# Enable your tokens in CCIP (Lock & Mint): Register from an EOA using Hardhat
Source: https://docs.chain.link/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-lock-mint-hardhat
Last Updated: 2026-04-24

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

## Guide Versions

- [Foundry (Lock & Mint)](/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-lock-mint-foundry)

- [Hardhat (Lock & Mint)](/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-lock-mint-hardhat)

In this tutorial you will:

1. Deploy a token on two chains using [Hardhat](https://hardhat.org/).
2. Set up a `Lock & Release` token pool on the source chain and a `Burn Mint` token pool on the destination chain.
3. Configure and activate the pools in CCIP so your token becomes a Cross-Chain Token (CCT).
4. (Optional) Test the setup by minting and transferring tokens across networks.

> **NOTE: If you do not explicitly configure these features, default behavior applies**
>
> 1. **Default finality:** Transfers use the chain's native finality (equivalent to omitting `finality` or using `finality=finalized`) unless you opt into faster than finality via `finality` (for example, `finality=32`).
> 2. **Opt-in changes.** New v2 behavior only applies when you explicitly configure it (for example,
>    pool-level fees or faster than finality).

## Before You Begin

### 1. Set up your development environment

1. Install Node.js and npm:
   - Make sure you have `Node.js v22.10.0` or above installed. If not, install **`Node.js v22.10.0`** using their [documentation](https://nodejs.org/en/download/).
   - `npm` is bundled with Node.js. If you can’t run `npm`, reinstall/update Node.js from the official installer.

2. Install/Update [Chainlink CCIP-CLI](https://docs.chain.link/ccip/tools/cli/), you can also find the [GitHub repository here](https://github.com/smartcontractkit/ccip-cli).

```bash filename="Terminal"
npm install -g @chainlink/ccip-cli
```

Verify the installation by running the following command:

```bash filename="Terminal"
ccip-cli --version
```

3. **Clone the repository and navigate to the project directory**:

[CCIP 2.0 template](https://github.com/smartcontractkit/docs-cct-hardhat)

Clone the CCIP 2.0 Hardhat template for a smoother setup.

```bash filename="Terminal"
git clone https://github.com/smartcontractkit/docs-cct-hardhat.git
cd docs-cct-hardhat
```

4. Create a `.env` file by copying the `.env.example` file, and fill in the required values:

```bash filename="Terminal"
cp .env.example .env
```

```bash filename=".env"
# Keystore name (created via `npx hardhat keystore set`)
KEYSTORE_NAME=<your_private_key_name>

# RPC URLs (add the ones you need)
ETHEREUM_SEPOLIA_RPC_URL=your_eth_sepolia_rpc
ARBITRUM_SEPOLIA_RPC_URL=your_arbitrum_sepolia_rpc

# Etherscan API key (required only if you pass --verify to deployment tasks)
ETHERSCAN_API_KEY=your_etherscan_api_key
```

[Complete List of Supported Chains](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/helper-config.ts)

View the complete list of supported chains in the `helper-config.ts` file.

5. To make sure your terminal has access to these variables, run the following command:

```bash filename="Terminal"
source .env
```

6. Build the project:

```bash filename="Terminal"
npm install && npx hardhat compile
```

7. Create an encrypted Hardhat keystore, if you haven't already:

```bash filename="Terminal"
npx hardhat keystore set <your_private_key_name>
```

> **CAUTION: Private key format**
>
> When prompted for your private key, include the `0x` prefix.

> **NOTE: Note**
>
> 1. Hardhat prompts for a keystore password: set it on first use, or enter it to unlock on subsequent uses. Then it
>    asks you to enter your private key as hidden text.
> 2. The name you choose (e.g. `PRIVATE_KEY`) is what you set as `KEYSTORE_NAME` in `.env`.
> 3. Use `npx hardhat keystore list` to check previously created keystores.

### 2. How to configure deployment parameters?

Deployment parameters can be configured in two ways:

1. Edit the `.json` files in `input/`.
2. Pass CLI flags inline at runtime.

> **Note:** CLI flags take precedence over `.json` file values.

#### Token Deployment Configuration

Default values live in `input/token.json`:

```json filename="input/token.json"
{
  "name": "BnM Test",
  "symbol": "BnM-T",
  "decimals": 18,
  "maxSupply": 0,
  "preMint": 0,
  "tokenAmountToMint": 1000000000000000000000,
  "tokenAmountToTransfer": 1000000000000000000
}
```

Deployment fields can be overridden with CLI flags:

| Flag          | Overrides (`token.json`) | Description                                   |
| ------------- | ------------------------ | --------------------------------------------- |
| `--name`      | `.name`                  | Token name                                    |
| `--symbol`    | `.symbol`                | Token symbol                                  |
| `--decimals`  | `.decimals`              | Decimal places (usually `18`)                 |
| `--maxsupply` | `.maxSupply`             | Max supply in smallest unit (`0` = unlimited) |
| `--premint`   | `.preMint`               | Amount pre-minted to deployer (`0` = none)    |

#### (Optional) Advanced Pool Hooks

> **NOTE: What are advanced pool hooks?**
>
> [Advanced Pool
> Hooks](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/AdvancedPoolHooks.sol)
> are an optional security layer you can attach to a token pool. They run checks:
>
> 1. **before** tokens are locked/burned (source chain)
> 2. **before** tokens are released/minted (destination chain)
>
> Most deployments do **not** need a hook. You would attach one only if you want to:
>
> - Make it so that only certain addresses can transfer your token cross-chain.
> - Put in place additional checks for large transfers above a threshold amount.
> - Plug in an external policy engine for custom compliance checks.

Default values live in `input/advanced-pool-hooks.json`:

```json filename="input/advanced-pool-hooks.json"
{
  "allowlist": [],
  "thresholdAmount": 0,
  "policyEngine": "0x0000000000000000000000000000000000000000",
  "authorizedCallers": []
}
```

All fields can be overridden with CLI flags:

| Flag                  | Overrides (`advanced-pool-hooks.json`) | Description                                                                              |
| --------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------- |
| `--allowlist`         | `.allowlist`                           | Addresses allowed to transfer (comma-separated)                                          |
| `--thresholdamount`   | `.thresholdAmount`                     | Threshold amount after which additional hook checks/policy checks may apply (`0` = none) |
| `--policyengine`      | `.policyEngine`                        | Policy engine contract address                                                           |
| `--authorizedcallers` | `.authorizedCallers`                   | Addresses authorized to call the hooks (comma-separated)                                 |

> **Note:** To configure an `AdvancedPoolHooks` sender allowlist, follow [Configure a sender allowlist with AdvancedPoolHooks using Hardhat](/ccip/evm/tutorials/cross-chain-tokens/configure-sender-allowlist-advanced-pool-hooks-hardhat). For an overview of the other hook capabilities, read [Advanced Pool Hooks](/ccip/concepts/cross-chain-token/advanced-pool-hooks).

## Tutorial

### Prerequisites

> **CAUTION: Before you continue**
>
> - **Sepolia ETH**: required for Sepolia transactions (deploy/configure/send).
> - **Arbitrum Sepolia ETH**: required for Arbitrum Sepolia transactions (deploy/configure).
> - **LINK (optional)**: if you plan to pay for the cross-chain transfer with `LINK`, fund the sender
>   wallet with testnet LINK on the **source chain**.&#x20;
> - You can use our [faucet](https://faucets.chain.link/) to get testnet LINK.

**Already have deployments? Skip only what you already have:**

- If you already have tokens deployed on **both** chains, skip **Deploy Tokens**.
- If you have deployed tokens but not the corresponding pools and lockbox, you must still run **Deploy Token Pools** before continuing.
- If you already have tokens deployed on **both** chains, **V2-compatible** token pools deployed on **both** chains, and the lockbox deployed on the **Lock & Release** side (Ethereum Sepolia), skip both sections and move straight on to [Enablement](#enablement).

**If you already have a V1 token pool deployed and want to use newer features or prepare for lane migration:**

- You will need to deploy a **V2-compatible token pool**
- Your existing V1 pool can continue to support current transfers
- Follow the migration guide to upgrade your setup without disrupting your existing deployment

> **Read**: [Migrate from V1 to V2 token pools](/ccip/evm/tutorials/cross-chain-tokens/migrate-from-v1-to-v2-lock-mint-foundry)

Before continuing, export the relevant addresses so subsequent tasks can find them:

```bash filename="Terminal"
export ETHEREUM_SEPOLIA_TOKEN=<your_token_address_on_sepolia>
export ARBITRUM_SEPOLIA_TOKEN=<your_token_address_on_arbitrum_sepolia>

export ETHEREUM_SEPOLIA_TOKEN_POOL=<your_token_pool_address_on_sepolia>
export ARBITRUM_SEPOLIA_TOKEN_POOL=<your_token_pool_address_on_arbitrum_sepolia>
```

#### 1. Deploy Tokens

> **TIP: Already have tokens deployed?**
>
> 1. Your source chain token (canonical token) does **NOT** need to support the burn and mint functions (this tutorial
>    deploys a Lock & Release pool on the source chain), but,
> 2. Both tokens must implement either `getCCIPAdmin()` or OpenZeppelin's `owner()` so the `Claim Admin Role` step can
>    identify the token administrator.

Use the `deployToken` task to deploy your tokens on two testnets, Ethereum Sepolia and Arbitrum Sepolia. The destination chain token (Arbitrum Sepolia) implements the [`IBurnMintERC20`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/interfaces/IBurnMintERC20.sol) interface, which exposes the `mint` and `burn` functions that the Burn & Mint token pool later calls during cross-chain transfers. The source chain token (Ethereum Sepolia) does not need burn/mint support; it is locked in the lockbox by the Lock & Release pool.

> **Note:** The task reads the `input/token.json` file to get the token name, symbol, decimals, maximum supply, and pre-mint amount. \
> You can also override these values by providing CLI flags at runtime. \
> See [how to configure deployment parameters](/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-lock-mint-hardhat#token-deployment-configuration) for more details.

[deployToken.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/deploy/deployToken.ts)

View the deployment task on GitHub.

1. Deploy token on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat deployToken --network sepolia --rolesrecipient <your_desired_address> --verify
```

> **NOTE: Please note**
>
> 1. `--verify` requires `ETHERSCAN_API_KEY` to be set.
> 2. `--rolesrecipient` is an optional flag. If not provided, the task will use the deployer's address as
>    the roles recipient.

Your output should look something like this:

```bash filename="Terminal"
========================================
🪙 Deploy Token
========================================
Chain:        Ethereum Sepolia
Action:       Deploy CrossChainToken
========================================

Token Parameters:
  Name:       BnM Test
  Symbol:     BnM-T
  Decimals:   18
  Max Supply: 0
  Pre-Mint:   0

  Pre-mint Recipient: 0xYourdesignatedAddressForPreMint
  CCIP Admin:         0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Deploying BnM Test (BnM-T) on Ethereum Sepolia
⏳ Deployment tx: 0x7d2f5d7f4b7c9f3b5b8f6a4b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d
   Waiting for 2 confirmation(s)...
Token deployed at: 0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D

[Step 2] Granting mint and burn roles to: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
   Waiting for 2 confirmation(s)...
✅ Roles granted successfully!

========================================
✅ Deployment Complete on Ethereum Sepolia!
========================================
Token Address: 0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
========================================
```

After deployment, the token address is automatically saved to:

```bash
deployments/tokens/{CHAIN_NAME_IDENTIFIER}/{timestamp}-{SYMBOL}-Token.json
```

1. The file uses the env var name as the key (for example, `ETHEREUM_SEPOLIA_TOKEN`).

2. You can copy the key and value directly into an `export` command.

3. The `deployments/` directory is ignored by `.gitignore`, so these files stay local to each user.

4. Deploy token on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat deployToken --network arbitrumSepolia --rolesrecipient <your_desired_address> --verify
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🪙 Deploy Token
========================================
Chain:        Arbitrum Sepolia
Action:       Deploy CrossChainToken
========================================

Token Parameters:
  Name:       BnM Test
  Symbol:     BnM-T
  Decimals:   18
  Max Supply: 0
  Pre-Mint:   0

  Pre-mint Recipient: 0xYourdesignatedAddressForPreMint
  CCIP Admin:         0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Deploying BnM Test (BnM-T) on Arbitrum Sepolia
⏳ Deployment tx: 0xc2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7
   Waiting for 2 confirmation(s)...
Token deployed at: 0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
https://sepolia.arbiscan.io/address/0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c

[Step 2] Granting mint and burn roles to: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
   Waiting for 2 confirmation(s)...
✅ Roles granted successfully!

========================================
✅ Deployment Complete on Arbitrum Sepolia!
========================================
Token Address: 0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
https://sepolia.arbiscan.io/address/0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
========================================
```

After deployment, the token address is automatically saved to:

```bash
deployments/tokens/{CHAIN_NAME_IDENTIFIER}/{timestamp}-{SYMBOL}-Token.json
```

3. Set the environment variables for the deployed token addresses:

> **NOTE: Why do I need to export these?**
>
> 1. Deployment addresses are persisted locally under `deployments/`, but each task still reads values from
>    your current shell environment.
> 2. Run the `export` commands so subsequent tasks in this terminal session can discover the correct
>    addresses.
> 3. You can also pass the addresses directly via `--tokenaddress` / `--tokenpool` flags on any task that requires
>    them.

```bash filename="Terminal"
export ETHEREUM_SEPOLIA_TOKEN=0x...
export ARBITRUM_SEPOLIA_TOKEN=0x...
```

#### 2. Deploy Token Pools

This tutorial deploys:

- A Lock & Release token pool on the source chain (Ethereum Sepolia)
- A Burn & Mint token pool on the destination chain (Arbitrum Sepolia)
- An `ERC20LockBox` to hold token liquidity on behalf of the Lock & Release token pool on the source chain.
- On the destination chain, the tokens are simply burnt or minted as required by the Burn & Mint token pool.

> **NOTE: Note**
>
> These tasks deploy `V2` token pools that unlock new features as part of CCIP 2.0. Check out how to use these new
> features in the following sections.

##### Deploy ERC20LockBox (Ethereum Sepolia)

The [`ERC20LockBox`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/ERC20LockBox.sol) holds token liquidity on behalf of the [`LockReleaseTokenPool`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/LockReleaseTokenPool.sol). It must be deployed before the pool.

[deployERC20LockBox.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/deploy/deployERC20LockBox.ts)

View the lockbox deployment task on GitHub.

1. Deploy the ERC20LockBox on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat deployERC20LockBox --network sepolia --verify
```

Your output should look something like this:

```bash filename="Terminal"
========================================
📦 Deploy ERC20 LockBox
========================================
Chain:        Ethereum Sepolia
Action:       Deploy ERC20 lockbox
========================================

ERC20LockBox Parameters:
  Token: 0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Authorized Callers: None (add after deploying the token pool)

[Step 1] Deploying ERC20LockBox on Ethereum Sepolia
⏳ Deployment tx: 0x5f0b4a3c2d1e0f9a8b7c6d5e4f3a2b1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a
   Waiting for 2 confirmation(s)...
ERC20LockBox deployed at: 0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
https://sepolia.etherscan.io/address/0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
✅ ERC20LockBox deployed successfully!

========================================
✅ Deployment Complete on Ethereum Sepolia!
========================================
ERC20LockBox Address: 0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
https://sepolia.etherscan.io/address/0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b

Copy this address to use in the next command:
  --lockbox 0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
========================================
```

After deployment, the lockbox address is automatically saved to:

```bash
deployments/lock-boxes/{CHAIN_NAME_IDENTIFIER}/{timestamp}-{SYMBOL}-LockBox.json
```

2. Set the environment variable for the deployed lockbox address:

```bash filename="Terminal"
export LOCK_BOX=0x...
```

##### Deploy Lock & Release Token Pool (Ethereum Sepolia)

Use the `deployLockReleaseTokenPool` task to [deploy a Lock & Release token pool](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/LockReleaseTokenPool.sol) on the source chain. A `LockReleaseTokenPool` locks tokens in the `ERC20LockBox` on the source chain during outbound transfers and releases escrowed tokens during inbound transfers.

[deployLockReleaseTokenPool.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/deploy/deployLockReleaseTokenPool.ts)

View the Lock & Release token pool deployment task on GitHub.

1. Deploy a Lock & Release token pool for the deployed token on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat deployLockReleaseTokenPool --lockbox $LOCK_BOX --network sepolia --verify
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔐 Deploy Lock & Release Token Pool
========================================
Chain:        Ethereum Sepolia
Action:       Deploy LockReleaseTokenPool
========================================

Token Pool Parameters:
  Token:       0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Decimals:    18
  Router:      0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
  RMN Proxy:   0xba3f6251de62dED61Ff98590cB2fDf6871FbB991
  LockBox:     0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
  Pool Hooks:  None (0x0)

[Step 1] Deploying LockReleaseTokenPool on Ethereum Sepolia
⏳ Deployment tx: 0x0a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b
   Waiting for 2 confirmation(s)...
Token Pool deployed at: 0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
https://sepolia.etherscan.io/address/0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
✅ LockReleaseTokenPool deployed successfully!

========================================
✅ Deployment Complete on Ethereum Sepolia!
========================================
Token Pool Address: 0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
https://sepolia.etherscan.io/address/0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
========================================
```

After deployment, the pool address is automatically saved to:

```bash
deployments/token-pools/{CHAIN_NAME_IDENTIFIER}/{timestamp}-{SYMBOL}-LockReleaseTokenPool.json
```

2. Set the environment variable for the deployed pool address:

```bash filename="Terminal"
export ETHEREUM_SEPOLIA_TOKEN_POOL=0x...
```

##### Authorize Pool on LockBox (Ethereum Sepolia)

The pool must be authorized as a caller on the lockbox before it can deposit and withdraw tokens during cross-chain transfers.

[updateAuthorizedCallers.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/configure/authorized-callers/updateAuthorizedCallers.ts)

View the authorized callers task on GitHub.

1. Authorize the token pool on the lockbox:

```bash filename="Terminal"
npx hardhat updateAuthorizedCallers --lockbox $LOCK_BOX --add $ETHEREUM_SEPOLIA_TOKEN_POOL --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
📝 Update Authorized Callers
========================================
Chain:        Ethereum Sepolia
LockBox:      0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
Action:       Update authorized callers
========================================

Adding 1 caller(s):
  [0] 0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567

[Step 1] Applying authorized caller updates on Ethereum Sepolia
⏳ Tx: 0xb1c2d3e4f5a678901234567890abcdef012345678901234567890abcdef012345

========================================
✅ Authorized callers updated on Ethereum Sepolia!
========================================
LockBox:      https://sepolia.etherscan.io/address/0x1c0b9A8f7E6d5C4b3A2f1E0d9C8b7A6f5E4d3C2b
Transaction:  0xb1c2d3e4f5a678901234567890abcdef012345678901234567890abcdef012345
========================================
```

##### Deploy Burn & Mint Token Pool (Arbitrum Sepolia)

Use the `deployTokenPool` task to [deploy a Burn & Mint token pool](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/BurnMintTokenPool.sol) on the destination chain. A `BurnMintTokenPool` burns tokens on the source chain and mints the equivalent amount on the destination chain, so the pool must hold the destination token's mint and burn roles, which the task grants automatically after deployment.

[deployBurnMintTokenPool.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/deploy/deployBurnMintTokenPool.ts)

View the deployment task on GitHub.

1. Deploy a Burn & Mint token pool on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat deployTokenPool --network arbitrumSepolia --verify
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔥⚒️  Deploy Burn & Mint Token Pool
========================================
Chain:        Arbitrum Sepolia
Action:       Deploy BurnMintTokenPool
========================================

Token Pool Parameters:
  Token:       0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
  Decimals:    18
  Router:      0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165
  RMN Proxy:   0x9527E2d01A3064ef6b50c1Da1C0cC523803BCFF2
  Pool Hooks:  None (0x0)

[Step 1] Deploying BurnMintTokenPool on Arbitrum Sepolia
⏳ Deployment tx: 0xd3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708
   Waiting for 2 confirmation(s)...
Token Pool deployed at: 0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d

[Step 2] Granting mint and burn roles to token pool: 0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
   Waiting for 2 confirmation(s)...
✅ Roles granted successfully!

========================================
✅ Deployment Complete on Arbitrum Sepolia!
========================================
Token Pool Address: 0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

> **NOTE: Token role-grant fallback**
>
> 1. The task attempts to call `grantMintAndBurnRoles` on the token to grant the pool mint and burn rights.
> 2. If the token does not implement this function, the task prints instructions to grant the roles manually.

##### Set environment variables

Set the environment variables for the deployed token pool addresses:

```bash filename="Terminal"
export ETHEREUM_SEPOLIA_TOKEN_POOL=0x...
export ARBITRUM_SEPOLIA_TOKEN_POOL=0x...
```

### Enablement

These steps configure your token pools and activate them under the CCIP protocol so your token becomes a truly Cross-Chain Token (CCT).

#### 1. Claim Admin Role

Use the `claimAdmin` task to register your EOA as the administrator for the deployed tokens on both chains. \
This process involves interacting with the [`RegistryModuleOwnerCustom`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/tokenAdminRegistry/RegistryModuleOwnerCustom.sol) contract to set up your EOA as the admin.

> **NOTE: Supported admin patterns**
>
> The task auto-detects how your token exposes its admin and uses the appropriate registration method:
>
> 1. If your token implements `getCCIPAdmin()`, the task calls `registerAdminViaGetCCIPAdmin()`.
> 2. If your token uses OpenZeppelin's `Ownable` pattern (`owner()`), the task calls `registerAdminViaOwner()` instead.
>
> No extra configuration is needed: both patterns are fully supported.

[claimAdmin.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/setup/claimAdmin.ts)

View the admin claim task on GitHub.

1. Claim the Admin role for the token on Ethereum Sepolia:

> **NOTE: Note**
>
> If you don't pass `--ccipadmin`, the task defaults to the address of the account broadcasting the
> transaction.

```bash filename="Terminal"
npx hardhat claimAdmin --network sepolia --ccipadmin <your_desired_address>
```

Your output should look something like this:

```bash filename="Terminal"
========================================
👑 Claim Token Admin
========================================
Chain:        Ethereum Sepolia
Action:       Claim token admin
========================================

Claim Admin Parameters:
  Token:           0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Current Admin:   0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Expected Admin:  0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Registry Module: 0xa3c796d480638d7476792230da1E2ADa86e031b0
  Admin Method:    getCCIPAdmin()

[Step 1] Claiming admin via getCCIPAdmin() on Ethereum Sepolia
⏳ Tx: 0x1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f809

========================================
✅ Admin Claim Complete on Ethereum Sepolia!
========================================
Token:         https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
Transaction:   0x1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7f809
Admin Address: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
========================================
```

2. Claim the Admin role for the token on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat claimAdmin --network arbitrumSepolia --ccipadmin <your_desired_address>
```

Your output should look something like this:

```bash filename="Terminal"
========================================
👑 Claim Token Admin
========================================
Chain:        Arbitrum Sepolia
Action:       Claim token admin
========================================

Claim Admin Parameters:
  Token:           0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
  Current Admin:   0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Expected Admin:  0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Registry Module: 0xaD417c0611dBD225471D31F056b8B6beC1CBC153
  Admin Method:    getCCIPAdmin()

[Step 1] Claiming admin via getCCIPAdmin() on Arbitrum Sepolia
⏳ Tx: 0x9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8

========================================
✅ Admin Claim Complete on Arbitrum Sepolia!
========================================
Token:         https://sepolia.arbiscan.io/address/0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
Transaction:   0x9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8
Admin Address: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
========================================
```

#### 2. Accept Admin Role

Use the `acceptAdminRole` task to accept the admin role for the deployed tokens on both chains.
Once you have claimed the role, accepting the role finalizes your control over the token administration via the [`TokenAdminRegistry`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/tokenAdminRegistry/TokenAdminRegistry.sol).

[acceptAdminRole.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/setup/acceptAdminRole.ts)

View the admin acceptance task on GitHub.

1. Accept the admin role for the token on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat acceptAdminRole --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
👑 Accept Admin Role
========================================
Chain:        Ethereum Sepolia
Action:       Accept admin role
========================================

Accept Admin Role Parameters:
  Token:                 0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Token Admin Registry:  0x95F29FEE11c5C55d26cCcf1DB6772DE953B37B82
  Pending Administrator: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Signer:                0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Accepting admin role for token on Ethereum Sepolia
⏳ Tx: 0x0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0

========================================
✅ Admin Role Accepted on Ethereum Sepolia!
========================================
Token:            https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
Transaction:      0x0f1e2d3c4b5a69788796a5b4c3d2e1f00f1e2d3c4b5a69788796a5b4c3d2e1f0
New Administrator: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
========================================
```

2. Accept the admin role for the token on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat acceptAdminRole --network arbitrumSepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
👑 Accept Admin Role
========================================
Chain:        Arbitrum Sepolia
Action:       Accept admin role
========================================

Accept Admin Role Parameters:
  Token:                 0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
  Token Admin Registry:  0x8126bE56454B628a88C17849B9ED99dd5a11Bd2f
  Pending Administrator: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Signer:                0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Accepting admin role for token on Arbitrum Sepolia
⏳ Tx: 0xa0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5

========================================
✅ Admin Role Accepted on Arbitrum Sepolia!
========================================
Token:            https://sepolia.arbiscan.io/address/0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
Transaction:      0xa0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5
New Administrator: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
========================================
```

#### 3. Configure Token Pools

Use the `applyChainUpdates` task to link each token pool to its counterpart on the other chain and configure rate limits. \
You will interact with the [`TokenPool`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/TokenPool.sol) contract by calling the `applyChainUpdates()` function to enable cross-chain transfers.

`applyChainUpdates()` registers the destination chain and the destination pool on the local pool by recording:

- The remote chain selector (to identify the exact chain),
- The remote pool address (to identify the exact pool on that exact chain),
- The remote token address (to identify the exact token on the remote pool),
- And per-direction rate limit buckets (outbound and inbound).

You must run it on **both** pools so each side knows its counterpart.

[applyChainUpdates.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/setup/applyChainUpdates.ts)

View the pool configuration task on GitHub.

> **CAUTION: Rate Limiting**
>
> 1. Rate limiting is disabled by default (`isEnabled: false`). With rate limiting disabled, there are **no
>    restrictions** on the volume of tokens that can be transferred through the pool in any direction.
> 2. To protect against large, unexpected outflows, set `isEnabled` to `true` and configure `capacity` (maximum bucket
>    size) and `rate` (tokens refilled per second).
> 3. See the [Update Rate Limiters](/ccip/evm/tutorials/cross-chain-tokens/update-rate-limiters-hardhat) tutorial for
>    more details.

| Flag                 | Required | Description                                                                    |
| -------------------- | -------- | ------------------------------------------------------------------------------ |
| `--destchain`        | Yes      | Destination chain name (e.g. `sepolia`, `ETHEREUM_SEPOLIA`, `ethereumSepolia`) |
| `--outboundcapacity` | No       | Token bucket capacity for outbound transfers                                   |
| `--outboundrate`     | No       | Token bucket refill rate (tokens/second) for outbound transfers                |
| `--inboundcapacity`  | No       | Token bucket capacity for inbound transfers                                    |
| `--inboundrate`      | No       | Token bucket refill rate (tokens/second) for inbound transfers                 |

1. Configure the token pool on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat applyChainUpdates \
  --destchain arbitrumSepolia \
  --outboundcapacity 1000000000000000000000 \
  --outboundrate 100000000000000000 \
  --inboundcapacity 1000000000000000000000 \
  --inboundrate 100000000000000000 \
  --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔗 Apply Chain Updates
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Action:       Configure cross-chain lane
========================================

Chain Update Parameters:
  Source Pool:                  0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
  Destination Chain Selector:   3478487238524512106
  Destination Chain Family:     evm
  Destination Pool:             0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
  Destination Token:            0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
  Outbound Rate Limit Enabled:  true
  Outbound Rate Limit Capacity: 1000000000000000000000
  Outbound Rate Limit Rate:     100000000000000000
  Inbound Rate Limit Enabled:   true
  Inbound Rate Limit Capacity:  1000000000000000000000
  Inbound Rate Limit Rate:      100000000000000000

[Step 1] Applying chain updates to pool on Ethereum Sepolia
⏳ Tx: 0x6cf4ac6987c82c018b3ea8e39f133cdc736e8e85a14669c765fe99e8ebdfbaf9

========================================
✅ Chain Updates Complete on Ethereum Sepolia!
========================================
Token Pool:   0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Explorer:     https://sepolia.etherscan.io/address/0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Transaction:  0x6cf4ac6987c82c018b3ea8e39f133cdc736e8e85a14669c765fe99e8ebdfbaf9
Remote Chain: Arbitrum Sepolia (Selector: 3478487238524512106)
Remote Pool:  0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

2. Configure the token pool on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat applyChainUpdates \
  --destchain sepolia \
  --outboundcapacity 1000000000000000000000 \
  --outboundrate 100000000000000000 \
  --inboundcapacity 1000000000000000000000 \
  --inboundrate 100000000000000000 \
  --network arbitrumSepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔗 Apply Chain Updates
========================================
Chain:        Arbitrum Sepolia
Remote Chain: Ethereum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       Configure cross-chain lane
========================================

Chain Update Parameters:
  Source Pool:                  0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
  Destination Chain Selector:   16015286601757825753
  Destination Chain Family:     evm
  Destination Pool:             0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
  Destination Token:            0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Outbound Rate Limit Enabled:  true
  Outbound Rate Limit Capacity: 1000000000000000000000
  Outbound Rate Limit Rate:     100000000000000000
  Inbound Rate Limit Enabled:   true
  Inbound Rate Limit Capacity:  1000000000000000000000
  Inbound Rate Limit Rate:      100000000000000000

[Step 1] Applying chain updates to pool on Arbitrum Sepolia
⏳ Tx: 0x7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6

========================================
✅ Chain Updates Complete on Arbitrum Sepolia!
========================================
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Explorer:     https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Transaction:  0x7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6
Remote Chain: Ethereum Sepolia (Selector: 16015286601757825753)
Remote Pool:  0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
========================================
```

3. (Optional) Read the list of supported chains and currently configured remote pools:

```bash filename="Terminal"
npx hardhat getSupportedChains --network sepolia
npx hardhat getSupportedChains --network arbitrumSepolia
```

#### 4. (Optional) Configure Faster Than Finality for the Token Pool <a id="optional-configure-fast-finality-for-the-token-pool"></a>

1. CCIP 2.0 supports **faster than finality** as an opt-in feature, letting token issuers control the speed vs. security
   tradeoff for cross-chain transfers of their token.

2. By default, a newly deployed token pool only allows transfers at default finality (equivalent to omitting `finality`
   or using `finality=finalized`).

3. To enable faster than finality, the pool owner must configure which faster than finality modes are allowed. Senders then request
   faster than finality per transfer using a numeric block depth via `finality=<N>` (minimum recommended depth: `32`).

> This section applies only to [**token pools with versions ≥ 2.0**](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/pools/TokenPool.sol). Existing v1 pools do not support fast
> finality.
>
> In this tutorial, configure faster than finality on both token pools: the `Lock & Release` pool on Ethereum Sepolia and the
> `Burn Mint` pool on Arbitrum Sepolia.

> **NOTE: Pool-level finality vs. transaction-level finality**
>
> 1. **Pool-level finality** (allowed finality config): A setting the pool owner configures via `setAllowedFinalityConfig(bytes4)`.
>
>    - Default = faster than finality is **disabled**. The pool only allows transfers that use default
>      finality (omit `finality` or use `finality=finalized`).
>    - The pool can opt in to faster than finality by allowing a minimum block depth (`finality=<N>`
>      ).
> 2. **Transaction-level finality** (`finality`): A per-transfer setting the sender specifies
>    via extra args when sending a CCIP message.
>
>    - `finality=finalized` (or omit `finality`) = default finality. This is always allowed.
>    - `finality=<N>` = faster than finality using block depth (block confirmations). Only succeeds
>      if the pool allows block-depth mode and the requested `N` is ≥ the pool's configured minimum.
>
>    Each transfer uses either default finality or block depth.
>
> Faster Than Finality transfers use the **faster than finality** rate limit bucket when configured. If the
> faster than finality bucket isn’t configured for a lane, the pool falls back to the standard rate limit bucket.

[setFinalityConfig.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/configure/finality-config/setFinalityConfig.ts)

View the pool configuration task on GitHub.

1. Set the allowed finality config for the token pool on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat setFinalityConfig \
  --blockdepth 32 \
  --destchain arbitrumSepolia \
  --outboundcapacity 1000000000000000000000 \
  --outboundrate 100000000000000000 \
  --inboundcapacity 1000000000000000000000 \
  --inboundrate 100000000000000000 \
  --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⏱️  Set Finality Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Action:       Set finality config
========================================

  Current Finality Config: 0x00000000
  New Finality Config:     0x00000020
  Mode:                    BLOCK_DEPTH (32 blocks)

----------------------------------------
📊 Current Rate Limits (faster than finality where enabled, standard otherwise):
----------------------------------------
  Outbound [standard fallback]:
    Enabled:  true
    Capacity: 1000000000000000000000
    Rate:     100000000000000000
    Tokens:   1000000000000000000000
  Inbound [standard fallback]:
    Enabled:  true
    Capacity: 1000000000000000000000
    Rate:     100000000000000000
    Tokens:   1000000000000000000000

[Step 1] Setting finality config on Ethereum Sepolia
⏳ Tx: 0x280399cd3dce1815a30ca3763736c7cbc4a8018bdb3ba1b650e728479640f5b6
✅ Finality config set successfully!

[Step 2] Updating rate limits (faster than finality bucket) on Ethereum Sepolia → Arbitrum Sepolia
⏳ Tx: 0xa69245f229f41313d597ea452fa7c9d8ead9e05bfe36aad5a997a6850d198ac5
✅ Rate limits updated successfully!

========================================
✅ Configuration Complete on Ethereum Sepolia!
========================================
Token Pool:      https://sepolia.etherscan.io/address/0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Finality Config: 0x00000020
Mode:            BLOCK_DEPTH (32 blocks)
========================================
```

2. Set the allowed finality config for the token pool on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat setFinalityConfig \
  --blockdepth 32 \
  --destchain sepolia \
  --outboundcapacity 1000000000000000000000 \
  --outboundrate 100000000000000000 \
  --inboundcapacity 1000000000000000000000 \
  --inboundrate 100000000000000000 \
  --network arbitrumSepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⏱️  Set Finality Config
========================================
Chain:        Arbitrum Sepolia
Remote Chain: Ethereum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       Set finality config
========================================

  Current Finality Config: 0x00000000
  New Finality Config:     0x00000020
  Mode:                    BLOCK_DEPTH (32 blocks)

----------------------------------------
📊 Current Rate Limits (faster than finality where enabled, standard otherwise):
----------------------------------------
  Outbound [standard fallback]:
    Enabled:  true
    Capacity: 1000000000000000000000
    Rate:     100000000000000000
    Tokens:   1000000000000000000000
  Inbound [standard fallback]:
    Enabled:  true
    Capacity: 1000000000000000000000
    Rate:     100000000000000000
    Tokens:   1000000000000000000000

[Step 1] Setting finality config on Arbitrum Sepolia
⏳ Tx: 0xb1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6
✅ Finality config set successfully!

[Step 2] Updating rate limits (faster than finality bucket) on Arbitrum Sepolia → Ethereum Sepolia
⏳ Tx: 0x8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7
✅ Rate limits updated successfully!

========================================
✅ Configuration Complete on Arbitrum Sepolia!
========================================
Token Pool:      https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Finality Config: 0x00000020
Mode:            BLOCK_DEPTH (32 blocks)
========================================
```

#### 5. Activate the Token Pool

Use the `setPool` task to register each token pool in the CCIP [`TokenAdminRegistry`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/tokenAdminRegistry/TokenAdminRegistry.sol), making it the official pool for your token. This is the step that activates the pool in the CCIP protocol.

[setPool.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/setup/setPool.ts)

View the pool linking task on GitHub.

1. Link the token to its respective token pool on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat setPool --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🏊 Set Token Pool
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Action:       Set token pool
========================================

Set Pool Parameters:
  Token:                0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Pool:                 0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
  Token Admin Registry: 0x95F29FEE11c5C55d26cCcf1DB6772DE953B37B82
  Token Administrator:  0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Setting pool for token on Ethereum Sepolia
⏳ Tx: 0x4abdea890bd094239b3931134e8001511f82fcadfc7554b7facd98987c0e55c5

========================================
✅ Pool Set Complete on Ethereum Sepolia!
========================================
Token Address: https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
Pool Address:  https://sepolia.etherscan.io/address/0x8a1b2C3d4E5F60718293a4B5c6D7E8F901234567
Transaction:   0x4abdea890bd094239b3931134e8001511f82fcadfc7554b7facd98987c0e55c5
========================================
```

2. Link the token to its respective token pool on Arbitrum Sepolia:

```bash filename="Terminal"
npx hardhat setPool --network arbitrumSepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🏊 Set Token Pool
========================================
Chain:        Arbitrum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       Set token pool
========================================

Set Pool Parameters:
  Token:                0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
  Pool:                 0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
  Token Admin Registry: 0x8126bE56454B628a88C17849B9ED99dd5a11Bd2f
  Token Administrator:  0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Setting pool for token on Arbitrum Sepolia
⏳ Tx: 0x6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5

========================================
✅ Pool Set Complete on Arbitrum Sepolia!
========================================
Token Address: https://sepolia.arbiscan.io/address/0x5B3c8F2a9D4e7A1c6F0b3E8d5C9a2F4b7D1e6A3c
Pool Address:  https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Transaction:   0x6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5
========================================
```

### Cross-chain Token Operations

If all the previous steps were successful, your CCT token is now fully registered and activated under the CCIP protocol.
Use these next steps to mint and transfer your tokens across networks.

#### 1. Mint Tokens

Use the `mintTokens` task to mint tokens to your Externally Owned Account (EOA) on Ethereum Sepolia. \
Since you granted mint and burn privileges to your EOA during the token deployment in the first step, you are authorized to mint tokens for testing purposes. \
This ensures that your EOA has sufficient tokens to perform cross-chain transfers in the next step.

[mintTokens.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/operations/mintTokens.ts)

View the minting task on GitHub.

1. Mint tokens for your EOA on Ethereum Sepolia:

> **NOTE: Note**
>
> 1. If you don't pass `--amount`, the task will use the amount from the `tokenAmountToMint`
>    field in your `input/token.json` file.
> 2. Pass `--receiver 0x...` to mint to a different address (defaults to the deployer).
> 3. If your source-chain token does not support minting, skip this step and fund your sender address through your
>    token's normal distribution flow before running the transfer step.

```bash filename="Terminal"
npx hardhat mintTokens --amount 1000000000000000000000 --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Mint Tokens
========================================
Chain:        Ethereum Sepolia
Action:       Mint tokens
========================================

Mint Parameters:
  Token:    0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Symbol:   BnM-T
  Amount:   1000000000000000000000
  Receiver: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Minting 1000000000000000000000 BnM-T to 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
⏳ Tx: 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
✅ Tokens minted successfully!

========================================
✅ Minting Complete on Ethereum Sepolia!
========================================
Receiver Address: https://sepolia.etherscan.io/address/0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
New Balance:      1000000000000000000000 BnM-T
========================================
```

#### 2. Transfer Tokens Across Networks

Use the `ccip-cli` command to securely transfer tokens across networks from your terminal.
Tokens will be:

1. **locked** on the source chain (Ethereum Sepolia), and,
2. **minted** on the destination chain (Arbitrum Sepolia). \\

You can choose to pay CCIP fees using LINK tokens or the native gas token.

> **Note:**
>
> 1. Add `--fee-token LINK` to pay CCIP fees in LINK. If you omit this flag, fees are paid in the native gas token.
> 2. Use `--receiver <address>` for a custom recipient. If omitted on EVM-to-EVM, the receiver defaults to the sender.

The CLI command expects the router address to be set in the environment variables. You can set it using the following command:

```bash filename="Terminal"
export ETHEREUM_SEPOLIA_ROUTER=0x...
```

> **NOTE: Router address**
>
> You can find the router address for your chain in the [CCIP
> Directory](https://docs.chain.link/ccip/directory/testnet).

> **NOTE: Token amounts in this tutorial**
>
> Earlier Hardhat tasks use smallest-unit amounts (wei-like). In the `ccip-cli` examples below we use a
> compact, human-readable token amount (for example, `1.23`).

1. Transfer tokens from Ethereum Sepolia to Arbitrum Sepolia on **default finality**:

```bash filename="Terminal"
ccip-cli send \
  --source ethereum-testnet-sepolia \
  --router $ETHEREUM_SEPOLIA_ROUTER \
  --dest ethereum-testnet-sepolia-arbitrum-1 \
  --transfer-tokens $ETHEREUM_SEPOLIA_TOKEN=1.23 \
  --receiver 0xYourReceiverAddress \
  --wallet hardhat:$KEYSTORE_NAME \
  --rpc "$ETHEREUM_SEPOLIA_RPC_URL" \
  --rpc "$ARBITRUM_SEPOLIA_RPC_URL"
```

Your output should look something like this:

```bash filename="Terminal"
Fee: 130129888907619n = 0.000130129888907619 ETH
✔ Enter password for Hardhat keystore 'PRIVATE_KEY'
🚀 Sending message to 0xE23Fc63F47F08F58B9d7448d4CCE0bCDcc96d7F3 @ ethereum-testnet-sepolia-arbitrum-1 , tx => 0x3dc40bea29f3e3fc93ff8fce0dda45fd7f55a07ace5089646e018874c8b6745e , messageId => 0x4a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293
CCIP Explorer: https://ccip.chain.link/msg/0x4a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293
```

2. Transfer tokens from Ethereum Sepolia to Arbitrum Sepolia using **faster than finality (block depth)**:

This assumes you enabled faster than finality on the pool in the optional finality configuration accordion above.
When you pass `--extra finality=...`, `ccip-cli` encodes it into the CCIP message extra args.

Faster Than Finality using numeric block depth (`finality=<N>`). Use a value of at least `32`:

```bash filename="Terminal"
ccip-cli send \
  --source ethereum-testnet-sepolia \
  --router $ETHEREUM_SEPOLIA_ROUTER \
  --dest ethereum-testnet-sepolia-arbitrum-1 \
  --transfer-tokens $ETHEREUM_SEPOLIA_TOKEN=1.23 \
  --receiver 0xYourReceiverAddress \
  --extra finality=32 \
  --wallet hardhat:$KEYSTORE_NAME \
  --rpc "$ETHEREUM_SEPOLIA_RPC_URL" \
  --rpc "$ARBITRUM_SEPOLIA_RPC_URL"
```

Your output should look something like this:

```bash filename="Terminal"
Fee: 130129888907619n = 0.000130129888907619 ETH
✔ Enter password for Hardhat keystore 'PRIVATE_KEY'
🚀 Sending message to 0xE23Fc63F47F08F58B9d7448d4CCE0bCDcc96d7F3 @ ethereum-testnet-sepolia-arbitrum-1 , tx => 0xeee045c912703291e6d6166e4ef8bfb0a7fb9035af1a41ac00b65c58ad868a94 , messageId => 0x5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4
CCIP Explorer: https://ccip.chain.link/msg/0x5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4
```

> **NOTE: Understand Minimum Block Depth Requirements 🧑‍🏫**
>
> 1. If a transfer reverts with `InvalidRequestedFinality(requestedFinality, allowedFinality)`, it usually
>    means the pool requires a larger block depth than you requested (for example, the pool minimum is `32` but you requested a smaller value).
> 2. Use a value of at least `32` (for example, `--extra finality=32`), or omit `finality` for default finality.
> 3. Other reverts may indicate the requested depth (or mode) is not permitted by the pool.

#### 3. (Optional) Hand Off Token Administration After Enablement

1. The process to set up your tokens for cross-chain transfers is complete. At this stage, you might want to hand off token administration to a different address, for example, transferring control to a multisig or a dedicated operations wallet
   This new admin will be able to mint and transfer tokens as needed.
2. Use the `transferTokenAdminRole` task to achieve this.
   This is a **two-step process**: the current admin initiates the transfer, and the new admin must call `acceptAdminRole` to complete it. Until the new admin accepts, the current admin retains full control.

[transferTokenAdminRole.ts](https://github.com/smartcontractkit/docs-cct-hardhat/blob/main/tasks/setup/transferTokenAdminRole.ts)

View the transfer admin task on GitHub.

1. Initiate the transfer on Ethereum Sepolia:

```bash filename="Terminal"
npx hardhat transferTokenAdminRole --newadmin new_admin_address --network sepolia
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔄 Transfer Token Admin Role
========================================
Chain:        Ethereum Sepolia
Action:       Transfer admin role
========================================

Transfer Admin Role Parameters:
  Token:                 0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
  Token Admin Registry:  0x95F29FEE11c5C55d26cCcf1DB6772DE953B37B82
  Current Administrator: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Pending Administrator: 0x0000000000000000000000000000000000000000
  New Admin:             0xE23Fc63F47F08F58B9d7448d4CCE0bCDcc96d7F3
  Signer:                0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Transferring admin role for token on Ethereum Sepolia
⏳ Tx: 0xabcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789

========================================
✅ Admin Role Transfer Initiated on Ethereum Sepolia!
========================================
Token:            https://sepolia.etherscan.io/address/0x9602399103Ff5F87587Ac5A28E1551A0bA0c6C0D
Transaction:      0xabcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789
New Admin:        0xE23Fc63F47F08F58B9d7448d4CCE0bCDcc96d7F3
========================================

ℹ️  The new admin (0xE23Fc63F47F08F58B9d7448d4CCE0bCDcc96d7F3) must run acceptAdminRole to complete the transfer.
```

> **NOTE: Note**
>
> 1. Pass `--tokenaddress 0x...` to specify the token explicitly. If omitted, the task reads the deployed
>    token address from the environment variable for the current chain.
> 2. Only the current admin can initiate this transfer. If the signer is not the admin, the task will fail with an
>    error.

2. Repeat the same command on Arbitrum Sepolia if you also want to transfer admin rights on the destination chain:

```bash filename="Terminal"
npx hardhat transferTokenAdminRole --newadmin new_admin_address --network arbitrumSepolia
```

3. The new admin completes the transfer by calling `acceptAdminRole`:

```bash filename="Terminal"
npx hardhat acceptAdminRole --network sepolia
npx hardhat acceptAdminRole --network arbitrumSepolia
```

> **CAUTION: Educational Example Disclaimer**
>
> Please note, this page contains community examples only — these are not Chainlink products or services and are not
> supported or maintained by Chainlink. This code represents an example of using a Chainlink product or service, and is
> intended for demonstration and educational purposes only. It is provided "AS IS" and "AS AVAILABLE" without warranties
> of any kind, may not have been audited, and may omit checks or error handling. Each party intending to use this
> example code does so entirely at their own risk and must perform its own audits, security and code review, key
> management, and testing before any production deployment and ensure the operation and performance of such code matches
> expectations. Neither Chainlink Labs nor the Chainlink Foundation deploys, operates, monitors, maintains or endorses
> any deployment of this code. Note that this is not a Chainlink product, feature or service, and there are no
> commitments made with respect to the code, including compatibility with future Chainlink releases. You should not rely
> on this code without first conducting your own technical, engineering, and security review. This code is also outside
> the scope of any Chainlink bug bounty programs. Neither Chainlink Labs, the Chainlink Foundation, nor Chainlink node
> operators are responsible for outcomes due to errors in this example or how it is deployed or operated, or liable for
> any resulting claims or damages. Use of the Chainlink Network is subject to the Chainlink Foundation [Terms of
> Service](https://chain.link/terms), which provides important information and disclosures. By using this code, you
> acknowledge and agree to these terms.