Skip to content
Back to skills

Moonpay Official Moonpay Swap Tokens

ASecurity

Swap tokens on the same chain or bridge tokens across chains. Use when the user wants to swap, bridge, or move tokens.

  • 81 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
blockchaingobash

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add jiayaoqijia/cryptoskill --skill moonpay-official-moonpay-swap-tokens --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Moonpay Official Moonpay Swap Tokens?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Moonpay Official Moonpay Swap Tokens
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jiayaoqijia-moonpay-official-moonpay-swap-tokens/badge)](https://www.skillsdirectory.com/skills/jiayaoqijia-moonpay-official-moonpay-swap-tokens)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: moonpay-swap-tokens
description: Swap tokens on the same chain or bridge tokens across chains. Use when the user wants to swap, bridge, or move tokens.
tags: [trading]
---

# Swap or bridge tokens

## Goal

Swap tokens on the same chain, or bridge tokens across chains. Two commands:

- **`mp token swap`** — same chain, different tokens
- **`mp token bridge`** — cross chain

Both build via swaps.xyz, sign locally, broadcast, and register for tracking.

## Commands

### Swap (same chain)

```bash
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)

```bash
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)

```bash
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)

```bash
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)

```bash
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

1. Resolves wallet name → address
2. Builds unsigned transaction via swaps.xyz (handles decimal conversion)
3. If ERC20 token needs approval, sends an approve transaction first, then re-builds
4. Signs locally — private key never leaves the machine
5. Broadcasts to the network
6. 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) or `So11111111111111111111111111111111111111111` (Solana)

## Related skills

- **moonpay-discover-tokens** — Search for token addresses
- **moonpay-check-wallet** — Check balances before swapping
- **moonpay-auth** — Set up wallets for signing

Files in this skill

  • LICENSE1 KB
  • SKILL.md2.9 KB
  • SOURCE.md151 B
  • TRUST.auto.yaml2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.