| Feature | Ethereum | Arc |
|---|---|---|
| Tokens needed | ETH (gas) + USDC (payment) = 2 tokens | Only USDC (used for both payment and gas) |
| Gas cost | $5 to $10, changes every minute | $0.01, fixed |
| Confirmation time | 3+ minutes | Under 1 second |
node -v npm -v
If any error shows in your PowerShell then at terminal paste this:
Temporarily:
+ -> select Command PromptPermanently (set as default terminal):
Ctrl + , to open Settingsterminal.integrated.defaultProfile.windows"Command Prompt"If you still need PowerShell scripts to run:
Set-ExecutionPolicy RemoteSigned
Y to confirmThis allows local scripts to run safely.
Note: Do this only when your work is finished, otherwise scripts will stop working again.
Get-ExecutionPolicy -List
Set-ExecutionPolicy Restricted -Scope LocalMachine
YScripts will now be blocked again like before.
You can always revert back after your work is done, or change the terminal to CMD instead of PowerShell.
Network name: Arc Testnet RPC URL: https://rpc.testnet.arc.network Chain ID: 5042002 Currency: USDC Explorer: https://testnet.arcscan.app
On Arc, USDC is used for both sending money and paying transaction fees (gas).
Copy and paste these commands one at a time:
mkdir arc-day-01 cd arc-day-01 npm init -y
This creates a folder called arc-day-01 and a package.json file that tracks your project info.
npm install @circle-fin/app-kit @circle-fin/adapter-viem-v2 viem typescript tsx
What was installed:
@circle-fin/app-kit -> Circle's tool for sending USDCviem -> Library for talking to blockchainstypescript -> Better JavaScript with typestsx -> Runs TypeScript codeThis takes 1 to 2 minutes. Wait for it to finish.
0x1234abcd...).envPRIVATE_KEY=your_wallet_private_key_here
your_wallet_private_key_here with the private key you copiedExample:
PRIVATE_KEY=0x12345.....
transfer.ts// AppKit handles blockchain actions
import { AppKit } from "@circle-fin/app-kit";
// Viem adapter signs transactions with your private key
import { createViemAdapterFromPrivateKey } from "@circle-fin/adapter-viem-v2";
// SendParams ensures safe, typed transaction data
import type { SendParams } from "@circle-fin/app-kit";
// Create an instance of App Kit
const kit = new AppKit();
const sendUSDC = async () => {
console.log("Starting USDC transfer on Arc Testnet\n");
// Step 1: Create adapter from your private key
const adapter = createViemAdapterFromPrivateKey({
privateKey: process.env.PRIVATE_KEY as string,
});
console.log("Wallet connected");
// Step 2: Define the transfer details
const sendParams: SendParams = {
from: {
adapter,
chain: "Arc_Testnet"
},
to: "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1", // Replace with your recipient
amount: "1.00", // Sending 1 USDC
token: "USDC",
};
console.log("Preparing to send:", sendParams.amount, "USDC");
console.log("To address:", sendParams.to);
// Step 3: Estimate the gas fee first
console.log("\nEstimating transaction cost...");
const estimate = await kit.estimateSend(sendParams);
console.log("Estimated gas fee:", estimate.fee, "USDC");
console.log(
"Total cost:",
(parseFloat(sendParams.amount) + parseFloat(estimate.fee)).toFixed(6),
"USDC"
);
// Step 4: Send the transaction
console.log("\nSending transaction...");
const result = await kit.send(sendParams);
// Step 5: Show results
console.log("\nSUCCESS! Transaction completed");
console.log("----------------------------------");
console.log("Transaction Hash:", result.txHash);
console.log("View on Explorer:", result.explorerUrl);
console.log("----------------------------------");
};
// Run the transfer function
sendUSDC().catch((error) => {
console.error("Error:", error.message);
process.exit(1);
});
In the VS Code terminal, run:
npx tsx --env-file=.env transfer.ts
What you will see:
Starting USDC transfer on Arc Testnet Wallet connected Preparing to send: 1.00 USDC To address: 0x742d.... Estimating transaction cost... Estimated gas fee: 0.010000 USDC Total cost: 1.010000 USDC Sending transaction... SUCCESS! Transaction completed ------------------------------------------ Transaction Hash: 0x1234567890abcdef... View on Explorer: https://testnet.arcscan.app/tx/0x1234... ------------------------------------------
Error: Cannot find module '@circle-fin/app-kit'
Fix: Run the following command:
npm install @circle-fin/app-kit @circle-fin/adapter-viem-v2 viem
Error: Private key is not defined
Fix: Check your .env file. Make sure it contains:
PRIVATE_KEY=0x...
Error: Insufficient funds
Fix: Get more testnet USDC from https://faucet.circle.com
Error: Invalid address
Fix: Make sure the recipient address starts with 0x and is exactly 42 characters long.
Before Day 2, try:
Get comfortable with the flow. We will build on this tomorrow.
.env file has the correct private keyReady for Day 2? See you tomorrow!