Description
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_getTransactionCount
to 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:
- error or just a warning?
- require at least one subgraph data source to have transaction(s) on chain, or all subgraph data sources to have transaction(s) on chain?
(thanks @leodasvacas for the suggestion)
Metadata
Metadata
Assignees
Type
Projects
Status