read contract from specific blockstamp? #3995
Answered
by
zemse
dellwatson
asked this question in
Q&A
-
how to read contract functions from specific blockstamp? i did use connect and it's not working too on my react app
|
Beta Was this translation helpful? Give feedback.
Answered by
zemse
Apr 25, 2023
Replies: 1 comment 4 replies
-
To read from block height 1000, you'd use: const balanceLastMonthBlock = await ContractLastMonth.balanceOf(address, { blockTag: 1000 }); But keep in mind this only works if your backend supports archive mode, and unfortunately if you have a non-archive node, it is silently ignored and |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(30 * 24 * 60 * 60) / 13
Since this is not solidity, it's js, so you would get a floating point number. In order to get rid of the fractional part you need toMath.floor((30 * 24 * 60 * 60) / 13)