eth.rb
eth.rb copied to clipboard
Problem with fetching archive data
I want to use eth_call with a custom block number, which should return archive data. Unfortunately, I have found that in line https://github.com/q9f/eth.rb/blob/main/lib/eth/client.rb#L472 "latest" value is added.
Is it possible to put there block number instead of "latest" value?
yes, this is possible. you can try it out by changing latest
to a number of your choice and locally run bin/console
and test it out with get_balance
.
to make it applicable in general for the library, it requires some metaprogramming though.
maybe we can create a configuration that is set by default to latest
but can be overridden by some block number for the entire environment.
open for ideas.
@q9f please provide snippet, how to use it
Fixed in #268