---
title: "在 Arc Chain 上发行 memecoin"
description: "用 Foundry 和 Alchemy RPC 在 Arc mainnet 上编写并部署固定供应量的 ERC-20，gas 用 USDC 支付；或者用 Alchemy CLI 把整个发行流程交给 coding agent。"
---

# 在 Arc Chain 上发行 memecoin

<ImageBlock
  src="https://media.alchemy.com/overviews/launch-a-memecoin-on-arc-hero-20260916.png"
  alt="在 Arc Chain 上发行 memecoin"
  width={1920}
  height={900}
/>

Arc 是 Circle 面向 stablecoin 金融设计的 blockchain，它的 [创始验证者](https://www.circle.com/pressroom/circle-announces-founding-validator-cohort-and-major-integrations-for-arc-ahead-of-september-16-mainnet-launch) 包括 BlackRock、Visa 和 Mastercard。但这些都没有让它变成一个私人俱乐部。这条 chain 对开发者开放且无需许可，mainnet 已经上线，并用 stablecoin 作为 gas，从 USDC 开始。任何人都可以在上面部署任何东西，一路上的每笔费用都以美元计价。

Arc 上的 memecoin 就是一个标准 ERC-20，只是 gas 以 USDC 计价。合约的工作方式和在任何 EVM chain 上完全一样，所以你可以自己用 Foundry 在大约二十分钟内部署一个，也可以把整个流程交给 coding agent。两条路径都在下文，包括一段可以直接复制粘贴的 prompt，任何能运行 shell 命令的智能体都能用它通过 Alchemy CLI 驱动整个发行。和你以往做过的每一次发行相比，唯一真正的区别是 gas token，所以你给部署钱包充值的是 USDC 而不是 ETH。

## 什么是 Arc？

Arc 是 Circle（USDC 的发行方）打造的 Layer-1 blockchain，面向 stablecoin 支付和金融设计。它兼容 EVM，用 USDC 作为原生 gas token，并在 [一秒内达到确定性最终性](https://docs.arc.io/arc/concepts/deterministic-finality)。它的验证者是一组许可制的金融机构。而在上面部署合约完全不需要任何许可。我们的 [《什么是 Arc》说明](https://www.alchemy.com/overviews/what-is-arc) 对这条 chain 的设计讲得更深入，包括移植合约时什么可能出问题。

[Arc mainnet 已在 Alchemy 上线](https://www.alchemy.com/blog/arc-mainnet-is-live-on-alchemy)，提供 [RPC](https://www.alchemy.com/rpc-api) 和 WebSockets、Debug API、Bundler API，以及面向 smart-account 流程的 [gas sponsorship](https://www.alchemy.com/gasless-transactions)。endpoint 列在 [Arc chain 页面](https://www.alchemy.com/arc)。

如果你之前在 Ethereum、Base 或 Arbitrum 上部署过，这套工具不会让你意外。Solidity、Foundry 和 viem 无需改动即可使用。差异体现在你给钱包充值什么，以及这条 chain 如何确认交易。

## 当 gas 是 USDC 时，什么会变？

Arc 没有波动的 gas token，所以常规发行清单里有三处行为不同：

- **给部署者充值的是 USDC，不是 ETH。** USDC 通过 Circle 的 cross-chain transfer protocol [CCTP v2](https://developers.circle.com/cctp/cctp-supported-blockchains) 以原生资产从任何受支持的 chain 进入 Arc。如果你更想用脚本处理，[Bridge Kit](https://docs.arc.io/app-kit/bridge) 把 burn-attest-mint 流程包成一次调用。
- **费用以美元计价且很小。** base fee 的目标是 [每笔大约一分钱](https://docs.arc.io/arc/references/gas-and-fees)，并且它对照平滑后的近期利用率调整，而不是逐区块调整，所以发行日的一波流量不会像 Ethereum 的 gas 拍卖那样把费用推高。你可以在开始之前用美元为整场发行做预算。
- **交易在一秒内最终确认。** Arc 运行 BFT 共识引擎，从构造上不会重组。一笔买入要么 pending，要么 final，这意味着交易你代币的人不需要任何确认次数启发式，发行日也不会有 reorg 纠纷。

有一个行为值得在发行前了解。USDC blocklist 在协议层运行，所以任何碰到 blocklist 地址的 transfer 都会 revert。这适用于 swap 的 USDC 一侧，而不是你的代币合约，但和那些 blocklist 只存在于 token 合约内部的 chain 相比，这是一个差异。

## 怎么部署代币？

在任何东西上链之前，你需要三样东西：

- **一个有资金的钱包。** gas 用 USDC 支付，通过 CCTP 桥入，或从支持 Arc 的交易所提出
- **代币合约。** 对 memecoin 来说，最小化的固定供应量 ERC-20 是标准形态。我们的 [Solidity 中的 ERC-20 标准指南](https://www.alchemy.com/overviews/erc20-solidity) 讲解了每个函数的作用。
- **一个 RPC endpoint。** 在 [dashboard](https://dashboard.alchemy.com/) 创建一个免费 app 并选择 Arc。

合约本身很短。供应量固定，没有 mint 函数，没有 owner，所以合约不会给部署者留下任何日后可以滥用的特权。不过全部供应量仍会落进部署钱包，发行之后这部分供应量的去向，下文会讲到：

<CodeSnippet
  language="solidity"
  code={`// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract Penny is ERC20 {
    constructor() ERC20("Penny", "PENNY") {
        _mint(msg.sender, 1_000_000_000 * 10 ** decimals());
    }
}`}
/>

把上面的合约保存为 `src/Penny.sol`（`forge init` 会生成一个可以删除的 `Counter.sol` 脚手架），然后用 Foundry 部署：

<CodeSnippet
  language="bash"
  code={`forge init penny && cd penny
forge install OpenZeppelin/openzeppelin-contracts
# paste the contract above into src/Penny.sol, then import your deployer key once
cast wallet import deployer --interactive
forge create src/Penny.sol:Penny \\
  --rpc-url https://arc-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY \\
  --account deployer \\
  --broadcast`}
/>

最后一条命令把合约部署到 mainnet 上线，费用从你的 USDC 余额里扣。`cast wallet import` 把私钥存进加密的 keystore，`--account` 在部署时用密码解锁，这样原始私钥就不会出现在你的 shell 历史和进程列表里。如果你想看 chain 团队自己的版本，Arc 也发布了自己的 [Foundry 教程](https://docs.arc.io/arc/tutorials/deploy-on-arc)。

## 部署之后会发生什么？

一个已部署的合约，是一枚没人能买到的代币。当你注入流动性池并开始分发供应量时，发行才算真正开始。Uniswap 和 Aerodrome 都已[在 Arc 上线](https://www.circle.com/pressroom/circle-launches-arc-mainnet-an-economic-operating-system-for-the-internet)，而在 Arc 上，天然的交易对是你的代币兑 USDC，这正是 chain 上所有人本来就为 gas 持有的资产。

这也是买家评判你的地方。经验丰富的 memecoin 交易者在碰一枚代币之前，会先检查供应量是否固定、流动性是否锁定，以及部署钱包持有多少份额。Arc 改变了这套仪式的一部分。最终性是确定的，所以交易一秒之后你读回的任何数据都已结算，rug 也没有可以藏身的 pending 窗口。

## 智能体能替你发行代币吗？

上面的每一步都可以脚本化，这让它天然适合交给 coding agent。[Alchemy CLI](https://www.alchemy.com/agents) 正是为此而生。每条命令都支持 `--json --no-interactive`，方便智能体解析输出；[agent wallets](https://www.alchemy.com/blog/agent-wallets-alchemy-cli) 给它一个有权限范围的会话来签名，而不是一把原始私钥。任何能运行 shell 命令的智能体都可以：Claude Code、Cursor、基于 OpenAI 的智能体，或者你自己的脚本。Claude Code 用户还有一条捷径：[Alchemy 插件](https://www.alchemy.com/blog/alchemy-claude-plugin-now-live) 用一条命令装好 CLI 的 skills 和 MCP 服务器。

关于分工，有一点要说清楚。CLI 没有 deploy 命令，所以智能体会通过 Foundry 对着你的 Alchemy endpoint 执行部署，所有读取状态的环节都用 CLI 完成：查余额、拉 receipt、读回合约。签名是需要弄对的地方。全部供应量会 mint 到执行部署的 Foundry keystore 账户，所以第一笔分发也由这个账户签名，而任何会花钱的 CLI 操作则由 agent wallet 会话负责。先把 keystore 设置好再把 prompt 交给智能体，否则它走到部署那一步时会没有可用的私钥。

用 `npm i -g @alchemy/cli` 安装 CLI，然后把这段 prompt 交给你的智能体。它会先向你询问代币细节，然后才写第一行 Solidity：

<CodeSnippet
  language="text"
  code={`You have the Alchemy CLI and Foundry installed. Run \`alchemy --json --no-interactive agent-prompt\` first to load the CLI's command contract, then launch a memecoin for me on Arc mainnet.

Start by asking me for:

- The token name and ticker symbol
- The total supply
- A logo image, and wait for me to upload the file before continuing

Do not invent any of these. Wait for my answers, then confirm them back to me before you write any code.

Once I have confirmed:

- Check that arc-mainnet is available with \`alchemy evm network list\`.
- Everything that moves funds signs with my Foundry keystore account. Get the deployer address with \`cast wallet address --account deployer\`. If no keystore account exists, stop and tell me to run \`cast wallet import\` first.
- Check the deployer's balance on arc-mainnet with \`alchemy evm data balance <deployer-address>\`. Gas on Arc is paid in USDC, not ETH. If the balance cannot cover gas, stop and tell me how much USDC to bridge in.
- Write a fixed-supply ERC-20 using the name, symbol, and supply I gave you, with no mint function and no owner, and deploy it with \`forge create\` against my Alchemy arc-mainnet endpoint, signing with \`--account deployer\`. Never pass a raw private key on the command line.
- Verify the launch: pull the receipt with \`alchemy evm receipt\`, then read the name, symbol, and total supply back with \`alchemy evm contract read\`.
- The full supply mints to the deployer, so the first distribution comes from the keystore too. Ask me which wallet gets it and how much. The token has 18 decimals, so convert the amount I give you to base units with \`cast to-wei\` before building the command. Then show me the exact \`cast send <token> "transfer(address,uint256)" <recipient> <amount-in-base-units> --rpc-url <my Alchemy arc-mainnet endpoint> --account deployer\` command, and wait for my approval before running it.

The logo never goes onchain. Keep the file path and hand it back to me for the block explorer and token list submissions once the contract is live.

Ask before every transaction that spends funds.`}
/>

这段 prompt 里没有任何针对特定智能体产品的内容，因为实际工作都由 CLI 和 Foundry 完成。关于把智能体接到钱包和链上数据的更深入模式，参见我们的 [构建链上智能体指南](https://www.alchemy.com/blog/how-to-build-onchain-agents)。

这段 prompt 把每一个不可逆的操作都放在你的批准之后。当智能体持有一个在 mainnet 上装着真实 USDC 的钱包时，这道批准关卡正是预览和真实交易之间的区别。

## 开始在 Arc 上构建

Arc endpoint 已在我们的免费套餐上线。在 [dashboard](https://dashboard.alchemy.com) 创建一个 app，选择 Arc，第一天你就有一个 mainnet endpoint。没有合同、没有 waitlist、没有最低承诺。如果你走智能体这条路径，[Alchemy CLI](https://www.alchemy.com/agents) 能在几分钟内带你从安装走到一笔已签名的 mainnet 交易。

Circle 为 stablecoin 金融设计了 Arc，并请来银行和卡组织来验证它。部署无需许可意味着这条 chain 会运行人们带来的任何东西，而第一波永远少不了 memecoin。
