Prerequisites
Before you begin, ensure that you’ve:- Installed Node.js v22+ and npm.
- Created an EVM wallet using a wallet provider such as MetaMask and added the Base Sepolia and Arc Testnet networks.
- Funded your EVM wallet with testnet tokens:
- Get testnet USDC from the Circle Faucet.
- Get native tokens for Base Sepolia from a public faucet.
- Get native tokens for Arc Testnet from the Console Faucet.
Step 1. Set up the project
This step shows you how to prepare your project and environment.1.1. Set up your development environment
Create a new directory and install Bridge Kit and its dependencies:Shell
1.2. Initialize and configure the project
First, initialize the project. This command creates atsconfig.json file:
Shell
tsconfig.json file:
Shell
1.3. Configure environment variables
Create an.env file in the project directory and add your wallet private key,
replacing {YOUR_PRIVATE_KEY} with the private key from your Base Sepolia (or
any EVM) wallet.
If you use MetaMask, follow their guide for how to find and export your
private
key.
Shell
Step 2. Bridge USDC
This step shows you how to set up your script, execute the bridge transfer, and check the result.2.1. Create the script
Create anindex.ts file in the project directory and add the following code.
This code sets up your script and transfers 1 USDC from Base Sepolia to Arc
Testnet:
Using other EVM chains? Change the
chain values in kit.bridge() and ensure
your source wallet has USDC and both wallets have native tokens.TypeScript
2.2. Run the script
Save theindex.ts file and run the script in your terminal:
Shell
2.3. Verify the transfer
After the script finishes, find the returnedsteps array in the terminal
output. Each transaction step includes an explorerUrl. Use that link to verify
that the USDC amount matches the amount you transferred.
The following code is an example of how an approve step might look in the
terminal output. The values are used in this example only and are not a real
transaction:
Shell