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

ethclient: make CallContract also accept block hash #24354

Closed
wants to merge 5 commits into from

Conversation

zhiqiangxu
Copy link
Contributor

Client.CallContract should be aligned with PublicBlockChainAPI.Call so that the user can choose to call contract at specific height or block hash.

Constants like EarliestBlockNumber or LatestBlockNumber can still be used with minimal change .

@zhiqiangxu zhiqiangxu changed the title make CallContract also accepts block hash ethclient: make CallContract also accept block hash Feb 8, 2022
@fjl
Copy link
Contributor

fjl commented Feb 8, 2022

This change is not possible because it is an API change. If this functionality is required for your application, we need to create a new API method for it.

@fjl fjl removed the status:triage label Feb 8, 2022
@zhiqiangxu
Copy link
Contributor Author

zhiqiangxu commented Feb 8, 2022

This change is not possible because it is an API change. If this functionality is required for your application, we need to create a new API method for it.

I created another PR to create a new API method :

#24355

I found this method is required when trying to seamlessly and incrementally synchronize contract state to local database.

@fjl fjl closed this Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants