# Manage Token Transfer Fees Using Foundry
Source: https://docs.chain.link/ccip/evm/tutorials/cross-chain-tokens/set-transfer-fee-config-foundry
Last Updated: 2026-05-05

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

## Guide Versions

- [Foundry](/ccip/evm/tutorials/cross-chain-tokens/set-transfer-fee-config-foundry)

- [Hardhat](/ccip/evm/tutorials/cross-chain-tokens/set-transfer-fee-config-hardhat)

CCIP 2.0 token pools let pool owners opt into **pool-level token transfer fee overrides** per destination lane. When an override is disabled, the [OnRamp](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/onRamp/OnRamp.sol) falls back to [`FeeQuoter`](https://github.com/smartcontractkit/chainlink-ccip/tree/contracts-ccip-v2.0.0/chains/evm/contracts/FeeQuoter.sol) defaults for that lane. In this tutorial you will:

1. Review the current fee configuration for both configured lanes.
2. Optionally set a fee admin who can withdraw accrued fees.
3. Configure lane-specific flat fees, transfer fees, destination gas overhead, and destination bytes overhead.
4. Send a LINK-paid transfer and inspect accrued fees in the source token pool.
5. Withdraw accrued fee tokens.
6. Disable the fee configuration on both lanes to return to `FeeQuoter` defaults.

> **NOTE: Defaults apply unless you opt in**
>
> 1. **Fee overrides are per lane:** each direction is configured independently (Ethereum Sepolia →
>    Arbitrum Sepolia vs. Arbitrum Sepolia → Ethereum Sepolia).
> 2. **FeeQuoter is the default:** when `isEnabled: false` for a lane, the OnRamp uses
>    FeeQuoter defaults for that lane.
> 3. **Faster Than Finality fees are opt-in:** the `fastFinality*` fields only apply when you
>    request block-depth finality (for example, `--extra finality=<N>`).

## 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 the [Node.js documentation](https://nodejs.org/en/download/).
   - `npm` is bundled with Node.js. If you can't run `npm`, reinstall or update Node.js from the official installer.

2. Install Foundry. If you haven't already, follow the [Foundry installation instructions](https://book.getfoundry.sh/getting-started/installation), then verify the installation:

```bash filename="Terminal"
forge --version
```

3. Install/Update `ccip-cli` and verify the installed version:

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

4. Clone the repository and navigate to the project directory:

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

Clone docs-cct-foundry for the CCT Foundry scripts used in this tutorial.

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

5. Create an encrypted Foundry keystore, if you haven't already:

```bash filename="Terminal"
cast wallet import your_keystore_name --interactive
```

Optionally, create an encrypted Foundry keystore for the fee admin, if you haven't already:

```bash filename="Terminal"
cast wallet import your_fee_admin_keystore_name --interactive
```

> **NOTE: Keystore**
>
> 1. For more information on encrypted Foundry keystores, refer to the [Foundry documentation](https://www.getfoundry.sh/cast/wallet-operations#wallet-operations).
> 2. `cast wallet import` will throw an error if a keystore with the same name already exists.
> 3. Use `cast wallet list` to check previously created keystores.

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

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

```bash filename=".env"
# Keystore name (created via `cast wallet import`)
KEYSTORE_NAME=your_keystore_name

# Optional: keystore name for a configured fee admin
FEE_ADMIN_KEYSTORE_NAME=your_fee_admin_keystore_name

# RPC URLs
ETHEREUM_SEPOLIA_RPC_URL=your_eth_sepolia_rpc
ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL=your_arbitrum_sepolia_rpc

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

Use the [CCIP Directory](/ccip/directory/testnet) or `script/HelperConfig.s.sol` to confirm the router and LINK addresses for your network.

> **TIP: Funding**
>
> 1. Configuration and withdrawal transactions require native gas on the source chain where you broadcast.
> 2. The `ccip-cli --fee-token LINK` examples require LINK on the source chain. You can get testnet LINK
>    from the [Chainlink faucet](https://faucets.chain.link/).
> 3. Token transfer examples require the sender to hold the source-chain token being transferred.

7. To make sure your terminal has access to these variables, run:

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

8. Build the project:

```bash filename="Terminal"
npm install && forge build
```

## Tutorial

> **TIP: Prerequisites**
>
> This tutorial assumes you have already deployed tokens and token pools on both chains. If not, complete one of the two
> tutorials first:
>
> - [Burn & Mint](/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-burn-mint-foundry)
> - [Lock & Mint](/ccip/evm/tutorials/cross-chain-tokens/register-from-eoa-lock-mint-foundry)
>
> Use the token pool address for the chain you are configuring. In a Burn & Mint setup, both pools are `BurnMintTokenPool` contracts. In a Lock & Mint setup, the source chain can use a `LockReleaseTokenPool` backed by an `ERC20LockBox`, while the destination chain uses a `BurnMintTokenPool`. This tutorial configures the token pool, not the lockbox.
>
> ```bash filename="Terminal"
> export ETHEREUM_SEPOLIA_TOKEN=0x...
> export ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_TOKEN=0x...
>
> export ETHEREUM_SEPOLIA_TOKEN_POOL=0x...
> export ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_TOKEN_POOL=0x...
> ```
>
> 1. `KEYSTORE_NAME` must resolve to the owner of the source-chain token pool when you set dynamic config or
>    fee config.
> 2. A configured fee admin can withdraw accrued fee tokens, but cannot set fee config or set another fee admin.

### 1. Verify and Set Fee Admin

The fee admin is part of the token pool dynamic configuration. Use `GetDynamicConfig.s.sol` to inspect the current router, rate limit admin, and fee admin before making any changes.

[GetDynamicConfig.s.sol](https://github.com/smartcontractkit/docs-cct-foundry/blob/main/script/configure/dynamic-config/GetDynamicConfig.s.sol)

View the dynamic config query script on GitHub.

```bash filename="Terminal"
forge script \
  script/configure/dynamic-config/GetDynamicConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⚙️  Get Dynamic Config
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       View dynamic config
========================================

Dynamic Configuration:
  Router:                       0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
  Rate Limit Admin:             0xYourAddressForRateLimitAdmin
  Fee Admin:                    0xYourAddressForFeeAdmin

========================================
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

```bash filename="Terminal"
forge script \
  script/configure/dynamic-config/GetDynamicConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⚙️  Get Dynamic Config
========================================
Chain:        Arbitrum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       View dynamic config
========================================

Dynamic Configuration:
  Router:                       0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165
  Rate Limit Admin:             0xYourAddressForRateLimitAdmin
  Fee Admin:                    0xYourAddressForFeeAdmin

========================================
Token Pool:   https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

Use `SetDynamicConfig.s.sol` to set a fee admin. This script sets the router, rate limit admin, and fee admin together, so pass the current router and rate limit admin from the previous output unless you intend to change them.

[SetDynamicConfig.s.sol](https://github.com/smartcontractkit/docs-cct-foundry/blob/main/script/configure/dynamic-config/SetDynamicConfig.s.sol)

View the dynamic config update script on GitHub.

| Env var            | Required | Description                                                                                                   |
| ------------------ | -------- | ------------------------------------------------------------------------------------------------------------- |
| `ROUTER`           | No       | Router to keep or set. Use the current router from `GetDynamicConfig.s.sol` unless intentionally changing it. |
| `RATE_LIMIT_ADMIN` | No       | Rate limit admin to keep or set. Use the current value unless intentionally changing it.                      |
| `FEE_ADMIN`        | No       | Address allowed to withdraw accrued fee tokens. Set to `address(0)` to restrict withdrawal to the pool owner. |
| `KEYSTORE_NAME`    | Yes      | Foundry keystore for the pool owner.                                                                          |

1. Set the fee admin on the Ethereum Sepolia pool:

```bash filename="Terminal"
ROUTER=0xCurrentRouterFromOutput \
  RATE_LIMIT_ADMIN=0xYourAddressForRateLimitAdmin \
  FEE_ADMIN=0xYourFeeAdminAddress \
  forge script \
  script/configure/dynamic-config/SetDynamicConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⚙️  Set Dynamic Config
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Set dynamic config
========================================

Current Configuration:
  Router:                       0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
  Rate Limit Admin:             0xYourAddressForRateLimitAdmin
  Fee Admin:                    0xYourAddressForFeeAdmin

New Configuration:
  Router:                       0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
  Rate Limit Admin:             0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Fee Admin:                    0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Setting dynamic config on Ethereum Sepolia
✅ Dynamic config updated successfully!

========================================
✅ Configuration Complete on Ethereum Sepolia!
========================================
Token Pool:       0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Router:           0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
Rate Limit Admin: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
Fee Admin:        0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
Token Pool:       https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

2. Set the fee admin on the Arbitrum Sepolia pool:

```bash filename="Terminal"
ROUTER=0xCurrentRouterFromOutput \
  RATE_LIMIT_ADMIN=0xYourAddressForRateLimitAdmin \
  FEE_ADMIN=0xYourFeeAdminAddress \
  forge script \
  script/configure/dynamic-config/SetDynamicConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
⚙️  Set Dynamic Config
========================================
Chain:        Arbitrum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       Set dynamic config
========================================

Current Configuration:
  Router:                       0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165
  Rate Limit Admin:             0xYourAddressForRateLimitAdmin
  Fee Admin:                    0xYourAddressForFeeAdmin

New Configuration:
  Router:                       0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165
  Rate Limit Admin:             0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
  Fee Admin:                    0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994

[Step 1] Setting dynamic config on Arbitrum Sepolia
✅ Dynamic config updated successfully!

========================================
✅ Configuration Complete on Arbitrum Sepolia!
========================================
Token Pool:       0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Router:           0x2a9C5afB0d0e4BAb2BCdaE109EC4b0c4Be15a165
Rate Limit Admin: 0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
Fee Admin:        0x3A34637a41aB08519d30Fdb65344aBa8E9b2e994
Token Pool:       https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

> **NOTE: Fee admin permissions**
>
> 1. The pool owner can set dynamic config and token transfer fee config.
> 2. The pool owner (or a configured fee admin) can withdraw accrued fee tokens. Anyone can inspect fee token balances.

### 2. Review Current Fee Configuration

Use `GetTokenTransferFeeConfig.s.sol` to read the current fee configuration for a destination lane from the source-chain token pool.

[GetTokenTransferFeeConfig.s.sol](https://github.com/smartcontractkit/docs-cct-foundry/blob/main/script/configure/fee-config/GetTokenTransferFeeConfig.s.sol)

View the fee config query script on GitHub.

| Env var             | Required | Description                                                                                                                                                     |
| ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DEST_CHAIN`        | Yes      | Remote chain whose lane is being queried.                                                                                                                       |
| Source pool env var | Yes      | `ETHEREUM_SEPOLIA_TOKEN_POOL`, `ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_TOKEN_POOL`, or the inline `TOKEN_POOL` alias for the source chain selected by `--rpc-url`. |

1. Check the Ethereum Sepolia pool for the lane to Arbitrum Sepolia:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Get Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       View fee config
========================================

Dest Chain Selector: 3478487238524512106

Fee Configuration:
  isEnabled:                    false
  destGasOverhead:              0
  destBytesOverhead:            0
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       0
  fastFinalityTransferFeeBps:   0

⚠️  Fee config is disabled for this lane.
    The OnRamp will fall back to FeeQuoter defaults for this destination.

========================================
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

2. Check the Arbitrum Sepolia pool for the lane to Ethereum Sepolia:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Get Token Transfer Fee Config
========================================
Chain:        Arbitrum Sepolia
Remote Chain: Ethereum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       View fee config
========================================

Dest Chain Selector: 16015286601757825753

Fee Configuration:
  isEnabled:                    false
  destGasOverhead:              0
  destBytesOverhead:            0
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       0
  fastFinalityTransferFeeBps:   0

⚠️  Fee config is disabled for this lane.
    The OnRamp will fall back to FeeQuoter defaults for this destination.

========================================
Token Pool:   https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

> **NOTE: Fee config disabled by default**
>
> 1. When fee config is disabled, the OnRamp uses FeeQuoter defaults for token transfer fee calculation on that source -> destination lane.
> 2. If you have already configured fees, the script will show non-zero values and `isEnabled: true`.

### 3. Set Token Transfer Fee Configuration

Use `UpdateTokenTransferFeeConfig.s.sol` to configure fee parameters for a destination lane on the source-chain token pool.

[UpdateTokenTransferFeeConfig.s.sol](https://github.com/smartcontractkit/docs-cct-foundry/blob/main/script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol)

View the fee config update script on GitHub.

| Env var                          | Required | Description                                                                                                                                                     |
| -------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DEST_CHAIN`                     | Yes      | Remote chain to configure fees for.                                                                                                                             |
| Source pool env var              | Yes      | `ETHEREUM_SEPOLIA_TOKEN_POOL`, `ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_TOKEN_POOL`, or the inline `TOKEN_POOL` alias for the source chain selected by `--rpc-url`. |
| `KEYSTORE_NAME`                  | Yes      | Foundry keystore for the pool owner.                                                                                                                            |
| `DEST_GAS_OVERHEAD`              | No       | Gas overhead charged in the fee model. Must be greater than `0` when enabled.                                                                                   |
| `DEST_BYTES_OVERHEAD`            | No       | Data availability bytes overhead. Use at least `32` for Burn & Mint and Lock & Release pools.                                                                   |
| `FINALITY_FEE_USD_CENTS`         | No       | Flat fee in 0.01 USD units for default-finality transfers.                                                                                                      |
| `FAST_FINALITY_FEE_USD_CENTS`    | No       | Flat fee in 0.01 USD units for fast-finality transfers.                                                                                                         |
| `FINALITY_TRANSFER_FEE_BPS`      | No       | Basis-point fee deducted from the transferred amount for default-finality transfers. Must be below `10000`.                                                     |
| `FAST_FINALITY_TRANSFER_FEE_BPS` | No       | Basis-point fee deducted from the transferred amount for fast-finality transfers. Must be below `10000`.                                                        |
| `DISABLE`                        | No       | Set to `true` to disable the fee config for this lane.                                                                                                          |

> **NOTE: Fee units: basis points vs flat fee**
>
> - **Flat fee:** values are in `0.01 USD (1 cent)` units. For example, `1` means
>   $0.01 and `100` means $1.00.
> - **Basis points (bps):** `1 basis points = 0.01%`, `100 basis points = 1%`, and `10000 basis points = 100%`. Values must be below `10000`.

> **CAUTION: Validation rules**
>
> 1. `DEST_GAS_OVERHEAD` must be greater than `0` when the config is enabled.
> 2. `DEST_BYTES_OVERHEAD` must be at least `32` for Burn & Mint and Lock & Release pools.
> 3. Basis-point fee values must be below `10000`.
> 4. First-time setup should pass every fee field shown in this tutorial. Later updates can omit fields you do not want
>    to change because the script defaults omitted fields to the current on-chain values.

This section uses a **two-step update demo** for the Ethereum Sepolia → Arbitrum Sepolia lane so you can see that **omitting fields does not reset them**.

- **Step 1** sets a basis-point fee for default-finality transfers.
- **Step 2** adds a flat fee for fast-finality transfers, while intentionally omitting the basis points env var so it carries forward.

Fee behavior in this tutorial:

- **bps fields** are deducted from the transferred token amount and retained by the source pool as the pool token.
- **Flat fee fields** are charged in the selected fee token (LINK in this tutorial) and credited to the source pool.

#### Step 1: Configure a basis points fee for default-finality transfers (ETH Sepolia → Arbitrum Sepolia)

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  DEST_GAS_OVERHEAD=50000 \
  DEST_BYTES_OVERHEAD=32 \
  FINALITY_FEE_USD_CENTS=0 \
  FINALITY_TRANSFER_FEE_BPS=25 \
  FAST_FINALITY_FEE_USD_CENTS=0 \
  FAST_FINALITY_TRANSFER_FEE_BPS=0 \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Update Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Set fee config
========================================

Dest Chain Selector: 3478487238524512106

Current On-Chain Fee Configuration:
  isEnabled:                    false
  destGasOverhead:              0
  destBytesOverhead:            0
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       0
  fastFinalityTransferFeeBps:   0

Fee Configuration to Apply:
  destGasOverhead:              50000
  destBytesOverhead:            32
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       25
  fastFinalityTransferFeeBps:   0

[Step 1] Applying fee config for lane to Arbitrum Sepolia
✅ Fee config applied successfully!

========================================
✅ Operation Complete!
========================================
Token Pool: 0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

#### Step 2: Add a flat fee for fast-finality transfers (ETH Sepolia → Arbitrum Sepolia)

This command intentionally omits `FINALITY_TRANSFER_FEE_BPS`. The script defaults omitted fields to the current on-chain values, so the 25 basis points default-finality fee carries forward.

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  FAST_FINALITY_FEE_USD_CENTS=150 \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Update Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Set fee config
========================================

Dest Chain Selector: 3478487238524512106

Current On-Chain Fee Configuration:
  isEnabled:                    true
  destGasOverhead:              50000
  destBytesOverhead:            32
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       25
  fastFinalityTransferFeeBps:   0

Fee Configuration to Apply:
  destGasOverhead:              50000
  destBytesOverhead:            32
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      150
  finalityTransferFeeBps:       25
  fastFinalityTransferFeeBps:   0

[Step 1] Applying fee config for lane to Arbitrum Sepolia
✅ Fee config applied successfully!

========================================
✅ Operation Complete!
========================================
Token Pool: 0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

#### Repeat for the reverse lane (Arbitrum Sepolia → Ethereum Sepolia)

Repeat the same two steps on the Arbitrum Sepolia token pool by switching the RPC URL and destination chain.

Step 1:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  DEST_GAS_OVERHEAD=50000 \
  DEST_BYTES_OVERHEAD=32 \
  FINALITY_FEE_USD_CENTS=0 \
  FINALITY_TRANSFER_FEE_BPS=25 \
  FAST_FINALITY_FEE_USD_CENTS=0 \
  FAST_FINALITY_TRANSFER_FEE_BPS=0 \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Step 2:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  FAST_FINALITY_FEE_USD_CENTS=150 \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Both steps should complete successfully and print the token pool address and transaction hash for the update.

### 4. Verify the Updated Fee Configuration

Re-run `GetTokenTransferFeeConfig.s.sol` to confirm the final (Step 2) configuration for the Ethereum Sepolia → Arbitrum Sepolia lane.

1. Verify the Ethereum Sepolia pool for the lane to Arbitrum Sepolia:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Get Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       View fee config
========================================

Dest Chain Selector: 3478487238524512106

Fee Configuration:
  isEnabled:                    true
  destGasOverhead:              50000
  destBytesOverhead:            32
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      150
  finalityTransferFeeBps:       25
  fastFinalityTransferFeeBps:   0

========================================
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

2. Repeat for the reverse lane (Arbitrum Sepolia → Ethereum Sepolia):

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL
```

Success criteria:

- Ethereum Sepolia → Arbitrum Sepolia shows `isEnabled: true`.
- Ethereum Sepolia → Arbitrum Sepolia shows `destGasOverhead: 50000`.
- Ethereum Sepolia → Arbitrum Sepolia shows `destBytesOverhead: 32`.
- Ethereum Sepolia → Arbitrum Sepolia shows `finalityFeeUSDCents: 0` and `finalityTransferFeeBps: 25`.
- Ethereum Sepolia → Arbitrum Sepolia shows `fastFinalityFeeUSDCents: 150` and `fastFinalityTransferFeeBps: 0`.
- The reverse lane should show the same values after you repeat the two-step update.

### 5. Send Transfers That Use the Fee Config

This section demonstrates Ethereum Sepolia → Arbitrum Sepolia cross-chain transfers. Repeat the same pattern from Arbitrum Sepolia if you want the Arbitrum Sepolia source pool to accrue fees.

Before sending, inspect the source pool balances for LINK and the source token:

> **NOTE: Note**
>
> 1. Export the `LINK` token address for the source chain. For example, `export ETHEREUM_SEPOLIA_LINK=0x...`.
> 2. Export the Router address for the source chain. For example, `export ETHEREUM_SEPOLIA_ROUTER=0x...`.
> 3. You can find a complete list of all addresses inside the [CCIP
>    Directory](https://docs.chain.link/ccip/directory/testnet).

```bash filename="Terminal"
FEE_TOKENS="$ETHEREUM_SEPOLIA_LINK,$ETHEREUM_SEPOLIA_TOKEN" \
  forge script \
  script/operations/GetFeeTokenBalances.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔍 Get Fee Token Balances
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Inspect fee token balances
========================================

Pool Token:   0xD73D06d36cEa36817186779fF877e418Ab759F09 (for reference)

Fee Token Balances:
  [0] 0x779877A7B0D9E8603169DdbD7836e478b4624789  →  balance: 0 ⚠️  (skipping)
  [1] 0xD73D06d36cEa36817186779fF877e418Ab759F09  →  balance: 0 ⚠️  (skipping)

ℹ️  No fee tokens have a non-zero balance in the pool. Nothing to withdraw.
```

1. Send a default-finality transfer and pay CCIP fees in LINK:

```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 \
  --fee-token LINK \
  --wallet foundry:$KEYSTORE_NAME \
  --rpc "$ETHEREUM_SEPOLIA_RPC_URL" \
  --rpc "$ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL"
```

Your output should look something like this:

```bash filename="Terminal"
Fee: 119317588427515265n = 0.119317588427515265 LINK
Request (source):
┌────────────────────────────────┬──────────────────────────────────────────────────────────────────────┐
│ (index)                        │ Values                                                               │
├────────────────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ fee                            │ '0.119317588427515265 LINK'                                          │
│ tokens                         │ '1.226925 BnM-T'                                                     │
│ tokenAmountBeforeTokenPoolFees │ 1230000000000000000n                                                 │
│ receipts[1].issuer             │ '0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9'                         │
│ receipts[1].feeTokenAmount     │ 93786750729051300n                                                   │
│ finality                       │ 'finalized'                                                          │
└────────────────────────────────┴──────────────────────────────────────────────────────────────────────┘
```

This send uses `finalityTransferFeeBps` (25 bps). In this demo, `finalityFeeUSDCents` is `0`.

2. Send a fast-finality transfer with block-depth finality and pay CCIP fees in LINK:

```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 \
  --fee-token LINK \
  --extra finality=32 \
  --wallet foundry:$KEYSTORE_NAME \
  --rpc "$ETHEREUM_SEPOLIA_RPC_URL" \
  --rpc "$ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL"
```

Your output should look something like this:

```bash filename="Terminal"
Request (source):
┌────────────────────────────────┬──────────────────────────────────────────────────────────────────────┐
│ (index)                        │ Values                                                               │
├────────────────────────────────┼──────────────────────────────────────────────────────────────────────┤
│ tokenAmountBeforeTokenPoolFees │ 1230000000000000000n                                                 │
│ tokens                         │ '1.23 BnM-T'                                                         │
└────────────────────────────────┴──────────────────────────────────────────────────────────────────────┘
```

This send uses `fastFinalityFeeUSDCents` (150). In this demo, `fastFinalityTransferFeeBps` is `0`.

> **CAUTION: Faster Than Finality must be allowed**
>
> 1. This send uses `fastFinalityFeeUSDCents` and `fastFinalityTransferFeeBps`. Use `--extra finality=<N>` only when the pool allows block-depth finality.
> 2. If the pool does not allow block-depth finality, or if the requested `finality=<N>` is below the pool minimum, the send reverts.

#### How to read fees from the `ccip-cli` output

- The top-level `fee: <X> LINK` is the total fee paid by the sender. It is not necessarily the amount credited to the token pool.
- For the fee-token amount credited to the pool, find the receipt where `receipts[i].issuer` equals the source token pool address. The corresponding `receipts[i].feeTokenAmount` is denominated in the fee token (LINK) in wei.
- For basis points deductions, compare `tokenAmountBeforeTokenPoolFees` with the `tokens` field. Their difference is the token amount retained by the source pool.

### 6. Inspect and Withdraw Accrued Fees

After the transfers complete, inspect the source pool balances again:

```bash filename="Terminal"
FEE_TOKENS="$ETHEREUM_SEPOLIA_LINK,$ETHEREUM_SEPOLIA_TOKEN" \
  forge script \
  script/operations/GetFeeTokenBalances.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔍 Get Fee Token Balances
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Inspect fee token balances
========================================

Pool Token:   0xD73D06d36cEa36817186779fF877e418Ab759F09 (for reference)

Fee Token Balances:
  [0] 0x779877A7B0D9E8603169DdbD7836e478b4624789  →  balance: <LINK_BALANCE_WEI>
  [1] 0xD73D06d36cEa36817186779fF877e418Ab759F09  →  balance: 3075000000000000

✅ 2 token(s) with non-zero balances are ready for withdrawal.
```

Expected balances:

- **Source token (bps fee)**: The default-finality send uses `finalityTransferFeeBps = 25`. With a `1.23` token transfer:
  - Retained by the pool: (1.23 \times 25 / 10000 = 0.003075) tokens
  - Verify in `ccip-cli` output: `tokenAmountBeforeTokenPoolFees (1.23)` - `tokens received (1.226925)` = `0.003075`
- **LINK (fee token credited to the pool)**: The fee-token amount credited to the token pool is visible in the send output receipt where `receipts[i].issuer` equals the source token pool address. Sum `receipts[i].feeTokenAmount` across the default-finality and fast-finality sends, then convert from wei to LINK by dividing by (10^). Confirm it matches `getFeeTokenBalances` for LINK.

Set a value for the `FEE_ADMIN_KEYSTORE_NAME` variable inside your `.env`, using the instructions covered inside [Set Up Your Development Environment](/ccip/evm/tutorials/cross-chain-tokens/set-transfer-fee-config-foundry#set-up-your-development-environment).

Use `WithdrawFeeTokens.s.sol` to withdraw accrued fee balances to a recipient. Withdraw as the configured fee admin:

```bash filename="Terminal"
RECIPIENT=0xYourRecipientAddress \
  FEE_TOKENS="$ETHEREUM_SEPOLIA_LINK,$ETHEREUM_SEPOLIA_TOKEN" \
  forge script \
  script/operations/WithdrawFeeTokens.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $FEE_ADMIN_KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💸 Withdraw Fee Tokens
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Withdraw fee tokens
========================================

Pool Token:   0xD73D06d36cEa36817186779fF877e418Ab759F09 (for reference)

Tokens to Withdraw:
  [0] 0x779877A7B0D9E8603169DdbD7836e478b4624789  →  balance: <LINK_BALANCE_WEI>
  [1] 0xD73D06d36cEa36817186779fF877e418Ab759F09  →  balance: 3075000000000000

[Step 1] Withdrawing fee tokens on Ethereum Sepolia
Recipient:    0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
✅ Fee tokens withdrawn successfully!

========================================
✅ Withdrawal complete on Ethereum Sepolia!
========================================
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Recipient:    0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
Recipient:    https://sepolia.etherscan.io/address/0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
========================================
```

Or withdraw as the pool owner:

```bash filename="Terminal"
RECIPIENT=0xYourRecipientAddress \
  FEE_TOKENS="$ETHEREUM_SEPOLIA_LINK,$ETHEREUM_SEPOLIA_TOKEN" \
  forge script \
  script/operations/WithdrawFeeTokens.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💸 Withdraw Fee Tokens
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Withdraw fee tokens
========================================

Pool Token:   0xD73D06d36cEa36817186779fF877e418Ab759F09 (for reference)

Tokens to Withdraw:
  [0] 0x779877A7B0D9E8603169DdbD7836e478b4624789  →  balance: <LINK_BALANCE_WEI>
  [1] 0xD73D06d36cEa36817186779fF877e418Ab759F09  →  balance: 3075000000000000

[Step 1] Withdrawing fee tokens on Ethereum Sepolia
Recipient:    0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
✅ Fee tokens withdrawn successfully!

========================================
✅ Withdrawal complete on Ethereum Sepolia!
========================================
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Recipient:    0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
Recipient:    https://sepolia.etherscan.io/address/0x368b6c4218Cd5B8feF04eFDb207Bd52f0566c411
========================================
```

Verify the balances after withdrawal:

```bash filename="Terminal"
FEE_TOKENS="$ETHEREUM_SEPOLIA_LINK,$ETHEREUM_SEPOLIA_TOKEN" \
  forge script \
  script/operations/GetFeeTokenBalances.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
🔍 Get Fee Token Balances
========================================
Chain:        Ethereum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Inspect fee token balances
========================================

Pool Token:   0xD73D06d36cEa36817186779fF877e418Ab759F09 (for reference)

Fee Token Balances:
  [0] 0x779877A7B0D9E8603169DdbD7836e478b4624789  →  balance: 0 ⚠️  (skipping)
  [1] 0xD73D06d36cEa36817186779fF877e418Ab759F09  →  balance: 0 ⚠️  (skipping)

ℹ️  No fee tokens have a non-zero balance in the pool. Nothing to withdraw.
========================================
```

> **NOTE: ERC20 fee tokens only**
>
> - `WithdrawFeeTokens.s.sol` accepts ERC20 token addresses. It does not withdraw native gas tokens.
> - This tutorial uses LINK for the fee-token portion so the accrued flat fee component can be inspected and withdrawn
>   with the existing script.

### 7. Disable the Fee Configuration

Disabling a lane deletes the pool-level override and makes the OnRamp use FeeQuoter defaults for that lane. Disabling does not withdraw already accrued fee balances.

1. Disable the Ethereum Sepolia → Arbitrum Sepolia fee config:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  DISABLE=true \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Update Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       Disable fee config
========================================

Dest Chain Selector: 3478487238524512106

[Step 1] Disabling fee config for lane to Arbitrum Sepolia
✅ Fee config disabled for this lane.
    The OnRamp will now use FeeQuoter defaults for this destination.

========================================
✅ Operation Complete!
========================================
Token Pool: 0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

2. Verify the Ethereum Sepolia → Arbitrum Sepolia fee config is disabled:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1 \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_SEPOLIA_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Get Token Transfer Fee Config
========================================
Chain:        Ethereum Sepolia
Remote Chain: Arbitrum Sepolia
Token Pool:   0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
Action:       View fee config
========================================

Dest Chain Selector: 3478487238524512106

Fee Configuration:
  isEnabled:                    false
  destGasOverhead:              0
  destBytesOverhead:            0
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       0
  fastFinalityTransferFeeBps:   0

⚠️  Fee config is disabled for this lane.
    The OnRamp will fall back to FeeQuoter defaults for this destination.

========================================
Token Pool:   https://sepolia.etherscan.io/address/0x147D4625b71f58D7CFA54BB705DC7741B94e0CE9
========================================
```

3. Disable the Arbitrum Sepolia → Ethereum Sepolia fee config:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  DISABLE=true \
  forge script \
  script/configure/fee-config/UpdateTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL \
  --account $KEYSTORE_NAME \
  --broadcast
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Update Token Transfer Fee Config
========================================
Chain:        Arbitrum Sepolia
Remote Chain: Ethereum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       Disable fee config
========================================

Dest Chain Selector: 16015286601757825753

[Step 1] Disabling fee config for lane to Ethereum Sepolia
✅ Fee config disabled for this lane.
    The OnRamp will now use FeeQuoter defaults for this destination.

========================================
✅ Operation Complete!
========================================
Token Pool: 0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Token Pool:   https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

4. Verify the Arbitrum Sepolia → Ethereum Sepolia fee config is disabled:

```bash filename="Terminal"
DEST_CHAIN=ETHEREUM_SEPOLIA \
  forge script \
  script/configure/fee-config/GetTokenTransferFeeConfig.s.sol \
  --rpc-url $ETHEREUM_TESTNET_SEPOLIA_ARBITRUM_1_RPC_URL
```

Your output should look something like this:

```bash filename="Terminal"
========================================
💰 Get Token Transfer Fee Config
========================================
Chain:        Arbitrum Sepolia
Remote Chain: Ethereum Sepolia
Token Pool:   0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
Action:       View fee config
========================================

Dest Chain Selector: 16015286601757825753

Fee Configuration:
  isEnabled:                    false
  destGasOverhead:              0
  destBytesOverhead:            0
  finalityFeeUSDCents:          0
  fastFinalityFeeUSDCents:      0
  finalityTransferFeeBps:       0
  fastFinalityTransferFeeBps:   0

⚠️  Fee config is disabled for this lane.
    The OnRamp will fall back to FeeQuoter defaults for this destination.

========================================
Token Pool:   https://sepolia.arbiscan.io/address/0x7D2f4A6c8E1b3D5a9F0c2E4b6A8d1C3e5F7a9B2d
========================================
```

> **CAUTION: Troubleshooting**
>
> - **Owner revert:** confirm `KEYSTORE_NAME` is the owner of the source-chain token pool.
> - **Fee admin withdrawal revert:** confirm the fee admin was set, the correct fee admin keystore is
>   used, and the action is withdrawal rather than owner-only configuration.
> - **Missing gas:** confirm the broadcaster has native gas on the source chain.
> - **Missing LINK:** confirm the sender has source-chain LINK when using `--fee-token LINK`.
> - **Missing lane:** confirm the pool lane was configured with `ApplyChainUpdates.s.sol`.
> - **Wrong lane or pool:** confirm `--rpc-url`, `DEST_CHAIN`, and the source pool
>   env var match the intended source -> destination lane.
> - **Invalid config:** confirm `DEST_GAS_OVERHEAD` is not `0`, `DEST_BYTES_OVERHEAD` is at least `32`, and basis points values are below `10000`.
> - **Fast-finality revert:** confirm the pool allows block-depth finality and the requested `finality=<N>` is not below the pool minimum.
> - **No accrued fees:** confirm `FEE_TOKENS` includes LINK and the source token, the send
>   completed, native fee token was not used, and flat or basis points fee values are non-zero.

> **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.