Register v0.2.2 API Reference

Register

A contract that manages network configuration details for various blockchain networks, storing and retrieving network-specific parameters.

Register

Structs

NetworkDetails

Configuration details for a CCIP network.

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

Fields

FieldTypeDescription
chainSelectoruint64The unique identifier for the chain
routerAddressaddressThe address of the CCIP router contract
linkAddressaddressThe address of the LINK token
wrappedNativeAddressaddressThe address of the wrapped native token
ccipBnMAddressaddressThe address of the CCIP BnM token
ccipLnMAddressaddressThe address of the CCIP LnM token
rmnProxyAddressaddressThe address of the RMN proxy
registryModuleOwnerCustomAddressaddressThe address of the registry module owner custom contract
tokenAdminRegistryAddressaddressThe address of the token admin registry

Variables

s_networkDetails

mapping(uint256 chainId => NetworkDetails) internal s_networkDetails

Functions

constructor

Initializes the contract with predefined network configurations for various test networks.

constructor()

getNetworkDetails

Fetches the network configuration for a specified chain ID.

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

Parameters

ParameterTypeDescription
chainIduint256The ID of the chain to get the details for

Returns

ParameterTypeDescription
networkDetailsNetworkDetailsThe network details for the specified chain ID

setNetworkDetails

Updates or adds network configuration details for a specific chain ID.

function setNetworkDetails(uint256 chainId, NetworkDetails memory networkDetails) external

Parameters

ParameterTypeDescription
chainIduint256The ID of the chain to set the details for
networkDetailsNetworkDetailsThe network details to set for the specified chain ID

Get the latest Chainlink content straight to your inbox.