Deploy smart contract with Foundry, Hardhat and Vscode. Use bridge USDC to Arc Testnet frontend.
Step-by-step guide to deploying smart contracts on Arc Testnet
This guide walks you through deploying a smart contract on the Arc Testnet using Foundry.
By the end, you’ll understand how to configure RPC, deploy using VS Code, and interact with your contract.
Arc is a stablecoin-native blockchain that uses USDC as gas.
It is currently in testnet phase, and this tutorial will show you how to:
- Set up your wallet and RPC
- Configure Foundry for Arc
- Write and deploy a Solidity contract
- Interact with it directly from VS Code
Before you begin, ensure you have:
- A GitHub account
- Node.js and Git installed
- VS Code installed
- A wallet like MetaMask or OKX Wallet
-
Open your wallet → go to Networks → Add Network Manually
-
Or use button Metamask on https://testnet.arcscan.app bottom left page :
- Fill in the following details:
| Field | Value |
|---|---|
| Network Name | Arc Testnet |
| RPC URL | https://rpc.testnet.arc.network |
| Chain ID | 5042002 |
| Currency Symbol | USDC |
| Block Explorer | https://testnet.arcscan.app |
- Save it.
You can now switch to Arc Testnet in your wallet.
curl -L https://foundry.paradigm.xyz | bash
foundryupInitialize a new Foundry project and move into the directory:
forge init hello-arc && cd hello-arcCreate a .env file in your project root:
ARC_TESTNET_RPC_URL="https://rpc.testnet.arc.network"
PRIVATE_KEY="0xYourPrivateKeyHere"
⚠️ Never commit your.envfile to GitHub. Keep it private.
Delete the default Counter.sol and create a new file:
src/HelloArchitect.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;
contract HelloArchitect {
string private greeting;
event GreetingChanged(string newGreeting);
constructor() {
greeting = "Hello Architect!";
}
function setGreeting(string memory newGreeting) public {
greeting = newGreeting;
emit GreetingChanged(newGreeting);
}
function getGreeting() public view returns (string memory) {
return greeting;
}
}forge buildVisit https://faucet.circle.com,
select Arc Testnet, paste your wallet address, and request testnet USDC.
- Open the project in VS Code
- Open a new terminal and run:
source .env
forge create src/HelloArchitect.sol:HelloArchitect \
--rpc-url $ARC_TESTNET_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcastGo to https://testnet.arcscan.app
Paste the transaction hash from your deployment output to view the transaction.
Call the getGreeting() function directly using Foundry’s cast command:
cast call <YOUR_CONTRACT_ADDRESS> "getGreeting()(string)" \
--rpc-url $ARC_TESTNET_RPC_URLOutput:
Hello Architect!
If you prefer deploying without the command line:
- Install Hardhat
npm install --save-dev hardhat
npx hardhat- Configure your Hardhat network in
hardhat.config.ts:
networks: {
arc: {
url: "https://rpc.testnet.arc.network",
accounts: [process.env.PRIVATE_KEY!],
},
},- Create a deploy script under
scripts/deploy.ts:
import { ethers } from "hardhat";
async function main() {
const Contract = await ethers.deployContract("HelloArchitect");
await Contract.waitForDeployment();
console.log("Deployed to:", await Contract.getAddress());
console.log("Transaction hash:", Contract.deploymentTransaction()?.hash);
}
main().catch((error) => {
console.error(error);
process.exit(1);
});- Run the deploy:
npx hardhat run scripts/deploy.ts --network arc- Extend your contract with on-chain logic
- Explore Arc’s USDC-based gas model
- Deploy a frontend using React + Wagmi + RainbowKit
- Experiment with other Move- or EVM-compatible tools
create-bridge-kit Scaffold a working bidirectional USDC bridge modal between Ethereum Sepolia and Arc Testnet using Circle Bridge Kit.
Bridge Base Sepolia to Arc Testnet is a example route !
- Node.js 18+
- MetaMask or compatible wallet
- USDC on Ethereum Sepolia or Arc Testnet (depending on bridge direction)
- Get Sepolia USDC from Circle Faucet https://faucet.circle.com
- Get Arc Testnet USDC from Arc Testnet faucet https://faucet.circle.com
npm i create-bridge-kitnpx create-bridge-kit my-bridge-app
cd my-bridge-app
npm install
npm run devExample online https://www.npmjs.com/package/create-bridge-kit
Use bridge kit by @realchriswilder https://bridge-to-arc.netlify.app/
MIT © 2025
Created by [cryptopunkstar]