eth_maxPriorityFeePerGas
Ethereum API method that returns an estimate of the current priority fee per gas. This fee is the tip that users may pay miners,post-merge, to validators on top of the base fee to incentivize the inclusion of their transactions in a block. This method helps users adjust their transaction fees in a dynamic market, ensuring transactions are processed promptly without overpaying.
Get you own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.
You can sign up with your GitHub, X, Google, or Microsoft account.
none
quantity
— the estimated priority fee per gas needed, represented as a hexadecimal string.eth_maxPriorityFeePerGas
code examplesLearn more about the ChainstackProvider
in ethers.js
: ethers ChainstackProvider Documentation.
A practical use case for eth_maxPriorityFeePerGas
using ethers.js
is to calculate transaction fees dynamically for applications and wallets to accurately estimate the cost of transactions, especially during periods of high network congestion. This method ensures transactions are confirmed in a timely manner without overpaying. By fetching the current priority fee (maxPriorityFeePerGas
) and the maximum fee per gas (maxFeePerGas
), applications can dynamically calculate the total transaction fee required for prompt processing under the current network conditions.
The simulateTransaction
function showcases how to build a transaction with dynamically calculated fees based on the current network state, including the base and priority fees. This approach provides a more nuanced and accurate method for estimating the total transaction fee, ensuring users pay a fair amount based on real-time network conditions. It simulates the transaction’s execution to estimate gas usage without actually broadcasting it to the network, allowing for cost-effective transaction planning and testing. This simulation is particularly useful for applications that require a balance between transaction cost and confirmation speed, providing a comprehensive picture of the fees needed for timely transaction processing.
The estimated max priority fee per gas
The response is of type object
.
eth_maxPriorityFeePerGas
Ethereum API method that returns an estimate of the current priority fee per gas. This fee is the tip that users may pay miners,post-merge, to validators on top of the base fee to incentivize the inclusion of their transactions in a block. This method helps users adjust their transaction fees in a dynamic market, ensuring transactions are processed promptly without overpaying.
Get you own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.
You can sign up with your GitHub, X, Google, or Microsoft account.
none
quantity
— the estimated priority fee per gas needed, represented as a hexadecimal string.eth_maxPriorityFeePerGas
code examplesLearn more about the ChainstackProvider
in ethers.js
: ethers ChainstackProvider Documentation.
A practical use case for eth_maxPriorityFeePerGas
using ethers.js
is to calculate transaction fees dynamically for applications and wallets to accurately estimate the cost of transactions, especially during periods of high network congestion. This method ensures transactions are confirmed in a timely manner without overpaying. By fetching the current priority fee (maxPriorityFeePerGas
) and the maximum fee per gas (maxFeePerGas
), applications can dynamically calculate the total transaction fee required for prompt processing under the current network conditions.
The simulateTransaction
function showcases how to build a transaction with dynamically calculated fees based on the current network state, including the base and priority fees. This approach provides a more nuanced and accurate method for estimating the total transaction fee, ensuring users pay a fair amount based on real-time network conditions. It simulates the transaction’s execution to estimate gas usage without actually broadcasting it to the network, allowing for cost-effective transaction planning and testing. This simulation is particularly useful for applications that require a balance between transaction cost and confirmation speed, providing a comprehensive picture of the fees needed for timely transaction processing.
The estimated max priority fee per gas
The response is of type object
.