hardhat-ignition
hardhat-ignition copied to clipboard
Expose blocknumber information for successful deployments to support creation of subgraphs
Reported on discord: https://discord.com/channels/750408878008827925/1153426756901032037/1212377098526924900
Building a subgraph requires knowing when to start indexing based on block number.
It should be possible to retrieve the block numbers of the successful transactions in the deployment.
The journal contains our on-chain interactions, including the hashes of our successful transactions. We should consider how we can expose that information and any other key transaction level metadata in Hardhat scripts and at the command line.
Perhaps an approach here is to enhance the return result from core's status function:
export interface GenericContractInfo extends DeployedContract {
sourceName: string;
abi: Abi;
deployedBlockNumber: number // <-- the block number of the successful deploy transaction
}
Alternatively we could provide a mechanism for getting transaction data from the log related to a future.
even I am facing a similar issue, and need to get the blockNumber for startBlock of the subquery