Register v0.3.1 API Reference
Register
A contract that stores and retrieves network details for various chains.
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
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
| 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
Sets the network details for a given 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 |
shardAddress
Returns the deterministic address of built-in data shard index.
function shardAddress(uint256 index) public view returns (address)
Parameters
| Parameter | Type | Description |
|---|---|---|
| index | uint256 | The shard index (0 to _SHARD_COUNT - 1) |