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: use eth_maxPriorityFeePerGas for determing gas #5157

Merged
merged 1 commit into from May 9, 2024

Conversation

kanej
Copy link
Member

@kanej kanej commented Apr 22, 2024

Update getFeeData to match the ethers algorithm, specifically don't just assume 1_000_000_000n as the maxPriorityFeePerGas. Instead call eth_maxPriorityFeePerGas, and only fall back to 1_000_000_000n, if there is no response.

Fixes #5093

Copy link

changeset-bot bot commented Apr 22, 2024

🦋 Changeset detected

Latest commit: d62d268

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/hardhat-ethers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 7:05pm

Update `getFeeData` to match the `ethers` algorithm, specifically don't
just assume `1_000_000_000n` as the `maxPriorityFeePerGas`. Instead call
`eth_maxPriorityFeePerGas`, and only fall back to `1_000_000_000n` if
there is no response.

Fixes #5093
@kanej kanej force-pushed the fix/max-priority-fee-per-gas branch from 13ee80c to d62d268 Compare May 7, 2024 19:04
@kanej kanej marked this pull request as ready for review May 7, 2024 19:49
@kanej kanej requested review from alcuadrado and schaable May 7, 2024 19:49
@kanej kanej merged commit 1d43aba into main May 9, 2024
36 checks passed
@kanej kanej deleted the fix/max-priority-fee-per-gas branch May 9, 2024 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

provider.getFeeData().maxPriorityFeePerGas vs eth_maxPriorityFeePerGas different values
2 participants