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

fix(anvil): eth_gasPrice returned 1000000000 with --block-base-fee-per-gas 0, adds new --disable-min-priority-fee to return 0 #9049

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Oct 7, 2024

Motivation

Closes: #9033

Solution

Prefers a simple boolean flag to disable the enforcement rather than allowing the user to pass a priority fee of 0

Adds a new flag to disable min suggested priority fee: --disable-min-priority-fee

anvil --gas-price 0 --block-base-fee-per-gas 0 --disable-min-priority-fee
cast gas-price

Now yields 0 when the --disable-min-priority-fee is set

Without it still yields the MIN_SUGGESTED_PRIORITY_FEE:

pub const MIN_SUGGESTED_PRIORITY_FEE: u128 = 1e9 as u128;

@zerosnacks zerosnacks changed the title fix(anvil): eth_gasPrice returns 1000000000 on an anvil instance with --gas-price 0 --block-base-fee-per-gas 0, adds new --disable-min-priority-fee fix(anvil): eth_gasPrice returned 1000000000 with --block-base-fee-per-gas 0, adds new --disable-min-priority-fee to return 0 Oct 7, 2024
@zerosnacks zerosnacks marked this pull request as ready for review October 7, 2024 08:36
crates/anvil/src/cmd.rs Outdated Show resolved Hide resolved
@zerosnacks zerosnacks enabled auto-merge (squash) October 7, 2024 15:38
@zerosnacks zerosnacks merged commit e215f3f into master Oct 7, 2024
21 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/fix-ethgasprice-anvil branch October 7, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

bug(anvil): eth_gasPrice returns 1000000000 on an anvil instance with --gas-price 0 --block-base-fee-per-gas 0
3 participants