Subnet-EVM API
Subnet-EVM APIs are identical to
Coreth C-Chain APIs, except Avalanche Specific APIs
starting with avax
. Subnet-EVM also supports standard Ethereum APIs as well. For more
information about Coreth APIs see GitHub.
Subnet-EVM has some additional APIs that are not available in Coreth.
eth_feeConfig
Subnet-EVM comes with an API request for getting fee config at a specific block. You can use this API to check your activated fee config.
Signature:
blk
is the block number or hash at which to retrieve the fee config. Defaults to the latest block if omitted.
Example Call:
Example Response:
eth_getChainConfig
eth_getChainConfig
returns the Chain Config of the blockchain. This API is enabled by default with
internal-blockchain
namespace.
This API exists on the C-Chain as well, but in addition to the normal Chain Config returned by the
C-Chain eth_getChainConfig
on subnet-evm
additionally returns the upgrade config, which specifies
network upgrades activated after the genesis. Signature:
Example Call:
Example Response:
eth_getActivePrecompilesAt
DEPRECATED—instead use eth_getActiveRulesAt
.
eth_getActivePrecompilesAt
returns activated precompiles at a specific timestamp. If no
timestamp is provided it returns the latest block timestamp. This API is enabled by default with
internal-blockchain
namespace.
Signature:
timestamp
specifies the timestamp to show the precompiles active at this time. If omitted it shows precompiles activated at the latest block timestamp.
Example Call:
Example Response:
eth_getActiveRulesAt
eth_getActiveRulesAt
returns activated rules (precompiles, upgrades) at a specific timestamp. If no
timestamp is provided it returns the latest block timestamp. This API is enabled by default with
internal-blockchain
namespace.
Signature:
timestamp
specifies the timestamp to show the rules active at this time. If omitted it shows rules activated at the latest block timestamp.
Example Call:
Example Response:
Last updated on