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);
jrbedard
  • 524
  • 1
  • 6
  • 15
Roy Pun
  • 209
  • 1
  • 6

1 Answers1

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.

BokkyPooBah
  • 40,274
  • 14
  • 123
  • 193