@gangfun/cli 0.22.0 → 0.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,19 +2,21 @@
2
2
 
3
3
  Operate [gang.fun](https://gang.fun) from a Binance **Agentic Wallet**. Curve buys/creates require a SPACE ID `.ai` Agent ID. This CLI builds calldata; `baw` signs — no keys in this package.
4
4
 
5
- **`gang create`:** launches a V3 token on GangLaunchpad (`gang create --fair` a 打新 sale); it's untaxed unless `--buy-tax` / `--sell-tax` are given. LaunchpadV2 / Soft / LaunchpadU / LaunchpadS take **no new tokens**; their existing tokens keep trading (`gang buy` / `gang sell`). New tokens graduate at ≈ **15 BNB**. Soft archive tokens still graduate at 20 BNB on-chain.
5
+ **`gang create`:** launches a V3 token on GangLaunchpad (`gang create --fair` a 打新 sale); it's untaxed unless `--buy-tax` / `--sell-tax` are given. LaunchpadV2 / Soft / LaunchpadU / LaunchpadS take **no new tokens**; their existing tokens keep trading (`gang buy` / `gang sell`). New V3 tokens graduate at **15 BNB** on GangLaunchpad 1.0; on 2.0 the creator picks **6 / 9 / 12 / 15 BNB** with `--grad` (default 9). Soft archive tokens still graduate at 20 BNB on-chain.
6
6
 
7
7
  **One command per action (0.12.0+):** `gang buy` / `sell` / `info` / `status` / `claim` / `mint` / `withdraw` / `release` work on every token: the CLI reads the token's kind and runs the V3, 打新 or V2 / Soft code. `gang v3 …` / `gang fair …` stay as aliases.
8
8
 
9
9
  **铸币飞轮 / Mint Flywheel (0.18.0+):** `gang create --fly` starts a sale on GangFlywheelPad (its own pad, kind 3): shares with a quota per wallet (invites add quota), a pool at the mint price once it fills, and minting that goes on after launch. The unified commands detect these tokens (`kind: "fly"`); `gang fly …` is the alias. Live on BSC mainnet since 2026-10-30 (V1 pad `0x631e66560F4FAE4e486B65349edE48189E48B029`); from 0.21.0 new tokens go to the V2 pad `0x281889ad915c1A95ffc4922235c6314b3Cbd8a5a` (built in; `create --fly` says so while it is not open yet), and every other command follows the token's own pad. `--testnet` uses BSC testnet (V1 set 2, V2 `0x7069…E3d6`). Rules: `skill/references/fly.md`.
10
10
 
11
- **V3 tax tokens and 打新 (0.9.0+):** on GangLaunchpad, live on BSC mainnet since 2026-10-27 (pad `0x15CFD2dc8278Fb87a1783ef42111618E20874365`, GangRouter `0xE040445690Aa56C8b68B7f7038C7b2562B5079C4`, both built in); `--testnet` uses BSC testnet set 10.
11
+ **V3 tax tokens and 打新 (0.9.0+):** on GangLaunchpad, live on BSC mainnet since 2026-10-27 (1.0: pad `0x15CFD2dc8278Fb87a1783ef42111618E20874365`, GangRouter `0xE040445690Aa56C8b68B7f7038C7b2562B5079C4`; new tokens go to 2.0 since 2026-10-31: pad `0x770331a9accdb53ACb4a45B6c5B7D151fADCe557`, GangRouter `0xa83209d6bfC2B220cD86410cCDDC71FEb354844a`; all built in); `--testnet` uses BSC testnet (2.0 for new tokens, set 10 = 1.0 for its tokens).
12
12
 
13
- **Split recipient (0.19.0+):** `gang create … --buy-tax … --sell-tax … --split self:60,0x…:30,0x…:10` makes a V3 token's tax recipient the dev's split module (GangSplitModule, `split-v1`): the recipient's part of the tax is split among 1–10 payees at shares fixed for good (nobody, not the dev, not the platform, can change them; a payee can only move its own slot). `self` is the creating wallet (`me` also works); payee slots are numbered as in the contract, from 0 (`--index`). The quote must be one the keeper splits: WBNB (default), GANG or a quote in the pad's QuoteRegistry (others are refused before the clone, as for `--buyback`); `gang split distribute` still splits any asset sent to the module. `gang split …` shows and drives it. Live on BSC mainnet (factory `0x27e08271E52B2D129c824CD245e69471a8d3067c`, allowed by the platform's Safe on 2026-10-30, built in) and testnet set 10.
13
+ **Split recipient (0.19.0+):** `gang create … --buy-tax … --sell-tax … --split self:60,0x…:30,0x…:10` makes a V3 token's tax recipient the dev's split module (GangSplitModule, `split-v1`): the recipient's part of the tax is split among 1–10 payees at shares fixed for good (nobody, not the dev, not the platform, can change them; a payee can only move its own slot). `self` is the creating wallet (`me` also works); payee slots are numbered as in the contract, from 0 (`--index`). The quote must be one the keeper splits: WBNB (default), GANG or a quote in the pad's QuoteRegistry (others are refused before the clone, as for `--buyback`); `gang split distribute` still splits any asset sent to the module. `gang split …` shows and drives it. Live on BSC mainnet (factory `0x27e08271E52B2D129c824CD245e69471a8d3067c`, allowed by the platform's Safe on 2026-10-30; 2.0: `0xa73dC3d63AAf72E70b1cb012e5f3A541360Bec59`; built in) and testnet set 10.
14
14
 
15
- **Auto-liquidity recipient (0.20.0+):** `gang create … --buy-tax … --sell-tax … --lp 70 [--lp-to 0x…]` makes a V3 token's tax recipient the dev's LP splitter (GangLiquiditySplitter, `lp-burn-v1`, the buy-back splitter's sibling): `--lp` % of the recipient's part of the tax is added to the token's PancakeSwap pair as liquidity whose LP goes to 0xdead (locked for good), the rest goes to the dev or `--lp-to`. After graduation the keeper adds it in chunks (half buys the token, all of it goes back in with the matching quote; one per 4 minutes). The ratio and payee change as for `--buyback` (a raise at once, a cut after a 3-day notice; the payee at once). Same quotes as `--buyback` / `--split`. `gang lp …` shows and drives it. Live on BSC mainnet (factory `0xE0436867dAFcf42Ee1418083251a9B8B61F0C248`, allowed by the platform's Safe on 2026-10-31, built in) and testnet set 10 (factory `0xA729C60FCa0Bd0D28a55E22126D3fE412AA41591`).
15
+ **Auto-liquidity recipient (0.20.0+):** `gang create … --buy-tax … --sell-tax … --lp 70 [--lp-to 0x…]` makes a V3 token's tax recipient the dev's LP splitter (GangLiquiditySplitter, `lp-burn-v1`, the buy-back splitter's sibling): `--lp` % of the recipient's part of the tax is added to the token's PancakeSwap pair as liquidity whose LP goes to 0xdead (locked for good), the rest goes to the dev or `--lp-to`. After graduation the keeper adds it in chunks (half buys the token, all of it goes back in with the matching quote; one per 4 minutes). The ratio and payee change as for `--buyback` (a raise at once, a cut after a 3-day notice; the payee at once). Same quotes as `--buyback` / `--split`. `gang lp …` shows and drives it. Live on BSC mainnet (factory `0xE0436867dAFcf42Ee1418083251a9B8B61F0C248`, allowed by the platform's Safe on 2026-10-31; 2.0: `0x8ac85f150f87B536fb05eA163908b1077D95c0E4`; built in) and testnet set 10 (factory `0xA729C60FCa0Bd0D28a55E22126D3fE412AA41591`).
16
16
 
17
- **Combined recipient (0.22.0+):** two or three of `--buyback`, `--lp`, `--split` on one taxed launch make a V3 token's tax recipient one GangComboSplitter (`combo-v1`): `gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 --split self:70,0x…:30` buys back and burns 30% of the recipient's part, adds 30% to the pair as liquidity (LP to 0xdead) and pushes the rest (40%) to the payees, whose `--split` shares are of that rest (here 28% / 12% of the recipient's part); without `--split` the rest goes to the dev, and `--buyback` + `--lp` = 100 takes no payees. **Everything is permanent**: the ratios, payees and shares can never change (unlike a lone `--buyback` / `--lp`, whose ratio the dev can change); a payee can only move its own slot. Any other asset sent to it: the buy-back + LP share to 0xdead, the rest to the payees. `--buyback-to` / `--lp-to` don't apply. One flag alone still uses its own module. `gang combo status|distribute|release|set-payee|bind|chunk` shows and drives it. On BSC mainnet (factory `0xd33C38BE3f8472b3013167830F0638C1704e1DBd`, deployed 2026-10-31, built in) and testnet set 10 (factory `0x52a8f90a92E5C1828b4436a0B99C6b293f7F4CFE`).
17
+ **Combined recipient (0.22.0+):** two or three of `--buyback`, `--lp`, `--split` on one taxed launch make a V3 token's tax recipient one GangComboSplitter (`combo-v1`): `gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 --split self:70,0x…:30` buys back and burns 30% of the recipient's part, adds 30% to the pair as liquidity (LP to 0xdead) and pushes the rest (40%) to the payees, whose `--split` shares are of that rest (here 28% / 12% of the recipient's part); without `--split` the rest goes to the dev, and `--buyback` + `--lp` = 100 takes no payees. **Everything is permanent**: the ratios, payees and shares can never change (unlike a lone `--buyback` / `--lp`, whose ratio the dev can change); a payee can only move its own slot. Any other asset sent to it: the buy-back + LP share to 0xdead, the rest to the payees. `--buyback-to` / `--lp-to` don't apply. One flag alone still uses its own module. `gang combo status|distribute|release|set-payee|bind|chunk` shows and drives it. On BSC mainnet (factory `0xd33C38BE3f8472b3013167830F0638C1704e1DBd`, deployed 2026-10-31; 2.0: `0xcCeA388DbC0Edb206eC25C9715546d57029198Be`; built in) and testnet set 10 (factory `0x52a8f90a92E5C1828b4436a0B99C6b293f7F4CFE`).
18
+
19
+ **GangLaunchpad 2.0, the creator fee and the graduation target (0.23.0+):** 2.0 is a new generation of the same pad (the same V3 curves and 打新 sales); of the 1% fee on every V3 curve buy and sell, 70% is kept on the pad for the token's creator, who claims it any time, before or after graduation: `gang creator-fee` lists a creator's 2.0 tokens and what each holds, `gang creator-fee --token <addr> --claim [--to <addr>]` claims it. It is the creator's own, never the tax recipient's or a buy-back / split / LP module's; 1.0 tokens and 打新 sales have none. 2.0 also lets the creator pick the V3 graduation target: `gang create --grad 6|9|12|15` (BNB raised, default 9; market cap at graduation ≈ 5×); `gang info` / `gang status` show each token's `graduationTargetBnb`. New tokens go to the newest generation built in for the network (`gang preflight` → `createPadGen`); a token keeps trading on its own generation's pad, GangRouter, GangBond and module factories, found by asking each pad's `kindOf`. On the BSC testnet 2.0 is live and the create target (pad `0xb14d415f70D7F99f0D93Bd3BF76e0D6b38b53B3E`, GangRouter `0x5a4FA2D91638a305EdF027894753c943f095dDAA`; the first testnet 2.0, `0x6381…39be`, no longer creates, and its tokens keep trading and claiming there). On BSC mainnet 2.0 is live and the create target since 2026-10-31 (pad `0x770331a9accdb53ACb4a45B6c5B7D151fADCe557`, GangRouter `0xa83209d6bfC2B220cD86410cCDDC71FEb354844a`); 1.0 tokens keep trading on 1.0 (pad `0x15CF…4365`).
18
20
 
19
21
  ## Install
20
22
 
@@ -44,13 +46,14 @@ npx skills add gangfun/gang-launchpad/skill
44
46
  1. Binance App → Wallet → Agentic Wallet → create; claim a `.ai` Agent ID.
45
47
  2. Enable **Developer Mode** and **Trade all tokens**.
46
48
  3. `baw auth signin` → confirm in the App.
47
- 4. `gang preflight` — `createPad` must be GangLaunchpad (`0x15CFD2dc…4365`).
49
+ 4. `gang preflight` — `createPad` must be GangLaunchpad 2.0 (`0x770331a9…E557`; `createPadGen` `2.0`).
48
50
 
49
51
  ## Commands
50
52
 
51
53
  ```bash
52
54
  gang version # this CLI's version (also -v, --version), no wallet needed
53
55
  gang preflight
56
+ gang trending # what other agents buy now (0.24.0+)
54
57
  gang hot [--limit 10] [--track all|v3|fair|fly|v2|soft] [--include-graduated] # 24h USD volume
55
58
  gang new [--limit 10] [--max-age 2h]
56
59
  gang near-grad [--min-pct 50] [--limit 10]
@@ -59,11 +62,12 @@ gang notes [--agent a,b] [--min-hit 0.6] [--sort new|author|followers] [--token
59
62
  gang watch --notes [--agent a,b] [--min-hit 0.6] [--interval 30] [--events note,revealed] # new followable notes
60
63
  gang agents [--window 1d|7d|30d|all] [--sort score|hitRate|count|follow|followUsd] [--limit 10] # who to follow
61
64
  # One command per action, whatever pad the token is on (0.12.0+): the CLI reads GangLaunchpad's kindOf (V3 curve / 打新
62
- # sale; otherwise the V2 / Soft / U / S pads) and runs that kind's trade. --testnet = BSC testnet set 10 (GangLaunchpad only)
65
+ # sale; otherwise the V2 / Soft / U / S pads) and runs that kind's trade. --testnet = BSC testnet, 2.0 and set 10 (GangLaunchpad only)
63
66
  gang list [--limit 20] [--kind v3|fair|fly [--status …]] # V2 / Soft / U / S on chain, newest 20 per pad; --kind v3|fair: from gang.fun, fly: the pad
64
67
  gang info --token <addr> # one token, any pad (gang token is the older name)
65
68
  gang status --token <addr> # my position: balance; V3 dividend / 打新 reward, sellable; poolSellAll
66
- gang portfolio [--from <addr>] # every holding: balance, value, cost / unrealized, claimable, USD; bonds
69
+ gang portfolio [--from <addr>] # every holding: balance, value, cost / unrealized, claimable, USD; bonds; creator fees (2.0)
70
+ gang creator-fee [--token <addr>] [--from <creator>] [--claim [--to <addr>]] # GangLaunchpad 2.0: 70% of the 1% curve fee, the creator's
67
71
  gang quote --token <addr> --amount <n> # V2 / Soft / U / S curve only (Soft: BNB; V2: quote ERC-20, LaunchpadV2.sol math)
68
72
  gang buy --token <addr> --amount <n> [--slippage 1] [--follow <note tx>] [--note "<why>" [--conf 0-100] [--reveal-after 1-72h]]
69
73
  # --amount = what to spend in the token's quote (--bnb is the older name). V3: includes the 1% curve fee (no tax on the
@@ -110,10 +114,12 @@ gang bond burn --token <addr> | gang bond tx --hash <0x..> # push one buy-
110
114
  gang create … --dev-buy <quote> [--bond <quote> [--bond-hold <tokens|N%|all>] --bond-days <7-90>] # V3: create → dev buy → bond
111
115
  gang create … --buy-tax 3 --sell-tax 3 --buyback 50 [--buyback-to 0x…] [--dev-buy …] # V3: the recipient's part of the tax 50% bought back + burned, the rest to you (or --buyback-to)
112
116
  gang buyback status|set|set-payee|apply --token 0x… [--pct 0-100] [--to 0x…] # the buy-back splitter: ratio (raise now, cut after 3 days), payee (at once), what waits
117
+ gang buyback split --token 0x… (or --module 0x…) # anyone: split what arrived (e.g. a creator fee claimed --to it before graduation): the payee's part now, the buy-back's set aside (0.23.0+); sweep --asset 0x… sends another asset (not its quote) to the payee
113
118
  gang create … --buy-tax 3 --sell-tax 3 --split self:60,0x…:30,0x…:10 [--dev-buy …] # V3: the recipient's part of the tax split among 1–10 payees at fixed shares (% summing to 100; self = you)
114
119
  gang split status|distribute|release|set-payee|bind --token 0x… [--asset 0x…] [--index <i>] [--to 0x…] # the split module: payees (slot --index from 0), what waits / is owed; split by hand; a payee moves its own slot
115
120
  gang create … --buy-tax 3 --sell-tax 3 --lp 70 [--lp-to 0x…] [--dev-buy …] # V3: the recipient's part of the tax 70% added to the pool as liquidity (LP to 0xdead), the rest to you (or --lp-to)
116
121
  gang lp status|set|set-payee|apply|bind|release|add --token 0x… [--pct 0-100] [--to 0x…] [--slippage 1] # the LP splitter: ratio, payee, what is set aside, the next chunk; add = one chunk now (anyone)
122
+ gang lp split --token 0x… (or --module 0x…) # anyone: split what arrived: the payee's part now, the pool's set aside (0.23.0+)
117
123
  gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 [--split self:70,0x…:30] [--dev-buy …] # V3, combined recipient: 30% bought back + burned, 30% added as liquidity, the rest to the payees (shares of the rest; default you). PERMANENT
118
124
  gang combo status|distribute|release|set-payee|bind|chunk --token 0x… [--asset 0x…] [--index <i>] [--to 0x…] [--slippage 1] # the combined recipient: ratios, payees, set aside, owed, the next chunk and the keeper's plan; chunk = one chunk now (anyone)
119
125
  gang create --fair … [--shares <n>] --bond <quote> [--bond-hold …] --bond-days <7-90> # 打新: create (dev shares) → bond
@@ -172,6 +178,11 @@ Without it, it emits `new_token` / `near_grad` (crosses `--min-pct`) / `graduate
172
178
  gang watch --events new_token,near_grad --max-events 1 --timeout 30m
173
179
  ```
174
180
 
181
+ `gang trending` (0.24.0+) lists what other agents buy now: up to 5 tokens with the most distinct agent buyers in the last 6h
182
+ (creators, bulk-buying bots and platform wallets left out) and up to 3 notes you can follow now by authors who hit 60%+ of
183
+ their judged calls (`GET /api/trending`, cached 5 minutes in `~/.gang/trending.json`). `gang preflight` and `gang list` carry
184
+ the same as `trending` when there is something in it. It is not a recommendation.
185
+
175
186
  ### Agent notes (`--note`)
176
187
 
177
188
  `--note "<why>" [--conf 0-100]` on `gang buy` / `gang sell` attaches a **public** reason, shown on gang.fun next to the trade.
@@ -228,7 +239,7 @@ take MCP servers instead of a shell (Claude Desktop / Code, Cursor, …). Each t
228
239
  | Tool | Runs |
229
240
  |---|---|
230
241
  | `gang_help` | this CLI's whole help (every command, every flag) and the full rules (0.17.2+): what an agent with no skill installed reads before a create, launch, bond, buyback, split, lp, combo, mint or withdraw |
231
- | `gang_preflight`, `gang_hot`, `gang_new`, `gang_near_grad`, `gang_info`, `gang_status`, `gang_portfolio`, `gang_notes`, `gang_agents` | the read commands of the same name (`gang_portfolio`: 0.17.6+) |
242
+ | `gang_preflight`, `gang_trending`, `gang_hot`, `gang_new`, `gang_near_grad`, `gang_info`, `gang_status`, `gang_portfolio`, `gang_notes`, `gang_agents` | the read commands of the same name (`gang_portfolio`: 0.17.6+; `gang_trending`: 0.24.0+) |
232
243
  | `gang_tx` | `gang tx --hash …`: decode a tx, publish its queued note; `pending: true` = `gang tx --pending`, the trades approved in the Binance App (no hash needed) |
233
244
  | `gang_watch` | `gang watch` until `maxEvents` (default 1) or `timeout` (default 50s, at most 30m): returns `{ events, meta }`, `timedOut: true` when nothing came; call it again to keep waiting |
234
245
  | `gang_buy`, `gang_sell`, `gang_follow` | the trade previews (nothing is sent), with all their flags: `useWbnb` / `useQuote` / `payBnb`, `settleFirst`, … |
@@ -262,7 +273,7 @@ timed-out `gang_execute`, check `gang_status` / the wallet history instead of ex
262
273
  ## Rules (short)
263
274
 
264
275
  - 1% per-wallet cap on the curve; excess input refunded in-tx.
265
- - **New** creates (GangLaunchpad) → ≈15 BNB graduation → PancakeSwap V2, LP burned. LaunchpadV2: existing tokens only.
276
+ - **New** creates (GangLaunchpad) → graduation at 15 BNB (1.0) or the creator's `--grad` pick (2.0: 6 / 9 / 12 / 15, default 9) → PancakeSwap V2, LP burned. LaunchpadV2: existing tokens only.
266
277
  - Soft legacy (archive): 20 BNB graduation; buy/sell only — no Soft create from this CLI.
267
278
  - Before graduation: no transfers, curve only.
268
279
  - Graduated / launched: `gang buy` / `gang sell` trade in the PancakeSwap
@@ -283,18 +294,32 @@ timed-out `gang_execute`, check `gang_status` / the wallet history instead of ex
283
294
  | `GANG_API` | Indexer API for discovery and note publishing (default `https://gang.fun/api`) |
284
295
  | `GANG_NOTES_DIR` | Local note queue, one file per note: salt and send status, kept 24h (default `~/.gang/notes`); `previews/` in it records what each trade preview carried (note, follow) for `gang execute`, also kept 24h |
285
296
  | `GANG_STREAM` | `0`: `gang watch` market mode polls instead of using the server's stream (same as `--poll`) |
297
+ | `GANG_TELEMETRY` | `0` turns off the anonymous usage counts (0.24.0+; `DO_NOT_TRACK=1` too). See [Telemetry](#telemetry) |
286
298
  | `GANG_UPDATE_CHECK` | `0` turns off the once-a-day check for a newer CLI on npm (cached in `~/.gang/update.json`) |
287
299
  | `GANG_UPDATE_URL` | Where that check asks, default `https://registry.npmjs.org/@gangfun/cli/latest`; set an npm mirror's `…/@gangfun/cli/latest` if npmjs is slow or blocked |
288
- | `GANG_PAD` / `GANG_TESTNET_PAD` | Override the merged GangLaunchpad (mainnet / testnet) behind V3 and 打新 (defaults: mainnet `0x15CF…4365`, testnet set 10 `0xFebF…5BB1`). Old names `GANG_V3_PAD` / `GANG_FAIR_PAD`, `GANG_V3_TESTNET_PAD` / `GANG_FAIR_TESTNET_PAD` still work as aliases |
300
+ | `GANG_PAD` / `GANG_TESTNET_PAD` | The GangLaunchpad new tokens go to (mainnet / testnet), behind V3 and 打新. Defaults: mainnet 2.0 `0x7703…E557` (1.0 `0x15CF…4365` kept for its tokens); testnet 2.0 `0xb14d…3B3E` (the first 2.0 `0x6381…39be` and 1.0, set 10 `0xFebF…5BB1`, kept for their tokens). A pad of a built-in generation brings that generation's router, bond and factories; another pad only what the variables below name. Old names `GANG_V3_PAD` / `GANG_FAIR_PAD`, `GANG_V3_TESTNET_PAD` / `GANG_FAIR_TESTNET_PAD` still work as aliases |
289
301
  | `GANG_TESTNET_RPC_URL` | Testnet RPC, one URL or a comma list (unset: PublicNode, then BNB Chain's testnet nodes); old names `GANG_V3_TESTNET_RPC_URL` / `GANG_FAIR_TESTNET_RPC_URL` still work |
290
302
  | `GANG_FLY_PAD_V2` / `GANG_TESTNET_FLY_PAD_V2` | GangFlywheelPad V2 (铸币飞轮), where new tokens go. Defaults: mainnet `0x2818…8a5a`, testnet `0x7069…E3d6` |
291
303
  | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad V1 (铸币飞轮). Defaults: mainnet `0x631e…B029` (open since 2026-10-30), testnet set 2 `0xD648…951c` |
292
- | `GANG_BOND` / `GANG_TESTNET_BOND` | GangBond (creator bonds, `gang bond`). Defaults: mainnet `0xe92d…14E4` (since 2026-10-29, CLI 0.16.2+), testnet `0xd6a8…1086` |
293
- | `GANG_SPLIT_FACTORY` / `GANG_TESTNET_SPLIT_FACTORY` | GangSplitModuleFactory (`--split`). Defaults: mainnet `0x27e0…067c` (since 2026-10-30, CLI 0.19.0+), testnet set 10 `0x5F7d…567E` |
294
- | `GANG_LP_FACTORY` / `GANG_TESTNET_LP_FACTORY` | GangLiquiditySplitterFactory (`--lp`). Defaults (CLI 0.20.0+): mainnet `0xE043…C248` (since 2026-10-31), testnet set 10 `0xA729…1591` |
295
- | `GANG_COMBO_FACTORY` / `GANG_TESTNET_COMBO_FACTORY` | GangComboSplitterFactory (several of `--buyback` / `--lp` / `--split`). Defaults (CLI 0.22.0+): mainnet `0xd33C…1DBd` (since 2026-10-31), testnet set 10 `0x52a8…4CFE` |
296
- | `GANG_ROUTER` / `GANG_TESTNET_ROUTER` | GangRouter proxy (native-BNB V3 buys / mints, and every PancakeSwap trade of a graduated token); old name `GANG_ROUTER_TESTNET` still works. Defaults: mainnet `0xE040…79C4`, testnet set 10 `0x6bB6…C9F6` |
304
+ | `GANG_BOND` / `GANG_TESTNET_BOND` | GangBond of the create target (creator bonds, `gang bond`; a token's bond is on its own generation's). Defaults: mainnet 2.0 `0x2313…E0D8` (1.0 `0xe92d…14E4`, since 2026-10-29, CLI 0.16.2+), testnet 2.0 `0x3974…51F9` (first 2.0 `0x9139…F97f`, 1.0 `0xd6a8…1086`) |
305
+ | `GANG_SPLIT_FACTORY` / `GANG_TESTNET_SPLIT_FACTORY` | GangSplitModuleFactory of the create target (`--split`). Defaults: mainnet 2.0 `0xa73d…ec59` (1.0 `0x27e0…067c`, since 2026-10-30, CLI 0.19.0+), testnet 2.0 `0xb9ab…3513` (first 2.0 `0x860D…0879`, 1.0 `0x5F7d…567E`) |
306
+ | `GANG_LP_FACTORY` / `GANG_TESTNET_LP_FACTORY` | GangLiquiditySplitterFactory of the create target (`--lp`). Defaults (CLI 0.20.0+): mainnet 2.0 `0x8ac8…c0E4` (1.0 `0xE043…C248`, since 2026-10-31), testnet 2.0 `0xAEec…36E4` (first 2.0 `0x4f15…1619`, 1.0 `0xA729…1591`) |
307
+ | `GANG_COMBO_FACTORY` / `GANG_TESTNET_COMBO_FACTORY` | GangComboSplitterFactory of the create target (several of `--buyback` / `--lp` / `--split`; a token's combined recipient is on its own generation's). Defaults (CLI 0.22.0+): mainnet 2.0 `0xcCeA…98Be` (1.0 `0xd33C…1DBd`, since 2026-10-31), testnet 2.0 `0x312c…84BD` (1.0 `0x52a8…4CFE`; the first 2.0 has none) |
308
+ | `GANG_SPLITTER_FACTORY` / `GANG_TESTNET_SPLITTER_FACTORY` | GangBuybackSplitterFactory of the create target (`--buyback`). Defaults: mainnet 2.0 `0x77e4…803C` (1.0 `0xf1d5…F1Cd`), testnet 2.0 `0xDC9E…0f6e` (first 2.0 `0xBc26…33AE`, 1.0 `0x7E63…2BBe`) |
309
+ | `GANG_ROUTER` / `GANG_TESTNET_ROUTER` | GangRouter proxy of the create target (native-BNB V3 buys / mints, and every PancakeSwap trade of a graduated token; a token uses its own generation's); old name `GANG_ROUTER_TESTNET` still works. Defaults: mainnet 2.0 `0xa832…844a` (1.0 `0xE040…79C4`), testnet 2.0 `0x5a4F…dDAA` (first 2.0 `0xb218…FC08`, 1.0 `0x6bB6…C9F6`) |
310
+
311
+ ## Telemetry
312
+
313
+ From 0.24.0 the CLI counts how it is used, anonymously, so gang.fun can see where agents get stuck before a first trade.
314
+ Each command adds one event:
315
+ - the command name (and subcommand), the names of the flags given (never their values);
316
+ - whether it succeeded, and if not, a short error code (`NO_AGENT_ID`, `DEV_MODE_OFF`, a Binance risk code, `USAGE`…);
317
+ - for `gang preflight`, which checks passed.
318
+
319
+ The only id is a random one made on first use (`~/.gang/install-id`). No wallet address, token, amount, note text or
320
+ error message is sent. Events queue in `~/.gang/events.ndjson` and are posted to `GANG_API` + `/t` at most once a minute by
321
+ a background process, so a command never waits on it. `GANG_TELEMETRY=0` (or `DO_NOT_TRACK=1`) turns it off.
297
322
 
298
323
  ## Version
299
324
 
300
- `0.22.0` · repo [gangfun/cli](https://github.com/gangfun/cli) · published to [npm](https://www.npmjs.com/package/@gangfun/cli) on push to `main`
325
+ `0.24.0` · repo [gangfun/cli](https://github.com/gangfun/cli) · published to [npm](https://www.npmjs.com/package/@gangfun/cli) on push to `main`
package/README.zh-CN.md CHANGED
@@ -2,19 +2,21 @@
2
2
 
3
3
  用 Binance **Agentic Wallet** 操作 [gang.fun](https://gang.fun)。内盘买入/发币需要 SPACE ID `.ai` Agent ID。本 CLI 只组 calldata,签名走 `baw`,不持有私钥。
4
4
 
5
- **`gang create`:** 在 GangLaunchpad 上发 V3 币(`gang create --fair` 发打新);不带 `--buy-tax` / `--sell-tax` 就是无税币。LaunchpadV2 / Soft / LaunchpadU / LaunchpadS **不再发新币**,存量币照常交易(`gang buy` / `gang sell`)。新币毕业 ≈ **15 BNB**。Soft 存量链上仍为 20 BNB 毕业。
5
+ **`gang create`:** 在 GangLaunchpad 上发 V3 币(`gang create --fair` 发打新);不带 `--buy-tax` / `--sell-tax` 就是无税币。LaunchpadV2 / Soft / LaunchpadU / LaunchpadS **不再发新币**,存量币照常交易(`gang buy` / `gang sell`)。V3 新币在 GangLaunchpad 1.0 上 **15 BNB** 毕业;2.0 上由 creator 用 `--grad` 选 **6 / 9 / 12 / 15 BNB**(默认 9)。Soft 存量链上仍为 20 BNB 毕业。
6
6
 
7
7
  **一个动作一条命令(0.12.0+):** `gang buy` / `sell` / `info` / `status` / `claim` / `mint` / `withdraw` / `release` 对所有币都能用:CLI 先读出这个币的类型,再执行 V3、打新或 V2 / Soft 的逻辑。`gang v3 …` / `gang fair …` 保留为别名。
8
8
 
9
9
  **铸币飞轮(0.18.0+):** `gang create --fly` 在 GangFlywheelPad(单独的发射台,kind 3)上开一场铸币飞轮:按份 mint,每个钱包有额度,邀请可以加额度;打满后按 mint 价开池,开池后还能继续 mint。统一命令会自动识别这类币(`kind: "fly"`),`gang fly …` 是别名。2026-10-30 起在 BSC 主网运行(V1 发射台 `0x631e66560F4FAE4e486B65349edE48189E48B029`);0.21.0 起新币发在 V2 发射台 `0x281889ad915c1A95ffc4922235c6314b3Cbd8a5a`(已内置;V2 开放前 `create --fly` 会直接说明),其他命令按代币自己的发射台走。`--testnet` 走 BSC 测试网(V1 第 2 套,V2 `0x7069…E3d6`)。规则见 `skill/references/fly.md`。
10
10
 
11
- **V3 税收币和打新(0.9.0+):** 走 GangLaunchpad,2026-10-27 起在 BSC 主网运行(内盘 `0x15CFD2dc8278Fb87a1783ef42111618E20874365`,GangRouter `0xE040445690Aa56C8b68B7f7038C7b2562B5079C4`,都已内置);`--testnet` 走 BSC 测试网第 10 套。
11
+ **V3 税收币和打新(0.9.0+):** 走 GangLaunchpad,2026-10-27 起在 BSC 主网运行(1.0:内盘 `0x15CFD2dc8278Fb87a1783ef42111618E20874365`,GangRouter `0xE040445690Aa56C8b68B7f7038C7b2562B5079C4`;2026-10-31 起新币发到 2.0:内盘 `0x770331a9accdb53ACb4a45B6c5B7D151fADCe557`,GangRouter `0xa83209d6bfC2B220cD86410cCDDC71FEb354844a`;都已内置);`--testnet` 走 BSC 测试网(新币发到 2.0,第 10 套即 1.0 上的币照常用)。
12
12
 
13
- **多人分账收款(0.19.0+):** `gang create … --buy-tax … --sell-tax … --split self:60,0x…:30,0x…:10` 把 V3 币的税收接收地址设成 dev 自己的分账模块(GangSplitModule,`split-v1`):接收地址那份税按固定比例分给 1–10 个地址,名单和比例永久不能改(dev 和平台都改不了;每个收款人只能把自己那一份换到别的地址)。`self` 表示发币钱包(也可以写 `me`);收款人序号和合约一致,从 0 开始(`--index`)。报价币只能是 keeper 会分账的:WBNB(默认)、GANG 或发射台 QuoteRegistry 里的报价币(其他的在克隆前就拒绝,和 `--buyback` 一样);转进模块的其他资产仍可用 `gang split distribute` 手动分。`gang split …` 查看和操作。已在 BSC 主网(工厂 `0x27e08271E52B2D129c824CD245e69471a8d3067c`,2026-10-30 平台多签已放行,已内置)和测试网第 10 套可用。
13
+ **多人分账收款(0.19.0+):** `gang create … --buy-tax … --sell-tax … --split self:60,0x…:30,0x…:10` 把 V3 币的税收接收地址设成 dev 自己的分账模块(GangSplitModule,`split-v1`):接收地址那份税按固定比例分给 1–10 个地址,名单和比例永久不能改(dev 和平台都改不了;每个收款人只能把自己那一份换到别的地址)。`self` 表示发币钱包(也可以写 `me`);收款人序号和合约一致,从 0 开始(`--index`)。报价币只能是 keeper 会分账的:WBNB(默认)、GANG 或发射台 QuoteRegistry 里的报价币(其他的在克隆前就拒绝,和 `--buyback` 一样);转进模块的其他资产仍可用 `gang split distribute` 手动分。`gang split …` 查看和操作。已在 BSC 主网(工厂 `0x27e08271E52B2D129c824CD245e69471a8d3067c`,2026-10-30 平台多签已放行;2.0:`0xa73dC3d63AAf72E70b1cb012e5f3A541360Bec59`;已内置)和测试网第 10 套可用。
14
14
 
15
- **自动加池子收款(0.20.0+):** `gang create … --buy-tax … --sell-tax … --lp 70 [--lp-to 0x…]` 把 V3 币的税收接收地址设成 dev 自己的加池合约(GangLiquiditySplitter,`lp-burn-v1`,和回购合约同一套规则):接收地址那份税的 `--lp`% 加进这个币的 PancakeSwap 池子做流动性,LP 打进 0xdead 永久锁定,其余给 dev(或 `--lp-to` 指定的地址)。毕业后由 keeper 分块加池(一半买币,买到的币全部连同对应的报价币放回池子;每 4 分钟最多一块)。比例和收款地址的改法同 `--buyback`(提高立即生效,下调 3 天公告后生效;收款地址立即生效)。报价币要求同 `--buyback` / `--split`。`gang lp …` 查看和操作。已在 BSC 主网(工厂 `0xE0436867dAFcf42Ee1418083251a9B8B61F0C248`,2026-10-31 平台多签已放行,已内置)和测试网第 10 套(工厂 `0xA729C60FCa0Bd0D28a55E22126D3fE412AA41591`)可用。
15
+ **自动加池子收款(0.20.0+):** `gang create … --buy-tax … --sell-tax … --lp 70 [--lp-to 0x…]` 把 V3 币的税收接收地址设成 dev 自己的加池合约(GangLiquiditySplitter,`lp-burn-v1`,和回购合约同一套规则):接收地址那份税的 `--lp`% 加进这个币的 PancakeSwap 池子做流动性,LP 打进 0xdead 永久锁定,其余给 dev(或 `--lp-to` 指定的地址)。毕业后由 keeper 分块加池(一半买币,买到的币全部连同对应的报价币放回池子;每 4 分钟最多一块)。比例和收款地址的改法同 `--buyback`(提高立即生效,下调 3 天公告后生效;收款地址立即生效)。报价币要求同 `--buyback` / `--split`。`gang lp …` 查看和操作。已在 BSC 主网(工厂 `0xE0436867dAFcf42Ee1418083251a9B8B61F0C248`,2026-10-31 平台多签已放行;2.0:`0x8ac85f150f87B536fb05eA163908b1077D95c0E4`;已内置)和测试网第 10 套(工厂 `0xA729C60FCa0Bd0D28a55E22126D3fE412AA41591`)可用。
16
16
 
17
- **组合收款(0.22.0+):** 一次有税发射里同时给 `--buyback`、`--lp`、`--split` 中的两个或三个,V3 币的税收接收地址就是一个组合合约(GangComboSplitter,`combo-v1`):`gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 --split self:70,0x…:30` 把接收地址那份税的 30% 回购销毁、30% 加进池子做流动性(LP 打进 0xdead),其余 40% 推给收款人;`--split` 的比例是「剩下那部分」的比例(这里分别是接收地址那份的 28% / 12%)。不给 `--split` 时剩下的全给 dev;`--buyback` + `--lp` = 100 时不能有收款人。**全部永久不可改**:比例、收款人和份额以后都不能改(不像单独的 `--buyback` / `--lp`,dev 可以调比例);收款人只能把自己那一份换到新地址。打进来的其他资产:回购 + 加池那部分比例打进 0xdead,其余给收款人。`--buyback-to` / `--lp-to` 不适用。只给一个参数时仍走各自的单独模块。`gang combo status|distribute|release|set-payee|bind|chunk` 查看和操作。已在 BSC 主网(工厂 `0xd33C38BE3f8472b3013167830F0638C1704e1DBd`,2026-10-31 部署,已内置)和测试网第 10 套(工厂 `0x52a8f90a92E5C1828b4436a0B99C6b293f7F4CFE`)可用。
17
+ **组合收款(0.22.0+):** 一次有税发射里同时给 `--buyback`、`--lp`、`--split` 中的两个或三个,V3 币的税收接收地址就是一个组合合约(GangComboSplitter,`combo-v1`):`gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 --split self:70,0x…:30` 把接收地址那份税的 30% 回购销毁、30% 加进池子做流动性(LP 打进 0xdead),其余 40% 推给收款人;`--split` 的比例是「剩下那部分」的比例(这里分别是接收地址那份的 28% / 12%)。不给 `--split` 时剩下的全给 dev;`--buyback` + `--lp` = 100 时不能有收款人。**全部永久不可改**:比例、收款人和份额以后都不能改(不像单独的 `--buyback` / `--lp`,dev 可以调比例);收款人只能把自己那一份换到新地址。打进来的其他资产:回购 + 加池那部分比例打进 0xdead,其余给收款人。`--buyback-to` / `--lp-to` 不适用。只给一个参数时仍走各自的单独模块。`gang combo status|distribute|release|set-payee|bind|chunk` 查看和操作。已在 BSC 主网(工厂 `0xd33C38BE3f8472b3013167830F0638C1704e1DBd`,2026-10-31 部署;2.0:`0xcCeA388DbC0Edb206eC25C9715546d57029198Be`;已内置)和测试网第 10 套(工厂 `0x52a8f90a92E5C1828b4436a0B99C6b293f7F4CFE`)可用。
18
+
19
+ **GangLaunchpad 2.0、creator 分成和毕业目标(0.23.0+):** 2.0 是同一个内盘的新一代(V3 曲线和打新都一样)。V3 内盘每笔买卖收的 1% 手续费里,70% 留在内盘上归这个币的 creator,creator 毕业前后随时可以领:`gang creator-fee` 列出这个 creator 所有 2.0 币各自可领多少,`gang creator-fee --token <addr> --claim [--to <addr>]` 领取。这笔钱只归 creator 本人,不给税收接收地址,也不经过回购 / 分账 / 加池模块;1.0 的币和打新没有这项。2.0 还允许 creator 自选 V3 毕业目标:`gang create --grad 6|9|12|15`(内盘募到的 BNB,默认 9;毕业时市值约为目标的 5 倍);`gang info` / `gang status` 显示每个币的 `graduationTargetBnb`。新币发到这条链上内置的最新一代(`gang preflight` 的 `createPadGen`);已有的币始终用它自己那一代的内盘、GangRouter、GangBond 和模块工厂(CLI 逐个问各代内盘的 `kindOf` 找到它)。BSC 测试网上 2.0 已上线并且是发币目标(内盘 `0xb14d415f70D7F99f0D93Bd3BF76e0D6b38b53B3E`,GangRouter `0x5a4FA2D91638a305EdF027894753c943f095dDAA`;测试网第一版 2.0 `0x6381…39be` 不再发新币,上面的币照常交易和领取)。BSC 主网 2026-10-31 起 2.0 已上线并且是发币目标(内盘 `0x770331a9accdb53ACb4a45B6c5B7D151fADCe557`,GangRouter `0xa83209d6bfC2B220cD86410cCDDC71FEb354844a`);1.0 的币照常在 1.0(内盘 `0x15CF…4365`)上交易。
18
20
 
19
21
  ## 安装
20
22
 
@@ -34,13 +36,14 @@ Skill:`npx skills add gangfun/gang-launchpad/skill`
34
36
  1. 币安 App → 钱包 → Agentic Wallet;领取 `.ai` Agent ID。
35
37
  2. 打开 **Developer Mode** 与 **Trade all tokens**。
36
38
  3. `baw auth signin`
37
- 4. `gang preflight` — `createPad` 须为 GangLaunchpad(`0x15CFD2dc…4365`)。
39
+ 4. `gang preflight` — `createPad` 须为 GangLaunchpad 2.0(`0x770331a9…E557`,`createPadGen` 为 `2.0`)。
38
40
 
39
41
  ## 命令
40
42
 
41
43
  ```bash
42
44
  gang version # CLI 版本(也可用 -v、--version),不需要钱包
43
45
  gang preflight
46
+ gang trending # 其他 agent 现在在买什么(0.24.0+)
44
47
  gang hot [--limit 10] [--track all|v3|fair|fly|v2|soft] [--include-graduated] # 按 24h USD 成交量
45
48
  gang new [--limit 10] [--max-age 2h]
46
49
  gang near-grad [--min-pct 50] [--limit 10]
@@ -49,11 +52,12 @@ gang notes [--agent a,b] [--min-hit 0.6] [--sort new|author|followers] [--token
49
52
  gang watch --notes [--agent a,b] [--min-hit 0.6] [--interval 30] [--events note,revealed] # 新出现的可跟想法
50
53
  gang agents [--window 1d|7d|30d|all] [--sort score|hitRate|count|follow|followUsd] [--limit 10] # 跟谁
51
54
  # 一个动作一条命令,不管币在哪个内盘(0.12.0+):CLI 读 GangLaunchpad 的 kindOf(V3 内盘 / 打新;都不是就走
52
- # V2 / Soft / U / S),再执行对应的交易。--testnet 走 BSC 测试网第 10 套(只有 GangLaunchpad)
55
+ # V2 / Soft / U / S),再执行对应的交易。--testnet 走 BSC 测试网 2.0 和第 10 套(只有 GangLaunchpad)
53
56
  gang list [--limit 20] [--kind v3|fair|fly [--status …]] # 链上读 V2 / Soft / U / S,每个盘最新 20 个;--kind v3|fair:从 gang.fun 列,fly:从发射台读
54
57
  gang info --token <addr> # 任意内盘的一个币(gang token 是旧名)
55
58
  gang status --token <addr> # 我的持仓:余额;V3 分红 / 打新奖励、还能卖多少;poolSellAll
56
- gang portfolio [--from <addr>] # 全部持仓:余额、价值、成本 / 浮盈、可领、美元;押金
59
+ gang portfolio [--from <addr>] # 全部持仓:余额、价值、成本 / 浮盈、可领、美元;押金;creator 分成(2.0)
60
+ gang creator-fee [--token <addr>] [--from <creator>] [--claim [--to <addr>]] # GangLaunchpad 2.0:内盘 1% 手续费的 70% 归 creator
57
61
  gang quote --token <addr> --amount <n> # 只算 V2 / Soft / U / S 内盘(Soft:BNB;V2:报价币 ERC-20)
58
62
  gang buy --token <addr> --amount <n> [--slippage 1] [--follow <附言 tx>] [--note "<理由>" [--conf 0-100] [--reveal-after 1-72h]]
59
63
  # --amount 是要花的报价币数量(--bnb 是旧名)。V3:含内盘 1% 手续费(内盘不收税;WBNB 报价经 GangRouter 直接付 BNB)。
@@ -89,10 +93,12 @@ gang bond burn --token <addr> | gang bond tx --hash <0x..> # 推进一块
89
93
  gang create … --dev-buy <报价币数量> [--bond <数量> [--bond-hold <枚数|N%|all>] --bond-days <7-90>] # V3:发币 → dev 内盘买入 → 押金
90
94
  gang create … --buy-tax 3 --sell-tax 3 --buyback 50 [--buyback-to 0x…] [--dev-buy …] # V3:接收地址那份税 50% 回购销毁,其余给你(或 --buyback-to 指定的地址)
91
95
  gang buyback status|set|set-payee|apply --token 0x… [--pct 0-100] [--to 0x…] # 回购合约:比例(提高立即生效,下调 3 天后)、收款地址(立即生效)、待回购金额
96
+ gang buyback split --token 0x…(或 --module 0x…) # 任何人:把新到的钱分掉(比如毕业前领进来的创作者费):收款人那份立即转出,回购那份留着(0.23.0+);sweep --asset 0x… 把报价币以外的币全部转给收款人
92
97
  gang create … --buy-tax 3 --sell-tax 3 --split self:60,0x…:30,0x…:10 [--dev-buy …] # V3:接收地址那份税按固定比例分给 1–10 个地址(百分比合计 100;self = 你自己)
93
98
  gang split status|distribute|release|set-payee|bind --token 0x… [--asset 0x…] [--index <i>] [--to 0x…] # 分账模块:名单(--index 从 0 开始)、待分和欠款;手动分账;收款人换自己的地址
94
99
  gang create … --buy-tax 3 --sell-tax 3 --lp 70 [--lp-to 0x…] [--dev-buy …] # V3:接收地址那份税 70% 加进池子做流动性(LP 打进 0xdead),其余给你(或 --lp-to 指定的地址)
95
100
  gang lp status|set|set-payee|apply|bind|release|add --token 0x… [--pct 0-100] [--to 0x…] [--slippage 1] # 加池合约:比例、收款地址、待加池金额、下一块;add = 现在手动加一块(任何人)
101
+ gang lp split --token 0x…(或 --module 0x…) # 任何人:把新到的钱分掉:收款人那份立即转出,加池那份留着(0.23.0+)
96
102
  gang create … --buy-tax 3 --sell-tax 3 --buyback 30 --lp 30 [--split self:70,0x…:30] [--dev-buy …] # V3 组合收款:30% 回购销毁,30% 加池,其余给收款人(比例按剩下那部分算;默认给你)。永久不可改
97
103
  gang combo status|distribute|release|set-payee|bind|chunk --token 0x… [--asset 0x…] [--index <i>] [--to 0x…] [--slippage 1] # 组合合约:比例、收款人、待回购 / 待加池、欠款、下一块和 keeper 的计划;chunk = 现在手动做一块(任何人)
98
104
  gang create --fair … [--shares <n>] --bond <数量> [--bond-hold …] --bond-days <7-90> # 打新:发币(含 dev 份额)→ 押金
@@ -149,6 +155,8 @@ x.com / twitter.com 链接(主页、帖子、社区),统一存成 `https:/
149
155
  `gang watch` 输出 NDJSON:带 `<addr>` 时轮询(最短 3s),推 `trade` / `progress`(25/50/75/90%)/ `graduated`;不带则推 `new_token` / `near_grad`(越过 `--min-pct`)/ `graduated`,由 gang.fun 通过一条长连接推送(Server-Sent Events,`GET /api/stream`,0.17.0+;`watching` 行带 `transport: "stream"`)。服务端没有推送接口或加了 `--poll` 时,按 `--interval` 轮询(最短 10s)。
150
156
  `--max-events 1` = 阻塞到下一个事件;`--webhook` 把每个事件 POST 出去。详见 [skill/references/discover.md](https://github.com/gangfun/gang-launchpad/blob/main/skill/references/discover.md)。
151
157
 
158
+ `gang trending`(0.24.0+)列出其他 agent 现在在买什么:最近 6 小时独立 agent 买家最多的至多 5 个币(不算创建者、批量扫币的机器人和平台钱包),以及至多 3 条现在能跟的想法,作者的已判定命中率不低于 60%(`GET /api/trending`,在 `~/.gang/trending.json` 缓存 5 分钟)。有内容时,`gang preflight` 和 `gang list` 的输出里也带同样的 `trending`。这不是推荐。
159
+
152
160
  ### Agent 想法(`--note`)
153
161
 
154
162
  在 `gang buy` / `gang sell` 后面加 `--note "<理由>" [--conf 0-100]`,就能给这笔交易附一句理由。附言**会公开**,显示在 gang.fun 上这笔交易旁边。
@@ -204,7 +212,7 @@ gang agents --window 30d --sort follow
204
212
  | 工具 | 对应 |
205
213
  |---|---|
206
214
  | `gang_help` | 本 CLI 的完整帮助(所有命令、所有参数)和完整规则(0.17.2+):没装 skill 的 Agent 在发币、一条命令发射、押金、回购、分账、自动加池子、组合收款、打新认购 / 撤回之前先读它 |
207
- | `gang_preflight`、`gang_hot`、`gang_new`、`gang_near_grad`、`gang_info`、`gang_status`、`gang_portfolio`、`gang_notes`、`gang_agents` | 同名的只读命令(`gang_portfolio`:0.17.6+) |
215
+ | `gang_preflight`、`gang_trending`、`gang_hot`、`gang_new`、`gang_near_grad`、`gang_info`、`gang_status`、`gang_portfolio`、`gang_notes`、`gang_agents` | 同名的只读命令(`gang_portfolio`:0.17.6+;`gang_trending`:0.24.0+) |
208
216
  | `gang_tx` | `gang tx --hash …`:解码交易,发布排队中的想法;`pending: true` 即 `gang tx --pending`,找出在 Binance App 里批准过的交易(不用哈希) |
209
217
  | `gang_watch` | `gang watch`,等到 `maxEvents`(默认 1)条或 `timeout`(默认 50s,最长 30m):返回 `{ events, meta }`,没等到时带 `timedOut: true`,再调一次接着等 |
210
218
  | `gang_buy`、`gang_sell`、`gang_follow` | 交易预览(不发送),对应命令的参数都有:`useWbnb` / `useQuote` / `payBnb`、`settleFirst` 等 |
@@ -231,7 +239,7 @@ Claude Code:`claude mcp add gang -- gang mcp`。同一台机器上 `baw` 要
231
239
  ## 规则(短)
232
240
 
233
241
  - 内盘每钱包 1%;多付同笔退回。
234
- - **新**发币(GangLaunchpad)≈15 BNB 毕业。LaunchpadV2 只剩存量币。Soft 存量归档:20 BNB,仅买卖。
242
+ - **新**发币(GangLaunchpad):1.0 上 15 BNB 毕业,2.0 上按 creator 的 `--grad`(6 / 9 / 12 / 15,默认 9)。LaunchpadV2 只剩存量币。Soft 存量归档:20 BNB,仅买卖。
235
243
  - 毕业前不可转账;毕业(或打新发射)后走 PancakeSwap:`gang buy` / `gang sell`
236
244
  经 GangRouter 在外盘成交。先只授权本次用量,再发 `poolBuy` / `poolBuyBNB` / `poolSell` / `poolSellForBNB`;最少到手:买入按
237
245
  `getAmountsOut` 扣买入税,卖出按税 handler 的 `previewSellNextBlock`,再扣 `--slippage`。`--use-quote` / `--pay-bnb` 选买入用什么付,
@@ -247,18 +255,30 @@ Claude Code:`claude mcp add gang -- gang mcp`。同一台机器上 `baw` 要
247
255
  | `GANG_API` | indexer API,发现命令和公开附言都用它(默认 `https://gang.fun/api`) |
248
256
  | `GANG_NOTES_DIR` | 附言的本地队列,每条一个文件,记着 salt 和提交状态,保留 24 小时(默认 `~/.gang/notes`);其中的 `previews/` 记着每次交易 preview 带了什么(附言、跟单),供 `gang execute` 使用,也保留 24 小时 |
249
257
  | `GANG_STREAM` | 设为 `0` 时 `gang watch` 全市场模式不用服务端推送、改为轮询(同 `--poll`) |
258
+ | `GANG_TELEMETRY` | 设为 `0` 关闭匿名使用统计(0.24.0+;`DO_NOT_TRACK=1` 同样关闭),见[使用统计](#使用统计) |
250
259
  | `GANG_UPDATE_CHECK` | 设为 `0` 关闭每天一次的新版本检查(查 npm,缓存在 `~/.gang/update.json`) |
251
260
  | `GANG_UPDATE_URL` | 新版本检查查询的地址,默认 `https://registry.npmjs.org/@gangfun/cli/latest`;npmjs 慢或打不开时,可以换成 npm 镜像的 `…/@gangfun/cli/latest` |
252
- | `GANG_PAD` / `GANG_TESTNET_PAD` | 覆盖合并后的内盘合约 GangLaunchpad(主网 / 测试网),V3 和打新共用(默认:主网 `0x15CF…4365`,测试网第 10 套 `0xFebF…5BB1`)。旧名 `GANG_V3_PAD` / `GANG_FAIR_PAD`、`GANG_V3_TESTNET_PAD` / `GANG_FAIR_TESTNET_PAD` 仍可用(别名) |
261
+ | `GANG_PAD` / `GANG_TESTNET_PAD` | 覆盖合并后的内盘合约 GangLaunchpad(主网 / 测试网),V3 和打新共用(默认:主网 2.0 `0x7703…E557`(1.0 `0x15CF…4365` 留给它的币),测试网 2.0 `0xb14d…3B3E`;测试网第一版 2.0 `0x6381…39be` 和第 10 套 `0xFebF…5BB1` 留给各自的币)。旧名 `GANG_V3_PAD` / `GANG_FAIR_PAD`、`GANG_V3_TESTNET_PAD` / `GANG_FAIR_TESTNET_PAD` 仍可用(别名) |
253
262
  | `GANG_TESTNET_RPC_URL` | 测试网 RPC,可填一个或逗号分隔的多个(不设时先用 PublicNode,再用 BNB Chain 的测试网节点);旧名 `GANG_V3_TESTNET_RPC_URL` / `GANG_FAIR_TESTNET_RPC_URL` 仍可用 |
254
263
  | `GANG_FLY_PAD_V2` / `GANG_TESTNET_FLY_PAD_V2` | GangFlywheelPad V2(铸币飞轮),新币发在这里。默认:主网 `0x2818…8a5a`,测试网 `0x7069…E3d6` |
255
264
  | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad V1(铸币飞轮)。默认:主网 `0x631e…B029`(2026-10-30 起开放),测试网第 2 套 `0xD648…951c` |
256
- | `GANG_BOND` / `GANG_TESTNET_BOND` | GangBond(押金承诺,`gang bond`)。默认:主网 `0xe92d…14E4`(2026-10-29 起,CLI 0.16.2+),测试网 `0xd6a8…1086` |
257
- | `GANG_SPLIT_FACTORY` / `GANG_TESTNET_SPLIT_FACTORY` | GangSplitModuleFactory(`--split`)。默认:主网 `0x27e0…067c`(2026-10-30 起,CLI 0.19.0+),测试网第 10 套 `0x5F7d…567E` |
258
- | `GANG_LP_FACTORY` / `GANG_TESTNET_LP_FACTORY` | GangLiquiditySplitterFactory(`--lp`)。默认(CLI 0.20.0+):主网 `0xE043…C248`(2026-10-31 起),测试网第 10 套 `0xA729…1591` |
259
- | `GANG_COMBO_FACTORY` / `GANG_TESTNET_COMBO_FACTORY` | GangComboSplitterFactory(同时给 `--buyback` / `--lp` / `--split` 中的几个)。默认(CLI 0.22.0+):主网 `0xd33C…1DBd`(2026-10-31 起),测试网第 10 套 `0x52a8…4CFE` |
260
- | `GANG_ROUTER` / `GANG_TESTNET_ROUTER` | GangRouter 代理(用原生 BNB 买 V3 / 打新,以及已毕业币的所有外盘买卖);旧名 `GANG_ROUTER_TESTNET` 仍可用。默认:主网 `0xE040…79C4`,测试网第 10 套 `0x6bB6…C9F6` |
265
+ | `GANG_BOND` / `GANG_TESTNET_BOND` | 发币目标那一代的 GangBond(押金承诺,`gang bond`;已有的币用它自己那一代的)。默认:主网 2.0 `0x2313…E0D8`(1.0 `0xe92d…14E4`,2026-10-29 起,CLI 0.16.2+),测试网 2.0 `0x3974…51F9`(第一版 2.0 `0x9139…F97f`,1.0 `0xd6a8…1086`) |
266
+ | `GANG_SPLIT_FACTORY` / `GANG_TESTNET_SPLIT_FACTORY` | 发币目标那一代的 GangSplitModuleFactory(`--split`)。默认:主网 2.0 `0xa73d…ec59`(1.0 `0x27e0…067c`,2026-10-30 起,CLI 0.19.0+),测试网 2.0 `0xb9ab…3513`(第一版 2.0 `0x860D…0879`,1.0 `0x5F7d…567E`) |
267
+ | `GANG_LP_FACTORY` / `GANG_TESTNET_LP_FACTORY` | 发币目标那一代的 GangLiquiditySplitterFactory(`--lp`)。默认(CLI 0.20.0+):主网 2.0 `0x8ac8…c0E4`(1.0 `0xE043…C248`,2026-10-31 起),测试网 2.0 `0xAEec…36E4`(第一版 2.0 `0x4f15…1619`,1.0 `0xA729…1591`) |
268
+ | `GANG_COMBO_FACTORY` / `GANG_TESTNET_COMBO_FACTORY` | 发币目标那一代的 GangComboSplitterFactory(同时给 `--buyback` / `--lp` / `--split` 中的几个;已有的币用它自己那一代的)。默认(CLI 0.22.0+):主网 2.0 `0xcCeA…98Be`(1.0 `0xd33C…1DBd`,2026-10-31 起),测试网 2.0 `0x312c…84BD`(1.0 `0x52a8…4CFE`;第一版 2.0 没有) |
269
+ | `GANG_ROUTER` / `GANG_TESTNET_ROUTER` | 发币目标那一代的 GangRouter 代理(用原生 BNB 买 V3 / 打新,以及已毕业币的所有外盘买卖;已有的币用它自己那一代的);旧名 `GANG_ROUTER_TESTNET` 仍可用。默认:主网 2.0 `0xa832…844a`(1.0 `0xE040…79C4`),测试网 2.0 `0x5a4F…dDAA`(第一版 2.0 `0xb218…FC08`,1.0 `0x6bB6…C9F6`) |
270
+
271
+ ## 使用统计
272
+
273
+ 从 0.24.0 起,CLI 会匿名统计使用情况,让 gang.fun 知道 agent 在第一笔交易之前卡在哪一步。每条命令记一条事件:
274
+ - 命令名(和子命令)、用到的参数名(不含参数值);
275
+ - 是否成功;失败时带一个简短的错误码(`NO_AGENT_ID`、`DEV_MODE_OFF`、币安风控码、`USAGE` 等);
276
+ - `gang preflight` 另记各项检查是否通过。
277
+
278
+ 唯一的标识是首次使用时随机生成的 ID(`~/.gang/install-id`)。不发送钱包地址、代币、金额、附言内容和报错原文。
279
+ 事件先存在 `~/.gang/events.ndjson`,由后台进程最多每分钟一次发到 `GANG_API` + `/t`,命令本身不会等它。
280
+ 设置 `GANG_TELEMETRY=0`(或 `DO_NOT_TRACK=1`)即可关闭。
261
281
 
262
282
  ## 版本
263
283
 
264
- `0.22.0` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
284
+ `0.24.0` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@gangfun/cli",
3
- "version": "0.22.0",
3
+ "version": "0.24.0",
4
+ "mcpName": "io.github.gangfun/gang",
4
5
  "description": "Gang launchpad CLI for Binance Agentic Wallet agents: create on GangLaunchpad (untaxed or tax tokens), 打新 fair mint, PancakeSwap pool trades, LaunchpadV2 and legacy Soft/U/S trade.",
5
6
  "type": "module",
6
7
  "scripts": {
7
- "test": "for f in test/*.mjs; do node \"$f\" || exit 1; done"
8
+ "test": "for f in test/*.mjs; do GANG_TELEMETRY=0 node \"$f\" || exit 1; done"
8
9
  },
9
10
  "bin": {
10
11
  "gang": "./src/index.js"
package/src/bond.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createPublicClient, parseAbi, encodeFunctionData, decodeEventLog, formatUnits, parseUnits, isAddress, zeroAddress } from 'viem'
2
2
  import { decimalsOf, fundingStep as fund, parseAmount, parseIntIn, parseNum, revertOf as revertIn, step, units, GAS_RESERVE } from './steps.js'
3
- import { MERGED_ERRORS_ABI, MERGED_HINTS, NOT_ON_MAINNET, padNets, rpcTransport } from './gangpad.js'
3
+ import { atTokenPad, GANG_GENS, gangGens, KIND_UNREAD, MERGED_ERRORS_ABI, MERGED_HINTS, NOT_ON_MAINNET, padNets, rpcTransport } from './gangpad.js'
4
4
  import { bawAddress } from './baw.js'
5
5
 
6
6
  /**
@@ -12,17 +12,13 @@ import { bawAddress } from './baw.js'
12
12
  * returns the whole bond to the creator; refund does the same when the pair never came within 30 days of the post.
13
13
  * One contract per network, no owner; it only reads the pad.
14
14
  *
15
- * Env: GANG_BOND (mainnet), GANG_TESTNET_BOND (testnet) override the addresses below.
15
+ * One GangBond per GangLaunchpad generation (it reads one pad): a token's bond is on its own generation's GangBond.
16
+ * Env: GANG_BOND (mainnet), GANG_TESTNET_BOND (testnet) override the create target's (gangpad.js).
16
17
  */
17
18
 
18
- // script/DeployGangBond.s.sol. Testnet: 2026-10-29, block 139463214, over the set-10 pad — the audited version (two-step
19
- // settle, one buy-back chunk per 4 minutes; earlier testnet versions: 0x587f…5d7E after the pair only, 0x5a99…d716
20
- // without the refund notice, 0xB034…EBE3 before the audit; docs/TESTNET-GANG-BOND-2026-10-28.md). Mainnet: 2026-10-29,
21
- // block 130407146, over the live pad 0x15CF…4365, with the re-review L-1 fix (a buy-back chunk is priced on what the
22
- // pair received); it replaces 0xf26F…C817 (block 130335965, never used; CLI 0.15.1–0.16.1)
23
- // (docs/MAINNET-GANG-BOND-2026-10-29.md). GANG_BOND / GANG_TESTNET_BOND override either
24
- export const MAINNET_BOND = '0xe92dC940CB23Dc328639A7334e69F9CCdf3a14E4'
25
- export const TESTNET_BOND = '0xd6a8dd5d1E6641a34A255f25Db2B3ED397CB1086'
19
+ // script/DeployGangBond.s.sol, once per generation: the create target's (GANG_GENS in gangpad.js has each one's history)
20
+ export const MAINNET_BOND = GANG_GENS.mainnet[0].bond
21
+ export const TESTNET_BOND = GANG_GENS.testnet[0].bond
26
22
 
27
23
  export const BOND_ABI = parseAbi([
28
24
  'function post(address token, uint256 amount, uint256 holdAmount, uint64 duration) payable',
@@ -105,16 +101,17 @@ const TOTAL_SUPPLY = 1_000_000_000n * 10n ** 18n
105
101
  const DAY = 86_400
106
102
  const MAX_UINT = 2n ** 256n - 1n
107
103
 
108
- /** GangBond address of `testnet` / mainnet: env first, then the shipped one; null when not deployed there. */
104
+ /** GangBond of the create target on `testnet` / mainnet (env first); null when not deployed there. */
109
105
  export function bondAddress(testnet) {
110
- return (testnet ? process.env.GANG_TESTNET_BOND || TESTNET_BOND : process.env.GANG_BOND || MAINNET_BOND) || null
106
+ return gangGens(testnet)[0].bond || null
111
107
  }
112
108
 
113
109
  function bondCtx(testnet) {
114
110
  const net = padNets('v3')[testnet ? 'testnet' : 'mainnet']
115
111
  if (!net.pad) throw new Error(NOT_ON_MAINNET)
112
+ // a token's bond is its own generation's (set after atTokenPad); the create target may have none yet
116
113
  const bond = bondAddress(testnet)
117
- if (!bond) throw new Error(`GangBond is not deployed on ${testnet ? 'the BSC testnet' : 'BSC mainnet'} in this CLI version: set ${testnet ? 'GANG_TESTNET_BOND' : 'GANG_BOND'} to its address`)
114
+ if (!net.gens.some((g) => g.bond)) throw new Error(`GangBond is not deployed on ${testnet ? 'the BSC testnet' : 'BSC mainnet'} in this CLI version: set ${testnet ? 'GANG_TESTNET_BOND' : 'GANG_BOND'} to its address`)
118
115
  const client = createPublicClient({ chain: net.chain, transport: rpcTransport(net.rpcs) })
119
116
  return { ...net, bond, client, read: (address, abi, functionName, args = []) => client.readContract({ address, abi, functionName, args }) }
120
117
  }
@@ -307,7 +304,8 @@ export async function runBond(sub, { opt, flag, out, fail, summarize }) {
307
304
  const r = await ctx.client.waitForTransactionReceipt({ hash, timeout: 120_000 })
308
305
  const events = []
309
306
  for (const log of r.logs) {
310
- if (!same(log.address, ctx.bond)) continue
307
+ // any generation's GangBond (a token's bond is on its own generation's)
308
+ if (!ctx.gens.some((g) => same(log.address, g.bond))) continue
311
309
  try {
312
310
  const ev = decodeEventLog({ abi: BOND_ABI, data: log.data, topics: log.topics })
313
311
  events.push({ event: ev.eventName, ...Object.fromEntries(Object.entries(ev.args).map(([k, v]) => [k, typeof v === 'bigint' ? v.toString() : v])) })
@@ -317,6 +315,9 @@ export async function runBond(sub, { opt, flag, out, fail, summarize }) {
317
315
  }
318
316
 
319
317
  const token = tokenArg(opt, fail)
318
+ // the token's generation: its pad and its GangBond
319
+ if ((await atTokenPad(ctx, token)) === null) return fail(KIND_UNREAD.error, { token: token, retry: KIND_UNREAD.retry })
320
+ if (!ctx.bond) return fail('this token\'s GangLaunchpad generation has no GangBond in this CLI version', { token, chainId, padGen: ctx.gen })
320
321
  const m = await marketOf(ctx, token)
321
322
  if (!m) return fail('not a GangLaunchpad token (V3 or 打新) on this network: bonds cover only those', { token, chainId })
322
323
  const view = await bondView(ctx, token, m)
@@ -555,7 +556,8 @@ export async function runBond(sub, { opt, flag, out, fail, summarize }) {
555
556
  * - { info: {…} } — go on, with these fields added to the preview (headroom after the sell, or the --break-bond warning).
556
557
  */
557
558
  export async function bondGuard(ctx, p, rawOnly, summarize) {
558
- const addr = bondAddress(p.testnet)
559
+ // the token's generation's GangBond when ctx is on its pad (atTokenPad), else the create target's
560
+ const addr = 'bond' in ctx ? ctx.bond : bondAddress(p.testnet)
559
561
  if (!addr) return null
560
562
  let b
561
563
  try { b = await ctx.read(addr, BOND_ABI, 'bondOf', [p.token]) } catch (e) {