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_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:
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.
timestamp specifies the timestamp to show the precompiles active at this time. If omitted it shows precompiles activated at the latest block timestamp.
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.
This API retrieves the list of current validators for the Subnet/L1. It provides detailed information about each validator, including their ID, status, weight, connection, and uptime.
validationID: (string) Unique identifier for the validation. This returns validation ID for L1s, AddSubnetValidator txID for Subnets.
nodeID: (string) Node identifier for the validator.
weight: (integer) The weight of the validator, often representing stake.
startTimestamp: (integer) UNIX timestamp for when validation started.
isActive: (boolean) Indicates if the validator is active. This returns true if this is L1 validator and has enough continuous subnet staking fees in P-Chain.
It always return true for subnet validators.
isL1Validator: (boolean) Indicates if the validator is a L1 validator or a subnet validator.
isConnected: (boolean) Indicates if the validator node is currently connected to the callee node.
uptimeSeconds: (integer) The number of seconds the validator has been online.
uptimePercentage: (float) The percentage of time the validator has been online.