Register v0.2.3 API Reference
Register
A contract that stores and manages network configuration details for various blockchain networks supported by CCIP (Cross-Chain Interoperability Protocol).
Structs
NetworkDetails
Contains configuration details for a specific network/chain.
| Field | Type | Description |
|---|---|---|
| chainSelector | uint64 | Unique identifier for the chain in CCIP |
| routerAddress | address | Address of the CCIP Router contract |
| linkAddress | address | Address of the LINK token contract |
| wrappedNativeAddress | address | Address of the wrapped native token contract |
| ccipBnMAddress | address | Address of the CCIP BnM token contract |
| ccipLnMAddress | address | Address of the CCIP LnM token contract |
| rmnProxyAddress | address | Address of the RMN proxy contract |
| registryModuleOwnerCustomAddress | address | Address of the registry module owner |
| tokenAdminRegistryAddress | address | Address of the token admin registry contract |
Variables
s_networkDetails
mapping(uint256 chainId => NetworkDetails) internal s_networkDetails
Functions
constructor
Initializes the contract with predefined network details for various supported chains.
constructor()
getNetworkDetails
Retrieves the network details for a specified chain ID.
function getNetworkDetails(uint256 chainId) external view returns (NetworkDetails memory networkDetails)
Parameters
| Parameter | Type | Description |
|---|---|---|
| chainId | uint256 | The ID of the chain to get details for |
Returns
| Type | Description |
|---|---|
NetworkDetails | The network configuration details for the chain |
setNetworkDetails
Sets or updates the network details for a specified chain ID.
function setNetworkDetails(uint256 chainId, NetworkDetails memory networkDetails) external
Parameters
| Parameter | Type | Description |
|---|---|---|
| chainId | uint256 | The ID of the chain to set details for |
| networkDetails | NetworkDetails | The network configuration details to be stored |