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.
Parameters
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"
}'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_getChainConfig",
"params": [],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/ext/bc/C/rpc',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data, null, 2)))
.catch(error => console.log(error));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
Use Cases
Error Handling
Status Code
Error Message
Cause
SDK Integration
Last updated
Was this helpful?