I am looking way to create a report on how specific function responses change block by block.
Something like:
const responses = []
for(let i = 0; i < blockNumberList.length; i++){
const blockNumber = blockNumberList[i]
const response = await contract.foo() // <-- should return response by block number
responses.push(response)
}
What I do now:
I have hardhat project with config like:
hardhat: {
forking: {
url: ''https://mainnet.infura.io/v3/key',
blockNumber: 13413700,
},
},
and function call like:
const response = contract.func()
If I change manually blocknumber and restart harhad console, I get different responses by blocknumber.
I am looking more efficient way to collect responses than collect then manually changing config.