@flaunch/sdk 0.8.1 → 0.8.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 CHANGED
@@ -28,6 +28,7 @@ _Note: Add this `llms-full.txt` file into Cursor IDE / LLMs to provide context a
28
28
  - [Selling with Permit2](#selling-with-permit2)
29
29
  - [Flaunching a Memecoin](#flaunching-a-memecoin)
30
30
  - [How to generate Base64Image from file upload](#how-to-generate-base64image-from-user-uploaded-file)
31
+ - [Flaunch with Address Fee Splits](#flaunch-with-address-fee-splits)
31
32
  - [Advanced Integration: Revenue Sharing with RevenueManager](#advanced-integration-revenue-sharing-with-revenuemanager)
32
33
  - [All SDK functions](#all-sdk-functions)
33
34
  - [React Hooks](#react-hooks)
@@ -251,6 +252,41 @@ const handleImageChange = useCallback(
251
252
  />;
252
253
  ```
253
254
 
255
+ ### Flaunch with Address Fee Splits
256
+
257
+ You can flaunch a coin and share the revenue with the creator and an array of recipients, each with a different percentage share.\
258
+ Example below of a creator splitting 50% of their revenue with 2 addresses, with 30% and 70% share respectively:
259
+
260
+ ```ts
261
+ await flaunchWrite.flaunchIPFSWithSplitManager({
262
+ name: "...",
263
+ symbol: "...",
264
+ metadata: {
265
+ base64Image: "...",
266
+ },
267
+ pinataConfig: {
268
+ jwt: "...",
269
+ },
270
+ fairLaunchPercent: 40,
271
+ fairLaunchDuration: 30 * 60, // 30 mins
272
+ initialMarketCapUSD: 1_000,
273
+ creator: "0x...",
274
+ creatorFeeAllocationPercent: 100,
275
+ // **Note:** Split related params
276
+ creatorSplitPercent: 50,
277
+ splitReceivers: [
278
+ {
279
+ address: "0x123...",
280
+ percent: 30,
281
+ },
282
+ {
283
+ address: "0xabc...",
284
+ percent: 70,
285
+ },
286
+ ],
287
+ });
288
+ ```
289
+
254
290
  ### Advanced Integration: Revenue Sharing with RevenueManager
255
291
 
256
292
  For platforms building on top of Flaunch, the `RevenueManager` contract enables sophisticated revenue-sharing models. It allows platforms to automatically take a protocol fee from the trading fees generated by memecoins launched through their integration.
@@ -0,0 +1,288 @@
1
+ export declare const TokenImporterAbi: readonly [{
2
+ readonly type: "constructor";
3
+ readonly inputs: readonly [{
4
+ readonly name: "_anyPositionManager";
5
+ readonly type: "address";
6
+ readonly internalType: "address payable";
7
+ }];
8
+ readonly stateMutability: "nonpayable";
9
+ }, {
10
+ readonly type: "function";
11
+ readonly name: "addVerifier";
12
+ readonly inputs: readonly [{
13
+ readonly name: "_verifier";
14
+ readonly type: "address";
15
+ readonly internalType: "address";
16
+ }];
17
+ readonly outputs: readonly [];
18
+ readonly stateMutability: "nonpayable";
19
+ }, {
20
+ readonly type: "function";
21
+ readonly name: "anyPositionManager";
22
+ readonly inputs: readonly [];
23
+ readonly outputs: readonly [{
24
+ readonly name: "";
25
+ readonly type: "address";
26
+ readonly internalType: "contract AnyPositionManager";
27
+ }];
28
+ readonly stateMutability: "view";
29
+ }, {
30
+ readonly type: "function";
31
+ readonly name: "cancelOwnershipHandover";
32
+ readonly inputs: readonly [];
33
+ readonly outputs: readonly [];
34
+ readonly stateMutability: "payable";
35
+ }, {
36
+ readonly type: "function";
37
+ readonly name: "completeOwnershipHandover";
38
+ readonly inputs: readonly [{
39
+ readonly name: "pendingOwner";
40
+ readonly type: "address";
41
+ readonly internalType: "address";
42
+ }];
43
+ readonly outputs: readonly [];
44
+ readonly stateMutability: "payable";
45
+ }, {
46
+ readonly type: "function";
47
+ readonly name: "getAllVerifiers";
48
+ readonly inputs: readonly [];
49
+ readonly outputs: readonly [{
50
+ readonly name: "verifiers_";
51
+ readonly type: "address[]";
52
+ readonly internalType: "address[]";
53
+ }];
54
+ readonly stateMutability: "view";
55
+ }, {
56
+ readonly type: "function";
57
+ readonly name: "initialize";
58
+ readonly inputs: readonly [{
59
+ readonly name: "_memecoin";
60
+ readonly type: "address";
61
+ readonly internalType: "address";
62
+ }, {
63
+ readonly name: "_creatorFeeAllocation";
64
+ readonly type: "uint24";
65
+ readonly internalType: "uint24";
66
+ }, {
67
+ readonly name: "_initialMarketCap";
68
+ readonly type: "uint256";
69
+ readonly internalType: "uint256";
70
+ }, {
71
+ readonly name: "_verifier";
72
+ readonly type: "address";
73
+ readonly internalType: "address";
74
+ }];
75
+ readonly outputs: readonly [];
76
+ readonly stateMutability: "nonpayable";
77
+ }, {
78
+ readonly type: "function";
79
+ readonly name: "initialize";
80
+ readonly inputs: readonly [{
81
+ readonly name: "_memecoin";
82
+ readonly type: "address";
83
+ readonly internalType: "address";
84
+ }, {
85
+ readonly name: "_creatorFeeAllocation";
86
+ readonly type: "uint24";
87
+ readonly internalType: "uint24";
88
+ }, {
89
+ readonly name: "_initialMarketCap";
90
+ readonly type: "uint256";
91
+ readonly internalType: "uint256";
92
+ }];
93
+ readonly outputs: readonly [];
94
+ readonly stateMutability: "nonpayable";
95
+ }, {
96
+ readonly type: "function";
97
+ readonly name: "owner";
98
+ readonly inputs: readonly [];
99
+ readonly outputs: readonly [{
100
+ readonly name: "result";
101
+ readonly type: "address";
102
+ readonly internalType: "address";
103
+ }];
104
+ readonly stateMutability: "view";
105
+ }, {
106
+ readonly type: "function";
107
+ readonly name: "ownershipHandoverExpiresAt";
108
+ readonly inputs: readonly [{
109
+ readonly name: "pendingOwner";
110
+ readonly type: "address";
111
+ readonly internalType: "address";
112
+ }];
113
+ readonly outputs: readonly [{
114
+ readonly name: "result";
115
+ readonly type: "uint256";
116
+ readonly internalType: "uint256";
117
+ }];
118
+ readonly stateMutability: "view";
119
+ }, {
120
+ readonly type: "function";
121
+ readonly name: "removeVerifier";
122
+ readonly inputs: readonly [{
123
+ readonly name: "_verifier";
124
+ readonly type: "address";
125
+ readonly internalType: "address";
126
+ }];
127
+ readonly outputs: readonly [];
128
+ readonly stateMutability: "nonpayable";
129
+ }, {
130
+ readonly type: "function";
131
+ readonly name: "renounceOwnership";
132
+ readonly inputs: readonly [];
133
+ readonly outputs: readonly [];
134
+ readonly stateMutability: "payable";
135
+ }, {
136
+ readonly type: "function";
137
+ readonly name: "requestOwnershipHandover";
138
+ readonly inputs: readonly [];
139
+ readonly outputs: readonly [];
140
+ readonly stateMutability: "payable";
141
+ }, {
142
+ readonly type: "function";
143
+ readonly name: "setAnyPositionManager";
144
+ readonly inputs: readonly [{
145
+ readonly name: "_anyPositionManager";
146
+ readonly type: "address";
147
+ readonly internalType: "address payable";
148
+ }];
149
+ readonly outputs: readonly [];
150
+ readonly stateMutability: "nonpayable";
151
+ }, {
152
+ readonly type: "function";
153
+ readonly name: "transferOwnership";
154
+ readonly inputs: readonly [{
155
+ readonly name: "newOwner";
156
+ readonly type: "address";
157
+ readonly internalType: "address";
158
+ }];
159
+ readonly outputs: readonly [];
160
+ readonly stateMutability: "payable";
161
+ }, {
162
+ readonly type: "function";
163
+ readonly name: "verifyMemecoin";
164
+ readonly inputs: readonly [{
165
+ readonly name: "_memecoin";
166
+ readonly type: "address";
167
+ readonly internalType: "address";
168
+ }];
169
+ readonly outputs: readonly [{
170
+ readonly name: "verifier_";
171
+ readonly type: "address";
172
+ readonly internalType: "address";
173
+ }];
174
+ readonly stateMutability: "view";
175
+ }, {
176
+ readonly type: "event";
177
+ readonly name: "AnyPositionManagerSet";
178
+ readonly inputs: readonly [{
179
+ readonly name: "_anyPositionManager";
180
+ readonly type: "address";
181
+ readonly indexed: true;
182
+ readonly internalType: "address";
183
+ }];
184
+ readonly anonymous: false;
185
+ }, {
186
+ readonly type: "event";
187
+ readonly name: "OwnershipHandoverCanceled";
188
+ readonly inputs: readonly [{
189
+ readonly name: "pendingOwner";
190
+ readonly type: "address";
191
+ readonly indexed: true;
192
+ readonly internalType: "address";
193
+ }];
194
+ readonly anonymous: false;
195
+ }, {
196
+ readonly type: "event";
197
+ readonly name: "OwnershipHandoverRequested";
198
+ readonly inputs: readonly [{
199
+ readonly name: "pendingOwner";
200
+ readonly type: "address";
201
+ readonly indexed: true;
202
+ readonly internalType: "address";
203
+ }];
204
+ readonly anonymous: false;
205
+ }, {
206
+ readonly type: "event";
207
+ readonly name: "OwnershipTransferred";
208
+ readonly inputs: readonly [{
209
+ readonly name: "oldOwner";
210
+ readonly type: "address";
211
+ readonly indexed: true;
212
+ readonly internalType: "address";
213
+ }, {
214
+ readonly name: "newOwner";
215
+ readonly type: "address";
216
+ readonly indexed: true;
217
+ readonly internalType: "address";
218
+ }];
219
+ readonly anonymous: false;
220
+ }, {
221
+ readonly type: "event";
222
+ readonly name: "TokenImported";
223
+ readonly inputs: readonly [{
224
+ readonly name: "_memecoin";
225
+ readonly type: "address";
226
+ readonly indexed: true;
227
+ readonly internalType: "address";
228
+ }, {
229
+ readonly name: "_verifier";
230
+ readonly type: "address";
231
+ readonly indexed: true;
232
+ readonly internalType: "address";
233
+ }];
234
+ readonly anonymous: false;
235
+ }, {
236
+ readonly type: "event";
237
+ readonly name: "VerifierAdded";
238
+ readonly inputs: readonly [{
239
+ readonly name: "_verifier";
240
+ readonly type: "address";
241
+ readonly indexed: true;
242
+ readonly internalType: "address";
243
+ }];
244
+ readonly anonymous: false;
245
+ }, {
246
+ readonly type: "event";
247
+ readonly name: "VerifierRemoved";
248
+ readonly inputs: readonly [{
249
+ readonly name: "_verifier";
250
+ readonly type: "address";
251
+ readonly indexed: true;
252
+ readonly internalType: "address";
253
+ }];
254
+ readonly anonymous: false;
255
+ }, {
256
+ readonly type: "error";
257
+ readonly name: "AlreadyInitialized";
258
+ readonly inputs: readonly [];
259
+ }, {
260
+ readonly type: "error";
261
+ readonly name: "InvalidMemecoin";
262
+ readonly inputs: readonly [];
263
+ }, {
264
+ readonly type: "error";
265
+ readonly name: "NewOwnerIsZeroAddress";
266
+ readonly inputs: readonly [];
267
+ }, {
268
+ readonly type: "error";
269
+ readonly name: "NoHandoverRequest";
270
+ readonly inputs: readonly [];
271
+ }, {
272
+ readonly type: "error";
273
+ readonly name: "Unauthorized";
274
+ readonly inputs: readonly [];
275
+ }, {
276
+ readonly type: "error";
277
+ readonly name: "VerifierAlreadyAdded";
278
+ readonly inputs: readonly [];
279
+ }, {
280
+ readonly type: "error";
281
+ readonly name: "VerifierNotAdded";
282
+ readonly inputs: readonly [];
283
+ }, {
284
+ readonly type: "error";
285
+ readonly name: "ZeroAddress";
286
+ readonly inputs: readonly [];
287
+ }];
288
+ //# sourceMappingURL=TokenImporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TokenImporter.d.ts","sourceRoot":"","sources":["../../src/abi/TokenImporter.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmRnB,CAAC"}
@@ -5317,10 +5317,35 @@ const FlaunchPositionManagerV1_1Address = {
5317
5317
  [baseSepolia.id]: "0x24347e0dd16357059abfc1b321df354873552fdc",
5318
5318
  };
5319
5319
  const AnyPositionManagerAddress = {
5320
- // TODO: update with actual address
5321
- [base.id]: viem.zeroAddress,
5320
+ [base.id]: "0x8DC3b85e1dc1C846ebf3971179a751896842e5dC",
5322
5321
  [baseSepolia.id]: "0xB4A535B9D35851972736495CC52FBfDaCF32e5dc",
5323
5322
  };
5323
+ /** Verifiers */
5324
+ const TokenImporterAddress = {
5325
+ [base.id]: "0xb47af90ae61bc916ea4b4bacffae4570e7435842",
5326
+ [baseSepolia.id]: "0xb4955a396ef07c124a59164c30d63e96a103a98b",
5327
+ };
5328
+ const ClankerWorldVerifierAddress = {
5329
+ [base.id]: "0xf6ddfcb093be0cd0c015590cb6c5127d9ff2a20b",
5330
+ [baseSepolia.id]: "0x2874f9a30348acaaad55d74b0bec9c18f04b471a",
5331
+ };
5332
+ const DopplerVerifierAddress = {
5333
+ [base.id]: "0xedd66b080b8e9425c39d349a3fb69f480580f993",
5334
+ [baseSepolia.id]: "0x6428b5C4da36ecB070aBdcB5E1939244A3cC7fb5",
5335
+ };
5336
+ const VirtualsVerifierAddress = {
5337
+ [base.id]: "0x06a089fa231aca48d2aa77365123ad9aca43d3a4",
5338
+ [baseSepolia.id]: "0x6582d2bc6a7eba3b40bdf46b3868fc7ec2ff96ec",
5339
+ };
5340
+ const WhitelistVerifierAddress = {
5341
+ [base.id]: "0x7a04367563a65db574d6b7d084fdbcf4a570c5a6",
5342
+ [baseSepolia.id]: "0xfde5b79e3e2814edd5f91e8694ae400954d9cfaa",
5343
+ };
5344
+ const ZoraVerifierAddress = {
5345
+ [base.id]: "0x656047fd43d2c3a121f2ef859d7171d7dd59f8b9",
5346
+ [baseSepolia.id]: "0x05a5763e9199b88bb591c6b112d0424b2cd7a99e",
5347
+ };
5348
+ /** ======== */
5324
5349
  const FeeEscrowAddress = {
5325
5350
  [base.id]: "0x72e6f7948b1B1A343B477F39aAbd2E35E6D27dde",
5326
5351
  [baseSepolia.id]: "0x73E27908b7d35A9251a54799A8ef4C17e4ED9FF9",
@@ -5356,8 +5381,7 @@ const FlaunchV1_1Address = {
5356
5381
  [baseSepolia.id]: "0x96be8ff5e244294a34bfa507a39190dc7a839baa",
5357
5382
  };
5358
5383
  const AnyFlaunchAddress = {
5359
- // FIXME: update with actual address
5360
- [base.id]: viem.zeroAddress,
5384
+ [base.id]: "0xc5B2E8F197407263F4B62a35C71bFc394ecF95D5",
5361
5385
  [baseSepolia.id]: "0x67Ee6C83956a75f67bD3Fc8Ca4080D95a145c7C9",
5362
5386
  };
5363
5387
  const BidWallAddress = {
@@ -5370,8 +5394,7 @@ const BidWallV1_1Address = {
5370
5394
  [baseSepolia.id]: "0x6f2fa01a05ff8b6efbfefd91a3b85aaf19265a00",
5371
5395
  };
5372
5396
  const AnyBidWallAddress = {
5373
- // FIXME: update with actual address
5374
- [base.id]: viem.zeroAddress,
5397
+ [base.id]: "0x2154c604df568A5285284D1c4918DC98C39240df",
5375
5398
  [baseSepolia.id]: "0xcfF222eA42E43F46A98755db237E4c9C2CA9B772",
5376
5399
  };
5377
5400
  const FastFlaunchZapAddress = {
@@ -5437,6 +5460,8 @@ exports.AnyFlaunchAddress = AnyFlaunchAddress;
5437
5460
  exports.AnyPositionManagerAddress = AnyPositionManagerAddress;
5438
5461
  exports.BidWallAddress = BidWallAddress;
5439
5462
  exports.BidWallV1_1Address = BidWallV1_1Address;
5463
+ exports.ClankerWorldVerifierAddress = ClankerWorldVerifierAddress;
5464
+ exports.DopplerVerifierAddress = DopplerVerifierAddress;
5440
5465
  exports.FLETHAddress = FLETHAddress;
5441
5466
  exports.FLETHHooksAddress = FLETHHooksAddress;
5442
5467
  exports.FairLaunchAddress = FairLaunchAddress;
@@ -5454,7 +5479,11 @@ exports.QuoterAddress = QuoterAddress;
5454
5479
  exports.ReferralEscrowAddress = ReferralEscrowAddress;
5455
5480
  exports.RevenueManagerAddress = RevenueManagerAddress;
5456
5481
  exports.StateViewAddress = StateViewAddress;
5482
+ exports.TokenImporterAddress = TokenImporterAddress;
5457
5483
  exports.TreasuryManagerFactoryAddress = TreasuryManagerFactoryAddress;
5458
5484
  exports.USDCETHPoolKeys = USDCETHPoolKeys;
5459
5485
  exports.UniversalRouterAddress = UniversalRouterAddress;
5486
+ exports.VirtualsVerifierAddress = VirtualsVerifierAddress;
5487
+ exports.WhitelistVerifierAddress = WhitelistVerifierAddress;
5488
+ exports.ZoraVerifierAddress = ZoraVerifierAddress;
5460
5489
  //# sourceMappingURL=index.cjs.map