kodadot / rubick

Implementation SubSquid indexer for Kusama NFTs
https://github.com/kodadot/rubick
9 stars 15 forks source link

Setup local v2 #248

Open vikiival opened 1 year ago

vikiival commented 1 year ago
  1. fork subsquid/substrate-archive-setup
  2. update docker-compose.yml
    image: subsquid/substrate-ingest:firesquid
    command: [
       "-e", "wss://staging.node.rmrk.app",
       "-c", "10",
       "--start-block", "5228860", # uncomment to specify a non-zero start block
       "--prom-port", "9090",
       "--out", "postgres://postgres:postgres@db:5432/squid-archive"
    ]
  1. in processor.ts
const STARTING_BLOCK = 5_228_865; // 8788586
const ENDING_BLOCK = undefined; // 16261119;
processor.setTypesBundle('kusama');

processor.setBlockRange({ from: STARTING_BLOCK, to: ENDING_BLOCK });
processor.setDataSource({
    archive: "http://localhost:8888/graphql",
    chain: "wss://staging.node.rmrk.app"
});

Your node should be indexed in few min

  1. in nft-gallery override ksm (constants.ts)
export const apolloClientConfig = {
  ...defineApolloConfig(),
  subsquid: toApolloEndpoint(process.env.SUBSQUID_ENDPOINT || URLS.koda.rubick),
  bsx: toApolloEndpoint(URLS.koda.snek),
  movr: toApolloEndpoint(URLS.koda.click),
  snek: toApolloEndpoint(URLS.koda.snekRococo),
  glmr: toApolloEndpoint(URLS.koda.antick),
  ksm: toApolloEndpoint('http://localhost:4350/graphql'),
}