Skip to content

Instantly share code, notes, and snippets.

import { Address } from "viem";
export const BASE_REGISTRY_API_BASE_URL = "https://base.org/api/registry";
export const BASE_REGISTRY_API_ENDPOINTS = {
entries: "entries",
featured: "featured",
};
export const BASE_REGISTRY_API_ENTRIES_QUERY_PARAMS = {
//The page number (default 1)
```
import { useAccount, useReadContract } from 'wagmi';
import { type Address, erc20Abi } from 'viem';
import { SKYBREACH_LAND_CHAIN_ID } from 'lib/constants/app';
type Props = {
tokenAddress?: Address;
allowedAddress?: Address;
enabled?: boolean;
chainId?: typeof SKYBREACH_LAND_CHAIN_ID;
@Yuripetusko
Yuripetusko / decode-evm-transaction-error-result.ts
Created July 13, 2024 21:15
decode-evm-transaction-error-result.ts
import { Abi } from 'abitype';
import {
AbiErrorSignatureNotFoundError,
BaseError,
ContractFunctionExecutionError,
ContractFunctionExecutionErrorType,
ContractFunctionRevertedError,
SimulateContractErrorType,
WaitForTransactionReceiptErrorType,
WriteContractErrorType,
import fs from 'fs';
const fsPromises = fs.promises;
export const getOrCreateNdjosnLogFile = async <T>(path: string) => {
let response: T[] = [];
if (fs.existsSync(path)) {
const rawResponse = fs.readFileSync(path, 'utf-8');
if (rawResponse.length !== 0) {
response = rawResponse
import { graphqlRmrkIndexer } from 'lib/graphql/graphql-client';
export const getPlotByIdQuery = graphqlRmrkIndexer(
`
query GetPlotByIdData($plotId: String!) {
nftById(id: $plotId) {
...NftFragment
}
}
`,
import { mapTxErrorNameToErrorMessage } from './map-tx-error-name-to-error-message';
import { Abi } from 'abitype';
import {
AbiErrorSignatureNotFoundError,
BaseError,
ContractFunctionExecutionError,
ContractFunctionExecutionErrorType,
ContractFunctionRevertedError,
SimulateContractErrorType,
WaitForTransactionReceiptErrorType,
type Props = {
collectionId: EthereumAddress;
onSuccess?: (data: TransactionReceipt) => void;
onSettled?: (data?: TransactionReceipt) => void;
onError?: (error?: Error) => void;
network?: EVM_NETWORKS;
newOwner: EthereumAddress;
enabled?: boolean;
};
const snapshot = [
{ buyer: '0xdaf780714Ce4931f98129060445fC6Eb4Ab73bB1', price: '11' }
{ buyer: '0xdd3c0f408Cad52Ca1224cb52b97DaEa58b443fc1', price: '5' }
{ buyer: '0x7E884E885AC2Ec3241FeF4B560f7d1Aaedcc0E50', price: '9' }
{ buyer: '0x2ef04E03457C96BfDeD0a85a772013937301C1CC', price: '1' }
{ buyer: '0x47bFF18E462912Ab61a465b2bc229e3857491AA6', price: '25' }
{ buyer: '0x24A566a73F252C2ea9E9BAC5b6873CF3BA03f232', price: '15' }
{ buyer: '0x24A566a73F252C2ea9E9BAC5b6873CF3BA03f232', price: '15' }
{ buyer: '0xb4cE0c954bB129D8039230F701bb6503dca1Ee8c', price: '50' }
{ buyer: '0xC22d43928CDBd57b6725E669C1606B18a2bcE82A', price: '4' }

Linking my account Yuripetusko on GitHub with my address 5Cafn1kueAGQnrcvN2uHFQ5NaMznSMyrfeUzuDHDQsMRSsN6 on Substrate in mycryptoprofile.io, and the challenge code is: aea52155756bc58fe228f0db8e9c4ef3. #LitentryVerifyMyAddress

@Yuripetusko
Yuripetusko / snapshot.js
Last active June 16, 2022 23:55 — forked from stevyhacker/snapshot.js
NFT holders snapshot tool
import fetch from 'node-fetch';
import fs from 'fs';
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
const apiKey = "INSERT_YOUR_OWN_API_KEY_HERE"