patractlabs / redspot

Redspot is an Substrate pallet-contracts (ink!) development environment. Compile your contracts and run them on a different networks. Redspot's core forks from Hardhat but changed a lot to suit substrate.
https://redspot.patract.io/
Other
67 stars 22 forks source link

Allow contract to be queried at a specific block #176

Closed forgetso closed 2 years ago

forgetso commented 2 years ago

This allows the contract history to be queried via redspot.

atBlock can be specified as an optional parameter to a contractQuery function as follows.

        const query = !atBlock ? signedContract.query[contractMethodName] : signedContract.queryAt(atBlock, signedContract.abi.findMessage(contractMethodName))
        const response = await query(...encodedArgs)

This is a code extract from here.

forgetso commented 2 years ago

Thanks for merging!