-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
provider.getFeeData().maxPriorityFeePerGas vs eth_maxPriorityFeePerGas different values #5093
Comments
Hey @JeremyX2022, can I confirm the version of |
|
I also post in ethers: ethers-io/ethers.js#4656 |
I can reproduce this locally. It appears that hardhat/packages/hardhat-ethers/src/internal/hardhat-ethers-provider.ts Lines 144 to 158 in dc6840c
We should update this logic to match the |
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
it should be noted that eth_maxPriorityFeePerGas was not originally part of the official Ethereum JSON-RPC specification and originally a go-ethereum only RPC method. It is now part of the execution api spec. |
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
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
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
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
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
Version of Hardhat
2.20
What happened?
Why the value of maxPriorityFeePerGas are different by using these two methods?
I tested it on the Ethereum mainnet
Minimal reproduction steps
goto hardhat console:
npx hardhat console --network mainnet
using following codes:
output:
You can see 'maxPriorityFeePerGas' in 'getFeeData' is different from the value of 'eth_maxPriorityFeePerGas' by using ethers.provider.
Search terms
No response
The text was updated successfully, but these errors were encountered: