2

I want to check the DAO balance address in the specify time(block number)
Is it possible to specify the block number when calling a contract function in web3.

var contract = web3.eth.contract(abi).at(“0xbb9bc244d798123fde783fcc1c72d3bb8c189413″);        
contract.balanceOf(eth.coinbase);
1

The format the statement to get the contract.balanceOf(...) value is:

var preHardForkBlock = 1919999;
var daosPreHardFork = theDAO.balanceOf(address, preHardForkBlock);

See How can I verify that my The DAO token balance is correct when the Goodies provide an ETC refund on the Ethereum Classic chain? for a working example.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.