From 56a3a603522b5c505cc091cd232f11a603e7969a Mon Sep 17 00:00:00 2001 From: David Lau Date: Thu, 23 Apr 2026 18:00:49 +0800 Subject: [PATCH] feat(eth): add ETH chain support to multi-swap, strategy, kol, smartmoney, created-tokens - multi-swap --chain: add eth - order strategy create/list/cancel --chain: add eth - track kol/smartmoney --chain: add eth, change to requiredOption - portfolio created-tokens --chain: add eth - SKILL.md files updated accordingly Co-Authored-By: Claude Sonnet 4.6 --- skills/gmgn-portfolio/SKILL.md | 2 +- skills/gmgn-swap/SKILL.md | 18 ++++++++++++++---- skills/gmgn-track/SKILL.md | 6 +++--- src/commands/portfolio.ts | 2 +- src/commands/swap.ts | 8 ++++---- src/commands/track.ts | 4 ++-- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/skills/gmgn-portfolio/SKILL.md b/skills/gmgn-portfolio/SKILL.md index 373847c..2e1f3c4 100644 --- a/skills/gmgn-portfolio/SKILL.md +++ b/skills/gmgn-portfolio/SKILL.md @@ -43,7 +43,7 @@ Use the `gmgn-cli` tool to query wallet portfolio data based on the user's reque ## Supported Chains -`sol` / `bsc` / `base` / `eth` (info / holdings / activity / stats / token-balance); `sol` / `bsc` / `base` (created-tokens) +`sol` / `bsc` / `base` / `eth` ## Prerequisites diff --git a/skills/gmgn-swap/SKILL.md b/skills/gmgn-swap/SKILL.md index 4ad0f91..19ab309 100644 --- a/skills/gmgn-swap/SKILL.md +++ b/skills/gmgn-swap/SKILL.md @@ -199,13 +199,23 @@ gmgn-cli multi-swap \ --priority-fee 0.00001 \ --tip-fee 0.00001 \ --condition-orders '[{"order_type":"profit_stop","side":"sell","price_scale":"100","sell_ratio":"100"},{"order_type":"loss_stop","side":"sell","price_scale":"50","sell_ratio":"100"}]' + +# ETH multi-wallet swap (EIP-1559 gas) +gmgn-cli multi-swap \ + --chain eth \ + --accounts <0xaddr1>,<0xaddr2> \ + --input-token 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \ + --output-token \ + --input-amount '{"<0xaddr1>":"1000000","<0xaddr2>":"2000000"}' \ + --slippage 0.01 \ + --gas-price 5 ``` ## `multi-swap` Parameters | Parameter | Required | Description | |-----------|----------|-------------| -| `--chain` | Yes | `sol` / `bsc` / `base` | +| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` | | `--accounts` | Yes | Comma-separated wallet addresses (1–100, all must be bound to the API Key) | | `--input-token` | Yes | Input token contract address | | `--output-token` | Yes | Output token contract address | @@ -442,7 +452,7 @@ Convert `report.input_amount` and `report.output_amount` from smallest unit usin | Parameter | Required | Description | |-----------|----------|-------------| -| `--chain` | Yes | `sol` / `bsc` / `base` | +| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` | | `--from` | Yes | Wallet address (must match API Key binding) | | `--base-token` | Yes | Base token contract address | | `--quote-token` | Yes | Quote token contract address | @@ -473,7 +483,7 @@ Convert `report.input_amount` and `report.output_amount` from smallest unit usin | Parameter | Required | Description | |-----------|----------|-------------| -| `--chain` | Yes | `sol` / `bsc` / `base` | +| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` | | `--type` | No | `open` (default) / `history` | | `--from` | No | Filter by wallet address | | `--group-tag` | Yes | Filter by order group: `LimitOrder` (limit orders only) / `STMix` (mixed strategy orders: take-profit, stop-loss, trailing take-profit, trailing stop-loss) | @@ -493,7 +503,7 @@ Convert `report.input_amount` and `report.output_amount` from smallest unit usin | Parameter | Required | Description | |-----------|----------|-------------| -| `--chain` | Yes | `sol` / `bsc` / `base` | +| `--chain` | Yes | `sol` / `bsc` / `base` / `eth` | | `--from` | Yes | Wallet address (must match API Key binding) | | `--order-id` | Yes | Order ID to cancel | | `--order-type` | No | Order type: `limit_order` (limit order) / `smart_trade` (mixed strategy order: take-profit, stop-loss, trailing take-profit, trailing stop-loss) | diff --git a/skills/gmgn-track/SKILL.md b/skills/gmgn-track/SKILL.md index 8bb5e02..7b2d218 100644 --- a/skills/gmgn-track/SKILL.md +++ b/skills/gmgn-track/SKILL.md @@ -1,7 +1,7 @@ --- name: gmgn-track description: Get real-time crypto buy/sell activity from Smart Money wallets, KOL influencer wallets, and personally followed wallets via GMGN API — alpha signals, whale tracking, meme token copy-trading ideas on Solana, BSC, Base, or Ethereum. Use when user asks what smart money or KOLs are buying, wants whale alerts, on-chain alpha, or copy-trade signals. (For a specific wallet address, use gmgn-portfolio.) -argument-hint: " [--chain ] [--wallet ]" +argument-hint: " --chain [--wallet ]" metadata: cliHelp: "gmgn-cli track --help" --- @@ -55,7 +55,7 @@ Use the `gmgn-cli` tool to query on-chain tracking data based on the user's requ ## Supported Chains -`sol` / `bsc` / `base` / `eth` (follow-wallet); `sol` / `bsc` / `base` (kol / smartmoney) +`sol` / `bsc` / `base` / `eth` ## Prerequisites @@ -142,7 +142,7 @@ gmgn-cli track smartmoney --chain sol --side sell --limit 10 --raw | Option | Description | |--------|-------------| -| `--chain ` | Chain: `sol` / `bsc` / `base` (default `sol`) | +| `--chain ` | Required. Chain: `sol` / `bsc` / `base` / `eth` | | `--limit ` | Page size (1–200, default 100) | | `--side ` | Filter by trade direction: `buy` / `sell` (client-side filter — applied locally after fetching results) | diff --git a/src/commands/portfolio.ts b/src/commands/portfolio.ts index 17dfd6b..95ba6d7 100644 --- a/src/commands/portfolio.ts +++ b/src/commands/portfolio.ts @@ -112,7 +112,7 @@ export function registerPortfolioCommands(program: Command): void { portfolio .command("created-tokens") .description("Get tokens created by a developer wallet") - .requiredOption("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .requiredOption("--wallet
", "Developer wallet address") .option("--order-by ", "Sort field: market_cap / token_ath_mc") .option("--direction ", "Sort direction: asc / desc") diff --git a/src/commands/swap.ts b/src/commands/swap.ts index 1dc7958..75b9bda 100644 --- a/src/commands/swap.ts +++ b/src/commands/swap.ts @@ -112,7 +112,7 @@ export function registerSwapCommands(program: Command): void { program .command("multi-swap") .description("Submit token swaps across multiple wallets concurrently (up to 100 wallets)") - .requiredOption("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .requiredOption("--accounts ", "Comma-separated wallet addresses (all must be bound to the API Key)") .requiredOption("--input-token
", "Input token contract address") .requiredOption("--output-token
", "Output token contract address") @@ -186,7 +186,7 @@ export function registerSwapCommands(program: Command): void { strategy .command("create") .description("Create a limit/strategy order (requires private key)") - .requiredOption("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .requiredOption("--from
", "Wallet address (must match API Key binding)") .requiredOption("--base-token
", "Base token contract address") .requiredOption("--quote-token
", "Quote token contract address") @@ -243,7 +243,7 @@ export function registerSwapCommands(program: Command): void { strategy .command("list") .description("List strategy orders (requires private key)") - .requiredOption("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .option("--type ", "open (default) / history") .option("--from
", "Filter by wallet address") .option("--group-tag ", "Filter by group: LimitOrder / STMix") @@ -268,7 +268,7 @@ export function registerSwapCommands(program: Command): void { strategy .command("cancel") .description("Cancel a strategy order (requires private key)") - .requiredOption("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .requiredOption("--from
", "Wallet address (must match API Key binding)") .requiredOption("--order-id ", "Order ID to cancel") .option("--order-type ", "Order type: limit_order / smart_trade") diff --git a/src/commands/track.ts b/src/commands/track.ts index 0957c78..6663a25 100644 --- a/src/commands/track.ts +++ b/src/commands/track.ts @@ -35,7 +35,7 @@ export function registerTrackCommands(program: Command): void { track .command("kol") .description("Get KOL trade records") - .option("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .option("--limit ", "Page size (1–200, default 100)", parseInt) .option("--side ", "Filter by trade direction: buy / sell (client-side filter)") .option("--raw", "Output raw JSON") @@ -52,7 +52,7 @@ export function registerTrackCommands(program: Command): void { track .command("smartmoney") .description("Get Smart Money trade records") - .option("--chain ", "Chain: sol / bsc / base") + .requiredOption("--chain ", "Chain: sol / bsc / base / eth") .option("--limit ", "Page size (1–200, default 100)", parseInt) .option("--side ", "Filter by trade direction: buy / sell (client-side filter)") .option("--raw", "Output raw JSON")