eth_maxPriorityFeePerGas - Base

Example code for the eth_maxPriorityFeePerGas JSON-RPC method. Complete guide on how to use eth_maxPriorityFeePerGas JSON-RPC in GetBlock Web3 documentation.

The eth_maxPriorityFeePerGas method returns a suggested max priority fee per gas (tip) for EIP-1559 transactions. On Base, priority fees are typically low since the sequencer processes transactions in order of receipt.

Parameters

  • None

Request

cURL
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

Example Response
{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": "0xf4240"
}

Response Parameters

Parameter
Type
Description

jsonrpc

string

JSON-RPC protocol version ("2.0")

id

string

Request identifier matching the request

result

string

Suggested max priority fee per gas in wei (hex)

Use Cases

1

Fee Estimation

Get suggested priority fee for transactions.

2

EIP-1559 Transactions

Set appropriate priority fee.

3

Cost Optimization

Balance speed vs cost.

4

Gas Strategies

Implement dynamic fee strategies.

Error Handling

Error Code
Message
Description

-32603

Internal error

Node internal failure

Web3 Integration

Last updated

Was this helpful?