tron-swap
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when the user asks to 'swap tokens on TRON', 'buy token on TRON', 'sell TRC-20 token', 'trade TRX for USDT', 'exchange tokens on…
от jiaxiaojunQAQ★ 35 звёзд на GitHubОб этом скилле
TRON DEX Swap
3 commands for swap quote, route optimization, and transaction status tracking (read-only queries).
Pre-flight Checks
Confirm Python & dependencies:
node -e "console.log('ok')" # Node.js >= 18 requiredCheck energy before swapping: Swaps consume significant Energy (typically 50,000–200,000). Run:
node scripts/tron_api.mjs resource-info --address <YOUR_ADDRESS>If energy is insufficient, consider freezing TRX first (
tron-staking) or accept TRX burn cost.
Commands
1. Swap Quote
node scripts/tron_api.mjs swap-quote \
--from-token <FROM_CONTRACT_OR_TRX> \
--to-token <TO_CONTRACT_OR_TRX> \
--amount <HUMAN_READABLE_AMOUNT>
Returns: expected output amount, price impact, route path, minimum received (with slippage), estimated energy cost.
⚠️ Amount is human-readable — pass 100 for 100 TRX, NOT 100000000.
Example:
# Quote: 100 TRX → USDT
node scripts/tron_api.mjs swap-quote \
--from-token TRX \
--to-token TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t \
--amount 100
2. Best Route
node scripts/tron_api.mjs swap-route \
--from-token <FROM_CONTRACT> \
--to-token <TO_CONTRACT> \
--amount <AMOUNT>
Returns: optimal route across SunSwap V2, V3, Sun.io — may include multi-hop routes (e.g., TRX → WTRX → USDT).
3. Transaction Status
node scripts/tron_api.mjs tx-status --txid <TRANSACTION_HASH>
Returns: confirmation status, block number, energy used, bandwidth used, result.
DEX Router Addresses (Mainnet)
| DEX | Router Contract |
|---|---|
| SunSwap V2 Router | TKzxdSv2FZKQrEqkKVgp5DcwEXBEKMg2Ax |
| SunSwap V3 Router | TQAvWQpT9H916GckwWDJNhYZvQMkuRL7PN |
| Sun.io Swap | TKcEU8ekq2ZoFzLSGFYCUY6aocJBX9X31b |
Swap Cost Estimation
TRON swap costs differ from EVM chains:
| Operation | Bandwidth | Energy | TRX Burn (if no resources) |
|---|---|---|---|
| TRX → TRC-20 | ~345 | ~65,000 | ~13 TRX |
| TRC-20 → TRX | ~345 | ~50,000 | ~10 TRX |
| TRC-20 → TRC-20 | ~345 | ~130,000 | ~26 TRX |
| Approve (first time) | ~345 | ~30,000 | ~6 TRX |
⚠️ Energy costs fluctuate. Always check current energy price:
node scripts/tron_api.mjs energy-price
Slippage Guide
| Token Type | Recommended Slippage |
|---|---|
| Stablecoins (USDT↔USDC) | 0.1% |
| Major tokens (TRX, JST, SUN) | 0.5% |
| Mid-cap tokens | 1-2% |
| Low-cap / Meme tokens | 3-5% |
| New launches | 5-10% (⚠️ high risk) |
Safety Checks Before Swap
- Security audit: Run
node scripts/tron_api.mjs token-security --contract <TOKEN>before trading unfamiliar tokens - Liquidity check: Run
node scripts/tron_api.mjs pool-info --contract <TOKEN>— avoid tokens with < $10k liquidity - Energy check: Run
node scripts/tron_api.mjs resource-info --address <YOUR_ADDRESS>— swap without energy burns TRX - Price impact: If price impact > 3%, consider splitting into smaller trades
Установить tron-swap в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл tron-swap?
This skill should be used when the user asks to 'swap tokens on TRON', 'buy token on TRON', 'sell TRC-20 token', 'trade TRX for USDT', 'exchange tokens on SunSwap', 'DEX trade on TRON', 'get swap quote on TRON', 'best route for TRON swap', or mentions swapping, trading, buying, selling, or exchanging tokens on the TRON network. Aggregates liquidity from SunSwap V2/V3, Sun.io, and other TRON DEXes. Do NOT use for staking — use tron-staking. Do NOT use for token research — use tron-token.
Как установить скилл tron-swap?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tron-swap запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic