curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": []
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}curl --request POST \
--url https://monad-testnet.core.chainstack.com/9c5b265f20b3ea5df4f54f70eb74b800/ \
--header 'Content-Type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_maxPriorityFeePerGas",
"params": []
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": "<string>"
}noneresult — the suggested max priority fee per gas in wei, encoded as hexadecimal.eth_maxPriorityFeePerGas code examplesconst { ethers } = require("ethers");
const provider = new ethers.JsonRpcProvider("CHAINSTACK_NODE_URL");
async function getMaxPriorityFee() {
const maxPriorityFee = await provider.send("eth_maxPriorityFeePerGas", []);
console.log(`Max priority fee: ${parseInt(maxPriorityFee, 16)} wei`);
console.log(`Max priority fee: ${ethers.formatUnits(maxPriorityFee, "gwei")} gwei`);
}
getMaxPriorityFee();
eth_maxPriorityFeePerGas is dynamically setting the priority fee for EIP-1559 transactions to ensure competitive inclusion times while avoiding overpaying during low-congestion periods.Was this page helpful?