vechain-sdk-js
vechain-sdk-js copied to clipboard
💡 Contracts :: Read value for revision
Summary
We should be able to read values in smart contracts for a particular point in time, by providing a block ID or number as a revision.
Basic Example
const blockNumber = 1000;
const balance = await contract.read.balanceOf(
"0x3504c0089Ce44d5709BB97a957EC40C76F18dCdA", { revision: blockNumber}
);
Looks like this would require an interface change:
@darrenvechain what about making the options compatible to the ContractCallOptions
on executeContractCall
? It basically allows to do a simulation