Skip to content

itsib/ethereum-blocks

 
 

Repository files navigation

EVM block indexer subgraph.

Every block is handled by one mapping handleBlock

The contract ConverterRegistryContract found in ABIs and subgraph.yaml is just a dummy contract used to pass formatting checks. Each block is handled automatically regardless of the logic in this contract.

References

Development

Install Dependencies

npm install

Code Generation

npm run codegen -- --chain-id 1

Build Subgraph

npm run build

Deploy

⚠️ For deployment the subgraph to hosted service you need the access token (deployment key). See: Store the Access Token

npm run deploy -- --name <subgraph-name> --token 5ec79a32a3d2cdc497eddfdcdac5ad44

or

npm run deploy -- -n <subgraph-name> -t 5ec79a32a3d2cdc497eddfdcdac5ad44

Token 5ec79a32a3d2cdc497eddfdcdac5ad44 is example, you need insert your access token for hosted service or studio.


--name: Subgraph name. Hosted service should contain '/'.

--token: Access token.

--version: Version label for studio project. Default v0.0.1

Clean

You can delete all generated files with the command:

npm run clean

Also, the cleanup is started before each code generation.


Enjoy yourself, you best developer!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 86.3%
  • Handlebars 8.3%
  • TypeScript 5.4%