Prerequisites for Canton as Destination Tutorials

Before starting the Canton as Destination (any2canton) tutorials, ensure you have the following:

Development Environment

  • Node.js v20 or higher: You can use the nvm package to install and switch between Node.js versions. Once installed, verify the node version with:

    Terminal
    node -v
    

    Example output:

    $ node -v
    v22.15.0
    
  • npm: For installing and managing dependencies.

  • Git: For cloning the repository.

Starter Kit Repository

  1. Clone the CCIP Canton Starter Kit:

    Terminal
    git clone https://github.com/smartcontractkit/ccip-starter-kit-canton.git
    
  2. Navigate to the directory:

    Terminal
    cd ccip-starter-kit-canton
    
  3. Install dependencies:

    Terminal
    npm install
    

The starter kit uses @chainlink/ccip-sdk v1.10+ for sending from Ethereum Sepolia and executing on Canton.

Understanding Network Configuration

Lane defaults live in helperConfig.ts:

  • Canton testnet chain selector: 9268731218649498074
  • Ethereum Sepolia chain selector: 16015286601757825753
  • Token lane: Canton LINK ↔ Sepolia TEST (0xeEe6675b20fE5950eb51361b93021D076289F612)

Canton deployment fields live in config/canton-config.json — see the Canton as Source prerequisites for the full file reference. Replace party and transferInstructionUrl; other fields are pre-configured for the Canton CCIP testnet lane.

Wallets and Accounts

  • Ethereum Sepolia wallet and private key: Required to send CCIP messages from Sepolia (any2canton send scripts). Set up a wallet like MetaMask, export the private key for the account you send from, and add it to .env as EVM_PRIVATE_KEY.

  • Canton party: The destination receiver on Canton. Defaults to the party field in canton-config.json. Override with --cantonReceiver on send scripts or --receiver on any2canton:manual-exec when needed.

Environment Configuration (.env file)

Create .env from the example:

Terminal
cp .env.example .env
cp config/canton-config.example.json config/canton-config.json

Fill in the following values:

VariableDescription
EVM_PRIVATE_KEYSepolia signer hex key (with or without 0x prefix)
ETHEREUM_SEPOLIA_RPC_URLSepolia JSON-RPC URL
CANTON_LEDGER_URLCanton participant JSON Ledger API URL (required for any2canton:manual-exec; not EDS or the validator)
CANTON_CONFIG_PATHPath to canton-config.json
CANTON_AUTH_URLOkta authorization server URL for your Canton party
CANTON_CLIENT_ID / CANTON_CLIENT_SECRETOkta credentials for JWT auth on Canton

In canton-config.json, set party to your Canton testnet party ID and transferInstructionUrl to your validator's transfer-instruction API. Contact Chainlink for assigned values on CCIP testnet, or see source prerequisites for field reference.

Send scripts use a default --gasLimit of 50000 for destination ccipReceive (see optional script flags in source prerequisites).

Example .env file:

.env
EVM_PRIVATE_KEY=0xYourSepoliaPrivateKey
ETHEREUM_SEPOLIA_RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY
CANTON_LEDGER_URL=https://your-canton-ledger-api.example.com
CANTON_CONFIG_PATH=./config/canton-config.json
CANTON_AUTH_URL=https://auth.example.com
CANTON_CLIENT_ID=your_okta_client_id
CANTON_CLIENT_SECRET=your_okta_client_secret

Testnet Tokens

ETH on Ethereum Sepolia

ETH pays for Sepolia transaction fees and CCIP fees (default --feeToken native). Use the Chainlink Faucet to obtain test ETH.

Pass --feeToken link on any2canton send scripts to pay CCIP fees in LINK instead of ETH. Use the Chainlink Faucet for test LINK.

TEST token on Ethereum Sepolia (token transfer tutorials)

Token transfer tutorials send the Sepolia TEST token (BurnMintERC20WithDrip). Mint test tokens with the starter kit faucet:

Terminal
npm run faucet:evm-test

This calls drip() on the TEST token contract and credits 1 TEST to your EVM_PRIVATE_KEY wallet.

Canton holdings after execution

TEST burned on Sepolia mints LINK on Canton only after you run any2canton:manual-exec once the message is ready. Data-only messages do not transfer tokens.

Check balances before and after execution:

Terminal
npm run check-balance

Verify Setup

Confirm Sepolia and Canton configuration:

Terminal
npm run check-balance -- --chain sepolia --token test
npm run check-balance -- --chain canton --token link

When setup is complete, continue to the Canton as Destination tutorials.

Get the latest Chainlink content straight to your inbox.