GET
/
v2
/
chains
/
{chainId}
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.metrics.evm.chains.getChain({
    chainId: "43114",
  });

  // Handle the result
  console.log(result);
}

run();
{
  "evmChainId": 43114,
  "chainName": "c_chain",
  "blockchainId": "2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5",
  "subnetId": "11111111111111111111111111111111LpoYY",
  "network": "mainnet"
}

Path Parameters

chainId
string
required

A supported evm chain id. Use the /chains endpoint to get a list of supported chain ids.

Response

200
application/json
Successful response
evmChainId
number
required

EVM ChainID for the blockchain.

chainName
string
required

Blockchain alias for easy identification of blockchains.

blockchainId
string
required

Unique blockchain ID for this blockchain.

subnetId
string
required

Subnet ID this blockchain belongs to.

network
enum<string>
required

Network on which this blockchain or subnet is created on.

Available options:
mainnet,
testnet