feat: init command support for starknet #455
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andstarknet-sepolia
. It's built on thesubstreams-starknet
crate.Similar to Ethereum, this implementation bootstraps a full substreams project with 3 sinks:
sql
,clickhouse
, andsubgraph
, all of which have been tested againstfirehose-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.