Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with fetching archive data #264

Open
wafcio opened this issue Mar 18, 2024 · 2 comments
Open

Problem with fetching archive data #264

wafcio opened this issue Mar 18, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed refactor Improving the architecture

Comments

@wafcio
Copy link

wafcio commented Mar 18, 2024

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?

@q9f q9f added enhancement New feature or request help wanted Extra attention is needed refactor Improving the architecture labels Apr 16, 2024
@q9f
Copy link
Owner

q9f commented Apr 16, 2024

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.

@wafcio
Copy link
Author

wafcio commented Apr 16, 2024

@q9f please provide snippet, how to use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed refactor Improving the architecture
Projects
None yet
Development

No branches or pull requests

2 participants