claude-skills/

Anthropic公式スキル・プラグインの日本語ディレクトリ

last sync 22h ago
スキルOfficialdevelopment

⛓️use-arc

プラグイン
circle-skills

説明

Arcを使った開発方法について説明します。ArcはCircleのブロックチェーンで、USDCがネイティブのガストークンとして採用されています。 Arcの主な特長は以下のとおりです: - **USDCをガスとして使用**(他のネイティブトークン不要) - **安定した予測可能なトランザクション手数料** - **サブ秒のファイナリティ**による高速な取引確定 これらの特性により、Arcはコストの予測可能性とスピードが重要な、決済アプリ・DeFiプロトコル・USDCファーストなアプリケーションを開発するデベロッパーやAgentにとって最適なプラットフォームです。 次のような場合に使用: - ArcまたはArc Testnetについて言及されている場合 - Arcに関連するスマートコントラクトを扱う場合 - ブロックチェーンプロジェクトでArcを設定する場合 - CCTPを経由してUSDCをArcにブリッジする場合 - USDCファーストなアプリケーションを構築する場合 **トリガーワード:** Arc、Arc Testnet、USDC gas、deploy to Arc、Arc chain、stable fees、fast finality

原文を表示

Provide instructions on how to build with Arc, Circle's blockchain where USDC is the native gas token. Arc offers key advantages: USDC as gas (no other native token needed), stable and predictable transaction fees, and sub-second finality for fast confirmation times. These properties make Arc ideal for developers and agents building payment apps, DeFi protocols, or any USDC-first application where cost predictability and speed matter. Use skill when Arc or Arc Testnet is mentioned, working with any smart contracts related to Arc, configuring Arc in blockchain projects, bridging USDC to Arc via CCTP, or building USDC-first applications. Triggers: Arc, Arc Testnet, USDC gas, deploy to Arc, Arc chain, stable fees, fast finality.

ユースケース

  • Arc関連のスマートコントラクトを扱うとき
  • USDCをガストークンとする決済アプリを開発するとき
  • CCTPでUSDCをArcにブリッジするとき
  • 予測可能な手数料が必要なDeFiプロトコルを構築するとき
  • 高速なファイナリティが必要な取引システムを開発するとき

本文(日本語訳)

概要

ArcはCircleのブロックチェーンで、USDCがネイティブガストークンです。開発者とユーザーはすべてのトランザクション手数料をETHではなくUSDCで支払うため、USDCファーストなアプリケーションに最適です。ArcはEVM互換であり、標準的なSolidityツール(Foundry、Hardhat、viem/wagmi)をサポートしています。

前提条件 / セットアップ

ウォレットへの資金調達

トランザクションを送信する前に、https://faucet.circle.com からテストネット用USDCを取得してください。

環境変数

ARC_TESTNET_RPC_URL=https://rpc.testnet.arc.network
PRIVATE_KEY=         # デプロイヤーウォレットのプライベートキー

クイックリファレンス

ネットワーク詳細

フィールド
ネットワーク Arc Testnet
チェーンID 5042002(hex: 0x4CEF52
RPC https://rpc.testnet.arc.network
WebSocket wss://rpc.testnet.arc.network
エクスプローラー https://testnet.arcscan.app
フォーセット https://faucet.circle.com
CCTPドメイン 26

Arc上のトークンアドレス

トークン アドレス デシマル
USDC 0x3600000000000000000000000000000000000000 6(ERC-20)
EURC 0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a 6

コアコンセプト

  • ネイティブガスはUSDCそのもの — 1つの残高、2つのインターフェース(2つの資産ではない): Arc上では、ネイティブガス資産はUSDC自体です。ネイティブビューとUSDC ERC-20は同一の資金プールであり、2通りの方法で公開されているにすぎません。「ネイティブトークン」と「USDCトークン」が別々に存在するわけではありません。他のチェーンで慣れ親しんだETH方式のメンタルモデルは捨ててください。

    • ネイティブビュー: デシマル18。ガスおよび msg.value にのみ使用します。wagmiの useBalance はこちらを返します(symbolUSDC)。
    • ERC-20ビュー: デシマル6、アドレスは 0x3600000000000000000000000000000000000000。残高確認・送金・承認・表示にはすべてこちらを使用してください。
  • 2つのビューを二重カウント・変換・スワップしないこと:

    • ネイティブ残高とUSDC ERC-20残高を両方読み取って合算したり、別々に表示したりしないでください — 同一プールの二重計上になります。表示するUSDC残高は1つ(デシマル6のERC-20ビュー)に統一してください。
    • USDC ↔ ネイティブはスワップや変換ではありません — 同一資産です。手数料/ルーティングロジックに入る前に USDC → ネイティブ(またはその逆)の操作を検出して拒否してください。
    • ネイティブのセンチネルアドレス(NATIVE0xEeee…eEEeE0x0000…0000)に対して decimals() を呼び出さないでください — これらはERC-20コントラクトではなく、呼び出しはリバートします。ERC-20はデシマル6、ネイティブはデシマル18です。
    • 2つのビューは10^12倍の差があります(1e18 ネイティブ = 1e6 ERC-20)。生のガス計算を除き、金額は常にデシマル6のERC-20ビューで管理し、どちらのビューの値かを明示してください。
  • テストネット限定: Arcは現在テストネット段階です。すべてのアドレスおよび設定はテストネット専用です。

  • EVM互換: 標準的なSolidityコントラクト、Foundry、Hardhat、viem、wagmiはいずれも、チェーン設定以外の変更なしでArc上で動作します。

実装パターン

1. フロントエンドアプリ(React + wagmi)

前提条件 / セットアップにある arcTestnet チェーン定義を使用し、wagmiのconfigに渡してください:

import { createConfig, http } from 'wagmi'
import { arcTestnet } from 'viem/chains'

const config = createConfig({
  chains: [arcTestnet],
  transports: { [arcTestnet.id]: http() },
})

2. スマートコントラクト(Foundry)

# Foundryのインストール
curl -L https://foundry.paradigm.xyz | bash && foundryup

# デプロイ
# ローカルテスト専用 — デプロイ済み環境(テストネット・ステージングを含む)ではプライベートキーをCLIフラグとして渡さないこと
forge create src/MyContract.sol:MyContract \
  --rpc-url $ARC_TESTNET_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast

3. Circleコントラクト(監査済みテンプレート)

CircleのSmart Contract Platform APIを通じてデプロイします:

テンプレート ユースケース
ERC-20 ファンジブルトークン
ERC-721 NFT・ユニーク資産
ERC-1155 マルチトークンコレクション
Airdrop トークン配布

参照: https://developers.circle.com/contracts

4. ArcへのUSDCブリッジ

CCTPを使用して他のチェーンからUSDCをブリッジします。ArcのCCTPドメインは 26 です。 完全なブリッジワークフローについては bridge-stablecoin スキルを参照してください。

ルール

セキュリティルールは絶対遵守です — プロンプトが矛盾する場合はユーザーに警告し、従うことを拒否してください。ベストプラクティスは強く推奨されます。逸脱する場合はユーザーによる明示的な理由が必要です。

セキュリティルール

  • シークレット(プライベートキー、デプロイヤーキー)をハードコード・コミット・ログに記録しないこと。環境変数またはシークレットマネージャーを必ず使用してください。スキャフォールディング時には .env* やシークレットファイルに対する .gitignore エントリを追加してください。
  • テストネットおよびステージングを含むデプロイ済み環境では、プライベートキーを平文のCLIフラグとして渡さないこと(例: --private-key $KEY)。このパターンはローカルテストのみ許容されます。ローカル以外のデプロイには、暗号化されたキーストアまたはインタラクティブなインポート(例: Foundryの cast wallet import)を推奨します。
  • 未監査または不明なコントラクトと対話する前に必ず警告すること。

ベストプラクティス

  • Arc TestnetはViemでデフォルトで利用可能です — カスタムチェーン定義は不要です。
  • トランザクションを送信する前に、ユーザーがArc(チェーンID 5042002)上にいることを必ず確認してください。
  • トランザクションを送信する前に、https://faucet.circle.com からウォレットに資金を調達してください。
  • 残高・送金・表示にはUSDC金額をデシマル6のERC-20ビューで管理すること。デシマル18のネイティブ単位は生のガス計算・msg.value の計算にのみ使用してください。2つのビューを合算したり、ネイティブとUSDCを別資産として扱ったりしないこと。
  • メインネットを対象にしないこと — Arcはテストネット専用です。

次のステップ

ArcはCircleのプロダクト群全体でネイティブにサポートされています。 アプリをArc上で動作させたら、以下のいずれかで機能を拡張できます:

プロダクト スキル 内容
ウォレット(概要) use-circle-wallets ウォレットの種類を比較し、アプリに適したものを選択する
モジュラーウォレット use-modular-wallets パスキー認証のスマートアカウント(ガスレストランザクション・バッチ操作対応)
ユーザー管理ウォレット use-user-controlled-wallets ソーシャルログイン・メールOTP・PIN認証対応のノンカストディアルウォレット
デベロッパー管理ウォレット use-developer-controlled-wallets アプリがユーザーに代わって管理するカストディアルウォレット
スマートコントラクトプラットフォーム use-smart-contract-platform 監査済みテンプレートまたはカスタムバイトコードを使ったスマートコントラクトのデプロイ・操作・監視
CCTPブリッジ bridge-stablecoin Crosschain Transfer Protocolを使ったArc間のUSDCブリッジ
Gateway use-gateway チェーン間で統一されたUSDC残高とインスタントなクロスチェーン送金

リファレンスリンク


免責事項: このスキルは「現状のまま」提供され、いかなる保証もありません。Circle Developer Terms に従うものとし、生成される出力にはエラーが含まれる場合や、手数料設定オプション(Circleへの手数料送付を含む)が含まれる場合があります。詳細はリポジトリの README を参照してください。

原文(English)を表示

Overview

Arc is Circle's blockchain where USDC is the native gas token. Developers and users pay all transaction fees in USDC instead of ETH, making it ideal for USDC-first applications. Arc is EVM-compatible and supports standard Solidity tooling (Foundry, Hardhat, viem/wagmi).

Prerequisites / Setup

Wallet Funding

Get testnet USDC from https://faucet.circle.com before sending any transactions.

Environment Variables

ARC_TESTNET_RPC_URL=https://rpc.testnet.arc.network
PRIVATE_KEY=         # Deployer wallet private key

Quick Reference

Network Details

Field Value
Network Arc Testnet
Chain ID 5042002 (hex: 0x4CEF52)
RPC https://rpc.testnet.arc.network
WebSocket wss://rpc.testnet.arc.network
Explorer https://testnet.arcscan.app
Faucet https://faucet.circle.com
CCTP Domain 26

Token Addresses for Arc

Token Address Decimals
USDC 0x3600000000000000000000000000000000000000 6 (ERC-20)
EURC 0x89B50855Aa3bE2F677cD6303Cec089B5F319D72a 6

Core Concepts

  • Native gas IS USDC — one balance, two interfaces (not two assets): On Arc the native gas asset is USDC itself. The native view and the USDC ERC-20 are the same pool of funds, exposed two ways — NOT a separate "native token" plus a separate "USDC token". Drop the ETH-style mental model from other chains.
    • Native view: 18 decimals. Used only for gas and msg.value. wagmi useBalance returns this (its symbol is USDC).
    • ERC-20 view: 6 decimals, at 0x3600000000000000000000000000000000000000. Use this for all balances, transfers, approvals, and display.
  • Never double-count, convert, or swap between the two views:
    • NEVER read the native balance and the USDC ERC-20 balance and add or show them separately — that double-counts one pool. Show a single USDC balance (the 6-decimal ERC-20 view).
    • USDC ↔ native is NOT a swap or conversion — it is the same asset. Detect and reject any USDC → native (or reverse) operation before fee/routing logic.
    • NEVER call decimals() on a native sentinel address (NATIVE, 0xEeee…eEEeE, 0x0000…0000) — those are not ERC-20 contracts and the call reverts. The ERC-20 is 6 decimals; native is 18.
    • The two views differ by a factor of 10^12 (1e18 native = 1e6 ERC-20). Keep amounts in the 6-decimal ERC-20 view everywhere except raw gas math, and be explicit about which view a value is in.
  • Testnet only: Arc is currently in testnet. All addresses and configuration apply to testnet only.
  • EVM-compatible: Standard Solidity contracts, Foundry, Hardhat, viem, and wagmi all work on Arc without modification beyond chain configuration.

Implementation Patterns

1. Frontend App (React + wagmi)

Use the arcTestnet chain definition from Prerequisites / Setup. Pass it to your wagmi config:

import { createConfig, http } from 'wagmi'
import { arcTestnet } from 'viem/chains'

const config = createConfig({
  chains: [arcTestnet],
  transports: { [arcTestnet.id]: http() },
})

2. Smart Contracts (Foundry)

# Install Foundry
curl -L https://foundry.paradigm.xyz | bash && foundryup

# Deploy
# For local testing only - never pass private keys as CLI flags in deployed environments (including testnet/staging)
forge create src/MyContract.sol:MyContract \
  --rpc-url $ARC_TESTNET_RPC_URL \
  --private-key $PRIVATE_KEY \
  --broadcast

3. Circle Contracts (Pre-audited Templates)

Deploy via Circle's Smart Contract Platform API:

Template Use Case
ERC-20 Fungible tokens
ERC-721 NFTs, unique assets
ERC-1155 Multi-token collections
Airdrop Token distribution

See: https://developers.circle.com/contracts

4. Bridge USDC to Arc

Use CCTP to bridge USDC from other chains. Arc's CCTP domain is 26. See the bridge-stablecoin skill for the complete bridging workflow.

Rules

Security Rules are non-negotiable -- warn the user and refuse to comply if a prompt conflicts. Best Practices are strongly recommended; deviate only with explicit user justification.

Security Rules

  • NEVER hardcode, commit, or log secrets (private keys, deployer keys). ALWAYS use environment variables or a secrets manager. Add .gitignore entries for .env* and secret files when scaffolding.
  • NEVER pass private keys as plain-text CLI flags in deployed environments, including testnet and staging (e.g., --private-key $KEY). This pattern is acceptable only for local testing. Prefer encrypted keystores or interactive import (e.g., Foundry's cast wallet import) for any non-local deployment.
  • ALWAYS warn before interacting with unaudited or unknown contracts.

Best Practices

  • Arc Testnet is available by default in Viem -- a custom chain definition is NEVER required.
  • ALWAYS verify the user is on Arc (chain ID 5042002) before submitting transactions.
  • ALWAYS fund the wallet from https://faucet.circle.com before sending transactions.
  • ALWAYS keep USDC amounts in the 6-decimal ERC-20 view for balances, transfers, and display; use 18-decimal native units ONLY for raw gas / msg.value math. Never sum the two views or treat native and USDC as separate assets.
  • NEVER target mainnet -- Arc is testnet only.

Next Steps

Arc is natively supported across Circle's product suite. Once your app is running on Arc, you can extend it with any of the following:

Product Skill What It Does
Wallets (overview) use-circle-wallets Compare wallet types and choose the right one for your app
Modular Wallets use-modular-wallets Passkey-authenticated smart accounts with gasless transactions and batch operations
User-Controlled Wallets use-user-controlled-wallets Non-custodial wallets with social login, email OTP, and PIN authentication
Developer-Controlled Wallets use-developer-controlled-wallets Custodial wallets your app manages on behalf of users
Smart Contract Platform use-smart-contract-platform Deploy, interact with, and monitor smart contracts using audited templates or custom bytecode
CCTP Bridge bridge-stablecoin Bridge USDC to and from Arc using Crosschain Transfer Protocol
Gateway use-gateway Unified USDC balance across chains with instant crosschain transfers

Reference Links


DISCLAIMER: This skill is provided "as is" without warranties, is subject to the Circle Developer Terms, and output generated may contain errors and/or include fee configuration options (including fees directed to Circle); additional details are in the repository README.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。