# Register v0.3.0 API Reference
Source: https://docs.chain.link/chainlink-local/api-reference/v0.3.0/register

> For the complete documentation index, see [llms.txt](/llms.txt).

> **NOTE: Integrate Chainlink Local into your project**
>
> ### npm
>
> If you use [NPM](https://www.npmjs.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> npm install @chainlink/local@0.3.0
> ```
>
> ### yarn
>
> If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> yarn add @chainlink/local@0.3.0
> ```
>
> ### foundry
>
> If you use [Foundry](https://book.getfoundry.sh/):
>
> ```shell
> forge install smartcontractkit/chainlink-local@v0.3.0
> ```
>
> and then set remappings to: `@chainlink/local/=lib/chainlink-local/` in either `remappings.txt` or `foundry.toml` file
>
> ### RemixIDE
>
> Import the `CCIPLocalSimulator` contract from the `@chainlink/local` package:
>
> ```solidity
> import {CCIPLocalSimulator} from "@chainlink/local@0.3.0/src/ccip/CCIPLocalSimulator.sol";
> ```

## Register

CCIP network configuration registry.

[Register](https://github.com/smartcontractkit/chainlink-local/blob/v0.3.0/src/ccip/Register.sol)

## Structs

### NetworkDetails

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

## Variables

### \_SHARD\_COUNT

Number of generated data shards in RegisterData.sol.

```solidity
uint256 internal constant _SHARD_COUNT = 4
```

### s\_isOverridden

Whether `setNetworkDetails` was called for a chain ID.

```solidity
mapping(uint256 chainId => bool isOverridden) internal s_isOverridden
```

### s\_networkDetails

Network details set with `setNetworkDetails`, overriding the built-in ones.

```solidity
mapping(uint256 chainId => NetworkDetails) internal s_networkDetails
```

## Functions

### \_defaultNetworkDetails

Built-in network details for `chainId`, or an all-zero struct for an unknown
chain.

Decodes the generated data shards; shard addresses without code are skipped, so
a bare `new Register()` (no shards placed) only serves `setNetworkDetails`
overrides.

```solidity
function _defaultNetworkDetails(uint256 chainId) internal view returns (NetworkDetails memory);
```

### getNetworkDetails

Retrieves network details for a given chain ID.

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

**Parameters**

| Name      | Type      | Description                                   |
| --------- | --------- | --------------------------------------------- |
| `chainId` | `uint256` | - The ID of the chain to get the details for. |

**Returns**

| Name             | Type             | Description                                       |
| ---------------- | ---------------- | ------------------------------------------------- |
| `networkDetails` | `NetworkDetails` | - The network details for the specified chain ID. |

### setNetworkDetails

Sets the network details for a given chain ID.

```solidity
function setNetworkDetails(uint256 chainId, NetworkDetails memory networkDetails) external;
```

**Parameters**

| Name             | 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

Deterministic address of built-in data shard `index`; the simulator places each
shard there.

```solidity
function shardAddress(uint256 index) public view returns (address);
```