Register v0.2.1 API Reference

Register

Register maintains a registry of CCIP network configurations for different blockchain networks. This contract provides pre-configured settings for various test networks and allows custom network configurations.

Structs

NetworkDetails

struct NetworkDetails {
  uint64 chainSelector;
  address routerAddress;
  address linkAddress;
  address wrappedNativeAddress;
  address ccipBnMAddress;
  address ccipLnMAddress;
}

Configuration details for a CCIP-enabled network:

• chainSelector - Unique identifier for the blockchain network in CCIP • routerAddress - Address of the CCIP Router contract • linkAddress - Address of the LINK token contract • wrappedNativeAddress - Address of the wrapped native token • ccipBnMAddress - Address of the CCIP BnM token • ccipLnMAddress - Address of the CCIP LnM token

Variables

s_networkDetails

mapping(uint256 chainId => NetworkDetails) internal s_networkDetails

Stores network configurations indexed by chain ID. Contains pre-configured settings for test networks including Sepolia, Mumbai, Fuji, and others.

Functions

constructor

constructor() public

Initializes the contract with pre-configured network details for various test networks including:

  • Ethereum Sepolia (11155111)
  • Optimism Sepolia (11155420)
  • Polygon Mumbai (80001)
  • Avalanche Fuji (43113)
  • BNB Chain Testnet (97)
  • Arbitrum Sepolia (421614)
  • Base Sepolia (84532)
  • Wemix Testnet (1112)
  • Kroma Sepolia (2358)
  • Gnosis Chiado (10200)

getNetworkDetails

function getNetworkDetails(uint256 chainId) external view returns (NetworkDetails memory)

Retrieves the CCIP configuration for a specific blockchain network.

Parameters:

ParameterTypeDescription
chainIduint256The blockchain network ID to look up

Returns:

TypeDescription
NetworkDetailsThe network configuration details for the chain

setNetworkDetails

function setNetworkDetails(uint256 chainId, NetworkDetails memory networkDetails) external

Updates or adds CCIP configuration for a blockchain network.

Parameters:

ParameterTypeDescription
chainIduint256The blockchain network ID to configure
networkDetailsNetworkDetailsThe network configuration to set

Get the latest Chainlink content straight to your inbox.