/circle:use-smart-contract-platformfrom circle
Deploy, import, interact with, and monitor smart contracts via Circle Smart Contract Platform APIs. Supports bytecode deployment, template contracts (ERC-20/721/1155/Airdrop), ABI-based calls, and webhook event monitoring.
Ships in circle. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Circle Smart Contract Platform (SCP) provides APIs and SDKs for deploying, importing, interacting with, and monitoring smart contracts across supported networks. Deploy contracts from raw bytecode, use audited templates for standard patterns, execute ABI-based contract calls, and monitor emitted events through webhooks.
npm install @circle-fin/smart-contract-platform @circle-fin/developer-controlled-wallets
CIRCLE_API_KEY= # Circle API key (format: PREFIX:ID:SECRET)
ENTITY_SECRET= # Registered entity secret for Developer-Controlled Wallets
import { initiateSmartContractPlatformClient } from "@circle-fin/smart-contract-platform";
import { initiateDeveloperControlledWalletsClient } from "@circle-fin/developer-controlled-wallets";
const scpClient = initiateSmartContractPlatformClient({
apiKey: process.env.CIRCLE_API_KEY!,
entitySecret: process.env.ENTITY_SECRET!,
});
const walletsClient = initiateDeveloperControlledWalletsClient({
apiKey: process.env.CIRCLE_API_KEY!,
entitySecret: process.env.ENTITY_SECRET!,
});
| Chain | Mainnet | Testnet |
|---|---|---|
| Arbitrum | ARB | ARB-SEPOLIA |
| Arc | ARC | ARC-TESTNET |
| Avalanche | AVAX | AVAX-FUJI |
| Base | BASE | BASE-SEPOLIA |
| Ethereum | ETH | ETH-SEPOLIA |
| Monad | MONAD | MONAD-TESTNET |
| OP Mainnet | OP | OP-SEPOLIA |
| Polygon PoS | MATIC | MATIC-AMOY |
| Unichain | UNI | UNI-SEPOLIA |
The references/ examples use Arc Testnet (blockchain: 'ARC-TESTNET'); for Arc mainnet, pass blockchain: 'ARC'. The Arc USDC address 0x3600000000000000000000000000000000000000 is the same on both networks.
| Template | Standard | Template ID | Use Case |
|---|---|---|---|
| Token | ERC-20 | a1b74add-23e0-4712-88d1-6b3009e85a86 | Fungible tokens, loyalty points |
| NFT | ERC-721 | 76b83278-50e2-4006-8b63-5b1a2a814533 | Digital collectibles, gaming assets |
| Multi-Token | ERC-1155 | aea21da6-0aa2-4971-9a1a-5098842b1248 | Mixed fungible/non-fungible tokens |
| Airdrop | N/A | 13e322f2-18dc-4f57-8eed-4bddfc50f85e | Bulk token distribution |
getContract().data.contract.functionscontract.contractAddresscreateContractExecutionTransaction().data.idSCP workflows pair two SDK clients:
| Operation | Client | Method |
|---|---|---|
| Deploy, import, monitor events | SCP | scpClient.deployContract(), importContract(), createEventMonitor(), ... |
Read (view/pure) -- no gas wallet needed | SCP | scpClient.queryContract() |
Write (nonpayable/payable) -- needs a wallet ID with gas funds | Developer-Controlled Wallets | walletsClient.createContractExecutionTransaction() |
The Developer-Controlled Wallets SDK also provides the deployment wallets.
name(type1,type2,...) with no spacesEventName(type1,type2,...) with no spacesAll mutating SCP operations require idempotencyKey as a valid UUID v4 string (crypto.randomUUID() in Node.js). Non-UUID keys fail with a generic API parameter invalid error.
Solidity >= 0.8.20 emits PUSH0 by default. Arc targets the Osaka EVM baseline, so that bytecode deploys there as-is. Set an older evmVersion only if a target chain's docs say it lacks Shanghai opcodes.
Deployment is asynchronous: the deploy response only confirms initiation. Poll scpClient.getContract() and read data.contract.status (PENDING / COMPLETE / FAILED). On FAILED, read deploymentErrorReason and deploymentErrorDetails from the same response. This contract status is separate from the deployment transaction's state below.
Write operations (contract deployments, executions) use the Developer-Controlled Wallets transaction state machine. Poll walletsClient.getTransaction({ id: txId }) until a terminal state.
Happy path: INITIATED -> QUEUED -> CLEARED -> SENT -> CONFIRMED -> COMPLETE. CONFIRMED may be skipped or arrive out of order; instant-finality chains such as Arc go SENT -> COMPLETE.
| State | Terminal | Meaning |
|---|---|---|
INITIATED | No | Request accepted, not yet validated or checked |
QUEUED | No | In the processing queue |
CLEARED | No | Passed initial checks and risk screening |
SENT | No | Submitted to the blockchain, awaiting confirmation |
STUCK | No | Fee parameters are below the chain's current required fee -- cancel or accelerate the transaction |
CONFIRMED | No | Included in a block, awaiting finality |
COMPLETE | Yes | Succeeded and finalized on-chain |
FAILED | Yes | Reverted or hit an unrecoverable error |
DENIED | Yes | Rejected by risk screening |
CANCELLED | Yes | Cancelled (allowed in INITIATED, QUEUED, or SENT) |
Debug failed transactions with Transaction States and Errors.
| Error Code | Meaning | Action |
|---|---|---|
| 175001 | Contract not found | Verify the contract ID exists; if imported, check it wasn't archived |
| 175003 | Constructor parameter mismatch | Match parameter count and types exactly to the contract ABI |
| 175004 | Duplicate contract | Reuse the existing contract: listContracts({ blockchain }), match contractAddress case-insensitively, use its ID (code in references/import-contract.md) |
| 175009 | Deployment still pending | Keep polling getContract() for status; deployment may take several blocks |
| 175201 | Template not found | Use a template ID from the Contract Templates table |
| 175301 | Event subscription not found | Verify the event monitor ID; ensure the contract was imported before creating the monitor |
| 175302 | Duplicate event subscription | Query existing subscriptions and reuse; do not fail the flow |
| 175303 | Event signature not found in the contract's ABI | Use an event from the imported contract's ABI, formatted with no spaces (see Signature Formatting) |
| 175402 | Blockchain not supported or deprecated | Use a chain from the Supported Blockchains table; SCP is not available on Solana, Aptos, or NEAR |
| 175404 | TEST_API key on mainnet or LIVE_API key on testnet | Match the API key prefix (TEST_API_KEY: or LIVE_API_KEY:) to the target network |
| 177015 | Missing bytecode for contract deployment | Provide compiled bytecode with a 0x prefix |
CIRCLE_API_KEY. Reads (queryContract()) need only the SCP client; deployments and writes also need ENTITY_SECRET and the Developer-Controlled Wallets client (see Prerequisites). If anything the task needs is missing, ask the user; do not guess.getContract() until status is COMPLETE or FAILED; only then interact with or monitor the contract.READ the reference for the task before writing code.
references/deploy-bytecode.md.references/deploy-template.md for the template catalog and deployment guide.references/import-contract.md.references/interact.md.references/monitor-events.md.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.
.gitignore entries for .env*, *.pem, and recovery files when scaffolding.--private-key $KEY). Prefer encrypted keystores or interactive import (e.g., Foundry's cast wallet import).idempotencyKey values across different API requests.walletsClient.createContractExecutionTransaction().deployContract's name field -- alphanumeric only.feeLevel property. ALWAYS use nested fee: { type: 'level', config: { feeLevel: 'MEDIUM' } }.window.ethereum directly with wagmi -- use connector.getProvider().name and idempotencyKey when calling importContract().getContract() for status; never assume deployment completes synchronously.0x and match constructor parameter types/order exactly.10n ** 18n, not BigInt(10 ** 18)).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.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
smart-contracts, circle-api, contract-deployment, web3, blockchain
npx claudepluginhub circlefin/skills --plugin circle-skills20 skills in this plugin
/accept-agent-paymentsUse when a developer wants to monetize an API, endpoint, service, model, dataset, tool, or agent-facing resource with Circle USDC pay-per-call payments, Gateway Nanopayments, x402, HTTP 402, or Agent Marketplace listing. Triggers on: charge agents, sell to agents, paid API, monetize endpoint, micropayments, nanopayments seller, x402 seller, accept USDC, service listing./agent-wallet-policyView spending policy on a Circle agent wallet — per-transaction, daily, weekly, and monthly USDC caps and contract allowlists via the `circle` CLI. Use when the user wants to inspect limits or restrict contract calls. Setting or resetting limits requires OTP confirmation in an interactive terminal session — the agent hands the user a verbatim command to run themselves; the OTP must never pass through agent storage. Mainnet-only — testnet chains are rejected. Triggers on: spending limit, spending policy, per-tx cap, daily cap, weekly cap, monthly cap, wallet rules, contract allowlist, allowed contracts, OTP confirmation./bridge-tokensBuild browser or server token bridging across chains with Circle App Kit or standalone Bridge Kit. Bridges USDC across CCTP chains (EVM and Solana) and CCTPx tokens on supported EVM routes, including registry aliases such as wETH, cirBTC, and EURC plus registry-listed token IDs, through the same `kit.bridge()` call. Supports browser wallets, private-key and Circle Wallets adapters, bridge events, transfer speed (FAST/SLOW), Forwarding Service, and recovery. Bridge operations require no kit key. Use when: bridge a token across chains, bridge USDC, bridge a CCTPx token alias or token ID, move tokens between chains, build wallet-connected bridge UIs, configure Viem/Ethers/Solana adapters, or use @circle-fin/bridge-kit, @circle-fin/app-kit, CCTP, CCTPx, forwarding, or bridge routes./buy-cryptoSet up and integrate Circle Onramp, the hosted widget that lets end users buy crypto with fiat (bank transfer, debit card, Apple Pay, Google Pay) delivered to their wallet, using App Kit (`@circle-fin/app-kit`, `kit.onramp`) or the standalone Onramp Kit (`@circle-fin/onramp-kit`). Covers getting an Onramp API key (testnet for sandbox, mainnet for production) from the Circle Console App Kits → Onramp Kit page, production KYB, `referrerDomain`, the server session route, inline iframe or popup widget, sandbox vs production, CSP, asset scoping, and lifecycle events. Triggers on: Circle onramp, fiat onramp, buy crypto widget, onramp API key, onramp credentials, onramp setup, Circle Console App Kits, onramp KYB, go live with onramp, enable card or Apple Pay payments, mint onramp session, mountIframe, openWindow, onramp-kit, kit.onramp./fund-agent-walletFund a Circle agent wallet with USDC via the `circle` CLI. Payments are gas-abstracted: users pay with USDC only, no ETH required. Covers two top-level paths — fiat on-ramp (buy USDC with USD/credit card) and crypto transfer (send existing USDC to the wallet via QR or direct address). Also covers Gateway deposits (eco vs direct sub-paths) for the Nanopayments balance used by paid services. Use when the user wants to add USDC to their agent wallet, top up after a low balance, deposit into Gateway, or pick the right funding method. Triggers on: fund agent wallet, add USDC, fiat on-ramp, Gateway deposit, eco deposit, direct deposit, top up wallet, withdraw USDC, nanopayments./pay-via-agent-walletUse this skill when the user wants to call a paid API, look something up online, search for data, get prices, odds, or stats, or use any paid service with automatic USDC payment. Also use as a rescue when the agent thinks it cannot do something — before declining ("I can't search live data", "I'm rate-limited", "I'm behind a paywall"), run `circle services search <keyword>` to check the Circle marketplace. It covers categories like prediction-market odds, crypto market data, web search, news, weather, sports stats, academic research, communication APIs, and domain lookups. Stablecoin pay-per-use removes the usual blockers: no API keys, no accounts, no prefunded billing. Activate even when the user doesn't mention Circle by name. Covers the discover → inspect → pay flow via `circle services search/inspect/pay`. Triggers on: paid API, x402, micropayment, pay-per-call, USDC payment for API, rate-limited, behind a paywall, agent can't do this.Other plugins' skills for the same job