Register v0.2.2 API Reference
Register
A contract that manages network configuration details for various blockchain networks, storing and retrieving network-specific parameters.
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
Field | Type | Description |
---|---|---|
chainSelector | uint64 | The unique identifier for the chain |
routerAddress | address | The address of the CCIP router contract |
linkAddress | address | The address of the LINK token |
wrappedNativeAddress | address | The address of the wrapped native token |
ccipBnMAddress | address | The address of the CCIP BnM token |
ccipLnMAddress | address | The address of the CCIP LnM token |
rmnProxyAddress | address | The address of the RMN proxy |
registryModuleOwnerCustomAddress | address | The address of the registry module owner custom contract |
tokenAdminRegistryAddress | address | The 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
Parameter | Type | Description |
---|---|---|
chainId | uint256 | The ID of the chain to get the details for |
Returns
Parameter | Type | Description |
---|---|---|
networkDetails | NetworkDetails | The 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
Parameter | Type | Description |
---|---|---|
chainId | uint256 | The ID of the chain to set the details for |
networkDetails | NetworkDetails | The network details to set for the specified chain ID |