API Version: v0.3.1

Register v0.3.1 API Reference

Register

A contract that stores and retrieves network details for various chains.

Register

Structs

NetworkDetails

Contains configuration details for a specific network/chain.

FieldTypeDescription
chainSelectoruint64Unique identifier for the chain in CCIP
routerAddressaddressAddress of the CCIP Router contract
linkAddressaddressAddress of the LINK token contract
wrappedNativeAddressaddressAddress of the wrapped native token contract
ccipBnMAddressaddressAddress of the CCIP BnM token contract
ccipLnMAddressaddressAddress of the CCIP LnM token contract
rmnProxyAddressaddressAddress of the RMN proxy contract
registryModuleOwnerCustomAddressaddressAddress of the registry module owner
tokenAdminRegistryAddressaddressAddress of the token admin registry contract

Variables

s_networkDetails

mapping(uint256 chainId => NetworkDetails) internal s_networkDetails

s_isOverridden

mapping(uint256 chainId => bool isOverridden) internal s_isOverridden

Functions

constructor

Initializes the contract.

constructor()

getNetworkDetails

Retrieves network details for a given 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

Sets the network details for a given 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

shardAddress

Returns the deterministic address of built-in data shard index.

function shardAddress(uint256 index) public view returns (address)

Parameters

ParameterTypeDescription
indexuint256The shard index (0 to _SHARD_COUNT - 1)

Get the latest Chainlink content straight to your inbox.