[request] Add `stopBlock` to manifest.
Heya, let me know if this is a good feature or not.
Essentially I think we should have the ability to set a stopBlock to a subgraph when listening to a contract.
Similarly to the startBlock the stopblock would tell us when to stop listening to a contract.
Example use case:
- you have a contract
lottery-v1and a subgraph. - for some reason you have to create a
lottery-v2. - you successfully copy today's data (current holders of tickets for example) from
lottery-v1tolottery-v2(lottery-v1 becomes deprecated). - The issue you have now is that you completely lost all the past transactions of
lottery-v1in the subgraph.
Adding both contracts to the subgraph will end up with a period where both contracts are being listened to and both would end up re-writing the same Entities in the subgraph.
Therefore I suggest adding a stopblock so it's possible to listen to contract lottery-v1 until the block number where lottery-v2 takes over. This way we keep the entities created by lottery-v1 and we keep going with the new contract.
Obviously this scenario is specific, but I believe there are more use-cases to this feature.
I think this is supported now?
https://github.com/graphprotocol/graph-node/issues/3504