Add the dictionary to the indexer

You can improve the performance of the indexation part by using a dictionary endpoint instead of targeting directly the blockchain to get data. Under the hood, the Dictionary provides a list of relevant block heights containing the specific events and extrinsics.

Example: If you look at a createNft event, not every block will contain this event since it depends on users' usage of the Ternoa chain. When looking at events, the dictionary will provide the list that contains the createNft event we are looking for instead of every event of each block.

  • You can see in our repository what is the dictionary endpoint and how to add it.

Code snippet example: look at line 7

    file: ./schema.graphql
    genesisHash: '0x6859c81ca95ef624c9dfe4dc6e3381c33e5d6509e35e147092bfbc780f777c4e'
    endpoint: wss://
    - kind: substrate/Runtime
      startBlock: 1
        file: "./dist/index.js"
          - handler: handleEvent
            kind: substrate/EventHandler
              module: balances
              method: Transfer

Last updated