@gangfun/cli 0.18.2 → 0.19.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
@@ -6,10 +6,12 @@ Operate [gang.fun](https://gang.fun) from a Binance **Agentic Wallet**. Curve bu
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
- **持续打新 / continuous mint (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 (pad `0x631e66560F4FAE4e486B65349edE48189E48B029`, built in); `--testnet` uses BSC testnet set 2. Rules: `skill/references/fly.md`.
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 (pad `0x631e66560F4FAE4e486B65349edE48189E48B029`, built in); `--testnet` uses BSC testnet set 2. Rules: `skill/references/fly.md`.
10
10
 
11
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.
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.
14
+
13
15
  ## Install
14
16
 
15
17
  Node ≥ 18. Also install Binance Agentic Wallet CLI (`baw`):
@@ -67,7 +69,7 @@ gang sell --token <addr> (--amount <tokens> | --all) [--slippage 1] [--to-bnb] [
67
69
  gang mint --token <addr> --shares <n> [--note …] # 打新 before it fills: + the sale's mint fee (1–3%, the platform's)
68
70
  gang withdraw --token <addr> (--shares <n> | --all) [--note …] # 打新: sell back at the mint price before it fills
69
71
  gang claim --token <addr> # V3: my dividend (in the quote token); 打新: the holder reward
70
- gang release --token <addr> # V3: push a tax payment that failed earlier; 持续打新: an owed dev cut / tax share
72
+ gang release --token <addr> # V3: push a tax payment that failed earlier; 铸币飞轮: an owed dev cut / tax share
71
73
  gang follow <note tx> --amount <n> [--slippage 1] [--note …] # buy the token a note is about, as a follow of it
72
74
  gang upload-logo (--file ./avatar.png | --url <image URL>) # → ipfs://<cid> (view at https://cdn.gang.fun/ipfs/<cid>)
73
75
  # create: GangLaunchpad. A V3 token (own buy / sell tax 1–5%, pool only, paid to the creator itself or a whitelisted
@@ -75,7 +77,7 @@ gang upload-logo (--file ./avatar.png | --url <image URL>) # → ipfs://<cid>
75
77
  gang create --name <n> --symbol <s> [--buy-tax 2 --sell-tax 2 [--dividend 0] [--recipient 0x…]] [--logo ./avatar.png | --logo-uri URL] [--website URL] [--twitter @handle] [--description "…"] [--testnet]
76
78
  gang create --fair --name <n> --symbol <s> [--raise 15] [--cap 0.5] [--hold 60] [--mint-fee 1] [--exit-fee 1] [--shares 1] [--logo …] [--website URL] [--twitter @handle] [--description "…"] [--testnet]
77
79
  # --cap 0.25–1% of supply per wallet (1% → at least 50 wallets), --hold 60–90% (the hold line)
78
- # 持续打新 (continuous mint, GangFlywheelPad; mainnet, --testnet = set 2). --preset j (default: the J template) or
80
+ # 铸币飞轮 (Mint Flywheel, GangFlywheelPad; mainnet, --testnet = set 2). --preset j (default: the J template) or
79
81
  # steady; every setting can be overridden: --raise 3-50 --quota 5-100 --invite-bonus 0-3 --max-per-tx 1-10 --hold 60-90
80
82
  # --mint-fee 1-3 --exit-fee 1-2 --dev-cut 0-10 --buy-pct 0-50 --sell-tax 1-2 --launch-delay 0-300 --window 300-1800
81
83
  # --cap-mul 1-2 --post-mint|--no-post-mint --tier flat|standard|linear [--step-pct --step-shares --max-mul] --supply-cap 10-500
@@ -103,6 +105,8 @@ gang bond burn --token <addr> | gang bond tx --hash <0x..> # push one buy-
103
105
  gang create … --dev-buy <quote> [--bond <quote> [--bond-hold <tokens|N%|all>] --bond-days <7-90>] # V3: create → dev buy → bond
104
106
  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)
105
107
  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
108
+ 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)
109
+ 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
106
110
  gang create --fair … [--shares <n>] --bond <quote> [--bond-hold …] --bond-days <7-90> # 打新: create (dev shares) → bond
107
111
  gang execute --request-id <id>
108
112
  gang tx --pending # trades approved in the Binance App: found by the exact call previewed, then as below
@@ -214,13 +218,13 @@ take MCP servers instead of a shell (Claude Desktop / Code, Cursor, …). Each t
214
218
 
215
219
  | Tool | Runs |
216
220
  |---|---|
217
- | `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, mint or withdraw |
221
+ | `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, mint or withdraw |
218
222
  | `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+) |
219
223
  | `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) |
220
224
  | `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 |
221
225
  | `gang_buy`, `gang_sell`, `gang_follow` | the trade previews (nothing is sent), with all their flags: `useWbnb` / `useQuote` / `payBnb`, `settleFirst`, … |
222
226
  | `gang_execute` | `gang execute --request-id …`: only after the user's yes on that preview |
223
- | `gang_cli` | every other command as an argument list: `create` (also `--fair` and a launch in one command), `mint`, `withdraw`, `claim`, `release`, `quote`, `list`, `upload-logo`, `bond …`, `buyback …`, `v3 income`, `version`, and the flags no other tool takes (`--calldata`, `--from`, …) |
227
+ | `gang_cli` | every other command as an argument list: `create` (also `--fair` and a launch in one command), `mint`, `withdraw`, `claim`, `release`, `quote`, `list`, `upload-logo`, `bond …`, `buyback …`, `split …`, `v3 income`, `version`, and the flags no other tool takes (`--calldata`, `--from`, …) |
224
228
 
225
229
  ```json
226
230
  { "mcpServers": { "gang": { "command": "gang", "args": ["mcp"] } } }
@@ -274,10 +278,11 @@ timed-out `gang_execute`, check `gang_status` / the wallet history instead of ex
274
278
  | `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 |
275
279
  | `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 |
276
280
  | `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 |
277
- | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad (持续打新). Defaults: mainnet `0x631e…B029` (open since 2026-10-30), testnet set 2 `0xD648…951c` |
281
+ | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad (铸币飞轮). Defaults: mainnet `0x631e…B029` (open since 2026-10-30), testnet set 2 `0xD648…951c` |
278
282
  | `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` |
283
+ | `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` |
279
284
  | `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` |
280
285
 
281
286
  ## Version
282
287
 
283
- `0.18.2` · repo [gangfun/cli](https://github.com/gangfun/cli) · published to [npm](https://www.npmjs.com/package/@gangfun/cli) on push to `main`
288
+ `0.19.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
@@ -6,10 +6,12 @@
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
- **持续打新(0.18.0+):** `gang create --fly` 在 GangFlywheelPad(单独的发射台,kind 3)上开一场持续打新:按份 mint,每个钱包有额度,邀请可以加额度;打满后按 mint 价开池,开池后还能继续 mint。统一命令会自动识别这类币(`kind: "fly"`),`gang fly …` 是别名。2026-10-30 起在 BSC 主网运行(发射台 `0x631e66560F4FAE4e486B65349edE48189E48B029`,已内置);`--testnet` 走 BSC 测试网第 2 套。规则见 `skill/references/fly.md`。
9
+ **铸币飞轮(0.18.0+):** `gang create --fly` 在 GangFlywheelPad(单独的发射台,kind 3)上开一场铸币飞轮:按份 mint,每个钱包有额度,邀请可以加额度;打满后按 mint 价开池,开池后还能继续 mint。统一命令会自动识别这类币(`kind: "fly"`),`gang fly …` 是别名。2026-10-30 起在 BSC 主网运行(发射台 `0x631e66560F4FAE4e486B65349edE48189E48B029`,已内置);`--testnet` 走 BSC 测试网第 2 套。规则见 `skill/references/fly.md`。
10
10
 
11
11
  **V3 税收币和打新(0.9.0+):** 走 GangLaunchpad,2026-10-27 起在 BSC 主网运行(内盘 `0x15CFD2dc8278Fb87a1783ef42111618E20874365`,GangRouter `0xE040445690Aa56C8b68B7f7038C7b2562B5079C4`,都已内置);`--testnet` 走 BSC 测试网第 10 套。
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 套可用。
14
+
13
15
  ## 安装
14
16
 
15
17
  Node ≥ 18。另需 `baw`:
@@ -57,7 +59,7 @@ gang sell --token <addr> (--amount <枚数> | --all) [--slippage 1] [--to-bnb] [
57
59
  gang mint --token <addr> --shares <n> [--note …] # 打新填满前:另收该币的打新费(1–3%,归平台、不退)
58
60
  gang withdraw --token <addr> (--shares <n> | --all) [--note …] # 打新填满前按打新价卖回
59
61
  gang claim --token <addr> # V3:领取分红(以报价币到账);打新:领持有奖励
60
- gang release --token <addr> # V3:补转之前打款失败的税;持续打新:补转欠创建者的 dev 分成 / 税
62
+ gang release --token <addr> # V3:补转之前打款失败的税;铸币飞轮:补转欠创建者的 dev 分成 / 税
61
63
  gang follow <附言 tx> --amount <n> [--slippage 1] [--note …] # 跟单:买附言里的币,并标明跟的是哪条
62
64
  gang upload-logo (--file ./avatar.png | --url <图片地址>)
63
65
  # 建币:GangLaunchpad。默认是 V3 币(买 / 卖税各 1–5%,只在外盘收,用报价币打给接收地址:发币人自己,或白名单里的
@@ -83,10 +85,12 @@ gang bond burn --token <addr> | gang bond tx --hash <0x..> # 推进一块
83
85
  gang create … --dev-buy <报价币数量> [--bond <数量> [--bond-hold <枚数|N%|all>] --bond-days <7-90>] # V3:发币 → dev 内盘买入 → 押金
84
86
  gang create … --buy-tax 3 --sell-tax 3 --buyback 50 [--buyback-to 0x…] [--dev-buy …] # V3:接收地址那份税 50% 回购销毁,其余给你(或 --buyback-to 指定的地址)
85
87
  gang buyback status|set|set-payee|apply --token 0x… [--pct 0-100] [--to 0x…] # 回购合约:比例(提高立即生效,下调 3 天后)、收款地址(立即生效)、待回购金额
88
+ gang create … --buy-tax 3 --sell-tax 3 --split self:60,0x…:30,0x…:10 [--dev-buy …] # V3:接收地址那份税按固定比例分给 1–10 个地址(百分比合计 100;self = 你自己)
89
+ gang split status|distribute|release|set-payee|bind --token 0x… [--asset 0x…] [--index <i>] [--to 0x…] # 分账模块:名单(--index 从 0 开始)、待分和欠款;手动分账;收款人换自己的地址
86
90
  gang create --fair … [--shares <n>] --bond <数量> [--bond-hold …] --bond-days <7-90> # 打新:发币(含 dev 份额)→ 押金
87
91
  gang execute --request-id <id>
88
92
  gang tx --pending # 在 Binance App 里批准过的交易:按预览时的调用自动找到交易,再按下面这条处理
89
- # 持续打新(GangFlywheelPad;主网,--testnet 走测试网第 2 套)。--preset j(默认,J 模板)或 steady,每一项都能单独改:
93
+ # 铸币飞轮(GangFlywheelPad;主网,--testnet 走测试网第 2 套)。--preset j(默认,J 模板)或 steady,每一项都能单独改:
90
94
  # --raise 3-50 --quota 5-100 --invite-bonus 0-3 --max-per-tx 1-10 --hold 60-90 --mint-fee 1-3 --exit-fee 1-2 --dev-cut 0-10
91
95
  # --buy-pct 0-50 --sell-tax 1-2 --launch-delay 0-300 --window 300-1800 --cap-mul 1-2 --post-mint|--no-post-mint
92
96
  # --tier flat|standard|linear [--step-pct --step-shares --max-mul] --supply-cap 10-500
@@ -190,13 +194,13 @@ gang agents --window 30d --sort follow
190
194
 
191
195
  | 工具 | 对应 |
192
196
  |---|---|
193
- | `gang_help` | 本 CLI 的完整帮助(所有命令、所有参数)和完整规则(0.17.2+):没装 skill 的 Agent 在发币、一条命令发射、押金、回购、打新认购 / 撤回之前先读它 |
197
+ | `gang_help` | 本 CLI 的完整帮助(所有命令、所有参数)和完整规则(0.17.2+):没装 skill 的 Agent 在发币、一条命令发射、押金、回购、分账、打新认购 / 撤回之前先读它 |
194
198
  | `gang_preflight`、`gang_hot`、`gang_new`、`gang_near_grad`、`gang_info`、`gang_status`、`gang_portfolio`、`gang_notes`、`gang_agents` | 同名的只读命令(`gang_portfolio`:0.17.6+) |
195
199
  | `gang_tx` | `gang tx --hash …`:解码交易,发布排队中的想法;`pending: true` 即 `gang tx --pending`,找出在 Binance App 里批准过的交易(不用哈希) |
196
200
  | `gang_watch` | `gang watch`,等到 `maxEvents`(默认 1)条或 `timeout`(默认 50s,最长 30m):返回 `{ events, meta }`,没等到时带 `timedOut: true`,再调一次接着等 |
197
201
  | `gang_buy`、`gang_sell`、`gang_follow` | 交易预览(不发送),对应命令的参数都有:`useWbnb` / `useQuote` / `payBnb`、`settleFirst` 等 |
198
202
  | `gang_execute` | `gang execute --request-id …`:用户对这份预览点头之后才调 |
199
- | `gang_cli` | 其余所有命令,按参数数组传:`create`(也包括 `--fair` 和一条命令发射)、`mint`、`withdraw`、`claim`、`release`、`quote`、`list`、`upload-logo`、`bond …`、`buyback …`、`v3 income`、`version`,以及其他工具没有的参数(`--calldata`、`--from` 等) |
203
+ | `gang_cli` | 其余所有命令,按参数数组传:`create`(也包括 `--fair` 和一条命令发射)、`mint`、`withdraw`、`claim`、`release`、`quote`、`list`、`upload-logo`、`bond …`、`buyback …`、`split …`、`v3 income`、`version`,以及其他工具没有的参数(`--calldata`、`--from` 等) |
200
204
 
201
205
  ```json
202
206
  { "mcpServers": { "gang": { "command": "gang", "args": ["mcp"] } } }
@@ -238,10 +242,11 @@ Claude Code:`claude mcp add gang -- gang mcp`。同一台机器上 `baw` 要
238
242
  | `GANG_UPDATE_URL` | 新版本检查查询的地址,默认 `https://registry.npmjs.org/@gangfun/cli/latest`;npmjs 慢或打不开时,可以换成 npm 镜像的 `…/@gangfun/cli/latest` |
239
243
  | `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` 仍可用(别名) |
240
244
  | `GANG_TESTNET_RPC_URL` | 测试网 RPC,可填一个或逗号分隔的多个(不设时先用 PublicNode,再用 BNB Chain 的测试网节点);旧名 `GANG_V3_TESTNET_RPC_URL` / `GANG_FAIR_TESTNET_RPC_URL` 仍可用 |
241
- | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad(持续打新)。默认:主网 `0x631e…B029`(2026-10-30 起开放),测试网第 2 套 `0xD648…951c` |
245
+ | `GANG_FLY_PAD` / `GANG_TESTNET_FLY_PAD` | GangFlywheelPad(铸币飞轮)。默认:主网 `0x631e…B029`(2026-10-30 起开放),测试网第 2 套 `0xD648…951c` |
242
246
  | `GANG_BOND` / `GANG_TESTNET_BOND` | GangBond(押金承诺,`gang bond`)。默认:主网 `0xe92d…14E4`(2026-10-29 起,CLI 0.16.2+),测试网 `0xd6a8…1086` |
247
+ | `GANG_SPLIT_FACTORY` / `GANG_TESTNET_SPLIT_FACTORY` | GangSplitModuleFactory(`--split`)。默认:主网 `0x27e0…067c`(2026-10-30 起,CLI 0.19.0+),测试网第 10 套 `0x5F7d…567E` |
243
248
  | `GANG_ROUTER` / `GANG_TESTNET_ROUTER` | GangRouter 代理(用原生 BNB 买 V3 / 打新,以及已毕业币的所有外盘买卖);旧名 `GANG_ROUTER_TESTNET` 仍可用。默认:主网 `0xE040…79C4`,测试网第 10 套 `0x6bB6…C9F6` |
244
249
 
245
250
  ## 版本
246
251
 
247
- `0.18.2` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
252
+ `0.19.0` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@gangfun/cli",
3
- "version": "0.18.2",
3
+ "version": "0.19.0",
4
4
  "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
5
  "type": "module",
6
+ "scripts": {
7
+ "test": "for f in test/*.mjs; do node \"$f\" || exit 1; done"
8
+ },
6
9
  "bin": {
7
10
  "gang": "./src/index.js"
8
11
  },
package/src/discover.js CHANGED
@@ -66,12 +66,12 @@ const TRADES = { v2: '/stocks/tokens', soft: '/tokens', v3: '/v3/tokens', fair:
66
66
 
67
67
  /**
68
68
  * GangLaunchpad rows: `v3` = V3 curves (/v3/tokens), `fair` = 打新 sales (/fair/sales; `graduated` = launched); GangFlywheelPad
69
- * rows: `fly` = 持续打新 sales (/fly/tokens, shaped like the 打新 rows; launched ones may still mint).
69
+ * rows: `fly` = 铸币飞轮 sales (/fly/tokens, shaped like the 打新 rows; launched ones may still mint).
70
70
  * List rows carry raw wei and no USD; details (/…/<addr>) carry human amounts and USD like the V2 rows.
71
71
  * `quoteUsdOf(quoteAddress)` prices a list row's quote (from the V2 / Soft rows), null when unknown.
72
72
  */
73
73
  function gangRow(r, quoteUsdOf) {
74
- // a 持续打新 row reads like a 打新 one (sharePrice = basePrice, raiseQuote, sold of 10,000)
74
+ // a 铸币飞轮 row reads like a 打新 one (sharePrice = basePrice, raiseQuote, sold of 10,000)
75
75
  const fair = r.track === 'fair' || r.track === 'fly'
76
76
  const dec = r.quoteDecimals ?? 18
77
77
  const w = (v) => num(v) / 10 ** dec
@@ -94,9 +94,7 @@ function gangRow(r, quoteUsdOf) {
94
94
  volume24hUsd: inUsd('volume24hUsd', 'volume24hQuote'), trades24h: num(r.trades24h), trades: num(r.trades),
95
95
  holders: r.holders != null ? num(r.holders) : fair ? num(r.participants) : null,
96
96
  ...(fair && { sharePrice: w(r.sharePrice), sharesLeft: num(r.sharesLeft), minWalletsLeft: num(r.minWalletsLeft) }),
97
- ...(r.track === 'fly' && {
98
- status: r.status ?? null, postMint: !!r.postMint, mintPaused: !!r.mintPaused, baseQuota: num(r.baseQuota), inviteBonus: num(r.inviteBonus),
99
- }),
97
+ ...(r.track === 'fly' && { status: r.status ?? null, postMint: !!r.postMint, baseQuota: num(r.baseQuota), inviteBonus: num(r.inviteBonus) }),
100
98
  createdAt: r.createdAt, ageMin: r.createdAt ? Math.floor((now() - r.createdAt) / 60) : null,
101
99
  lastTradeAt: r.lastTradeAt || r.lastActivityAt || null, creatorHandle: r.creatorHandle || null, logoUrl: r.logoUrl || null,
102
100
  website: r.website && !websiteError(r.website) ? r.website : null,
@@ -158,7 +156,7 @@ export async function fetchMarket(track = 'all', stop) {
158
156
  const [v3, fair, fly, v2, soft] = await Promise.all([
159
157
  want('v3') ? pages('/v3/tokens?status=all', stop) : none,
160
158
  want('fair') ? pages('/fair/sales?status=all', stop) : none,
161
- // 持续打新 (2026-10-30): a server without the route yet lists none, unless --track fly asked for it alone
159
+ // 铸币飞轮 (2026-10-30): a server without the route yet lists none, unless --track fly asked for it alone
162
160
  want('fly') ? pages('/fly/tokens?status=all', stop).catch((e) => (track === 'fly' ? Promise.reject(e) : none)) : none,
163
161
  want('v2') ? pages('/stocks/tokens', stop) : priced ? prices('/stocks/tokens') : none,
164
162
  want('soft') ? pages('/tokens?sort=new', stop) : priced ? prices('/tokens?sort=new') : none,
@@ -181,12 +179,12 @@ export async function fetchMarket(track = 'all', stop) {
181
179
  /** The command that acts on a token next: quote / preview a buy (no tx is sent before `gang execute`). */
182
180
  const hint = (t) => {
183
181
  const amount = `--amount <amount in ${t.quote}>`
184
- // 持续打新: minting before launch, and after it while the server's postMint flag is on (gang mint picks the post-launch
182
+ // 铸币飞轮: minting before launch, and after it while the server's postMint flag is on (gang mint picks the post-launch
185
183
  // mint); a filled sale waits for its launch, a refund-only one only sells back
186
184
  if (t.track === 'fly' && t.status === 'filled') return `gang info --token ${t.address}`
187
185
  if (t.track === 'fly' && t.status === 'refund') return `gang withdraw --token ${t.address} --all`
188
- // launched with post-launch minting paused (the pool too far below its references): the pool, not a mint
189
- if (t.track === 'fly' && (!t.graduated || (t.postMint && !t.mintPaused))) return `gang mint --token ${t.address} --shares <n>`
186
+ // (list rows do not say whether post-launch minting is paused: gang mint checks that on chain and says so)
187
+ if (t.track === 'fly' && (!t.graduated || t.postMint)) return `gang mint --token ${t.address} --shares <n>`
190
188
  if (t.graduated) return `gang buy --token ${t.address} ${amount}` // the PancakeSwap pool, through GangRouter
191
189
  if (t.track === 'fair') return `gang mint --token ${t.address} --shares <n>`
192
190
  if (t.track === 'v3') return `gang buy --token ${t.address} ${amount}`
package/src/fly.js CHANGED
@@ -6,7 +6,7 @@ import { MERGED_ERRORS_ABI, MERGED_HINTS, padNets, rpcTransport } from './gangpa
6
6
  import { poolPayBnb, poolTrade } from './pool.js'
7
7
 
8
8
  /**
9
- * `gang fly …` — 持续打新 (continuous mint, track `fly`): GangFlywheelPad, its own pad (kind 3) beside GangLaunchpad.
9
+ * `gang fly …` — 铸币飞轮 (Mint Flywheel, track `fly`): GangFlywheelPad, its own pad (kind 3) beside GangLaunchpad.
10
10
  * Before launch: 10,000 shares at one price (sale.basePrice), a quota per wallet (baseQuota + invite bonus), sell-back
11
11
  * at the mint price less an exit fee. The sale fills (or the creator opens it early at ≥ 30%), then anyone launches it
12
12
  * `launchDelay` later: a PancakeSwap pool at the mint price, with a protection window (Agent ID + a per-wallet buy cap).
@@ -114,7 +114,7 @@ const PAIR_ABI = parseAbi(['function getReserves() view returns (uint112, uint11
114
114
  const DEX_ABI = parseAbi(['function getAmountsOut(uint256 amountIn, address[] path) view returns (uint256[] amounts)'])
115
115
  const GANG_ROUTER_VIEW = parseAbi(['function pancakeRouter() view returns (address)'])
116
116
 
117
- /** What `gang tx` decodes a 持续打新 tx's logs with (the pad, the tax handler, the holder-reward vault). */
117
+ /** What `gang tx` decodes a 铸币飞轮 tx's logs with (the pad, the tax handler, the holder-reward vault). */
118
118
  export const FLY_EVENT_ABIS = [FLY_PAD_ABI, FLY_HANDLER_ABI, VAULT_ABI]
119
119
 
120
120
  // platform constants (FlywheelLogic): the pad's own numbers, fixed in the contract
@@ -135,7 +135,7 @@ const GAS_NOTE = 'gas limit set with room: a hot token\'s first trade in a block
135
135
 
136
136
  const HINTS = {
137
137
  BadConfig: 'a setting is out of bounds: see reason',
138
- NotAgent: 'this wallet holds no Agent ID; 持续打新 is Agent-only',
138
+ NotAgent: 'this wallet holds no Agent ID; 铸币飞轮 is Agent-only',
139
139
  NotMinting: 'the sale no longer takes pre-launch mints / sell-backs (filled, opened early or launched): gang info shows its state',
140
140
  NotLaunched: 'the token has not launched yet',
141
141
  NotFilled: 'the sale has not filled (or been opened early) yet: nothing to launch',
@@ -147,7 +147,7 @@ const HINTS = {
147
147
  PriceAbovePool: 'the mint price is more than 10% above the pool price right now (the pool just dropped): try again shortly',
148
148
  PaceExceeded: 'this wallet minted too much too fast: recent post-launch mints (decaying over 30 minutes) plus this one may be at most 2% of the pool\'s quote side; mint fewer shares or wait',
149
149
  PostMintOff: 'this sale has no post-launch minting: trade the token in the pool (gang buy / gang sell)',
150
- MigratorNotSet: 'the 持续打新 pad is not open on this network yet',
150
+ MigratorNotSet: 'the 铸币飞轮 pad is not open on this network yet',
151
151
  BnbShort: 'the BNB sent does not cover the mint (the tier price moved up): re-run to re-quote',
152
152
  BnbNotQuote: 'this sale is not WBNB-quoted: pay in its quote (leave out BNB payment)',
153
153
  TooFewShares: 'fewer than 3,000 shares are still held 7 days after the fill: the sale can no longer launch, only refund (gang withdraw)',
@@ -176,7 +176,7 @@ export function flyCtx(testnet) {
176
176
  }
177
177
  }
178
178
 
179
- /** true when `token` is a 持续打新 token on this pad; null on an RPC error. */
179
+ /** true when `token` is a 铸币飞轮 token on this pad; null on an RPC error. */
180
180
  export async function isFlyToken(ctx, token) {
181
181
  try {
182
182
  return Number(await ctx.read(ctx.pad, FLY_PAD_ABI, 'kindOf', [token])) === 3
@@ -189,7 +189,7 @@ export async function isFlyToken(ctx, token) {
189
189
  export async function padOpen(ctx) {
190
190
  return (await ctx.read(ctx.pad, FLY_PAD_ABI, 'migrator')) !== zeroAddress
191
191
  }
192
- const CLOSED = 'the 持续打新 (continuous mint) pad on BSC mainnet takes no creates right now (no migrator set): use --testnet to try it there'
192
+ const CLOSED = 'the 铸币飞轮 (Mint Flywheel) pad on BSC mainnet takes no creates right now (no migrator set): use --testnet to try it there'
193
193
 
194
194
  const symbolOf = async (ctx, token) => { try { return await ctx.read(token, TOKEN_ABI, 'symbol') } catch { return null } }
195
195
  const pct = (bps) => Number(bps) / 100
@@ -417,16 +417,16 @@ export async function runFly(sub, { opt, flag, out, fail, summarize, resolveLogo
417
417
  const ctx = flyCtx(testnet)
418
418
  const chainId = Number(ctx.chainId)
419
419
  const write = (tx, extra) => step(ctx, tx, { chainId, ...extra }, rawOnly, summarize)
420
- if (flag('note')) fail('--note is not matched to 持续打新 trades yet: leave it out')
420
+ if (flag('note')) fail('--note is not matched to 铸币飞轮 trades yet: leave it out')
421
421
 
422
422
  const tokenArg = () => {
423
423
  const t = opt('token')
424
- if (!isAddress(t ?? '')) fail('--token must be the 持续打新 token\'s address (0x…)', { got: t ?? null })
424
+ if (!isAddress(t ?? '')) fail('--token must be the 铸币飞轮 token\'s address (0x…)', { got: t ?? null })
425
425
  return t
426
426
  }
427
427
  const loadSale = async (token) => {
428
428
  const sale = await saleOf(ctx, token)
429
- if (!sale) fail(`not a 持续打新 (continuous-mint) token on this pad${testnet ? ' (BSC testnet)' : ''}`, { token, chainId, pad: ctx.pad })
429
+ if (!sale) fail(`not a 铸币飞轮 (Mint Flywheel) token on this pad${testnet ? ' (BSC testnet)' : ''}`, { token, chainId, pad: ctx.pad })
430
430
  return sale
431
431
  }
432
432
  const handlerOf = () => ctx.read(ctx.pad, FLY_PAD_ABI, 'taxHandler')
@@ -583,7 +583,7 @@ export async function runFly(sub, { opt, flag, out, fail, summarize, resolveLogo
583
583
  const name = opt('name'), symbol = opt('symbol')
584
584
  if (!name || !symbol) fail('--name and --symbol are required')
585
585
  checkMeta()
586
- if (!(await padOpen(ctx))) fail(testnet ? 'the 持续打新 pad on BSC testnet has no migrator set: it takes no creates right now' : CLOSED, { pad: ctx.pad })
586
+ if (!(await padOpen(ctx))) fail(testnet ? 'the 铸币飞轮 pad on BSC testnet has no migrator set: it takes no creates right now' : CLOSED, { pad: ctx.pad })
587
587
  const presetName = opt('preset', 'j')
588
588
  const preset = FLY_PRESETS[presetName]
589
589
  if (!preset) fail(`--preset must be ${Object.keys(FLY_PRESETS).join(' or ')}`, { got: presetName })
@@ -661,7 +661,7 @@ export async function runFly(sub, { opt, flag, out, fail, summarize, resolveLogo
661
661
  const sale = await loadSale(token)
662
662
  const who = me()
663
663
  const acct = await accountOf(ctx, token, sale, who)
664
- if (sale.gate && !(await hasAgent(ctx, sale.gate, who))) fail('this wallet holds no Agent ID; 持续打新 minting is Agent-only', { wallet: who })
664
+ if (sale.gate && !(await hasAgent(ctx, sale.gate, who))) fail('this wallet holds no Agent ID; 铸币飞轮 minting is Agent-only', { wallet: who })
665
665
  const referrer = await checkReferrer(ctx, token, sale, who, acct.raw, opt('ref'), fail)
666
666
  const quota = { quota: acct.view.quota, quotaLeft: acct.view.quotaLeft, maxPerTx: sale.rules.maxPerTx }
667
667
  if (!acct.view.quotaLeft) fail('this wallet\'s quota in this sale is used up', { ...quota, hint: `invites add ${sale.rules.inviteBonus} share(s) each: gang fly invite --token ${token}${net}` })
@@ -833,7 +833,7 @@ export async function runFly(sub, { opt, flag, out, fail, summarize, resolveLogo
833
833
  hint: sub === 'buy' ? `before launch, mint shares: gang mint --token ${token} --shares <n>${net}` : `before launch, sell shares back: gang withdraw --token ${token} (--shares <n> | --all)${net}`,
834
834
  })
835
835
  }
836
- for (const f of ['bond', 'break-bond', 'settle-first']) if (flag(f)) fail(`--${f}: 持续打新 tokens take no GangBond`)
836
+ for (const f of ['bond', 'break-bond', 'settle-first']) if (flag(f)) fail(`--${f}: 铸币飞轮 tokens take no GangBond`)
837
837
  const slippage = parseNum(fail, 'slippage', opt('slippage', '1'), 0, 50)
838
838
  if (sub === 'sell' && flag('all') === !!opt('amount')) fail('pass exactly one of --amount <tokens> or --all')
839
839
  if (sub === 'buy' && !flag('amount')) fail('--amount <quote (or BNB) to spend> required')
package/src/index.js CHANGED
@@ -20,6 +20,7 @@ import { runFair, FAIR_EVENT_ABIS } from './fair.js'
20
20
  import { runV3, v3Ctx, V3_EVENT_ABIS } from './v3.js'
21
21
  import { runBond } from './bond.js'
22
22
  import { runBuyback } from './buyback.js'
23
+ import { runSplit, SPLIT_EVENT_ABIS } from './split.js'
23
24
  import { runFly, flyCtx, isFlyToken, FLY_EVENT_ABIS, FLY_CREATE_FLAGS } from './fly.js'
24
25
  import { FAIR_DEV_BUY, isLaunch, LAUNCH_FLAGS, runLaunch } from './launch.js'
25
26
  import { poolPayBnb, poolTrade } from './pool.js'
@@ -203,8 +204,8 @@ const followSkipped = (follow) =>
203
204
  const HELP = `gang — agent-only launchpad on BNB Chain (Binance Agentic Wallet) · new tokens on GangLaunchpad (V3 / 打新)
204
205
 
205
206
  One command per action, whatever pad the token is on: buy / sell / info / status / claim / mint / withdraw / release
206
- read the token's kind (GangLaunchpad kindOf: V3 curve or 打新 sale; GangFlywheelPad: 持续打新; otherwise the V2 / Soft /
207
- U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tokens carry kind: "v3" | "fair" | "fly". --testnet
207
+ read the token's kind (GangLaunchpad kindOf: V3 curve or 打新 sale; GangFlywheelPad: 铸币飞轮; otherwise the V2 / Soft /
208
+ U / S pads) and run that kind's trade. Results of V3 / 打新 / 铸币飞轮 tokens carry kind: "v3" | "fair" | "fly". --testnet
208
209
  = BSC testnet (GangLaunchpad and GangFlywheelPad only); --calldata prints the raw tx instead of a baw preview; --from
209
210
  <addr> reads / builds for that wallet (V2 / Soft: graduated tokens only).
210
211
 
@@ -217,7 +218,7 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tok
217
218
  V2 / Soft / U / S tokens read on chain (works without gang.fun), the newest --limit
218
219
  per pad; --kind v3 (--status curve|graduated|all) / --kind fair
219
220
  (--status minting|launched|all): GangLaunchpad tokens from gang.fun; --kind fly
220
- (--status minting|filled|launched|all): 持续打新 tokens read from the pad, newest first
221
+ (--status minting|filled|launched|all): 铸币飞轮 tokens read from the pad, newest first
221
222
  gang hot [--limit 10] [--track all|v3|fair|fly|v2|soft] [--include-graduated]
222
223
  tokens not yet graduated / launched, ranked by 24h USD volume
223
224
  gang new [--limit 10] [--max-age 2h] [--track …] newest first
@@ -265,9 +266,9 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tok
265
266
  sales pay native BNB through GangRouter in one tx (--use-wbnb: from WBNB)
266
267
  gang withdraw --token <addr> (--shares <n> | --all)
267
268
  打新: sell shares back before it fills: mint price − exit fee (none once stale)
268
- gang claim --token <addr> V3: my dividend (the quote token); 打新 / 持续打新: the holder reward
269
+ gang claim --token <addr> V3: my dividend (the quote token); 打新 / 铸币飞轮: the holder reward
269
270
  gang release --token <addr> V3: push a tax payment that failed earlier (anyone may; the recipient gets it).
270
- 持续打新: push the creator's dev cut / tax share that a transfer could not deliver
271
+ 铸币飞轮: push the creator's dev cut / tax share that a transfer could not deliver
271
272
  gang follow <note tx> --amount <n> [--slippage 1] [--note …]
272
273
  buy the token that note is about, marked on-chain as following it (= gang buy
273
274
  --follow; curve buys only)
@@ -302,7 +303,7 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tok
302
303
  [--sell-tax 1-2] [--launch-delay 0-300] [--window 300-1800] [--cap-mul 1-2] [--post-mint | --no-post-mint]
303
304
  [--tier flat|standard|linear [--step-pct 0-10 --step-shares 100-100000 --max-mul 1-10]] [--supply-cap 10-500]
304
305
  [--dev-shares <n>] [--quote 0x… --ref-pool 0x…] [--logo …] [--website URL] [--twitter @handle] [--description …]
305
- a 持续打新 (continuous mint, GangFlywheelPad) sale (mainnet; --testnet = BSC testnet
306
+ a 铸币飞轮 (Mint Flywheel, GangFlywheelPad) sale (mainnet; --testnet = BSC testnet
306
307
  set 2). 10,000 shares at raise / 10,000 each; a quota per wallet
307
308
  (--quota + --invite-bonus per wallet it invites), --max-per-tx per mint, Agent ID
308
309
  only. Fills (or the creator opens early at ≥ 30%), launches --launch-delay s later
@@ -317,7 +318,7 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tok
317
318
  invites, dev cut 0, sell tax 1. Flags override the preset; checkConfig runs first.
318
319
  --dev-shares (default 1, up to quota and max-per-tx) are minted in the create. No
319
320
  --bond / --buyback / --dev-buy (phase 1)
320
- FLY (持续打新; also gang fly <sub>): gang mint --token <a> --shares <n> [--ref <inviter>] [--min-shares <n>] [--slippage 2]
321
+ FLY (铸币飞轮; also gang fly <sub>): gang mint --token <a> --shares <n> [--ref <inviter>] [--min-shares <n>] [--slippage 2]
321
322
  [--use-wbnb]: before launch the sale price (+ mint fee; WBNB sales pay BNB in one tx,
322
323
  --use-wbnb from WBNB); after launch mintPost: minTokensOut = the preview less
323
324
  --slippage (default 2%), maxSpent = paid + fee; shows the mint price per token vs
@@ -341,6 +342,17 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 持续打新 tok
341
342
  (GangBuybackSplitterFactory; listed as a recipient in the same tx) → create with it as
342
343
  the recipient → bind → the rest of the launch. Without --buyback the tax goes to you.
343
344
  Quote: WBNB (default), GANG or one listed in the pad's QuoteRegistry only
345
+ gang create … --buy-tax <1-5> --sell-tax <1-5> --split <addr>:<pct>[,<addr>:<pct>…] [--dev-buy … [--bond …]]
346
+ V3, taxed: the recipient's part of the tax is split among 1–10 payees at fixed shares
347
+ (% with up to 2 decimals, at least 0.01, adding up to 100; the first payee also takes
348
+ the rounding dust), e.g. --split self:60,0xKol…:30,0xDao…:10 (self = your wallet, me
349
+ works too; payee slots are the contract's 0-based index, here 0, 1, 2). PERMANENT:
350
+ nobody (not you, not the platform) can change the payees or shares later; a payee can
351
+ only move its own slot (gang split set-payee). Steps: clone your split module
352
+ (GangSplitModuleFactory; listed as a recipient in the same tx) → create with it as the
353
+ recipient → bind → the rest of the launch. --split, --buyback and --recipient are
354
+ exclusive. Quote: WBNB (default), GANG or one listed in the pad's QuoteRegistry only
355
+ (the quotes the keeper splits; others are refused before the clone)
344
356
  gang create --fair … [--shares <n>] --bond <quote> [--bond-hold …] --bond-days <7-90>
345
357
  打新: create (the dev's --shares are bought in it) → bond. Progress is read from the
346
358
  chain (a token this wallet created with this symbol since the plan); a run that finds
@@ -414,11 +426,31 @@ BUYBACK (a V3 token whose recipient is a buy-back splitter; GANG_SPLITTER_FACTOR
414
426
  gang buyback bind --token <addr> | gang buyback release --token <addr>
415
427
  anyone: bind the splitter to its token (the launch does it) / push the payee what a
416
428
  failed payment left owed. --testnet, --calldata, --from as in gang v3
429
+ SPLIT (a V3 token whose recipient is a split module, split-v1; GANG_SPLIT_FACTORY / GANG_TESTNET_SPLIT_FACTORY):
430
+ gang split status --token <addr> payees and shares (fixed), the dev, the bound token / quote, what waits to be split
431
+ and what each slot is owed (bound quote, WBNB, GANG, the token's quote), whether the
432
+ keeper is due and serves the quote (WBNB, GANG, a QuoteRegistry quote; any other
433
+ quote, and any other asset sent to the module, is split by hand), next commands
434
+ gang split distribute --token <addr> [--asset <addr>|wbnb]
435
+ anyone: split what of the asset (default the bound quote) arrived since its last split
436
+ gang split release --token <addr> [--asset <addr>] [--index <i>] [--max <amount>]
437
+ anyone: push a slot what a failed push left owed (default all; --index = the
438
+ contract's 0-based slot, default your own slot or the only one owed)
439
+ gang split set-payee --token <addr> --to <addr> [--index <i>]
440
+ only the slot's current payee (--index = the contract's 0-based slot, default your
441
+ wallet's own): moves the slot to --to at once, the share stays. Splits WBNB / GANG /
442
+ other known assets waiting in the module first (one tx each, then re-run), so they go
443
+ to the current address
444
+ gang split bind --token <addr> anyone: bind the module to its token (the launch does it)
445
+ --module <addr> instead of --token names a module directly (not for bind).
446
+ Gas: the CLI never sets a gas limit on these; let the wallet estimate it. Each payee's
447
+ push needs ~365k gas left before it, so the limit is far above the gas used; a lower
448
+ limit reverts PushStarved. --testnet, --calldata, --from as in gang v3
417
449
  gang execute --request-id <id> broadcast a previewed call
418
450
  gang tx --pending a trade that waited for Binance App approval (execute: pendingConfirmation): find its tx
419
451
  in the wallet's history by the exact call previewed, then as gang tx --hash below
420
452
  gang tx --hash <0x..> [--testnet] wait for receipt and decode Gang events: V2 / Soft / U / S, GangLaunchpad (V3 /
421
- 打新, tax router, vaults), GangFlywheelPad (持续打新 pad and tax handler) (publishes a queued --note; mainnet). GangLaunchpad events
453
+ 打新, tax router, vaults), GangFlywheelPad (铸币飞轮 pad and tax handler) (publishes a queued --note; mainnet). GangLaunchpad events
422
454
  carry units: "raw" (amounts in wei, 18 decimals; bps / shares as is)
423
455
 
424
456
  --note is PUBLIC: shown on gang.fun next to the trade. Its hash goes into the tx calldata, so it is provably written
@@ -799,7 +831,7 @@ const V3_VERBS = new Set(['buy', 'sell', 'info', 'status', 'claim', 'release'])
799
831
  const FAIR_VERBS = new Set(['buy', 'sell', 'info', 'status', 'claim', 'mint', 'withdraw'])
800
832
  const FLY_VERBS = new Set(['buy', 'sell', 'info', 'status', 'claim', 'mint', 'withdraw', 'release'])
801
833
  const KIND_NAMES = {
802
- v3: 'a V3 (bonding-curve) token', fair: 'a 打新 (fair-mint) token', fly: 'a 持续打新 (continuous-mint) token', legacy: 'a V2 / Soft / U / S token',
834
+ v3: 'a V3 (bonding-curve) token', fair: 'a 打新 (fair-mint) token', fly: 'a 铸币飞轮 (Mint Flywheel) token', legacy: 'a V2 / Soft / U / S token',
803
835
  }
804
836
  // what the V2 / Soft / U / S code runs: it looks the token up on those pads itself, so it can also take a token whose kindOf
805
837
  // could not be read (a GangLaunchpad token then gets a pointer from resolvePad instead of a wrong answer)
@@ -830,7 +862,7 @@ async function padKind(token, verb) {
830
862
  try { ctx = v3Ctx(testnet) } catch (e) { fail(e.message) }
831
863
  const kind = await kindOf(ctx, token)
832
864
  if (kind === 'v3' || kind === 'fair') return kind
833
- // not GangLaunchpad's: the 持续打新 pad (GangFlywheelPad, kind 3) is asked next
865
+ // not GangLaunchpad's: the 铸币飞轮 pad (GangFlywheelPad, kind 3) is asked next
834
866
  const fly = await isFlyToken(flyCtx(testnet), token)
835
867
  if (fly) return 'fly'
836
868
  if (fly === null && (testnet || !LEGACY_VERBS.has(verb))) {
@@ -902,11 +934,11 @@ async function routed(verb) {
902
934
  parseNote()
903
935
  parseFollow()
904
936
  const kind = await padKind(token, verb)
905
- if (flag('ref') && !(kind === 'fly' && verb === 'mint')) fail(`--ref (an inviter) only applies to gang mint on a 持续打新 token; this is ${KIND_NAMES[kind]}`, { token })
937
+ if (flag('ref') && !(kind === 'fly' && verb === 'mint')) fail(`--ref (an inviter) only applies to gang mint on a 铸币飞轮 token; this is ${KIND_NAMES[kind]}`, { token })
906
938
  const io = { ...PAD_IO, out: tagKind(kind) }
907
939
  if (kind === 'v3' && V3_VERBS.has(verb)) return runV3(verb, { ...io, notes: padNotes('v3', verb) })
908
940
  if (kind === 'fly' && FLY_VERBS.has(verb)) {
909
- if (flag('follow')) fail('--follow only counts on curve buys (V3 / V2 tokens): a 持续打新 token has no curve', { token })
941
+ if (flag('follow')) fail('--follow only counts on curve buys (V3 / V2 tokens): a 铸币飞轮 token has no curve', { token })
910
942
  return runFly(verb, amountIo(io))
911
943
  }
912
944
  if (kind === 'fair' && FAIR_VERBS.has(verb)) {
@@ -950,18 +982,18 @@ function alias(kind, sub) {
950
982
  // gang create: V3 by default, a 打新 sale with --fair; a setting of the other kind is refused, not ignored
951
983
  const V3_CREATE_FLAGS = ['buy-tax', 'sell-tax', 'dividend', 'recipient']
952
984
  const FAIR_CREATE_FLAGS = ['raise', 'cap', 'hold', 'mint-fee', 'exit-fee', 'shares']
953
- // 持续打新 settings beyond those it shares with 打新 (--raise / --hold / --mint-fee / --exit-fee) and V3 (--sell-tax)
985
+ // 铸币飞轮 settings beyond those it shares with 打新 (--raise / --hold / --mint-fee / --exit-fee) and V3 (--sell-tax)
954
986
  const FLY_ONLY_FLAGS = FLY_CREATE_FLAGS.filter((f) => !['raise', 'hold', 'mint-fee', 'exit-fee', 'sell-tax'].includes(f))
955
- const FLY_NO_BOND = '持续打新 tokens take no GangBond, buy-back splitter or --dev-buy (phase 1): the creator mints its shares in the create with --dev-shares <n>'
956
- /** The flags a 持续打新 create refuses (gang create --fly and gang fly create alike). */
987
+ const FLY_NO_BOND = '铸币飞轮 tokens take no GangBond, buy-back splitter, split module or --dev-buy (phase 1): the creator mints its shares in the create with --dev-shares <n>'
988
+ /** The flags a 铸币飞轮 create refuses (gang create --fly and gang fly create alike). */
957
989
  function checkFlyCreate() {
958
- if (flag('fair')) fail('give --fly (持续打新) or --fair (打新), not both')
990
+ if (flag('fair')) fail('give --fly (铸币飞轮) or --fair (打新), not both')
959
991
  const wrong = ['buy-tax', 'dividend', 'recipient', 'cap', 'shares'].find(flag)
960
992
  if (wrong) {
961
- fail(wrong === 'buy-tax' ? '--buy-tax: a 持续打新 token\'s buy tax is fixed at 1% (--sell-tax 1-2 sets the sell tax)'
962
- : wrong === 'shares' ? '--shares is 打新\'s: a 持续打新 creator mints with --dev-shares <n>'
963
- : wrong === 'cap' ? '--cap is 打新\'s: a 持续打新 sale has a quota per wallet, --quota <5-100> (+ --invite-bonus)'
964
- : `--${wrong} is a V3 tax setting; a 持续打新 token's tax goes to holders, the platform and the creator in fixed parts`)
993
+ fail(wrong === 'buy-tax' ? '--buy-tax: a 铸币飞轮 token\'s buy tax is fixed at 1% (--sell-tax 1-2 sets the sell tax)'
994
+ : wrong === 'shares' ? '--shares is 打新\'s: a 铸币飞轮 creator mints with --dev-shares <n>'
995
+ : wrong === 'cap' ? '--cap is 打新\'s: a 铸币飞轮 sale has a quota per wallet, --quota <5-100> (+ --invite-bonus)'
996
+ : `--${wrong} is a V3 tax setting; a 铸币飞轮 token's tax goes to holders, the platform and the creator in fixed parts`)
965
997
  }
966
998
  }
967
999
  function create() {
@@ -970,7 +1002,7 @@ function create() {
970
1002
  return runFly('create', { ...PAD_IO })
971
1003
  }
972
1004
  const flyOnly = FLY_ONLY_FLAGS.find(flag)
973
- if (flyOnly) fail(`--${flyOnly} is a 持续打新 (continuous-mint) setting: add --fly to create one (gang create --fly …)`)
1005
+ if (flyOnly) fail(`--${flyOnly} is a 铸币飞轮 (Mint Flywheel) setting: add --fly to create one (gang create --fly …)`)
974
1006
  if (flag('fair')) {
975
1007
  const wrong = V3_CREATE_FLAGS.find(flag)
976
1008
  if (wrong) fail(`--${wrong} is a V3 tax setting; a 打新 sale's pool tax is fixed (1%): leave it out, or drop --fair for a V3 token`)
@@ -986,15 +1018,15 @@ function create() {
986
1018
  // commands whose JSON result carries `update`; `watch` streams NDJSON and help is plain text
987
1019
  const UPDATE_CHECKED = new Set(['version', '--version', '-v', 'preflight', 'list', 'hot', 'new', 'near-grad', 'notes', 'agents', 'token', 'info', 'status', 'portfolio', 'quote',
988
1020
  'buy', 'follow', 'sell', 'claim', 'mint', 'withdraw', 'release', 'upload-logo', 'create', 'execute', 'tx', 'fair', 'v3', 'bond',
989
- 'buyback', 'fly'])
1021
+ 'buyback', 'split', 'fly'])
990
1022
  // gang tx decodes these beside the V2 / Soft / U / S pads' events (GangLaunchpad: both kinds; the tax router; the vaults)
991
- const GANG_EVENT_ABIS = [...V3_EVENT_ABIS, ...FAIR_EVENT_ABIS, ...FLY_EVENT_ABIS]
1023
+ const GANG_EVENT_ABIS = [...V3_EVENT_ABIS, ...FAIR_EVENT_ABIS, ...FLY_EVENT_ABIS, ...SPLIT_EVENT_ABIS]
992
1024
 
993
- /** gang bond / gang buyback on a 持续打新 token: both contracts refuse it, so say why before any step. */
1025
+ /** gang bond / gang buyback / gang split on a 铸币飞轮 token: those contracts refuse it, so say why before any step. */
994
1026
  async function refuseFly(what) {
995
1027
  const token = opt('token')
996
1028
  if (!isAddress(token ?? '')) return
997
- if (await isFlyToken(flyCtx(flag('testnet')), token)) fail(`持续打新 (continuous-mint) tokens take no ${what} (phase 1)`, { token, kind: 'fly' })
1029
+ if (await isFlyToken(flyCtx(flag('testnet')), token)) fail(`铸币飞轮 (Mint Flywheel) tokens take no ${what} (phase 1)`, { token, kind: 'fly' })
998
1030
  }
999
1031
 
1000
1032
  /** A mainnet tx decoded, its queued note published (or its state refreshed), its follow ref and token links. */
@@ -1081,7 +1113,7 @@ async function main() {
1081
1113
  // a 打新 dev buys with --shares in the create itself: say so here, not "add --bond" (which would only lead to that)
1082
1114
  if (launchKind === 'fair' && flag('dev-buy')) fail(FAIR_DEV_BUY)
1083
1115
  const lone = LAUNCH_FLAGS.find((f) => flag(f))
1084
- if (lone) fail(`--${lone} only applies to a launch in one command: add --bond <quote>${launchKind === 'fair' ? '' : ' (or --dev-buy <quote> / --buyback <pct>)'}`)
1116
+ if (lone) fail(`--${lone} only applies to a launch in one command: add --bond <quote>${launchKind === 'fair' ? '' : ' (or --dev-buy <quote> / --buyback <pct> / --split <addr>:<pct>,…)'}`)
1085
1117
  }
1086
1118
  switch (cmd) {
1087
1119
  case 'fair':
@@ -1101,6 +1133,9 @@ async function main() {
1101
1133
  case 'buyback':
1102
1134
  await refuseFly('a buy-back splitter')
1103
1135
  return runBuyback(args[1], { opt, flag, out, fail, summarize: summarizePreview })
1136
+ case 'split':
1137
+ await refuseFly('a split module')
1138
+ return runSplit(args[1], { opt, flag, out, fail, summarize: summarizePreview })
1104
1139
  case 'version':
1105
1140
  case '--version':
1106
1141
  case '-v':
@@ -1328,7 +1363,7 @@ async function main() {
1328
1363
  // a GangLaunchpad token: the V3 curve buy (--amount / --bnb = the quote to spend)
1329
1364
  const onPad = await kindOf(v2PoolCtx(), token)
1330
1365
  if (onPad === 'fair') fail('this note is on a 打新 (fair-mint) token: only curve buys can follow a note', { noteTx, token })
1331
- if (onPad !== 'v3' && (await isFlyToken(flyCtx(false), token))) fail('this note is on a 持续打新 (continuous-mint) token: only curve buys can follow a note', { noteTx, token })
1366
+ if (onPad !== 'v3' && (await isFlyToken(flyCtx(false), token))) fail('this note is on a 铸币飞轮 (Mint Flywheel) token: only curve buys can follow a note', { noteTx, token })
1332
1367
  if (onPad === 'v3') {
1333
1368
  return runV3('buy', { ...PAD_IO, opt: (n, d) => (n === 'token' ? token : opt(n, d)), notes: padNotes('v3', 'buy', { note, checked: follow }) })
1334
1369
  }