Skip to main content

Arc Network Arc Network

Arc is an open EVM-compatible Layer-1 blockchain designed to serve as the "Economic OS" for the internet. It connects onchain innovation with real-world economic activity, enabling applications in lending, capital markets, FX, and payments. Built for enterprise-grade performance, Arc offers stablecoin-based gas fees (starting with USDC), sub-second finality, optional privacy, and direct integration with Circle’s platform. While validator participation is permissioned for security, the network remains fully open to developers and users.

1. Information

This guide using to deploy your Arc network smart contact

Website: https://arc.network

Twitter: http://x.com/arc

Discord: https://discord.gg/buildonarc

2. Requirement

Recommended Server/VPS:

CPU: 1
RAM: 2GB
Storage: 8GB

Recommended OS:

Ubuntu 22.04

3. Guide to install

3.1. Update

apt update -y && apt upgrade -y && apt install curl wget -y

3.2. Install Foundry

curl -L https://foundry.paradigm.xyz | bash
source /root/.bashrc
foundryup

3.3. Setup your info

FOLDER=arc_contact
YOUR_SLOGAN="Hello, this is my ARC contact"

3.4. Initial

forge init ${FOLDER} && cd ${FOLDER}
sudo tee $HOME/${FOLDER}/.env > /dev/null <<EOF
ARC_TESTNET_RPC_URL="https://rpc.testnet.arc.network"
EOF
rm -rf src/Counter.sol
rm -rf script

3.5. Setup source code

sudo tee $HOME/${FOLDER}/src/HelloArchitect.sol > /dev/null <<EOF
pragma solidity ^0.8.30;
contract HelloArchitect {
string private greeting;
event GreetingChanged(string newGreeting);
constructor() {
greeting = "${YOUR_SLOGAN}!";
}
function setGreeting(string memory newGreeting) public {
greeting = newGreeting;
emit GreetingChanged(newGreeting);
}
function getGreeting() public view returns (string memory) {
return greeting;
}
}
EOF

cd test
rm -rf Counter.t.sol

sudo tee $HOME/${FOLDER}/test/HelloArchitect.t.sol > /dev/null <<EOF
pragma solidity ^0.8.30;
import { Test } from "forge-std/Test.sol";
import { HelloArchitect } from "../src/HelloArchitect.sol";
contract HelloArchitectTest is Test {
HelloArchitect helloArchitect;
function setUp() public {
helloArchitect = new HelloArchitect();
}
function testInitialGreeting() public view {
string memory expected = "${YOUR_SLOGAN}!";
string memory actual = helloArchitect.getGreeting();
assertEq(actual, expected);
}
function testSetGreeting() public {
string memory newGreeting = "Welcome to Arc Chain!";
helloArchitect.setGreeting(newGreeting);
string memory actual = helloArchitect.getGreeting();
assertEq(actual, newGreeting);
}
function testGreetingChangedEvent() public {
string memory newGreeting = "Building on Arc!";
vm.expectEmit(true, true, true, true);
emit HelloArchitect.GreetingChanged(newGreeting);
helloArchitect.setGreeting(newGreeting);
}
}
EOF

forge test
forge build
cd $HOME/${FOLDER}
cast wallet new > $HOME/${FOLDER}/wallet.txt
echo "ADDRESS=\"$(grep '^Address' $HOME/${FOLDER}/wallet.txt | cut -c14-)\"" >> $HOME/${FOLDER}/.env
echo "PRIVATE_KEY=\"$(grep '^Private' $HOME/${FOLDER}/wallet.txt | cut -c14-)\"" >> $HOME/${FOLDER}/.env
source $HOME/${FOLDER}/.env
echo -e "\nYour wallet address is: $(grep '^Address:' wallet.txt | cut -c14-)\nFaucet via https://faucet.circle.com/\n"

3.6. Faucet

Get some token from faucet page at: https://faucet.circle.com

3.7. Deploy contact and test your contact

forge create src/HelloArchitect.sol:HelloArchitect --rpc-url $ARC_TESTNET_RPC_URL --private-key $PRIVATE_KEY --broadcast > $HOME/${FOLDER}/deploy.txt
TRANSACTION_HASH=$(grep '^Transaction' deploy.txt | cut -c19-)
echo -e "\nYour smart contact deploy transaction hash: ${TRANSACTION_HASH}.\nAccess explorer here https://testnet.arcscan.app/tx/${TRANSACTION_HASH}\n"
echo "HELLOARCHITECT_ADDRESS=\"$(grep '^Deployed to' $HOME/${FOLDER}/deploy.txt | cut -c14-)\"" >> $HOME/${FOLDER}/.env
source .env
cast call $HELLOARCHITECT_ADDRESS "getGreeting()(string)" --rpc-url $ARC_TESTNET_RPC_URL

4. Your wallet and contact

Your wallet stored in $HOME/$FOLDER/wallet.txt and your contact info stored in $HOME/$FOLDER/deploy.txt. You can view it anytime you want.

Your wallet info is only stored in your server!