Reference
Developer Resources
Repository, network details, contract addresses, explorer links, architecture and integration guides.
Repository
- GitHub repositoryFrontend, API routes, contract, tests and scripts.
- ArcSocialPay.solContract source.
- IssuesBugs, questions and feature requests.
git clone https://github.com/Optimusjishu5/Arcsocialpay.git
cd Arcsocialpay
bun install # or: npm install
cp .env.example .env
bun run dev # or: npm run devArc Mainnet
| Detail | Value |
|---|---|
| Network | Arc Mainnet |
| Chain ID | 5042 |
| RPC | https://rpc.mainnet.arc.io |
| Explorer | https://explorer.arc.io |
| Gas token | USDC (18-decimal native view) |
| USDC (ERC-20) | 0x3600000000000000000000000000000000000000, 6 decimals |
| CCTP domain | 26 |
Contract addresses
SocialPay deployments:
ArcSocialPay
Arc Explorer0x3b61FC789342B02Ae9DA3Bcece910AFaAd40bf54
Payments and tips with an onchain memo. Holds no funds, no fees, not upgradeable.
In this repository: contracts/ArcSocialPay.sol, src/contracts/arcSocialPay.ts
Create2Factory
Arc Explorer0x375Fb60CA0ba2f3bfBfE95eb122ecF087bD1334d
Deployment infrastructure for deterministic addresses. The app does not call it.
In this repository: contracts/script/Create2Factory.sol
Contracts SocialPay talks to on Arc Mainnet:
USDC (ERC-20 view, 6 decimals)
Arc Explorer0x3600000000000000000000000000000000000000
Circle USDC on Arc. Also the gas token (18-decimal native view).
In this repository: src/hooks/useArcWallet.ts, src/lib/arcTokens.ts
EURC
Arc Explorer0xbEf5f6d51CB62b58e6A8f77868681825C6fe21c1
Circle euro stablecoin on Arc.
In this repository: src/lib/arcTokens.ts
cirBTC
Arc Explorer0x171A4217b86A807A64eB94757db6849fb4bDbAA0
Circle wrapped Bitcoin on Arc (8 decimals).
In this repository: src/lib/arcTokens.ts
CCTP TokenMessengerV2
Arc Explorer0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d
Circle CCTP contract that burns USDC when bridging out of Arc. Used to recognise bridges in Activity.
In this repository: src/lib/bridgeDetect.ts
Uniswap v3 Factory
Arc Explorer0xf0db7b58379503491d857dB50AC9ece64c653918
Uniswap v3 deployment on Arc.
In this repository: src/lib/uniswapArc.ts
Uniswap v3 QuoterV2
Arc Explorer0x7dfd4f31be6814d2906bde155c3e1b146eac1468
Read-only price quotes for Best price swaps.
In this repository: src/lib/uniswapArc.ts
Uniswap SwapRouter02
Arc Explorer0x53bf6b0684ec7ef91e1387da3d1a1769bc5a6f77
Router that executes Uniswap swaps.
In this repository: src/lib/uniswapArc.ts
Multicall3
Arc Explorer0xcA11bde05977b3631167028862bE2a173976CA11
Reads many token balances in one request.
In this repository: src/lib/arcTokens.ts
Explorer source verification is not claimed for any address here. Open the address on Arc Explorer to check.
Technical architecture
Your device
SocialPay web app
- Next.js 15, React 18, Tailwind
- Pay, Swap, Bridge, Messages, Explore
- src/App.tsx, src/components/
Your wallet
- Injected wallet via ConnectKit and wagmi
- You sign every transaction
- Keys never leave the wallet
Browser storage
- Settings, drafts, activity cache
- Used for chat when no database is set
- src/store/appStore.ts
SocialPay services (Next.js API routes)
Chat and social API
- app/api/conversations, messages, posts
- Wallet-signed sessions guard private data
- Optional Turso (LibSQL) database
Explorer and upstream proxies
- app/api/explorer, tx, upstream
- Optional Blockscout key for history
- Token and chain lists, cached
Transaction verification
- app/api/tx reads the Arc node
- Checks receipt, transaction and logs
- src/server/arcRpc.ts
Arc Mainnet (chain 5042)
ArcSocialPay
- pay() and tip() with a memo
- Pulls USDC, forwards it at once, holds nothing
- 0x3b61...bf54
Circle USDC, EURC, cirBTC
- USDC is also the gas token
- 6 decimals as ERC-20, 18 as gas
- src/lib/arcTokens.ts
Swap and bridge protocols
- Uniswap v3, KyberSwap, LI.FI
- Circle App Kit, CCTP, Across, Relay
- Contracts called directly or via quotes
Environment variables
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_ARC_RPC | Override the Arc RPC URL. Defaults to the public Arc Mainnet RPC. |
NEXT_PUBLIC_SOCIAL_PAY_ADDRESS | Point the app at a different ArcSocialPay deployment. Rebuild after changing it. |
TURSO_DATABASE_URL, TURSO_AUTH_TOKEN | Enable server-side chat and social storage. |
CHAT_SESSION_SECRET | Secret that signs wallet sessions. Falls back to a key derived from the database token. |
BLOCKSCOUT_API_KEY | Optional. Lets the server read explorer history faster. |
Keep secrets in .env, never in code, and never prefix them with NEXT_PUBLIC_.
Integration guides
Link to a prefilled payment
Send people to the app with the recipient, and optionally an amount and a note, in the query string. The recipient must be a valid address.
/?pay=<recipient address>&amount=5&memo=Invoice%2042Read payments from the contract
Read Payment events with viem. The Arc RPC limits the block range of a log query, so scan in bounded windows starting at the contract creation block (24,774,515) rather than from block zero.
import { createPublicClient, http, parseAbiItem } from 'viem'
const client = createPublicClient({ transport: http('https://rpc.mainnet.arc.io') })
const payment = parseAbiItem(
'event Payment(address indexed sender, address indexed recipient, uint256 amount, string memo)',
)
const logs = await client.getLogs({
address: '0x3b61FC789342B02Ae9DA3Bcece910AFaAd40bf54',
event: payment,
fromBlock: 24_774_515n,
toBlock: 24_782_514n, // keep windows small, then advance
})Pay through the contract
Approve USDC for the contract, then call pay. Amounts use 6 decimals.
// 1. usdc.approve(socialPay, amount)
// 2. socialPay.pay(recipient, amount, 'memo')
import { SOCIAL_PAY_ABI } from '@/contracts/arcSocialPay'Check a transaction
The app exposes GET /api/tx?hash=0x..., which checks the receipt, transaction and logs on the Arc node and decodes SocialPay events. GET /api/health reports the chain and whether the database is configured.
Developer contact
The maintainer contact for this project is its GitHub repository. Open an issue for bugs, questions or integration help.
Found something unclear or out of date? Open an issue on GitHub.