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:
Terminalnode -vExample output:
$ node -v v22.15.0 -
npm: For installing and managing dependencies.
-
Git: For cloning the repository.
Starter Kit Repository
-
Clone the CCIP Canton Starter Kit:
Terminalgit clone https://github.com/smartcontractkit/ccip-starter-kit-canton.git -
Navigate to the directory:
Terminalcd ccip-starter-kit-canton -
Install dependencies:
Terminalnpm 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 (
any2cantonsend scripts). Set up a wallet like MetaMask, export the private key for the account you send from, and add it to.envasEVM_PRIVATE_KEY. -
Canton party: The destination receiver on Canton. Defaults to the
partyfield incanton-config.json. Override with--cantonReceiveron send scripts or--receiveronany2canton:manual-execwhen needed.
Environment Configuration (.env file)
Create .env from the example:
cp .env.example .env
cp config/canton-config.example.json config/canton-config.json
Fill in the following values:
| Variable | Description |
|---|---|
EVM_PRIVATE_KEY | Sepolia signer hex key (with or without 0x prefix) |
ETHEREUM_SEPOLIA_RPC_URL | Sepolia JSON-RPC URL |
CANTON_LEDGER_URL | Canton participant JSON Ledger API URL (required for any2canton:manual-exec; not EDS or the validator) |
CANTON_CONFIG_PATH | Path to canton-config.json |
CANTON_AUTH_URL | OIDC authorization server URL (from your validator setup) |
CANTON_CLIENT_ID / CANTON_CLIENT_SECRET | OIDC credentials for ledger auth on Canton |
In canton-config.json, set party to your Canton testnet party ID and transferInstructionUrl to your validator's transfer-instruction API. See source prerequisites for field reference.
Send scripts use a default --gasLimit of 200000 for destination ccipReceive (see optional script flags in source prerequisites).
Example .env file:
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_client_id
CANTON_CLIENT_SECRET=your_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.
LINK on Ethereum Sepolia (optional)
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:
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:
npm run check-balance
Verify Setup
Confirm Sepolia and Canton configuration:
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.