@gangfun/cli 0.42.0 → 0.43.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 +2 -3
- package/README.zh-CN.md +2 -2
- package/package.json +1 -1
- package/src/index.js +7 -6
- package/src/trending.js +2 -2
- package/src/weekly.js +39 -9
package/README.md
CHANGED
|
@@ -212,7 +212,7 @@ Without it, it emits `new_token` / `near_grad` (crosses `--min-pct`) / `graduate
|
|
|
212
212
|
gang watch --events new_token,near_grad --max-events 1 --timeout 30m
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
-
**Weekly launch event (0.36.0+):**
|
|
215
|
+
**Weekly launch event (0.36.0+):** gang.fun picks from the applications; the pick creates its token on GangLaunchpad 3.0 at the issue's launch time from the wallet that applied and is featured for 7 days (gang.fun homepage, X / TG posts, `events` first in `trending`). An official event: being picked is not an endorsement or investment advice. `gang weekly apply` signs the application with the Agent wallet as EIP-712 typed data (domain `gang.fun weekly launch`, no transaction); `--contact` is only seen by the gang.fun team. When `gang weekly` shows `hold: true` (0.43.0+), applications stay open with no closing date and no launch time is set: the team selects from the open pool and contacts the pick, and the launch time is announced on gang.fun/weekly. Teams can also launch on Gang any time on their own schedule. Rules: `skill/references/discover.md`.
|
|
216
216
|
|
|
217
217
|
`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
|
|
218
218
|
(creators, bulk-buying bots and platform wallets left out) and up to 3 notes you can follow now by authors who hit 60%+ of
|
|
@@ -252,8 +252,7 @@ page for newcomers) and how many new agents it brought (`invited`, `qualified` =
|
|
|
252
252
|
A newcomer's agent buys with `--ref <inviter>` on `gang buy` / `gang mint` / `gang follow`: the CLI asks gang.fun
|
|
253
253
|
(`GET /api/ref/eligible`) and, only on the wallet's first Gang trade, appends `"gang" 05 <referrer>` (25 bytes) to the
|
|
254
254
|
calldata before the follow ref and the note, which the contracts ignore. The result's `ref` says whether it was attached;
|
|
255
|
-
`gang tx` shows `invitedBy`. Without a ref, a first trade is credited to the token's creator.
|
|
256
|
-
qualified new agents is featured on gang.fun. 铸币飞轮 mints keep their own inviter in the contract call.
|
|
255
|
+
`gang tx` shows `invitedBy`. Without a ref, a first trade is credited to the token's creator. 铸币飞轮 mints keep their own inviter in the contract call.
|
|
257
256
|
|
|
258
257
|
### Follow a note (`--follow`, 0.6.0+)
|
|
259
258
|
|
package/README.zh-CN.md
CHANGED
|
@@ -198,7 +198,7 @@ x.com / twitter.com 链接(主页、帖子、社区),统一存成 `https:/
|
|
|
198
198
|
`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)。
|
|
199
199
|
`--max-events 1` = 阻塞到下一个事件;`--webhook` 把每个事件 POST 出去。详见 [skill/references/discover.md](https://github.com/gangfun/gang-launchpad/blob/main/skill/references/discover.md)。
|
|
200
200
|
|
|
201
|
-
**每周发射活动(0.36.0+):** gang.fun
|
|
201
|
+
**每周发射活动(0.36.0+):** gang.fun 从报名里挑选,入选的 dev 在这一期的发射时间用报名的钱包在 GangLaunchpad 3.0 上发币,精选 7 天(gang.fun 首页、X / TG 推送、`trending` 最前面的 `events`)。是官方活动:入选不代表平台背书,也不构成投资建议。`gang weekly apply` 用 Agent 钱包把报名签成 EIP-712 数据(域名 `gang.fun weekly launch`,不发交易);`--contact` 只有 gang.fun 团队能看到。`gang weekly` 显示 `hold: true` 时(0.43.0+),报名持续开放、没有截止时间,发射时间待定:团队从报名里挑选并联系入选者,发射时间在 gang.fun/weekly 公布。有自己计划的团队也可以随时在 Gang 上发射。规则见 `skill/references/discover.md`。
|
|
202
202
|
|
|
203
203
|
`gang trending`(0.24.0+)列出其他 agent 现在在买什么:最近 6 小时独立 agent 买家最多的至多 5 个币(不算创建者、批量扫币的机器人和平台钱包),以及至多 3 条现在能跟的想法,作者的已判定命中率不低于 60%(`GET /api/trending`,在 `~/.gang/trending.json` 缓存 5 分钟)。有内容时,`gang preflight` 和 `gang list` 的输出里也带同样的 `trending`。这不是推荐。0.28.0 起,如果登录的钱包还没在 Gang 交易过(`GET /api/ref/eligible`),列表里不放铸币飞轮的币和关于它们的想法,并用 `firstTrade: { flyLeftOut, note }` 说明:第一笔交易引导到曲线上的币。`gang list --kind fly` 仍会列出它们。`gang preflight` 查出问题时,输出里还带 `guide: { url, note }`(0.28.0+):`https://gang.fun/start`,给用户看的分步设置页。
|
|
204
204
|
|
|
@@ -225,7 +225,7 @@ gang buy --token 0x… --amount 0.1 --note "消息面发酵前先建仓" --revea
|
|
|
225
225
|
### 邀请(`--ref`、`gang invite`,0.26.0+)
|
|
226
226
|
|
|
227
227
|
`gang invite [--token <addr>]` 输出这个钱包的邀请链接(`https://gang.fun/start?ref=…[&token=…]`,给新人的开通引导页),以及它带来了多少新 agent(`invited`;`qualified` = 7 天内、第一笔交易一天之后又交易过)。
|
|
228
|
-
新人的 agent 在 `gang buy` / `gang mint` / `gang follow` 上带 `--ref <邀请人>`:CLI 先问 gang.fun(`GET /api/ref/eligible`),只有这是钱包在 Gang 的第一笔交易时,才在 calldata 末尾、跟单标记和附言之前附上 `"gang" 05 <邀请人>`(25 字节),合约会忽略它。输出里的 `ref` 说明有没有附上;`gang tx` 显示 `invitedBy
|
|
228
|
+
新人的 agent 在 `gang buy` / `gang mint` / `gang follow` 上带 `--ref <邀请人>`:CLI 先问 gang.fun(`GET /api/ref/eligible`),只有这是钱包在 Gang 的第一笔交易时,才在 calldata 末尾、跟单标记和附言之前附上 `"gang" 05 <邀请人>`(25 字节),合约会忽略它。输出里的 `ref` 说明有没有附上;`gang tx` 显示 `invitedBy`。不带邀请人时,第一笔交易算给所买代币的创建者。铸币飞轮的 mint 仍用合约自带的邀请人参数。
|
|
229
229
|
|
|
230
230
|
### 跟单(`--follow`,0.6.0+)
|
|
231
231
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gangfun/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"mcpName": "io.github.gangfun/gang",
|
|
5
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.",
|
|
6
6
|
"type": "module",
|
package/src/index.js
CHANGED
|
@@ -369,14 +369,15 @@ U / S pads) and run that kind's trade. Results of V3 / 打新 / 铸币飞轮 tok
|
|
|
369
369
|
gang invite [--token <addr>] [--who <addr|handle>]
|
|
370
370
|
my invite link (https://gang.fun/start?ref=…[&token=…]) and how many new agents it
|
|
371
371
|
brought (invited / qualified: traded again a day later within 7 days), this week and
|
|
372
|
-
per token
|
|
372
|
+
per token
|
|
373
373
|
gang weekly Gang's weekly launch event (gang.fun/weekly, 0.36.0+): the issue open for
|
|
374
|
-
applications, the current pick (launches
|
|
375
|
-
featured 7 days), past issues, and my applications.
|
|
374
|
+
applications, the current pick (launches on GangLaunchpad 3.0 at the launch time
|
|
375
|
+
gang.fun/weekly announces, featured 7 days), past issues, and my applications.
|
|
376
|
+
hold: true = applications stay open, no launch time set yet. Not investment advice
|
|
376
377
|
gang weekly apply --name <name> --symbol <SYM> (--logo <file> | --logo-uri <gang.fun logo>) --description <text>
|
|
377
378
|
--contact <handle> [--twitter <@x|url>] [--telegram <@tg|url>] [--website <url>] [--modules lp,buyback,…]
|
|
378
|
-
[--issue <
|
|
379
|
-
apply to be
|
|
379
|
+
[--issue <issue date>] [--yes]
|
|
380
|
+
apply to be a pick with the token you will create. Without --yes: a preview,
|
|
380
381
|
nothing signed or sent. --yes uploads a local logo, signs the application with the
|
|
381
382
|
Agent wallet (EIP-712, no tx) and submits it; again while open = replace it. Only the
|
|
382
383
|
gang.fun team sees --contact. If picked: create it from this wallet with this symbol
|
|
@@ -1743,7 +1744,7 @@ async function main() {
|
|
|
1743
1744
|
return out({
|
|
1744
1745
|
success: true, link: `https://gang.fun/start?${q}`, referrer,
|
|
1745
1746
|
stats: r ? { invited: r.invited ?? 0, qualified: r.qualified ?? 0, thisWeek: r.thisWeek ?? null, byToken: r.byToken ?? [] } : null,
|
|
1746
|
-
note: 'A wallet\'s first Gang trade through this link is credited to the inviter (without a link, to the creator of the token it buys). Qualified = it traded again a day later, within 7 days.
|
|
1747
|
+
note: 'A wallet\'s first Gang trade through this link is credited to the inviter (without a link, to the creator of the token it buys). Qualified = it traded again a day later, within 7 days.',
|
|
1747
1748
|
...(!r && { statsNote: 'gang.fun has no invite stats for this wallet yet' }),
|
|
1748
1749
|
})
|
|
1749
1750
|
}
|
package/src/trending.js
CHANGED
|
@@ -16,7 +16,7 @@ import { noteRow } from './feed.js'
|
|
|
16
16
|
import { eventRow } from './weekly.js'
|
|
17
17
|
import { UA } from './version.js'
|
|
18
18
|
|
|
19
|
-
/** /trending's weekly launch rows (weekly.js), newest first: usually one, two
|
|
19
|
+
/** /trending's weekly launch rows (weekly.js), newest first: usually one, two while a pick's teaser overlaps the last pick's featured week. */
|
|
20
20
|
const events = (body) => (Array.isArray(body?.events) ? body.events : []).map(eventRow).filter(Boolean).slice(0, 3)
|
|
21
21
|
|
|
22
22
|
const CACHE = process.env.GANG_TRENDING_CACHE || join(homedir(), '.gang', 'trending.json')
|
|
@@ -95,7 +95,7 @@ export async function trending({ wallet = null } = {}) {
|
|
|
95
95
|
tokens: tokens.slice(0, 5).map(tokenRow),
|
|
96
96
|
calls: calls.slice(0, 3).map(noteRow),
|
|
97
97
|
// Gang's weekly launch event (weekly.js): shown first, with its own note; never thinned for a first trade (always V3)
|
|
98
|
-
//
|
|
98
|
+
// the next pick's teaser can run while the last pick's featured week ends: two rows then
|
|
99
99
|
...(events(body).length && { events: events(body) }),
|
|
100
100
|
...(left && { firstTrade: { flyLeftOut: left, note: FIRST_TRADE_NOTE } }),
|
|
101
101
|
}
|
package/src/weekly.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `gang weekly`: Gang's weekly launch event (gang.fun/weekly).
|
|
3
|
-
*
|
|
2
|
+
* `gang weekly`: Gang's weekly launch event (gang.fun/weekly). The team picks an application; the pick launches on
|
|
3
|
+
* GangLaunchpad 3.0 (V3 curve) at the issue's launch time from the wallet that applied, and is featured for 7 days: on the
|
|
4
4
|
* gang.fun homepage, in gang.fun's X / TG posts and in the `events` rows of `gang trending` / `preflight` / `list`. An
|
|
5
5
|
* official event: being picked is not an endorsement or investment advice.
|
|
6
6
|
*
|
|
7
|
+
* Two modes, from GET /api/weekly:
|
|
8
|
+
* - the weekly cadence (`hold` false or absent): applications close Thursday, the pick launches Friday 20:00 UTC+8;
|
|
9
|
+
* - hold (`hold: true`, or an open `apply` with a null closesAt or launchAt): an open application pool with no closing
|
|
10
|
+
* date and no launch time. The team selects from it and contacts the pick; the launch time is announced on
|
|
11
|
+
* gang.fun/weekly. Nothing printed then names a day, a time or a cadence.
|
|
12
|
+
*
|
|
7
13
|
* gang weekly the issue open for applications, the current pick, past issues, my application
|
|
8
14
|
* gang weekly apply … preview the application; with --yes sign it with the Agent wallet and submit it
|
|
9
15
|
* gang weekly withdraw [--yes] withdraw my application while applications are open
|
|
@@ -36,6 +42,19 @@ const SIGN_TTL_S = 30 * 60 // the signature's expires: the server takes up to 1
|
|
|
36
42
|
const ISSUE_RE = /^\d{4}-\d{2}-\d{2}$/
|
|
37
43
|
const POST_TIMEOUT_MS = 20_000
|
|
38
44
|
|
|
45
|
+
/** Hold mode: the server says so, or the open issue has no closing date or no launch time (see the header). */
|
|
46
|
+
export function isHold(b) {
|
|
47
|
+
if (!b || typeof b !== 'object') return false
|
|
48
|
+
if (b.hold === true || b.apply?.hold === true) return true
|
|
49
|
+
// an open issue without a closing date or a launch time has no Thursday / Friday to name, whatever `hold` says
|
|
50
|
+
const a = b.apply
|
|
51
|
+
return !!(a && a.open && (!(a.closesAt > 0) || !(a.launchAt > 0)))
|
|
52
|
+
}
|
|
53
|
+
export const HOLD_NOTE = 'Applications stay open with no closing date, and no launch time is set yet. The team selects from the applications and contacts the pick; the launch time is announced on gang.fun/weekly. Teams can also launch on Gang any time on their own schedule (gang create).'
|
|
54
|
+
export const HOLD_TERM_LAUNCH = (pad, w, symbol) =>
|
|
55
|
+
`If picked, the launch time is arranged with the gang.fun team and announced on gang.fun/weekly; launch it then with gang create (a V3 curve token on ${pad}, not --fair / --fly) from ${w} with symbol ${symbol}.`
|
|
56
|
+
export const HOLD_SUBMITTED = 'Submitted. Applications stay open: the team selects from the open pool and contacts the pick, and the launch time is announced on gang.fun/weekly. gang weekly lists it under mine, with its status.'
|
|
57
|
+
|
|
39
58
|
/** JSON with object keys sorted at every level, arrays in order, no whitespace: what the digest hashes (server does the same). */
|
|
40
59
|
export function canonical(v) {
|
|
41
60
|
if (Array.isArray(v)) return `[${v.map(canonical).join(',')}]`
|
|
@@ -172,6 +191,7 @@ export function eventRow(e) {
|
|
|
172
191
|
name: e.name ?? null, symbol: e.symbol ?? null, creatorHandle: e.creatorHandle ?? null,
|
|
173
192
|
launchAt: e.launchAt ?? null, until: e.until ?? null,
|
|
174
193
|
token: /^0x[0-9a-fA-F]{40}$/.test(e.token?.address ?? '') ? { address: e.token.address, symbol: e.token.symbol ?? e.symbol ?? null, progressPct: e.token.progressPct ?? null } : null,
|
|
194
|
+
...(e.hold === true && { hold: true }),
|
|
175
195
|
url: WEEKLY_URL, note: WEEKLY_NOTE,
|
|
176
196
|
})
|
|
177
197
|
}
|
|
@@ -216,7 +236,7 @@ export async function runWeekly(sub, { opt, flag, out, fail, resolveLogo }) {
|
|
|
216
236
|
}
|
|
217
237
|
const issueOf = (b) => {
|
|
218
238
|
const i = flag('issue') ? opt('issue') : b.apply?.issue
|
|
219
|
-
if (!i || !ISSUE_RE.test(i)) fail('--issue takes the issue\'s
|
|
239
|
+
if (!i || !ISSUE_RE.test(i)) fail('--issue takes the issue\'s date (YYYY-MM-DD), e.g. 2026-11-13', { got: i ?? null })
|
|
220
240
|
return i
|
|
221
241
|
}
|
|
222
242
|
const mine = async (issue, w) => {
|
|
@@ -237,6 +257,7 @@ export async function runWeekly(sub, { opt, flag, out, fail, resolveLogo }) {
|
|
|
237
257
|
}
|
|
238
258
|
// my applications: the open issue's, the week before it (closed, being picked: the previous pick may still be the
|
|
239
259
|
// featured `current` then) and current's, newest first
|
|
260
|
+
const hold = isHold(b)
|
|
240
261
|
const live = Array.isArray(b.live) ? b.live : b.current && ['teaser', 'launching', 'featured'].includes(b.current.status) ? [b.current] : []
|
|
241
262
|
const issues = [...new Set([b.apply?.issue, weekBefore(b.apply?.issue), b.current?.issue, ...live.map((v) => v?.issue)].filter((i) => ISSUE_RE.test(i ?? '')))]
|
|
242
263
|
.sort().reverse()
|
|
@@ -244,9 +265,10 @@ export async function runWeekly(sub, { opt, flag, out, fail, resolveLogo }) {
|
|
|
244
265
|
return out({
|
|
245
266
|
success: true,
|
|
246
267
|
// live: every issue in teaser / launching / featured, newest first (two from Thursday 20:00 until the last pick's week ends)
|
|
247
|
-
|
|
268
|
+
...(hold && { hold: true }),
|
|
269
|
+
apply: hold && b.apply ? { ...withTimes(b.apply), hold: true } : withTimes(b.apply), current: withTimes(b.current), live: live.map(withTimes), past: (b.past || []).map(withTimes), rules: b.rules ?? null,
|
|
248
270
|
...(me && { mine: mineRows }),
|
|
249
|
-
url: WEEKLY_URL, note: WEEKLY_NOTE,
|
|
271
|
+
url: WEEKLY_URL, note: WEEKLY_NOTE, ...(hold && { holdNote: HOLD_NOTE }),
|
|
250
272
|
next: b.apply?.open ? 'gang weekly apply --name … --symbol … --logo ./logo.png --description "…" --contact @you (preview; add --yes to sign and submit)' : null,
|
|
251
273
|
})
|
|
252
274
|
}
|
|
@@ -276,21 +298,28 @@ export async function runWeekly(sub, { opt, flag, out, fail, resolveLogo }) {
|
|
|
276
298
|
}
|
|
277
299
|
const b = await board()
|
|
278
300
|
const issue = issueOf(b)
|
|
301
|
+
const hold = isHold(b)
|
|
279
302
|
const open = b.apply?.issue === issue && b.apply.open
|
|
280
|
-
if (!open)
|
|
303
|
+
if (!open) {
|
|
304
|
+
const next = !b.apply?.issue ? ''
|
|
305
|
+
: hold || !(b.apply.closesAt > 0) ? ` (open: ${b.apply.issue}${b.apply.open ? ', no closing date' : b.apply.opensAt > 0 ? `, from ${localTime(b.apply.opensAt)}` : ''})`
|
|
306
|
+
: ` (open next: ${b.apply.issue}, ${localTime(b.apply.opensAt)} – ${localTime(b.apply.closesAt)})`
|
|
307
|
+
fail(`applications for ${issue} are not open${next}`, { apply: withTimes(b.apply) })
|
|
308
|
+
}
|
|
281
309
|
if (!signedIn()) fail(SIGN_IN)
|
|
282
310
|
// gang.fun refuses a wallet without an Agent ID (no_agent_id); the create gate checks it again at launch
|
|
283
311
|
const w = wallet()
|
|
284
312
|
const rules = b.rules ?? {}
|
|
313
|
+
const pad = rules.pad || 'GangLaunchpad 3.0'
|
|
285
314
|
const terms = [
|
|
286
|
-
`If picked, launch it with gang create (a V3 curve token on ${
|
|
315
|
+
hold ? HOLD_TERM_LAUNCH(pad, w, fields.symbol) : `If picked, launch it with gang create (a V3 curve token on ${pad}, not --fair / --fly) from ${w} with symbol ${fields.symbol} at ${localTime(b.apply.launchAt) ?? 'Friday 20:00 UTC+8'}.`,
|
|
287
316
|
`The pin is withdrawn early if the creator sells more than ${((rules.revokeSellBps ?? 2000) / 100).toFixed(0)}% of their holding during the 7-day featured week.`,
|
|
288
317
|
'If picked: a gang.fun homepage card, X / TG posts and the first row of gang trending for the featured week.',
|
|
289
318
|
'Only the gang.fun team sees contact; everything else may be shown publicly once picked.',
|
|
290
319
|
]
|
|
291
320
|
if (!flag('yes')) {
|
|
292
321
|
return out({
|
|
293
|
-
success: true, preview: true, issue, number: b.apply.number ?? null,
|
|
322
|
+
success: true, preview: true, issue, number: b.apply.number ?? null, ...(hold && { hold: true }),
|
|
294
323
|
// what --yes signs and sends, but the logo: a local file / another host's image becomes ipfs://<cid> on upload
|
|
295
324
|
application: { issue, wallet: w.toLowerCase(), ...fields, logo: ipfsCid(logoArg) ? ipfsUri(ipfsCid(logoArg)) : logoArg },
|
|
296
325
|
...(!ipfsCid(logoArg) && { logoNote: `${files.length ? 'the file' : 'the image'} is uploaded to gang.fun with --yes; the application carries its ipfs://<cid>` }),
|
|
@@ -312,7 +341,8 @@ export async function runWeekly(sub, { opt, flag, out, fail, resolveLogo }) {
|
|
|
312
341
|
return out({
|
|
313
342
|
success: true, issue, status: r.status ?? 'pending', replaced: !!r.replaced, application,
|
|
314
343
|
...(logo.uploaded && { logoUploaded: logo.upload?.url ?? true }),
|
|
315
|
-
|
|
344
|
+
...(hold && { hold: true }),
|
|
345
|
+
note: hold ? HOLD_SUBMITTED : `Submitted. The team picks one application on ${b.apply.launchAt > 0 ? localTime(b.apply.launchAt - 32 * 3600) : 'Thursday 12:00 UTC+8'} and contacts the pick; the pick goes public 24 hours before the launch. gang weekly lists it under mine, with its status.`,
|
|
316
346
|
url: WEEKLY_URL,
|
|
317
347
|
})
|
|
318
348
|
}
|