Skip to content
New issue

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

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

Already on GitHub? # to your account

hotfix(contract): support state overrides for gas estimation #967

Merged

Conversation

shankinson
Copy link
Contributor

Motivation

When using a StateOverride with a CallBuilder to estimate_gas, the state overrides were not being applied.

i.e.
contract.function(args).state(state).estimate_gas().await;

Solution

If the state property has been set, apply the overrides when calling the provider estimate_gas method.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse merged commit b69b5a3 into alloy-rs:main Jun 25, 2024
22 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants