Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: init command support for starknet #455

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

xJonathanLEI
Copy link

As part of the effort of adding Starknet to The Graph Network, this PR adds a new protocol Starknet to the init command with 2 networks: starknet-mainnet and starknet-sepolia. It's built on the substreams-starknet crate.

Similar to Ethereum, this implementation bootstraps a full substreams project with 3 sinks: sql, clickhouse, and subgraph, all of which have been tested against firehose-starknet v0.2.2.

A notable difference from Ethereum is that, while the Starknet Firehose protocol does indeed provide access to contract events (which is how Starknet support in graph-node works after all), there is currently no complete ABI-based event decoding implementation in Rust for Starknet, making it difficult to generate an actually useful Starknet substreams project automatically.

Therefore, the template implemented in this PR simply tracks block metadata instead. These fields are indexed:

  • hash
  • prev_hash
  • height
  • timestamp
  • tx_count
  • event_count

Once we have the ABI decoding implementation ready, I will send another PR to change the template to track contracts instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant