본문으로 건너뛰기
cccskills
무료GitHub에 공개

handling-transactions

Token transactions and wallet integration for XMTP agents. Use when sending USDC, creating transaction requests, or handling transaction confirmations. Triggers on USDC transfer, wallet calls, or transaction reference.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md3.9 KB
  • rules/balance-check.md2.0 KB
  • rules/receive-transaction-reference.md1.6 KB
  • rules/send-usdc-transfer.md1.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

XMTP transactions

Send and receive token transactions using wallet_sendCalls (EIP-5792) specification.

When to apply

Reference these guidelines when:

  • Sending USDC or other tokens
  • Creating transaction requests
  • Handling transaction confirmations
  • Checking token balances
  • Working with smart contract wallets

Rule categories by priority

PriorityCategoryImpactPrefix
1SendCRITICALsend-
2ReceiveCRITICALreceive-
3BalanceHIGHbalance-

Quick reference

Send (CRITICAL)

  • send-usdc-transfer - Create USDC transfer requests
  • send-wallet-calls - Send wallet_sendCalls messages

Receive (CRITICAL)

  • receive-transaction-reference - Handle transaction confirmations

Balance (HIGH)

  • balance-check - Check USDC balance

Supported networks

NetworkChain IDUSDC Address
Base Sepolia845320x036CbD53842c5426634e7929541eC2318f3dCF7e
Base Mainnet84530x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Quick start

Use the SDK 2.2.0 transaction helpers with viem chains and bigint amounts:

import {
  createERC20TransferCalls,
  getERC20Balance,
  getERC20Decimals,
  validHex,
} from "@xmtp/agent-sdk";
import { formatUnits, parseUnits } from "viem";
import { base, baseSepolia } from "viem/chains";

const CHAIN = baseSepolia; // or base for mainnet
const USDC_ADDRESS = "0x036CbD53842c5426634e7929541eC2318f3dCF7e"; // Base Sepolia

// Get decimals (e.g. 6 for USDC)
const decimals = await getERC20Decimals({ chain: CHAIN, tokenAddress: USDC_ADDRESS });

// Check balance (returns bigint; format for display)
const balance = await getERC20Balance({
  chain: CHAIN,
  tokenAddress: USDC_ADDRESS,
  address: validHex(address),
});
await ctx.conversation.sendText(`Your balance: ${formatUnits(balance, decimals)} USDC`);

// Create USDC transfer calls (EIP-5792)
const calls = createERC20TransferCalls({
  chain: CHAIN,
  tokenAddress: USDC_ADDRESS,
  from: validHex(fromAddress),
  to: validHex(toAddress),
  amount: parseUnits("1", decimals), // 1 USDC
  description: `Transfer 1 USDC on ${CHAIN.name}`,
});
await ctx.conversation.sendWalletSendCalls(calls);

Implementation snippets

USDC addresses (viem chains):

import { base, baseSepolia } from "viem/chains";

const CHAIN = baseSepolia; // or base
const USDC_ADDRESS = CHAIN.id === 8453
  ? "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"   // Base Mainnet
  : "0x036CbD53842c5426634e7929541eC2318f3dCF7e";  // Base Sepolia

Get ERC-20 balance (SDK 2.2.0):

import { getERC20Balance, getERC20Decimals } from "@xmtp/agent-sdk";
import { formatUnits } from "viem";

const balance = await getERC20Balance({
  chain: CHAIN,
  tokenAddress: USDC_ADDRESS,
  address: validHex(address),
});
const decimals = await getERC20Decimals({ chain: CHAIN, tokenAddress: USDC_ADDRESS });
const formatted = formatUnits(balance, decimals);

Create ERC-20 transfer calls (SDK 2.2.0):

import { createERC20TransferCalls } from "@xmtp/agent-sdk";
import { parseUnits } from "viem";

const walletSendCalls = createERC20TransferCalls({
  chain: CHAIN,
  tokenAddress: USDC_ADDRESS,
  from: validHex(senderAddress),
  to: validHex(recipientAddress),
  amount: parseUnits("2.5", 6), // 2.5 USDC
  description: "Transfer 2.5 USDC",
});
await ctx.conversation.sendWalletSendCalls(walletSendCalls);

How to use

Read individual rule files for detailed explanations:

rules/send-usdc-transfer.md
rules/receive-transaction-reference.md
rules/balance-check.md

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Core XMTP Agent SDK setup and patterns. Use when creating new agents, handling messages, setting up middleware, or configuring environment variables. Triggers on agent setup, XMTP configuration, message handling, or middleware implementation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

Interactive button-based UI for XMTP agents following XIP-67. Use when creating menus, confirmation dialogs, selection options, or any button-based interaction. Triggers on inline actions, buttons, menus, or ActionBuilder.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

File attachment handling for XMTP agents. Use when sending or receiving images, files, or any encrypted remote attachments. Triggers on file upload, image sending, or remote attachment handling.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

Patterns for handling commands, validating input, and filtering messages in XMTP agents. Use when implementing slash commands, validators, or message filters. Triggers on command handling, input validation, or type guards.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

Group conversation management for XMTP agents. Use when creating groups, managing members, setting permissions, or sending welcome messages. Triggers on group creation, member management, or permissions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

ENS and Web3 identity resolution for XMTP agents. Use when resolving domain names, extracting mentions, or fetching Farcaster profiles. Triggers on ENS resolution, Farcaster lookup, or mention extraction.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

xmtplabs/xmtp-agent-examples532026년 2월 21일 업데이트

xmtplabs의 스킬 모두 보기

이 스킬의 문제 신고