Skip to content

[To be deprecated in November once we move to new indexer solution]

Notifications You must be signed in to change notification settings

NEAR-DevHub/neardevhub-proposals-indexer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Near DevHub indexers

This repo keeps track of DevHub's indexers. DevHub makes use of two custom indexers

  1. The proposal indexer
  2. The post indexer (old feed)

View

QueryAPI has a QueryApi.App NEAR widget, hosted under the dataplatform.near account. With this component, you can see all the public indexers currently available on the Near blockchain.

Deploy

Important

In order to deploy indexers your account needs to be given permission.

Simply fork an existing indexer and press the publish button in the QueryApi.App widget. alt text

Tips:

  1. Once a indexer is deployed the schema can't be edited only forked. Make sure to deleted unused once. You don’t have to fork the indexer every time you fix the JS code – this is needed only if you need to use another SQL schema or want to completely wipe the indexer.

  2. Make sure to fork the indexer before editing the schema. It automatically makes some useful changes for you.

  3. The original way of writing data to the indexer was using GraphQL mutation. This generally works, but provides less flexibility and has poor performance. It is recommended to migrate to context.db methods. Try to use upsert extensively to allow your indexer to reindex same blocks.

Read more about the indexer in the docs

Read more about query api

Event Committee

On the event-committee side we tested on mainnet for while before wiping the contract state and redeploying/re-initializing the same contract. Which means you can NOT start the indexer at a random block. We found that block 118620288 is a good start to not index the test proposals and still index proposal 0.

About

[To be deprecated in November once we move to new indexer solution]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published