githubEdit

eth_maxPriorityFeePerGas - Polygon

Example code for the eth_maxPriorityFeePerGas json-rpc method. Сomplete guide on how to use eth_maxPriorityFeePerGas json-rpc in GetBlock.io Web3 documentation.

The eth_maxPriorityFeePerGas method returns a suggested priority fee (tip) for EIP-1559 transactions. This value represents the amount validators receive as an incentive.

Parameters

  • None

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_maxPriorityFeePerGas",
    "params": [],
    "id": "getblock.io"
}'

Response

Response (application/json)
{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0x59682f00"
}

Response Parameters

Field
Type
Description

jsonrpc

string

JSON-RPC version (2.0)

id

string

Request identifier

result

varies

Suggested priority fee in wei as hexadecimal

Use Case

The eth_maxPriorityFeePerGas method is useful for:

  • EIP-1559 transactions

  • Dynamic fee calculation

  • Priority estimation

  • Fast confirmation

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

-32600

Invalid Request

Malformed request body

-32602

Invalid params

Invalid method parameters

Web3 Integration

Last updated

Was this helpful?