moonpay-swap-tokens
Swap tokens on the same chain or bridge tokens across chains. Use when the user wants to swap, bridge, or move tokens.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- moonpay-swap-tokens
- tags
- [ "trading" ]
- description
- Swap tokens on the same chain or bridge tokens across chains. Use when the user wants to swap, bridge, or move tokens.
03 SKILL.md 正文
Swap or bridge tokens
Goal
Swap tokens on the same chain, or bridge tokens across chains. Two commands:
mp token swap— same chain, different tokensmp token bridge— cross chain
Both build via swaps.xyz, sign locally, broadcast, and register for tracking.
Commands
Swap (same chain)
mp token swap \
--wallet <wallet-name> \
--chain <chain> \
--from-token <token-address> \
--from-amount <amount> \
--to-token <token-address>
Supports exact-out: use --to-amount instead of --from-amount.
Bridge (cross chain)
mp token bridge \
--from-wallet <wallet-name> \
--from-chain <chain> \
--from-token <token-address> \
--from-amount <amount> \
--to-chain <chain> \
--to-token <token-address> \
--to-wallet <wallet-name> # optional, defaults to from-wallet
Supports exact-out: use --to-amount instead of --from-amount.
Examples
Same-chain swap (SOL → USDC on Solana)
mp token swap \
--wallet main --chain solana \
--from-token So11111111111111111111111111111111111111111 \
--from-amount 0.1 \
--to-token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Cross-chain bridge (ETH → USDC.e on Polygon)
mp token bridge \
--from-wallet funded --from-chain ethereum \
--from-token 0x0000000000000000000000000000000000000000 \
--from-amount 0.003 \
--to-chain polygon \
--to-token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174
ERC20 swap (auto-approves if needed)
mp token swap \
--wallet funded --chain polygon \
--from-token 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 \
--from-amount 5 \
--to-token 0x0000000000000000000000000000000000000000
Supported chains
solana, ethereum, base, polygon, arbitrum, optimism, bnb, avalanche, bitcoin (bridges only)
How it works
- Resolves wallet name → address
- Builds unsigned transaction via swaps.xyz (handles decimal conversion)
- If ERC20 token needs approval, sends an approve transaction first, then re-builds
- Signs locally — private key never leaves the machine
- Broadcasts to the network
- Registers for tracking
token swap calls token bridge under the hood with from-chain = to-chain.
Tips
- If the user provides token names/symbols, resolve to addresses with
mp token search --query "USDC" --chain solana - Check balances first with
mp token balance list --wallet <address> --chain <chain> - Native tokens use
0x0000000000000000000000000000000000000000(EVM) orSo11111111111111111111111111111111111111111(Solana)
Related skills
- moonpay-discover-tokens — Search for token addresses
- moonpay-check-wallet — Check balances before swapping
- moonpay-auth — Set up wallets for signing
04 同仓库更多 Skills
zkrouter
Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.
zk
For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.
zk-omni-messaging
Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.
zerion-wallet-data
Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
yield-optimization
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.