This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const ResourceTypes = { | |
clay: 'clay', | |
coal: 'coal', | |
copper: 'copper', | |
diamond: 'diamond', | |
gold: 'gold', | |
iron: 'iron', | |
// silver: 'silver', | |
stone: 'stone', | |
wood: 'wood', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
type Address, | |
type ContractFunctionParameters, | |
createPublicClient, | |
encodePacked, | |
http, | |
keccak256, | |
namehash, | |
zeroAddress, | |
} from 'viem'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Processor } from './helpers'; | |
import * as rmrkEquippable from '../abi/rmrkEquippable'; | |
import { | |
getCollectionDatabaseId, | |
getEquippableGroupDatabaseId, | |
getTokenDatabaseId, | |
} from '../model/helpers'; | |
import { | |
CollectionValidParentEquippableGroupIdSetEventPayload, | |
EquippableGroup, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { EntityClass, FindOneOptions, Store } from '@subsquid/typeorm-store'; | |
import type { FindOptionsRelations, FindOptionsWhere } from 'typeorm'; | |
import { In } from 'typeorm'; | |
export const splitIntoBatches = <T>(array: T[], maxBatchSize: number): T[][] => { | |
const result: T[][] = []; | |
for (let i = 0; i < array.length; i += maxBatchSize) { | |
const chunk = array.slice(i, i + maxBatchSize); | |
result.push(chunk); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=========== | |
Taks 1: Mint Bitbob NFT. | |
Action: https://singular.app/bitbob | |
API to verify the task: | |
curl https://singular.app/api/bitget-bob-campaign/user-minted-bitbob-nft \ | |
-X POST \ | |
-H "Content-Type: application/json" \ | |
-d '{"address": "0xfbea1b97406C6945D07F50F588e54144ea8B684f"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Abi } from 'abitype'; | |
import { | |
AbiErrorSignatureNotFoundError, | |
BaseError, | |
ContractFunctionExecutionError, | |
type ContractFunctionExecutionErrorType, | |
ContractFunctionRevertedError, | |
decodeErrorResult, | |
InvalidInputRpcError, | |
type SimulateContractErrorType, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { graphqlRmrkIndexer } from 'lib/graphql/graphql-client'; | |
export const getPlotByIdQuery = graphqlRmrkIndexer( | |
` | |
query GetPlotByIdData($plotId: String!) { | |
nftById(id: $plotId) { | |
...NftFragment | |
} | |
} | |
`, |
NewerOlder