moltlaunch 0.1.0 → 0.1.2
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 +44 -65
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -41,11 +41,11 @@ Returns:
|
|
|
41
41
|
| `moltlaunch wallet` | Show wallet address and balance |
|
|
42
42
|
| `moltlaunch wallet --show-key` | Show wallet with private key |
|
|
43
43
|
| `moltlaunch status` | List all launched tokens |
|
|
44
|
-
| `moltlaunch claim` | Claim accumulated fees |
|
|
44
|
+
| `moltlaunch claim` | Claim accumulated trading fees |
|
|
45
45
|
|
|
46
46
|
All commands support `--json` for structured output.
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## How It Works
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
npx moltlaunch --name "X" --symbol "X" --image ./logo.png
|
|
@@ -58,7 +58,6 @@ npx moltlaunch --name "X" --symbol "X" --image ./logo.png
|
|
|
58
58
|
│
|
|
59
59
|
├─ 3. Submit gasless launch
|
|
60
60
|
│ POST web2-api.flaunch.gg/api/v1/base/launch-memecoin
|
|
61
|
-
│ body: { name, symbol, description, imageIpfs, creatorAddress, revenueManagerAddress }
|
|
62
61
|
│ → returns jobId
|
|
63
62
|
│
|
|
64
63
|
├─ 4. Poll for deployment (2s intervals, 120s timeout)
|
|
@@ -71,73 +70,50 @@ npx moltlaunch --name "X" --symbol "X" --image ./logo.png
|
|
|
71
70
|
└─ 6. Output result (human-readable or --json)
|
|
72
71
|
```
|
|
73
72
|
|
|
74
|
-
## Fee
|
|
73
|
+
## Fee Model
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
Tokens launched through moltlaunch are immediately tradeable on Flaunch. Every trade generates fees distributed through Flaunch's [waterfall model](https://docs.flaunch.gg/general/for-builders/developer-resources/hooks/fee-distributor) — each tier takes a percentage of what remains before passing it down.
|
|
77
76
|
|
|
78
77
|
```
|
|
79
78
|
Trade executes on Uniswap V4 (Base)
|
|
80
79
|
│
|
|
81
|
-
├─ Swap Fee (1% base, up to 50% during high volume)
|
|
80
|
+
├─ Swap Fee (1% base, dynamic up to 50% during high volume)
|
|
82
81
|
│ │
|
|
83
|
-
│ ├─ Referrer Fee (5%
|
|
84
|
-
│ │ └─
|
|
82
|
+
│ ├─ Referrer Fee (5%)
|
|
83
|
+
│ │ └─ Paid to referrer if one was set on the trade
|
|
85
84
|
│ │
|
|
86
|
-
│ ├─ Protocol Fee (10%
|
|
87
|
-
│ │ └─
|
|
85
|
+
│ ├─ Protocol Fee (10%)
|
|
86
|
+
│ │ └─ Paid to the moltlaunch revenue manager
|
|
88
87
|
│ │
|
|
89
|
-
│ ├─ Creator Fee (80%
|
|
90
|
-
│ │ └─
|
|
88
|
+
│ ├─ Creator Fee (80%)
|
|
89
|
+
│ │ └─ Paid to the token creator (your wallet)
|
|
91
90
|
│ │
|
|
92
91
|
│ └─ BidWall (100% of remainder)
|
|
93
|
-
│ └─ Automated buybacks
|
|
92
|
+
│ └─ Automated buybacks supporting token liquidity
|
|
94
93
|
```
|
|
95
94
|
|
|
96
|
-
###
|
|
95
|
+
### Example: 1 ETH trade, no referrer, 1% swap fee
|
|
97
96
|
|
|
98
|
-
| Tier | Rate | Amount |
|
|
99
|
-
|
|
100
|
-
| Swap fee | 1% of trade | 0.01 ETH |
|
|
101
|
-
| Referrer | 5% of
|
|
102
|
-
|
|
|
103
|
-
| Creator | 80% of
|
|
104
|
-
| BidWall |
|
|
97
|
+
| Tier | Rate | Amount |
|
|
98
|
+
|------|------|--------|
|
|
99
|
+
| Swap fee | 1% of trade | 0.01 ETH |
|
|
100
|
+
| Referrer | 5% of fee | 0 (no referrer) |
|
|
101
|
+
| Protocol | 10% of remainder | 0.001 ETH |
|
|
102
|
+
| **Creator (you)** | **80% of remainder** | **0.0072 ETH** |
|
|
103
|
+
| BidWall | Rest | 0.0018 ETH |
|
|
105
104
|
|
|
106
|
-
The swap fee is dynamic
|
|
105
|
+
The swap fee is dynamic — 1% baseline, scaling with volume up to 50%, decaying over a 1-hour window. Tokens trade heaviest at launch, which is when creator fees are highest.
|
|
107
106
|
|
|
108
107
|
### Claiming fees
|
|
109
108
|
|
|
110
|
-
Fees accumulate in escrow on the Flaunch
|
|
109
|
+
Fees accumulate in escrow on the Flaunch PositionManager. Withdraw anytime:
|
|
111
110
|
|
|
111
|
+
```bash
|
|
112
|
+
moltlaunch claim # withdraw to your wallet
|
|
113
|
+
moltlaunch claim --json # structured output
|
|
112
114
|
```
|
|
113
|
-
moltlaunch claim
|
|
114
|
-
│
|
|
115
|
-
├─ Check balance: PositionManager.balances(walletAddress)
|
|
116
|
-
│
|
|
117
|
-
├─ If > 0: PositionManager.withdrawFees(walletAddress, true)
|
|
118
|
-
│ └─ unwrap=true converts flETH → native ETH
|
|
119
|
-
│
|
|
120
|
-
└─ Requires ETH for gas (claim is an on-chain transaction)
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Key Contracts (Base Mainnet)
|
|
124
|
-
|
|
125
|
-
| Contract | Address | Role |
|
|
126
|
-
|----------|---------|------|
|
|
127
|
-
| Revenue Manager | `0x3Bc08524d9DaaDEC9d1Af87818d809611F0fD669` | Our RM — 10% protocol fee, recipient `0x160e...` |
|
|
128
|
-
| PositionManager | `0x51Bba15255406Cfe7099a42183302640ba7dAFDC` | Fee escrow — `balances()`, `withdrawFees()` |
|
|
129
|
-
| Flaunch | `0x6A53F8b799bE11a2A3264eF0bfF183dCB12d9571` | Token factory |
|
|
130
115
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
| Endpoint | Method | Purpose |
|
|
134
|
-
|----------|--------|---------|
|
|
135
|
-
| `/api/v1/upload-image` | POST | Upload image to IPFS |
|
|
136
|
-
| `/api/v1/{network}/launch-memecoin` | POST | Gasless token launch |
|
|
137
|
-
| `/api/v1/launch-status/{jobId}` | GET | Poll launch status |
|
|
138
|
-
| `/api/v1/{network}/create-revenue-manager` | POST | Create new RM (one-time) |
|
|
139
|
-
|
|
140
|
-
Base URL: `https://web2-api.flaunch.gg`
|
|
116
|
+
Requires ETH in your wallet for gas (claiming is an on-chain transaction).
|
|
141
117
|
|
|
142
118
|
## Exit Codes
|
|
143
119
|
|
|
@@ -153,6 +129,7 @@ Base URL: `https://web2-api.flaunch.gg`
|
|
|
153
129
|
|
|
154
130
|
## Agent Integration
|
|
155
131
|
|
|
132
|
+
### Python
|
|
156
133
|
```python
|
|
157
134
|
import subprocess, json
|
|
158
135
|
|
|
@@ -168,23 +145,21 @@ if result.returncode == 0:
|
|
|
168
145
|
flaunch_url = data["flaunch"]
|
|
169
146
|
```
|
|
170
147
|
|
|
171
|
-
|
|
148
|
+
### Node.js
|
|
149
|
+
```javascript
|
|
150
|
+
import { execSync } from "child_process";
|
|
172
151
|
|
|
152
|
+
const raw = execSync(
|
|
153
|
+
'npx moltlaunch --name "AgentCoin" --symbol "AGT" --description "Launched by AI" --image ./logo.png --json',
|
|
154
|
+
{ encoding: "utf-8" }
|
|
155
|
+
);
|
|
156
|
+
const { tokenAddress, flaunch } = JSON.parse(raw);
|
|
173
157
|
```
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
│ ├── claim.ts # Withdraw fees from PositionManager escrow
|
|
180
|
-
│ ├── status.ts # List launched tokens from local history
|
|
181
|
-
│ └── wallet.ts # Show wallet address, balance, private key
|
|
182
|
-
└── lib/
|
|
183
|
-
├── config.ts # Constants: RM address, PM address, API base, chains
|
|
184
|
-
├── flaunch-api.ts # Flaunch Web2 API client (upload, launch, poll)
|
|
185
|
-
├── wallet.ts # Generate/load/save wallet and launch records
|
|
186
|
-
├── output.ts # JSON vs human-readable formatting
|
|
187
|
-
└── errors.ts # Typed errors with exit codes
|
|
158
|
+
|
|
159
|
+
### Shell
|
|
160
|
+
```bash
|
|
161
|
+
OUTPUT=$(npx moltlaunch --name "AgentCoin" --symbol "AGT" --description "test" --image ./logo.png --json)
|
|
162
|
+
[ $? -eq 0 ] && echo "$OUTPUT" | jq -r '.tokenAddress'
|
|
188
163
|
```
|
|
189
164
|
|
|
190
165
|
## Development
|
|
@@ -194,3 +169,7 @@ npm install
|
|
|
194
169
|
npm run build
|
|
195
170
|
npx . # test locally
|
|
196
171
|
```
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "moltlaunch",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI for AI agents to launch tokens on Base via Flaunch",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"moltlaunch": "./dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
|
-
"dist"
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"build": "tsup",
|