Prerequisites
Before you begin, ensure that you’ve:- Installed Node.js v22+.
- Created an EVM wallet using a wallet provider such as MetaMask and added the Ethereum Sepolia and Arc Testnet networks.
- Funded your EVM wallet with testnet tokens:
- Get testnet USDC from the Circle Faucet.
- Get native tokens for Ethereum 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 App Kit and its dependencies:Shell
1.2. Configure TypeScript (optional)
This step is optional. It helps prevent missing types in your IDE or editor.
tsconfig.json file:
Shell
tsconfig.json file:
Shell
1.3. Configure environment variables
Create an.env file in the project directory:
Shell
YOUR_PRIVATE_KEY with the private
key from your Ethereum Sepolia (or any EVM) wallet:
.env
If you use MetaMask, follow their guide for how to find and export your
private
key.
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 bridges 1.00 USDC from Ethereum 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 transaction
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 bridged.
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