From circle
Deploys, imports, interacts with, and monitors smart contracts using Circle SCP SDKs. Supports bytecode, ERC-20/721/1155/Airdrop templates, ABI read/write calls, and webhook events.
npx claudepluginhub circlefin/skills --plugin circle-skillsThis skill uses the workspace's default tool permissions.
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.
Develops secure smart contracts by integrating OpenZeppelin libraries for ERC tokens, access control, pausability, governance, and accounts. Supports Solidity, Cairo, Stylus, Stellar.
Builds production-ready Web3 apps, smart contracts in Solidity/Rust/Vyper, and decentralized systems for DeFi, NFTs, DAOs across Ethereum L2s, Solana, Cosmos.
Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset NFT integration, security patterns, and storage type guidance for collections, marketplaces, DAOs, staking.
Share bugs, ideas, or general feedback.
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!,
});
| 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.contractAddress (fallback: contract.address)createContractExecutionTransaction().data.idgetContract().data.contract.deploymentStatusSCP workflows pair two SDK clients:
Write operations use walletsClient.createContractExecutionTransaction(), NOT the SCP client.
view/pure functions) use scpClient.queryContract() and require no gas walletnonpayable/payable functions) use walletsClient.createContractExecutionTransaction() and require a wallet ID with gas fundsname(type1,type2,...) with no spacesEventName(type1,type2,...) with no spacesAll mutating SCP operations require idempotencyKey as a valid UUID v4 string. Use crypto.randomUUID() in Node.js. Non-UUID keys fail with generic API parameter invalid errors.
Contract deployment is asynchronous. The response indicates initiation only. Poll getContract() for deploymentStatus. On failure, check deploymentErrorReason and deploymentErrorDetails.
Compile Solidity with evmVersion: "paris" or earlier to avoid the PUSH0 opcode. Solidity >= 0.8.20 defaults to Shanghai. Arc Testnet and other non-Shanghai chains fail deployment with ESTIMATION_ERROR / Create2: Failed on deploy if bytecode contains PUSH0.
name and idempotencyKey when calling importContract()idempotencyKey must be a valid UUID v4 stringlistContracts, match by address, and retrieve with getContract() using the existing contract IDDeploy a compiled contract using raw ABI + bytecode.
READ references/deploy-bytecode.md for the complete guide.
Deploy audited template contracts without writing Solidity.
READ references/deploy-erc-1155.md for the complete guide.
READ references/templates.md for the full template catalog.
import crypto from 'node:crypto';
const response = await scpClient.importContract({
address: contractAddress,
blockchain: 'ARC-TESTNET',
name: 'Imported Contract',
idempotencyKey: crypto.randomUUID(), // MUST be UUID v4
});
const contractId = response.data?.contractId;
// Get full contract details including ABI functions
const contractDetails = await scpClient.getContract({ id: contractId });
console.log(contractDetails.data?.contract?.functions);
If import fails with duplicate error:
const listRes = await scpClient.listContracts({ blockchain: 'ARC-TESTNET' });
const existing = listRes.data?.contracts?.find(c =>
c.contractAddress.toLowerCase() === contractAddress.toLowerCase()
);
const contractId = existing?.id;
Query read functions and execute write functions via ABI signatures.
READ references/interact.md for the complete guide.
Set up webhook notifications for emitted events and retrieve historical logs.
READ references/monitor-events.md for the complete guide.
Check deploymentStatus when polling getContract(). On FAILED status:
deploymentErrorReason for error categorydeploymentErrorDetails for specificsIf importContract() returns duplicate/already-exists error:
listContracts({ blockchain: 'ARC-TESTNET' })contractAddress (case-insensitive comparison)contractIdNever fail the flow on import duplicates.
Poll walletsClient.getTransaction({ id: txId }) for write execution status:
INITIATED → transaction createdSENT → broadcast to networkCONFIRMED → mined in blockCOMPLETE → finalizedFAILED → check transaction error detailsSecurity 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().idempotencyKey from mutating SCP requests. Must be UUID v4 (use crypto.randomUUID()).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().evmVersion: "paris" to avoid PUSH0 opcode.listContracts and match by address. ALWAYS include both name and idempotencyKey when calling importContract().getContract() for deploymentStatus.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.