- EVM
- Solana
Prerequisites
Before you begin, ensure that you’ve:- Installed Node.js v22+
-
Prepared an EVM testnet wallet with the private key available
- Added Arc testnet network to your wallet (network details)
- Funded your testnet wallet with USDC and native tokens
-
Created a TypeScript project and have
vieminstalled -
You’ve set up a
.envfile with the following variables:.env
Steps
Follow these steps to establish a unified USDC balance on Arc Testnet. You can adapt this example for any supported EVM chain.Step 1. Approve the Gateway Wallet to transfer USDC from your address
Create a new file calleddeposit.ts in the root of your project, and add the
following code to it. This code calls the approve() method on the USDC
contract to allow the Gateway Wallet contract to transfer USDC from your wallet.deposit.ts
Step 2. Call the deposit method on the Gateway Wallet contract
Add the following code to thedeposit.ts file to call the
deposit() method
on the Gateway Wallet contract. Note that you must use the deposit() method
and not the standard transfer on the USDC contract.deposit.ts