0

I am using web3.py, and i am trying to get block-specific data of some ERC20 token contracts. Also, i tried with Google's BigQuery, but both seem to give the totalSupply at the 'latest' block.

Is there any way to get the contract data/storage at a specific block? Or i need to calculate the changes of the totalSupply by running back on each mint from the current value, or running forward from the token's initial deployment?

0

you can specify the block to get the data from when calling or transacting using web3.py. here is an example :

token_contract.functions.myBalance().call(block_identifier=10)

If you can get the total supply from the contract(which i think u can) then this is your solution

1
  • Awesome! it got me exactly what i needed, Thanks!
    – GaryB
    Jul 20 at 18:23

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.