Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
If a user writes a subgraph referencing contract addresses from (for example) a testnet, and then accidentally deploys the subgraph to a graph node running mainnet, the subgraph will run but won't find any events. We can provide a better experience using
eth_getTransactionCountto check that the contract addresses exist on the blockchain in use.I think it is technically possible to write a subgraph using contract addresses that are not yet present in the blockchain, but will eventually appear. Contract addresses are just a hash of the sender address and sender's nonce, so they could be determined ahead of time. This use case seems unusual however, and may not be something we want to support.
Open questions:
(thanks @leodasvacas for the suggestion)