send-usdc

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sending USDC

发送USDC

Use the
npx awal@latest send
command to transfer USDC from the wallet to any Ethereum address or ENS name on Base.
使用
npx awal@latest send
命令将钱包中的USDC转账至Base网络上的任意以太坊地址或ENS名称。

Confirm wallet is initialized and authed

确认钱包已初始化并完成认证

bash
npx awal@latest status
If the wallet is not authenticated, refer to the
authenticate-wallet
skill.
bash
npx awal@latest status
如果钱包未完成认证,请参考
authenticate-wallet
技能文档。

Command Syntax

命令语法

bash
npx awal@latest send <amount> <recipient> [--chain <chain>] [--json]
bash
npx awal@latest send <amount> <recipient> [--chain <chain>] [--json]

Arguments

参数说明

ArgumentDescription
amount
Amount to send: '$1.00', '1.00', or atomic units (1000000 = $1). Always single-quote amounts that use
$
to prevent bash variable expansion. If the number looks like atomic units (no decimal or > 100), treat as atomic units. Assume that people won't be sending more than 100 USDC the majority of the time
recipient
Ethereum address (0x...) or ENS name (vitalik.eth)
参数描述
amount
转账金额:格式支持'$1.00'、'1.00'或原子单位(1000000 = 1美元)。使用
$
符号的金额务必用单引号包裹,以避免bash变量展开。如果数字看起来是原子单位(无小数点或数值>100),则按原子单位处理。默认情况下,大多数用户的转账金额不会超过100 USDC
recipient
以太坊地址(0x...格式)或ENS名称(如vitalik.eth)

Options

选项说明

OptionDescription
--chain <name>
Blockchain network (default: base)
--json
Output result as JSON
选项描述
--chain <name>
区块链网络(默认值:base)
--json
以JSON格式输出结果

Examples

示例

bash
undefined
bash
undefined

Send $1.00 USDC to an address

向某地址发送1.00美元USDC

npx awal@latest send 1 0x1234...abcd
npx awal@latest send 1 0x1234...abcd

Send $0.50 USDC to an ENS name

向某ENS名称发送0.50美元USDC

npx awal@latest send 0.50 vitalik.eth
npx awal@latest send 0.50 vitalik.eth

Send with dollar sign prefix (note the single quotes)

带美元符号的金额转账(注意单引号)

npx awal@latest send '$5.00' 0x1234...abcd
npx awal@latest send '$5.00' 0x1234...abcd

Get JSON output

以JSON格式输出结果

npx awal@latest send 1 vitalik.eth --json
undefined
npx awal@latest send 1 vitalik.eth --json
undefined

ENS Resolution

ENS名称解析

ENS names are automatically resolved to addresses via Ethereum mainnet. The command will:
  1. Detect ENS names (any string containing a dot that isn't a hex address)
  2. Resolve the name to an address
  3. Display both the ENS name and resolved address in the output
ENS名称会通过以太坊主网自动解析为对应地址。该命令的处理流程如下:
  1. 识别ENS名称(任何包含小数点且不是十六进制地址的字符串)
  2. 将名称解析为对应地址
  3. 在输出中同时显示ENS名称和解析后的地址

Prerequisites

前置条件

  • Must be authenticated (
    npx awal@latest awal status
    to check,
    npx awal@latest awal auth login
    to sign in, see skill
    authenticate-wallet
    for more information)
  • Wallet must have sufficient USDC balance (
    npx awal balance
    to check)
  • 必须完成钱包认证(使用
    npx awal@latest status
    检查状态,使用
    npx awal@latest auth login
    登录,更多信息请查看
    authenticate-wallet
    技能文档)
  • 钱包中必须有足够的USDC余额(使用
    npx awal balance
    查询余额)

Error Handling

错误处理

Common errors:
  • "Not authenticated" - Run
    awal auth login <email>
    first
  • "Insufficient balance" - Check balance with
    awal balance
  • "Could not resolve ENS name" - Verify the ENS name exists
  • "Invalid recipient" - Must be valid 0x address or ENS name
常见错误:
  • "Not authenticated" - 先运行
    awal auth login <email>
    完成认证
  • "Insufficient balance" - 使用
    awal balance
    查询余额
  • "Could not resolve ENS name" - 确认该ENS名称是否存在
  • "Invalid recipient" - 接收方必须是有效的0x格式地址或ENS名称