web3-eth icon indicating copy to clipboard operation
web3-eth copied to clipboard

Support call functions at block number

Open vinhnd2010 opened this issue 6 years ago • 1 comments

Pass BlockNumber value at the last of params list. Ex:

# creation of contract object
myContract = web3.eth.contract(abi);

# initiate contract for an address
myContractInstance = myContract.at('0x2ad180cbaffbc97237f572148fc1b283b68d8861');

# call constant function at block_number
result = myContractInstance.balanceOf([address], [block_number]); 
puts result 

vinhnd2010 avatar Jun 21 '18 17:06 vinhnd2010

@astudnev Please have a look. This PR solves the issue #16. Thanks!

vinhnd2010 avatar Jun 21 '18 17:06 vinhnd2010