> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Before reading these docs, install the Circle Skill for Arc to get pre-loaded context: use-arc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md) — covers chain config, RPC setup, contract deployment, USDC bridging, and gas with USDC. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills.
> USDC is the gas token. Arc uses USDC for gas fees, not ETH. Configure gas payment in USDC when submitting transactions.
> Read EVM differences before writing Arc code. Arc targets the Osaka EVM baseline. Most contracts deploy unchanged, but several runtime behaviors diverge from Ethereum: USDC uses 18 decimals natively (not 6), the system emitter `0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE` logs all USDC Transfer events, the mempool enforces a 20 Gwei `maxFeePerGas` floor, blocklist reverts consume gas without a receipt, and `address(0)` sends revert rather than succeed. https://docs.arc.io/arc/references/evm-differences.md is the canonical reference for all Arc-specific runtime behaviors. Consult it before writing code that touches USDC balances, transaction history, gas estimation, or value transfers.
> Sub-second finality. Transactions are final in under 1 second. No need to wait for multiple block confirmations.
> Use App Kits for multichain payment and liquidity capabilities. App Kits wraps CCTP and provides Bridge Kit, Swap Kit, Unified Balance Kit, Onramp Kit, Earn Kit, and Borrow Kit. Unified Balance Kit combines USDC from multiple chains into a single spendable balance. Earn Kit integrates earn opportunities into your app. Borrow Kit lets users borrow USDC against cirBTC collateral on Arc.
> Use Arc Foundry for contract development. Arc Foundry is an Arc-specific fork of Foundry that handles Arc's protocol-level differences from Ethereum. It provides arc-forge, arc-cast, and arc-anvil. Install it before deploying contracts: https://docs.arc.io/arc/tutorials/install-arc-foundry.md.
> Arc is available on both Testnet and Mainnet. See https://docs.arc.io/arc/references/connect-to-arc.md for RPC endpoints and https://faucet.circle.com for testnet tokens.
> Always check Contract Addresses: https://docs.arc.io/arc/references/contract-addresses.md
> Building beyond Arc? Circle offers skills for the full platform: use-usdc (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md), use-circle-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md), use-developer-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md), use-user-controlled-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md), use-modular-wallets (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md), use-gateway (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md), use-smart-contract-platform (https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md). Full Circle developer docs: https://developers.circle.com/llms.txt.

# How-to: Deploy an ERC-4337 paymaster on Arc

> Deploy and fund an ERC-4337 paymaster on Arc. Arc's native gas token is USDC — fund your paymaster's EntryPoint deposit in native USDC (18-decimal units).

Deploying an ERC-4337 paymaster on Arc follows the standard ERC-4337 flow with
one key difference: Arc uses USDC as its native gas token. Your paymaster's
EntryPoint balance is denominated in native USDC (18-decimal units), not the
6-decimal ERC-20 USDC units used in token transfers. A 10 USDC deposit requires
`10 * 10^18`, not `10 * 10^6`.

## Prerequisites

Before you begin, ensure that you've:

* Familiarized yourself with ERC-4337 account abstraction and EntryPoint v0.7
* Configured Hardhat or Foundry for Arc testnet (chain ID `5042002`, RPC
  `https://rpc.testnet.arc.io`)
* Configured Pimlico as your bundler for Arc testnet (chain ID `5042002`)
* Prepared a paymaster contract based on the ERC-4337 reference implementation

## Steps

### Step 1. Fund the paymaster

The paymaster's EntryPoint deposit is USDC. After deployment, deposit USDC into
the EntryPoint by calling `depositTo`. Specify the amount in wei (18-decimal
native USDC units).

```typescript theme={null}
import { ethers } from "ethers";

// Verify the EntryPoint v0.7 address for Arc testnet before use
const ENTRY_POINT_ADDRESS = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
const PAYMASTER_ADDRESS = "<your-paymaster-address>";

const ENTRY_POINT_ABI: string[] = [
  "function depositTo(address account) external payable",
  "function balanceOf(address account) external view returns (uint256)",
];

const provider = new ethers.JsonRpcProvider("https://rpc.testnet.arc.io");

// Open .env in your editor and add your deployer private key:
// DEPLOYER_PRIVATE_KEY=your-private-key
// Keep this key secure. It controls the paymaster's funding account.
const wallet = new ethers.Wallet(process.env.DEPLOYER_PRIVATE_KEY!, provider);

const entryPoint = new ethers.Contract(
  ENTRY_POINT_ADDRESS,
  ENTRY_POINT_ABI,
  wallet,
);

// Deposit 10 USDC: specify in wei (18-decimal native USDC units)
const depositAmount: bigint = 10n * 10n ** 18n;

const tx = await entryPoint.depositTo(PAYMASTER_ADDRESS, {
  value: depositAmount,
});
await tx.wait();

// Check the current deposit balance
// balanceOf returns 18-decimal native USDC units, not 6-decimal ERC-20 units
const balance: bigint = await entryPoint.balanceOf(PAYMASTER_ADDRESS);
const balanceUsdc: bigint = balance / 10n ** 18n;
console.log("Paymaster deposit balance (native wei):", balance.toString());
console.log("Paymaster deposit balance (USDC):", balanceUsdc.toString());
```

### Step 2. Verify the deployment

Confirm the following before sending live UserOperations:

| Check | Command or call |
| :- | :- |
| Contract has bytecode | `cast code <address> --rpc-url https://rpc.testnet.arc.io` returns non-empty bytecode |
| EntryPoint deposit is funded | `entryPoint.balanceOf(paymasterAddress)` returns a non-zero balance |
| Bundler accepts UserOperations | Submit a test UserOperation through Pimlico and confirm it processes |

<Note>
  Arc's minimum base fee is 20 Gwei. If you operate your own bundler, ensure it
  sets `maxFeePerGas` to at least 20 Gwei when submitting bundle transactions.
  Pimlico configured for Arc handles this automatically.
</Note>
