eth_getChainConfig - AVAX

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

Returns the C-Chain runtime configuration — including all activated hard forks, fee config, and validator info. Avalanche-specific extension.

Parameters

  • None

Request Example

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

Response Example

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "chainId": 43114,
        "homesteadBlock": 0,
        "eip150Block": 0,
        "byzantiumBlock": 0,
        "constantinopleBlock": 0,
        "petersburgBlock": 0,
        "istanbulBlock": 0,
        "muirGlacierBlock": 0,
        "apricotPhase1BlockTimestamp": 1612230000,
        "apricotPhase2BlockTimestamp": 1620320400,
        "apricotPhase3BlockTimestamp": 1629839640,
        "apricotPhase4BlockTimestamp": 1633042200,
        "apricotPhase5BlockTimestamp": 1638203000,
        "banffBlockTimestamp": 1669144680,
        "cortinaBlockTimestamp": 1684339200,
        "durangoBlockTimestamp": 1712863200,
        "etnaTimestamp": 1727712000,
        "feeConfig": {
            "gasLimit": 15000000,
            "minBaseFee": 25000000000,
            "targetGas": 15000000,
            "baseFeeChangeDenominator": 36,
            "minBlockGasCost": 0,
            "maxBlockGasCost": 1000000,
            "targetBlockRate": 2,
            "blockGasCostStep": 200000
        }
    }
}

Response Parameters

Field
Type
Description

result.chainId

integer

Numeric chain ID (43114 mainnet, 43113 Fuji)

result.feeConfig

object

Dynamic fee configuration parameters

result.feeConfig.minBaseFee

integer

Minimum base fee in wei

result.feeConfig.gasLimit

integer

Block gas limit

result.feeConfig.targetBlockRate

integer

Target block production rate in seconds

result.*BlockTimestamp

integer

Activation timestamps for Avalanche upgrades (Apricot, Banff, Cortina, Durango, Etna)

Use Cases

  • Detecting which protocol upgrades are active

  • Adaptive fee oracles that respect the network's dynamic fee config

  • Tooling that needs to know the block gas limit and target rate

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?