@gangfun/cli 0.15.1 → 0.16.1

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
@@ -227,4 +227,4 @@ gang agents --window 30d --sort follow
227
227
 
228
228
  ## Version
229
229
 
230
- `0.15.1` · repo [gangfun/cli](https://github.com/gangfun/cli) · published to [npm](https://www.npmjs.com/package/@gangfun/cli) on push to `main`
230
+ `0.16.1` · 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
@@ -200,4 +200,4 @@ gang agents --window 30d --sort follow
200
200
 
201
201
  ## 版本
202
202
 
203
- `0.15.1` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
203
+ `0.16.1` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gangfun/cli",
3
- "version": "0.15.1",
3
+ "version": "0.16.1",
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
6
  "bin": {
package/src/bond.js CHANGED
@@ -156,9 +156,10 @@ const tokens = (x) => formatUnits(x, 18)
156
156
  const same = (a, b) => String(a).toLowerCase() === String(b).toLowerCase()
157
157
  const ceilDiv = (a, b) => (a + b - 1n) / b
158
158
 
159
- /** Display tier of a coverage (bps): ≥ 100% full cover badge, 50–100% bond badge, below 50% no badge. */
159
+ /** Coverage tier (bps): ≥ 100% full cover, 50–100% bond, below 50% none. gang.fun colours a tier only for an
160
+ * allow-listed quote and an X of at least half the creator's balance; every other active bond gets a gray badge. */
160
161
  const tierOf = (bps) => (bps >= BPS ? 'full' : bps >= 5_000n ? 'bond' : 'none')
161
- const TIER_NOTE = { full: '押金全覆盖: dumping X now loses money (bond ≥ what the sale fetches)', bond: '押金: bond covers 50–100% of what dumping X fetches', none: 'below 50% coverage: no badge on gang.fun (bond and coverage still shown)' }
162
+ const TIER_NOTE = { full: '押金全覆盖: dumping X now loses money (bond ≥ what the sale fetches)', bond: '押金: bond covers 50–100% of what dumping X fetches', none: 'below 50% coverage: a plain gray 押金 badge on gang.fun (bond and coverage still shown)' }
162
163
 
163
164
  async function nowOf(ctx) {
164
165
  return Number((await ctx.client.getBlock()).timestamp)
package/src/buyback.js CHANGED
@@ -16,12 +16,14 @@ import { parseNum, revertOf as revertIn, step } from './steps.js'
16
16
  * Env: GANG_SPLITTER_FACTORY / GANG_TESTNET_SPLITTER_FACTORY override the built-in factory addresses.
17
17
  */
18
18
 
19
- // BSC 56, factory v2 (payee; docs/MAINNET-BUYBACK-SPLITTER-2026-10-28.md). v1 was 0x6bcd…8546 (2-argument create)
20
- export const MAINNET_SPLITTER_FACTORY = '0x93467Cb38B9Cb7f6EF3b67d2226Eb8b77ca58F2f'
21
- export const TESTNET_SPLITTER_FACTORY = '0x08b9E2Cf5F666b55F262239b19e25de25b8ba87D'
22
- /** The factory's clones; v1 (mainnet's first factory, 0x6bcd…8546) pays the dev, v2 its payee. */
23
- export const BUYBACK_TYPE = 'buyback-burn-v2'
24
- const BUYBACK_TYPES = ['buyback-burn-v1', BUYBACK_TYPE]
19
+ // BSC 56, factory v3 (one chunk per 4 minutes; docs/MAINNET-BUYBACK-SPLITTER-2026-10-28.md). v2 0x9346…8F2f and v1
20
+ // 0x6bcd…8546 (2-argument create) are stopped: their clones keep working, new ones can't be made
21
+ export const MAINNET_SPLITTER_FACTORY = '0xf1d5CA816d72e6F130f42662d11b238312A7F1Cd'
22
+ export const TESTNET_SPLITTER_FACTORY = '0x7E63fF8A9FB9Ab1BE4e2128e9f6C8D1054292BBe'
23
+ /** The factory's clones; v1 (mainnet's first factory, 0x6bcd…8546) pays the dev, v2 and v3 their payee; v3 buys at
24
+ * most one chunk per 4 minutes (GangBond audit H-1). */
25
+ export const BUYBACK_TYPE = 'buyback-burn-v3'
26
+ const BUYBACK_TYPES = ['buyback-burn-v1', 'buyback-burn-v2', BUYBACK_TYPE]
25
27
 
26
28
  export const FACTORY_ABI = parseAbi([
27
29
  'function create(uint16 buybackBps, bytes32 salt, address payee) returns (address splitter)',
@@ -182,7 +184,7 @@ export async function runBuyback(sub, { opt, flag, out, fail, summarize }) {
182
184
  }
183
185
 
184
186
  if (sub === 'set-payee') {
185
- if (!s.payeeChangeable) return fail('this splitter (buyback-burn-v1) has no payee: it pays the dev; only splitters from the current factory (v2) can name another address')
187
+ if (!s.payeeChangeable) return fail('this splitter (buyback-burn-v1) has no payee: it pays the dev; only splitters from later factories (v2, v3) can name another address')
186
188
  if (me().toLowerCase() !== s.dev.toLowerCase()) return fail('only the dev this splitter was made for can change its payee', { wallet: me(), dev: s.dev })
187
189
  const to = opt('to')
188
190
  if (!isAddress(to ?? '') || to === zeroAddress) fail('--to <0x…> required (checksummed or all lowercase): the address the dev\'s part goes to from now on', { got: to ?? null })
package/src/index.js CHANGED
@@ -295,7 +295,7 @@ graduated tokens only).
295
295
  chain (a token this wallet created with this symbol since the plan); a run that finds
296
296
  none never creates again by itself (the first may still be landing): --restart does.
297
297
  Done stays done: running it again only reports. --note goes on the create only;
298
- --bond needs GangBond on the network (testnet only for now), checked before the create
298
+ --bond needs GangBond on the network (mainnet and testnet), checked before the create
299
299
  NOTES: gang create / buy / sell, and gang mint / withdraw on a 打新 sale, take [--note "<why>" [--conf 0-100]
300
300
  [--reveal-after 1-72h]] (a create's note is its launch manifesto); gang buy also
301
301
  --follow <note tx>. Mainnet only; pool trades (graduated / launched) carry no note
@@ -331,8 +331,8 @@ BOND (押金承诺, GangBond; any GangLaunchpad token, from create on; GANG_BOND
331
331
  creator only: the bond only grows, X only rises, the commitment only gets longer (90
332
332
  days in all before the pair; a deadline ≤ 90 days from now after it)
333
333
  gang bond status --token <addr> state, phase (pending: waiting for the pair / running), X and the creator's balance /
334
- headroom, coverage + tier once on the pair (≥100% full cover, 50–100% bond, <50% no
335
- badge), toFullCover, time left, buy-back progress, the creator's record
334
+ headroom, coverage + tier once on the pair (≥100% full cover, 50–100% bond, <50% plain
335
+ gray badge), toFullCover, time left, buy-back progress, the creator's record
336
336
  gang bond start --token <addr> anyone, once the token graduated / launched: start the clock (deadline = now + days)
337
337
  gang bond report --token <addr> anyone, when the creator holds less than X: 1% of the bond to you, the rest buys
338
338
  back and burns the token (simulated first; nothing is sent when not violated)
@@ -357,7 +357,7 @@ BUYBACK (a V3 token whose recipient is a buy-back splitter; GANG_SPLITTER_FACTOR
357
357
  dev only: a higher share applies at once; a lower one after a 3-day notice
358
358
  gang buyback set-payee --token <addr> --to <addr>
359
359
  dev only: the part not bought back goes to --to from now on (at once; splitters
360
- from the current factory; the first mainnet ones, buyback-burn-v1, pay the dev)
360
+ from v2 on; the first mainnet ones, buyback-burn-v1, pay the dev)
361
361
  gang buyback apply --token <addr> anyone: apply a cut whose notice ran (within 7 days, or it lapses)
362
362
  gang buyback bind --token <addr> | gang buyback release --token <addr>
363
363
  anyone: bind the splitter to its token (the launch does it) / push the payee what a