@gangfun/cli 0.1.4 → 0.3.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 +59 -32
- package/README.zh-CN.md +50 -47
- package/package.json +2 -2
- package/src/abi.js +45 -3
- package/src/chain.js +238 -47
- package/src/discover.js +266 -0
- package/src/index.js +228 -28
- package/src/logo.js +40 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Gang CLI (`gang`)
|
|
2
2
|
|
|
3
|
-
Operate [gang.fun](https://gang.fun) from a Binance **Agentic Wallet**. Curve buys require a SPACE ID `.ai` Agent ID. This CLI builds calldata; `baw` signs — no keys in this package.
|
|
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
|
-
|
|
5
|
+
**Create path (0.2.1+):** LaunchpadV2 only (`0x1B8F3f69DFa0a7F63d308C7EB0Fd38D8b099966E`). Soft / LaunchpadU / LaunchpadS: **no new create** — buy/sell/claim existing tokens only. New tokens graduate at ≈ **15 BNB** (PoolCheck). Soft archive tokens still graduate at 20 BNB on-chain.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -10,36 +10,18 @@ Node ≥ 18. Also install Binance Agentic Wallet CLI (`baw`):
|
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm i -g @binance/agentic-wallet
|
|
13
|
-
npm i -g @gangfun/cli@
|
|
13
|
+
npm i -g @gangfun/cli@latest
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Package: [
|
|
16
|
+
Package: [`@gangfun/cli` on npm](https://www.npmjs.com/package/@gangfun/cli) (public registry, no auth). Upgrade with the same command.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
@gangfun:registry=https://npm.pkg.github.com
|
|
20
|
-
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Then you can omit the `--registry` flag: `npm i -g @gangfun/cli@0.1.3`.
|
|
24
|
-
|
|
25
|
-
**Alternate** (no Packages token; installs from the public git repo `main` tip = `@gangfun/cli@0.1.3` / Launchpad v4.1):
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm i -g github:gangfun/cli
|
|
29
|
-
# or one-shot:
|
|
30
|
-
npx --yes github:gangfun/cli preflight
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
If a previous global is stale, clear it then reinstall:
|
|
18
|
+
**Alternate** (public git tip):
|
|
34
19
|
|
|
35
20
|
```bash
|
|
36
|
-
npm uninstall -g @gangfun/cli
|
|
37
21
|
npm i -g github:gangfun/cli
|
|
38
22
|
```
|
|
39
23
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Skill install (Claude Code / Cursor / Codex / OpenClaw / Binance AI Pro):
|
|
24
|
+
Skill:
|
|
43
25
|
|
|
44
26
|
```bash
|
|
45
27
|
npx skills add gangfun/gang-launchpad/skill
|
|
@@ -50,28 +32,71 @@ npx skills add gangfun/gang-launchpad/skill
|
|
|
50
32
|
1. Binance App → Wallet → Agentic Wallet → create; claim a `.ai` Agent ID.
|
|
51
33
|
2. Enable **Developer Mode** and **Trade all tokens**.
|
|
52
34
|
3. `baw auth signin` → confirm in the App.
|
|
53
|
-
4. `gang preflight`
|
|
35
|
+
4. `gang preflight` — `createPad` must be LaunchpadV2.
|
|
54
36
|
|
|
55
37
|
## Commands
|
|
56
38
|
|
|
57
39
|
```bash
|
|
58
40
|
gang preflight
|
|
59
41
|
gang list
|
|
42
|
+
gang hot [--limit 10] [--track all|v2|soft] [--include-graduated] # 24h USD volume
|
|
43
|
+
gang new [--limit 10] [--max-age 2h]
|
|
44
|
+
gang near-grad [--min-pct 50] [--limit 10]
|
|
45
|
+
gang watch [<addr>] [--interval 10] [--events a,b] [--max-events N] [--timeout 30m] [--webhook URL]
|
|
60
46
|
gang token --token <addr>
|
|
61
|
-
gang quote --token <addr> --bnb <n>
|
|
47
|
+
gang quote --token <addr> --bnb <n> # Soft archive: BNB; V2: quote ERC-20 (LaunchpadV2.sol math)
|
|
62
48
|
gang buy --token <addr> --bnb <n> [--slippage 1]
|
|
63
49
|
gang sell --token <addr> (--amount <tokens> | --all) [--slippage 1]
|
|
64
|
-
gang
|
|
50
|
+
gang upload-logo --file ./avatar.png # → https://gang.fun/api/logos/<id>.png
|
|
51
|
+
gang create --name <n> --symbol <s> [--logo-uri URL | --logo ./avatar.png] [--taxed] [--pair-or-quote 0x…]
|
|
65
52
|
gang execute --request-id <id>
|
|
66
53
|
gang tx --hash <0x..>
|
|
67
54
|
```
|
|
68
55
|
|
|
69
|
-
|
|
56
|
+
### Logo + create
|
|
57
|
+
|
|
58
|
+
Browser UI: https://gang.fun/dev/logo (pre-create tab).
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Option A — upload then create
|
|
62
|
+
gang upload-logo --file ./avatar.png
|
|
63
|
+
# → { "logoUrl": "https://gang.fun/api/logos/<id>.png", ... }
|
|
64
|
+
gang create --name "My Agent Coin" --symbol MAC --logo-uri https://gang.fun/api/logos/<id>.png
|
|
65
|
+
gang execute --request-id …
|
|
66
|
+
|
|
67
|
+
# Option B — create uploads for you
|
|
68
|
+
gang create --name "My Agent Coin" --symbol MAC --logo ./avatar.png
|
|
69
|
+
gang execute --request-id …
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`--logo-uri ""` / omit logo → empty `logoURI` on-chain (allowed). `--taxed` requires `--pair-or-quote`. Untaxed default: `taxed=false`, `pairOrQuote=0x0` (WBNB).
|
|
73
|
+
|
|
74
|
+
Buy / sell / create: **preview → you confirm → execute**. `requestId` expires in ~5 minutes.
|
|
75
|
+
|
|
76
|
+
### Discovery (0.3.0+)
|
|
77
|
+
|
|
78
|
+
`hot` / `new` / `near-grad` / `watch` read the gang.fun indexer (`GANG_API`) and cover the V2 and Soft tracks. Each row has
|
|
79
|
+
`quote` (the unit to pass to `--bnb`), `progressPct`, `remaining`/`remainingUsd`, `volume24hUsd`, `holders`, `ageMin` and a `next` command.
|
|
80
|
+
Graduated tokens are hidden unless `--include-graduated` is passed.
|
|
81
|
+
|
|
82
|
+
`gang watch` polls and prints NDJSON. The minimum interval is 3s with `<addr>` and 10s for the whole market. With `<addr>` it emits `trade` / `progress` (25/50/75/90%) / `graduated`.
|
|
83
|
+
Without it, it emits `new_token` / `near_grad` (crosses `--min-pct`) / `graduated`. `--max-events 1` blocks until the next event and
|
|
84
|
+
`--webhook` POSTs each event. Details: [skill/references/discover.md](https://github.com/gangfun/gang-launchpad/blob/main/skill/references/discover.md).
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
gang watch --events new_token,near_grad --max-events 1 --timeout 30m
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Quote path
|
|
91
|
+
|
|
92
|
+
- **Soft archive tokens:** on-chain `quoteBuy` / `quoteSell`.
|
|
93
|
+
- **LaunchpadV2 (and U/S-shaped pads for legacy trade):** unique off-chain path = `LaunchpadV2.sol` `_prepBuy` / `_tokensOut` / `_quoteOut` (1% fee, wallet cap, graduation clamp). No Soft/U/S create/quote fallback. Output fields `quotePath` + `deterministic: true`.
|
|
70
94
|
|
|
71
95
|
## Rules (short)
|
|
72
96
|
|
|
73
|
-
- 1% per-wallet cap on the curve; excess
|
|
74
|
-
-
|
|
97
|
+
- 1% per-wallet cap on the curve; excess input refunded in-tx.
|
|
98
|
+
- **New** creates → ≈15 BNB graduation (LaunchpadV2 / PoolCheck) → PancakeSwap V2, LP burned.
|
|
99
|
+
- Soft legacy (archive): 20 BNB graduation; buy/sell only — no Soft create from this CLI.
|
|
75
100
|
- Before graduation: no transfers, curve only.
|
|
76
101
|
- Graduated: trade on PancakeSwap (`pair` from `gang token`).
|
|
77
102
|
|
|
@@ -79,9 +104,11 @@ Buy / sell / create: **preview → you confirm → execute**. `requestId` expire
|
|
|
79
104
|
|
|
80
105
|
| Var | Meaning |
|
|
81
106
|
|---|---|
|
|
82
|
-
| `GANG_LAUNCHPAD` |
|
|
107
|
+
| `GANG_LAUNCHPAD` | Create target (default LaunchpadV2 `0x1B8F3f69…966E`) |
|
|
83
108
|
| `GANG_RPC_URL` | BSC HTTP RPC |
|
|
109
|
+
| `GANG_LOGO_API` | Logo upload endpoint (default `https://gang.fun/api/logos`) |
|
|
110
|
+
| `GANG_API` | Indexer API for discovery (default `https://gang.fun/api`) |
|
|
84
111
|
|
|
85
112
|
## Version
|
|
86
113
|
|
|
87
|
-
`0.
|
|
114
|
+
`0.3.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
|
@@ -1,87 +1,90 @@
|
|
|
1
1
|
# Gang CLI(`gang`)
|
|
2
2
|
|
|
3
|
-
用 Binance **Agentic Wallet** 操作 [gang.fun](https://gang.fun)
|
|
3
|
+
用 Binance **Agentic Wallet** 操作 [gang.fun](https://gang.fun)。内盘买入/发币需要 SPACE ID `.ai` Agent ID。本 CLI 只组 calldata,签名走 `baw`,不持有私钥。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**发币路径(0.2.1+):** 仅 LaunchpadV2(`0x1B8F3f69DFa0a7F63d308C7EB0Fd38D8b099966E`)。Soft / LaunchpadU / LaunchpadS:**禁止新 create**,仅存量 buy/sell/claim。新币毕业 ≈ **15 BNB**(PoolCheck)。Soft 存量链上仍为 20 BNB 毕业。
|
|
6
6
|
|
|
7
7
|
## 安装
|
|
8
8
|
|
|
9
|
-
Node ≥ 18
|
|
9
|
+
Node ≥ 18。另需 `baw`:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
npm i -g @binance/agentic-wallet
|
|
13
|
-
npm i -g @gangfun/cli@
|
|
13
|
+
npm i -g @gangfun/cli@latest
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
npm 公共源,无需鉴权;升级用同一条命令。或(git 最新):`npm i -g github:gangfun/cli`
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
@gangfun:registry=https://npm.pkg.github.com
|
|
20
|
-
//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
配好后可省略 `--registry`:`npm i -g @gangfun/cli@0.1.3`。
|
|
24
|
-
|
|
25
|
-
**备选**(不需要 Packages token;从公开 git 仓 `main` tip 装 = `@gangfun/cli@0.1.3` / Launchpad v4.1):
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
npm i -g github:gangfun/cli
|
|
29
|
-
# 或一次性:
|
|
30
|
-
npx --yes github:gangfun/cli preflight
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
若之前装过旧全局包,先卸再装:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm uninstall -g @gangfun/cli
|
|
37
|
-
npm i -g github:gangfun/cli
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
装完跑 `gang preflight`——Launchpad 必须是 `0x315Ba2e8952D06094CC636b2B84229FA32fb23A7`(v4.1)。若仍看到 `0x86854…dDcc`,说明旧全局还在,卸掉重装。
|
|
41
|
-
|
|
42
|
-
Skill(Claude Code / Cursor / Codex / OpenClaw / Binance AI Pro):
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npx skills add gangfun/gang-launchpad/skill
|
|
46
|
-
```
|
|
18
|
+
Skill:`npx skills add gangfun/gang-launchpad/skill`
|
|
47
19
|
|
|
48
20
|
## 准备
|
|
49
21
|
|
|
50
|
-
1.
|
|
51
|
-
2. 打开 **Developer Mode**
|
|
52
|
-
3. `baw auth signin
|
|
53
|
-
4. `gang preflight`
|
|
22
|
+
1. 币安 App → 钱包 → Agentic Wallet;领取 `.ai` Agent ID。
|
|
23
|
+
2. 打开 **Developer Mode** 与 **Trade all tokens**。
|
|
24
|
+
3. `baw auth signin`
|
|
25
|
+
4. `gang preflight` — `createPad` 须为 LaunchpadV2。
|
|
54
26
|
|
|
55
27
|
## 命令
|
|
56
28
|
|
|
57
29
|
```bash
|
|
58
30
|
gang preflight
|
|
59
31
|
gang list
|
|
32
|
+
gang hot [--limit 10] [--track all|v2|soft] [--include-graduated] # 按 24h USD 成交量
|
|
33
|
+
gang new [--limit 10] [--max-age 2h]
|
|
34
|
+
gang near-grad [--min-pct 50] [--limit 10]
|
|
35
|
+
gang watch [<addr>] [--interval 10] [--events a,b] [--max-events N] [--timeout 30m] [--webhook URL]
|
|
60
36
|
gang token --token <addr>
|
|
61
37
|
gang quote --token <addr> --bnb <n>
|
|
62
38
|
gang buy --token <addr> --bnb <n> [--slippage 1]
|
|
63
39
|
gang sell --token <addr> (--amount <tokens> | --all) [--slippage 1]
|
|
64
|
-
gang
|
|
40
|
+
gang upload-logo --file ./avatar.png
|
|
41
|
+
gang create --name <n> --symbol <s> [--logo-uri URL | --logo ./avatar.png] [--taxed] [--pair-or-quote 0x…]
|
|
65
42
|
gang execute --request-id <id>
|
|
66
43
|
gang tx --hash <0x..>
|
|
67
44
|
```
|
|
68
45
|
|
|
69
|
-
|
|
46
|
+
### Logo + 发币
|
|
47
|
+
|
|
48
|
+
站内:https://gang.fun/dev/logo
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
gang upload-logo --file ./avatar.png
|
|
52
|
+
gang create --name "My Agent Coin" --symbol MAC --logo-uri https://gang.fun/api/logos/<id>.png
|
|
53
|
+
gang execute --request-id …
|
|
54
|
+
|
|
55
|
+
# 或一步上传
|
|
56
|
+
gang create --name "My Agent Coin" --symbol MAC --logo ./avatar.png
|
|
57
|
+
gang execute --request-id …
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 发现(0.3.0+)
|
|
61
|
+
|
|
62
|
+
`hot` / `new` / `near-grad` / `watch` 读 gang.fun indexer(`GANG_API`),同时覆盖 V2 与 Soft。每行带 `quote`(`--bnb` 的单位)、
|
|
63
|
+
`progressPct`、`remaining`/`remainingUsd`、`volume24hUsd`、`holders`、`ageMin` 和 `next` 命令;已毕业默认隐藏(`--include-graduated` 显示)。
|
|
64
|
+
|
|
65
|
+
`gang watch` 轮询并输出 NDJSON(最短间隔:单币 3s,全市场 10s):带 `<addr>` 推 `trade` / `progress`(25/50/75/90%)/ `graduated`;不带则推 `new_token` / `near_grad`(越过 `--min-pct`)/ `graduated`。
|
|
66
|
+
`--max-events 1` = 阻塞到下一个事件;`--webhook` 把每个事件 POST 出去。详见 [skill/references/discover.md](https://github.com/gangfun/gang-launchpad/blob/main/skill/references/discover.md)。
|
|
67
|
+
|
|
68
|
+
## Quote 路径
|
|
69
|
+
|
|
70
|
+
- Soft 存量:链上 `quoteBuy` / `quoteSell`。
|
|
71
|
+
- **LaunchpadV2:** 唯一路径 = 合约 `LaunchpadV2.sol` 曲线公式(`_prepBuy` / `_tokensOut` / `_quoteOut`),无 Soft/U/S create/quote fallback;输出 `quotePath` + `deterministic: true`。
|
|
70
72
|
|
|
71
73
|
## 规则(短)
|
|
72
74
|
|
|
73
|
-
- 内盘每钱包 1
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
- 已毕业:去 PancakeSwap(`gang token` 里的 `pair`)。
|
|
75
|
+
- 内盘每钱包 1%;多付同笔退回。
|
|
76
|
+
- **新**发币 ≈15 BNB 毕业(LaunchpadV2)。Soft 存量归档:20 BNB,仅买卖。
|
|
77
|
+
- 毕业前不可转账;毕业后走 PancakeSwap。
|
|
77
78
|
|
|
78
79
|
## 环境变量
|
|
79
80
|
|
|
80
81
|
| 变量 | 含义 |
|
|
81
82
|
|---|---|
|
|
82
|
-
| `GANG_LAUNCHPAD` |
|
|
83
|
-
| `GANG_RPC_URL` | BSC
|
|
83
|
+
| `GANG_LAUNCHPAD` | 发币目标(默认 V2) |
|
|
84
|
+
| `GANG_RPC_URL` | BSC RPC |
|
|
85
|
+
| `GANG_LOGO_API` | Logo 上传 API(默认 `https://gang.fun/api/logos`) |
|
|
86
|
+
| `GANG_API` | 发现命令用的 indexer API(默认 `https://gang.fun/api`) |
|
|
84
87
|
|
|
85
88
|
## 版本
|
|
86
89
|
|
|
87
|
-
`0.
|
|
90
|
+
`0.3.0` · [gangfun/cli](https://github.com/gangfun/cli) · push 到 `main` 自动发布到 [npm](https://www.npmjs.com/package/@gangfun/cli)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gangfun/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Gang launchpad CLI
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Gang launchpad CLI (LaunchpadV2-only create + legacy Soft/U/S trade) for Binance Agentic Wallet agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"gang": "./src/index.js"
|
package/src/abi.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/** Soft / legacy BNB-payable pad (create archived; buy/sell/claim only). */
|
|
2
|
+
export const SOFT_ABI = [
|
|
2
3
|
{ type: 'function', name: 'create', stateMutability: 'nonpayable', inputs: [{ name: 'name', type: 'string' }, { name: 'symbol', type: 'string' }], outputs: [{ type: 'address' }] },
|
|
3
4
|
{ type: 'function', name: 'buy', stateMutability: 'payable', inputs: [{ name: 'token', type: 'address' }, { name: 'minTokensOut', type: 'uint256' }], outputs: [{ type: 'uint256' }] },
|
|
4
|
-
{ type: 'function', name: 'withdraw', stateMutability: 'nonpayable', inputs: [], outputs: [] },
|
|
5
|
-
{ type: 'function', name: 'pendingWithdrawals', stateMutability: 'view', inputs: [{ type: 'address' }], outputs: [{ type: 'uint256' }] },
|
|
6
5
|
{ type: 'function', name: 'sell', stateMutability: 'nonpayable', inputs: [{ name: 'token', type: 'address' }, { name: 'tokensIn', type: 'uint256' }, { name: 'minBnbOut', type: 'uint256' }], outputs: [{ type: 'uint256' }] },
|
|
7
6
|
{ type: 'function', name: 'quoteBuy', stateMutability: 'view', inputs: [{ name: 'token', type: 'address' }, { name: 'buyer', type: 'address' }, { name: 'bnbGross', type: 'uint256' }], outputs: [{ name: 'tokensOut', type: 'uint256' }, { name: 'bnbIn', type: 'uint256' }, { name: 'fee', type: 'uint256' }, { name: 'refund', type: 'uint256' }] },
|
|
8
7
|
{ type: 'function', name: 'quoteSell', stateMutability: 'view', inputs: [{ name: 'token', type: 'address' }, { name: 'tokensIn', type: 'uint256' }], outputs: [{ name: 'bnbToUser', type: 'uint256' }, { name: 'fee', type: 'uint256' }] },
|
|
@@ -20,11 +19,54 @@ export const LAUNCHPAD_ABI = [
|
|
|
20
19
|
{ type: 'event', name: 'Graduated', inputs: [{ name: 'token', type: 'address', indexed: true }, { name: 'pair', type: 'address', indexed: true }, { name: 'tokenAmount', type: 'uint256', indexed: false }, { name: 'bnbAmount', type: 'uint256', indexed: false }] },
|
|
21
20
|
]
|
|
22
21
|
|
|
22
|
+
/** LaunchpadV2 (+ U/S-shaped quote pads): create with logoURI; buy/sell take quote ERC-20. */
|
|
23
|
+
export const V2_ABI = [
|
|
24
|
+
{ type: 'function', name: 'create', stateMutability: 'nonpayable', inputs: [{ name: 'name', type: 'string' }, { name: 'symbol', type: 'string' }, { name: 'logoURI', type: 'string' }, { name: 'taxed', type: 'bool' }, { name: 'pairOrQuote', type: 'address' }], outputs: [{ type: 'address' }] },
|
|
25
|
+
{ type: 'function', name: 'buy', stateMutability: 'nonpayable', inputs: [{ name: 'token', type: 'address' }, { name: 'quoteIn', type: 'uint256' }, { name: 'minTokensOut', type: 'uint256' }], outputs: [{ type: 'uint256' }] },
|
|
26
|
+
{ type: 'function', name: 'sell', stateMutability: 'nonpayable', inputs: [{ name: 'token', type: 'address' }, { name: 'tokensIn', type: 'uint256' }, { name: 'minQuoteOut', type: 'uint256' }], outputs: [{ type: 'uint256' }] },
|
|
27
|
+
{ type: 'function', name: 'curves', stateMutability: 'view', inputs: [{ name: 'token', type: 'address' }], outputs: [
|
|
28
|
+
{ name: 'creator', type: 'address' }, { name: 'quote', type: 'address' }, { name: 'realQuote', type: 'uint128' }, { name: 'sold', type: 'uint128' },
|
|
29
|
+
{ name: 'gradAmt', type: 'uint128' }, { name: 'virtualQuote', type: 'uint128' }, { name: 'graduated', type: 'bool' }, { name: 'taxed', type: 'bool' },
|
|
30
|
+
{ name: 'pair', type: 'address' }, { name: 'refPair', type: 'address' },
|
|
31
|
+
] },
|
|
32
|
+
{ type: 'function', name: 'allTokens', stateMutability: 'view', inputs: [{ type: 'uint256' }], outputs: [{ type: 'address' }] },
|
|
33
|
+
{ type: 'function', name: 'tokenCount', stateMutability: 'view', inputs: [], outputs: [{ type: 'uint256' }] },
|
|
34
|
+
{ type: 'function', name: 'isAgent', stateMutability: 'view', inputs: [{ name: 'account', type: 'address' }], outputs: [{ type: 'bool' }] },
|
|
35
|
+
{ type: 'function', name: 'walletRoom', stateMutability: 'view', inputs: [{ name: 'token', type: 'address' }, { name: 'buyer', type: 'address' }], outputs: [{ type: 'uint256' }] },
|
|
36
|
+
{ type: 'function', name: 'MAX_PER_WALLET', stateMutability: 'view', inputs: [], outputs: [{ type: 'uint256' }] },
|
|
37
|
+
{ type: 'function', name: 'TARGET_GRAD_BNB', stateMutability: 'view', inputs: [], outputs: [{ type: 'uint256' }] },
|
|
38
|
+
{ type: 'function', name: 'logoURIOf', stateMutability: 'view', inputs: [{ type: 'address' }], outputs: [{ type: 'string' }] },
|
|
39
|
+
{ type: 'event', name: 'Created', inputs: [
|
|
40
|
+
{ name: 'token', type: 'address', indexed: true }, { name: 'creator', type: 'address', indexed: true },
|
|
41
|
+
{ name: 'name', type: 'string', indexed: false }, { name: 'symbol', type: 'string', indexed: false },
|
|
42
|
+
{ name: 'logoURI', type: 'string', indexed: false }, { name: 'taxed', type: 'bool', indexed: false },
|
|
43
|
+
{ name: 'quote', type: 'address', indexed: true }, { name: 'refPair', type: 'address', indexed: false }, { name: 'gradAmt', type: 'uint256', indexed: false },
|
|
44
|
+
] },
|
|
45
|
+
{ type: 'event', name: 'Buy', inputs: [
|
|
46
|
+
{ name: 'token', type: 'address', indexed: true }, { name: 'buyer', type: 'address', indexed: true },
|
|
47
|
+
{ name: 'quoteIn', type: 'uint256', indexed: false }, { name: 'taxDividend', type: 'uint256', indexed: false },
|
|
48
|
+
{ name: 'taxPlatform', type: 'uint256', indexed: false }, { name: 'tokensOut', type: 'uint256', indexed: false }, { name: 'realQuote', type: 'uint256', indexed: false },
|
|
49
|
+
] },
|
|
50
|
+
{ type: 'event', name: 'Sell', inputs: [
|
|
51
|
+
{ name: 'token', type: 'address', indexed: true }, { name: 'seller', type: 'address', indexed: true },
|
|
52
|
+
{ name: 'tokensIn', type: 'uint256', indexed: false }, { name: 'taxDividend', type: 'uint256', indexed: false },
|
|
53
|
+
{ name: 'taxPlatform', type: 'uint256', indexed: false }, { name: 'quoteOut', type: 'uint256', indexed: false }, { name: 'realQuote', type: 'uint256', indexed: false },
|
|
54
|
+
] },
|
|
55
|
+
{ type: 'event', name: 'Graduated', inputs: [
|
|
56
|
+
{ name: 'token', type: 'address', indexed: true }, { name: 'pair', type: 'address', indexed: true },
|
|
57
|
+
{ name: 'quote', type: 'address', indexed: false }, { name: 'tokenAmount', type: 'uint256', indexed: false }, { name: 'quoteAmount', type: 'uint256', indexed: false },
|
|
58
|
+
] },
|
|
59
|
+
]
|
|
60
|
+
|
|
23
61
|
export const ERC20_ABI = [
|
|
24
62
|
{ type: 'function', name: 'name', stateMutability: 'view', inputs: [], outputs: [{ type: 'string' }] },
|
|
25
63
|
{ type: 'function', name: 'symbol', stateMutability: 'view', inputs: [], outputs: [{ type: 'string' }] },
|
|
64
|
+
{ type: 'function', name: 'decimals', stateMutability: 'view', inputs: [], outputs: [{ type: 'uint8' }] },
|
|
26
65
|
{ type: 'function', name: 'balanceOf', stateMutability: 'view', inputs: [{ type: 'address' }], outputs: [{ type: 'uint256' }] },
|
|
27
66
|
{ type: 'function', name: 'allowance', stateMutability: 'view', inputs: [{ type: 'address' }, { type: 'address' }], outputs: [{ type: 'uint256' }] },
|
|
28
67
|
{ type: 'function', name: 'approve', stateMutability: 'nonpayable', inputs: [{ type: 'address' }, { type: 'uint256' }], outputs: [{ type: 'bool' }] },
|
|
29
68
|
{ type: 'function', name: 'locked', stateMutability: 'view', inputs: [], outputs: [{ type: 'bool' }] },
|
|
30
69
|
]
|
|
70
|
+
|
|
71
|
+
/** @deprecated alias kept for older imports */
|
|
72
|
+
export const LAUNCHPAD_ABI = V2_ABI
|