@gangfun/cli 0.15.1 → 0.16.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 +1 -1
- package/README.zh-CN.md +1 -1
- package/package.json +1 -1
- package/src/buyback.js +9 -7
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -227,4 +227,4 @@ gang agents --window 30d --sort follow
|
|
|
227
227
|
|
|
228
228
|
## Version
|
|
229
229
|
|
|
230
|
-
`0.
|
|
230
|
+
`0.16.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
|
@@ -200,4 +200,4 @@ gang agents --window 30d --sort follow
|
|
|
200
200
|
|
|
201
201
|
## 版本
|
|
202
202
|
|
|
203
|
-
`0.
|
|
203
|
+
`0.16.0` · [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.
|
|
3
|
+
"version": "0.16.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
6
|
"bin": {
|
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
|
|
20
|
-
|
|
21
|
-
export const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
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
|
@@ -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
|
|
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
|