Create and manage USDC escrows for agent-to-agent payments on Base Sepolia. 30% gas savings, batch operations, dispute resolution.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install trust-escrow或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install trust-escrow⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/trust-escrow/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: trust-escrow description: Create and manage USDC escrows for agent-to-agent payments on Base Sepolia. 30% gas savings, batch operations, dispute resolution. metadata: {"clawdbot":{"emoji":"🫘","requires":{"network":"base-sepolia"}}} ---
Production-ready escrow for agent-to-agent USDC payments on Base Sepolia.
---
0x6354869F9B79B2Ca0820E171dc489217fC22AD640x036CbD53842c5426634e7929541eC2318f3dCF7ehttps://sepolia.base.org---
Create new escrow. Returns escrowId.
// Using viem/wagmi
await writeContract({
address: '0x6354869F9B79B2Ca0820E171dc489217fC22AD64',
abi: ESCROW_ABI,
functionName: 'createEscrow',
args: [
'0xRECEIVER_ADDRESS', // address receiver
parseUnits('100', 6), // uint96 amount (USDC 6 decimals)
Math.floor(Date.now()/1000) + 86400 // uint40 deadline (24h)
]
});
Sender releases payment early (manual approval).
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'release',
args: [BigInt(escrowId)]
});
Anyone can call after deadline + 1 hour inspection period.
// First check if ready
const ready = await readContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'canAutoRelease',
args: [BigInt(escrowId)]
});
if (ready) {
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'autoRelease',
args: [BigInt(escrowId)]
});
}
Sender cancels within first 30 minutes.
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'cancel',
args: [BigInt(escrowId)]
});
Either party flags for arbitration.
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'dispute',
args: [BigInt(escrowId)]
});
---
41% gas savings vs individual transactions.
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'createEscrowBatch',
args: [
[addr1, addr2, addr3, addr4, addr5], // address[] receivers
[100e6, 200e6, 150e6, 300e6, 250e6], // uint96[] amounts
[deadline1, deadline2, deadline3, deadline4, deadline5] // uint40[] deadlines
]
});
35% gas savings vs individual transactions.
await writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'releaseBatch',
args: [[id1, id2, id3, id4, id5]]
});
---
Get escrow details.
const escrow = await readContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'getEscrow',
args: [BigInt(escrowId)]
});
// Returns: [sender, receiver, amount, createdAt, deadline, state]
// state: 0=Active, 1=Released, 2=Disputed, 3=Refunded, 4=Cancelled
Check if ready for auto-release.
const ready = await readContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'canAutoRelease',
args: [BigInt(escrowId)]
});
// Returns: boolean
Efficient batch view (gas optimized).
const result = await readContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'getEscrowBatch',
args: [[id1, id2, id3, id4, id5]]
});
// Returns: [states[], amounts[]]
---
import { createPublicClient, createWalletClient, http } from 'viem';
import { baseSepolia } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';
const ESCROW_ADDRESS = '0x6354869F9B79B2Ca0820E171dc489217fC22AD64';
const USDC_ADDRESS = '0x036CbD53842c5426634e7929541eC2318f3dCF7e';
const account = privateKeyToAccount('0xYOUR_PRIVATE_KEY');
const walletClient = createWalletClient({
account,
chain: baseSepolia,
transport: http()
});
const publicClient = createPublicClient({
chain: baseSepolia,
transport: http()
});
// 1. Approve USDC
const approveTx = await walletClient.writeContract({
address: USDC_ADDRESS,
abi: [{
name: 'approve',
type: 'function',
inputs: [
{ name: 'spender', type: 'address' },
{ name: 'amount', type: 'uint256' }
],
outputs: [{ name: '', type: 'bool' }],
stateMutability: 'nonpayable'
}],
functionName: 'approve',
args: [ESCROW_ADDRESS, parseUnits('100', 6)]
});
await publicClient.waitForTransactionReceipt({ hash: approveTx });
// 2. Create escrow
const createTx = await walletClient.writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'createEscrow',
args: [
'0xRECEIVER_ADDRESS',
parseUnits('100', 6),
Math.floor(Date.now()/1000) + 86400
]
});
const receipt = await publicClient.waitForTransactionReceipt({ hash: createTx });
console.log('Escrow created:', receipt.transactionHash);
// 3. Later: Release payment
const releaseTx = await walletClient.writeContract({
address: ESCROW_ADDRESS,
abi: ESCROW_ABI,
functionName: 'release',
args: [escrowId]
});
await publicClient.waitForTransactionReceipt({ hash: releaseTx });
console.log('Payment released!');
---
---
| Operation | Gas | Cost @ 1 gwei | |-----------|-----|---------------| | Create single | ~65k | ~0.000065 ETH | | Release single | ~45k | ~0.000045 ETH | | Batch create (5) | ~250k | ~0.00025 ETH | | Batch release (5) | ~180k | ~0.00018 ETH |
---
---
---
Built for #USDCHackathon - Agentic Commerce Track Built by beanbot 🫘
安装 Trust Escrow 后,可以对 AI 说这些话来触发它
Help me get started with Trust Escrow
Explains what Trust Escrow does, walks through the setup, and runs a quick demo based on your current project
Use Trust Escrow to create and manage USDC escrows for agent-to-agent payments on Base ...
Invokes Trust Escrow with the right parameters and returns the result directly in the conversation
What can I do with Trust Escrow in my developer & devops workflow?
Lists the top use cases for Trust Escrow, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/trust-escrow/ 目录(个人级,所有项目可用),或 .claude/skills/trust-escrow/(项目级)。重启 AI 客户端后,用 /trust-escrow 主动调用,或让 AI 根据上下文自动发现并使用。
Trust Escrow 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Trust Escrow 可免费安装使用。请查阅仓库了解许可证信息。
Create and manage USDC escrows for agent-to-agent payments on Base Sepolia. 30% gas savings, batch operations, dispute resolution.
Trust Escrow 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Trust Escrow
Identifies repetitive steps in your workflow and sets up Trust Escrow to handle them automatically