@flaunch/sdk 0.4.1 → 0.5.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/dist/abi/InitialPrice.d.ts +336 -0
- package/dist/abi/InitialPrice.d.ts.map +1 -0
- package/dist/clients/FlaunchPositionManagerClient.d.ts +7 -4
- package/dist/clients/FlaunchPositionManagerClient.d.ts.map +1 -1
- package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts +17 -4
- package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts.map +1 -1
- package/dist/clients/FlaunchZapClient.d.ts +50 -20
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/InitialPriceClient.d.ts +19 -0
- package/dist/clients/InitialPriceClient.d.ts.map +1 -0
- package/dist/clients/Permit2Client.d.ts +1 -1
- package/dist/helpers/index.cjs +14 -1
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.js +14 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/ipfs.d.ts.map +1 -1
- package/dist/index.cjs.js +7923 -7412
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7924 -7413
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/sdk/FlaunchSDK.d.ts +49 -3
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/utils/universalRouter.d.ts +3 -0
- package/dist/utils/universalRouter.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
export declare const InitialPriceAbi: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "address";
|
|
4
|
+
readonly name: "_protocolOwner";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
|
+
readonly internalType: "address";
|
|
8
|
+
readonly name: "_poolManager";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}, {
|
|
11
|
+
readonly internalType: "address";
|
|
12
|
+
readonly name: "_ethToken";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}, {
|
|
15
|
+
readonly internalType: "address";
|
|
16
|
+
readonly name: "_usdcToken";
|
|
17
|
+
readonly type: "address";
|
|
18
|
+
}, {
|
|
19
|
+
readonly internalType: "address";
|
|
20
|
+
readonly name: "_flaunchFeeExemption";
|
|
21
|
+
readonly type: "address";
|
|
22
|
+
}];
|
|
23
|
+
readonly stateMutability: "nonpayable";
|
|
24
|
+
readonly type: "constructor";
|
|
25
|
+
}, {
|
|
26
|
+
readonly inputs: readonly [];
|
|
27
|
+
readonly name: "AlreadyInitialized";
|
|
28
|
+
readonly type: "error";
|
|
29
|
+
}, {
|
|
30
|
+
readonly inputs: readonly [{
|
|
31
|
+
readonly internalType: "uint256";
|
|
32
|
+
readonly name: "_usdcMarketCap";
|
|
33
|
+
readonly type: "uint256";
|
|
34
|
+
}, {
|
|
35
|
+
readonly internalType: "uint256";
|
|
36
|
+
readonly name: "_usdcMarketCapMinimum";
|
|
37
|
+
readonly type: "uint256";
|
|
38
|
+
}];
|
|
39
|
+
readonly name: "MarketCapTooSmall";
|
|
40
|
+
readonly type: "error";
|
|
41
|
+
}, {
|
|
42
|
+
readonly inputs: readonly [];
|
|
43
|
+
readonly name: "NewOwnerIsZeroAddress";
|
|
44
|
+
readonly type: "error";
|
|
45
|
+
}, {
|
|
46
|
+
readonly inputs: readonly [];
|
|
47
|
+
readonly name: "NoHandoverRequest";
|
|
48
|
+
readonly type: "error";
|
|
49
|
+
}, {
|
|
50
|
+
readonly inputs: readonly [];
|
|
51
|
+
readonly name: "Unauthorized";
|
|
52
|
+
readonly type: "error";
|
|
53
|
+
}, {
|
|
54
|
+
readonly anonymous: false;
|
|
55
|
+
readonly inputs: readonly [{
|
|
56
|
+
readonly indexed: false;
|
|
57
|
+
readonly internalType: "uint256";
|
|
58
|
+
readonly name: "_flaunchFeeThreshold";
|
|
59
|
+
readonly type: "uint256";
|
|
60
|
+
}];
|
|
61
|
+
readonly name: "FlaunchFeeThresholdUpdated";
|
|
62
|
+
readonly type: "event";
|
|
63
|
+
}, {
|
|
64
|
+
readonly anonymous: false;
|
|
65
|
+
readonly inputs: readonly [{
|
|
66
|
+
readonly indexed: true;
|
|
67
|
+
readonly internalType: "address";
|
|
68
|
+
readonly name: "pendingOwner";
|
|
69
|
+
readonly type: "address";
|
|
70
|
+
}];
|
|
71
|
+
readonly name: "OwnershipHandoverCanceled";
|
|
72
|
+
readonly type: "event";
|
|
73
|
+
}, {
|
|
74
|
+
readonly anonymous: false;
|
|
75
|
+
readonly inputs: readonly [{
|
|
76
|
+
readonly indexed: true;
|
|
77
|
+
readonly internalType: "address";
|
|
78
|
+
readonly name: "pendingOwner";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
}];
|
|
81
|
+
readonly name: "OwnershipHandoverRequested";
|
|
82
|
+
readonly type: "event";
|
|
83
|
+
}, {
|
|
84
|
+
readonly anonymous: false;
|
|
85
|
+
readonly inputs: readonly [{
|
|
86
|
+
readonly indexed: true;
|
|
87
|
+
readonly internalType: "address";
|
|
88
|
+
readonly name: "oldOwner";
|
|
89
|
+
readonly type: "address";
|
|
90
|
+
}, {
|
|
91
|
+
readonly indexed: true;
|
|
92
|
+
readonly internalType: "address";
|
|
93
|
+
readonly name: "newOwner";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}];
|
|
96
|
+
readonly name: "OwnershipTransferred";
|
|
97
|
+
readonly type: "event";
|
|
98
|
+
}, {
|
|
99
|
+
readonly inputs: readonly [];
|
|
100
|
+
readonly name: "MINIMUM_USDC_MARKET_CAP";
|
|
101
|
+
readonly outputs: readonly [{
|
|
102
|
+
readonly internalType: "uint256";
|
|
103
|
+
readonly name: "";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
}];
|
|
106
|
+
readonly stateMutability: "view";
|
|
107
|
+
readonly type: "function";
|
|
108
|
+
}, {
|
|
109
|
+
readonly inputs: readonly [];
|
|
110
|
+
readonly name: "cancelOwnershipHandover";
|
|
111
|
+
readonly outputs: readonly [];
|
|
112
|
+
readonly stateMutability: "payable";
|
|
113
|
+
readonly type: "function";
|
|
114
|
+
}, {
|
|
115
|
+
readonly inputs: readonly [{
|
|
116
|
+
readonly internalType: "address";
|
|
117
|
+
readonly name: "pendingOwner";
|
|
118
|
+
readonly type: "address";
|
|
119
|
+
}];
|
|
120
|
+
readonly name: "completeOwnershipHandover";
|
|
121
|
+
readonly outputs: readonly [];
|
|
122
|
+
readonly stateMutability: "payable";
|
|
123
|
+
readonly type: "function";
|
|
124
|
+
}, {
|
|
125
|
+
readonly inputs: readonly [];
|
|
126
|
+
readonly name: "ethToken";
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly internalType: "Currency";
|
|
129
|
+
readonly name: "";
|
|
130
|
+
readonly type: "address";
|
|
131
|
+
}];
|
|
132
|
+
readonly stateMutability: "view";
|
|
133
|
+
readonly type: "function";
|
|
134
|
+
}, {
|
|
135
|
+
readonly inputs: readonly [];
|
|
136
|
+
readonly name: "flaunchFeeExemption";
|
|
137
|
+
readonly outputs: readonly [{
|
|
138
|
+
readonly internalType: "contract FlaunchFeeExemption";
|
|
139
|
+
readonly name: "";
|
|
140
|
+
readonly type: "address";
|
|
141
|
+
}];
|
|
142
|
+
readonly stateMutability: "view";
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
}, {
|
|
145
|
+
readonly inputs: readonly [];
|
|
146
|
+
readonly name: "flaunchFeeThreshold";
|
|
147
|
+
readonly outputs: readonly [{
|
|
148
|
+
readonly internalType: "uint256";
|
|
149
|
+
readonly name: "";
|
|
150
|
+
readonly type: "uint256";
|
|
151
|
+
}];
|
|
152
|
+
readonly stateMutability: "view";
|
|
153
|
+
readonly type: "function";
|
|
154
|
+
}, {
|
|
155
|
+
readonly inputs: readonly [{
|
|
156
|
+
readonly internalType: "address";
|
|
157
|
+
readonly name: "_sender";
|
|
158
|
+
readonly type: "address";
|
|
159
|
+
}, {
|
|
160
|
+
readonly internalType: "bytes";
|
|
161
|
+
readonly name: "_initialPriceParams";
|
|
162
|
+
readonly type: "bytes";
|
|
163
|
+
}];
|
|
164
|
+
readonly name: "getFlaunchingFee";
|
|
165
|
+
readonly outputs: readonly [{
|
|
166
|
+
readonly internalType: "uint256";
|
|
167
|
+
readonly name: "";
|
|
168
|
+
readonly type: "uint256";
|
|
169
|
+
}];
|
|
170
|
+
readonly stateMutability: "view";
|
|
171
|
+
readonly type: "function";
|
|
172
|
+
}, {
|
|
173
|
+
readonly inputs: readonly [{
|
|
174
|
+
readonly internalType: "bytes";
|
|
175
|
+
readonly name: "_initialPriceParams";
|
|
176
|
+
readonly type: "bytes";
|
|
177
|
+
}];
|
|
178
|
+
readonly name: "getMarketCap";
|
|
179
|
+
readonly outputs: readonly [{
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}];
|
|
184
|
+
readonly stateMutability: "view";
|
|
185
|
+
readonly type: "function";
|
|
186
|
+
}, {
|
|
187
|
+
readonly inputs: readonly [{
|
|
188
|
+
readonly internalType: "address";
|
|
189
|
+
readonly name: "";
|
|
190
|
+
readonly type: "address";
|
|
191
|
+
}, {
|
|
192
|
+
readonly internalType: "bool";
|
|
193
|
+
readonly name: "_flipped";
|
|
194
|
+
readonly type: "bool";
|
|
195
|
+
}, {
|
|
196
|
+
readonly internalType: "bytes";
|
|
197
|
+
readonly name: "_initialPriceParams";
|
|
198
|
+
readonly type: "bytes";
|
|
199
|
+
}];
|
|
200
|
+
readonly name: "getSqrtPriceX96";
|
|
201
|
+
readonly outputs: readonly [{
|
|
202
|
+
readonly internalType: "uint160";
|
|
203
|
+
readonly name: "sqrtPriceX96_";
|
|
204
|
+
readonly type: "uint160";
|
|
205
|
+
}];
|
|
206
|
+
readonly stateMutability: "view";
|
|
207
|
+
readonly type: "function";
|
|
208
|
+
}, {
|
|
209
|
+
readonly inputs: readonly [];
|
|
210
|
+
readonly name: "owner";
|
|
211
|
+
readonly outputs: readonly [{
|
|
212
|
+
readonly internalType: "address";
|
|
213
|
+
readonly name: "result";
|
|
214
|
+
readonly type: "address";
|
|
215
|
+
}];
|
|
216
|
+
readonly stateMutability: "view";
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
}, {
|
|
219
|
+
readonly inputs: readonly [{
|
|
220
|
+
readonly internalType: "address";
|
|
221
|
+
readonly name: "pendingOwner";
|
|
222
|
+
readonly type: "address";
|
|
223
|
+
}];
|
|
224
|
+
readonly name: "ownershipHandoverExpiresAt";
|
|
225
|
+
readonly outputs: readonly [{
|
|
226
|
+
readonly internalType: "uint256";
|
|
227
|
+
readonly name: "result";
|
|
228
|
+
readonly type: "uint256";
|
|
229
|
+
}];
|
|
230
|
+
readonly stateMutability: "view";
|
|
231
|
+
readonly type: "function";
|
|
232
|
+
}, {
|
|
233
|
+
readonly inputs: readonly [];
|
|
234
|
+
readonly name: "poolId";
|
|
235
|
+
readonly outputs: readonly [{
|
|
236
|
+
readonly internalType: "PoolId";
|
|
237
|
+
readonly name: "";
|
|
238
|
+
readonly type: "bytes32";
|
|
239
|
+
}];
|
|
240
|
+
readonly stateMutability: "view";
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
}, {
|
|
243
|
+
readonly inputs: readonly [];
|
|
244
|
+
readonly name: "poolManager";
|
|
245
|
+
readonly outputs: readonly [{
|
|
246
|
+
readonly internalType: "contract IPoolManager";
|
|
247
|
+
readonly name: "";
|
|
248
|
+
readonly type: "address";
|
|
249
|
+
}];
|
|
250
|
+
readonly stateMutability: "view";
|
|
251
|
+
readonly type: "function";
|
|
252
|
+
}, {
|
|
253
|
+
readonly inputs: readonly [];
|
|
254
|
+
readonly name: "renounceOwnership";
|
|
255
|
+
readonly outputs: readonly [];
|
|
256
|
+
readonly stateMutability: "payable";
|
|
257
|
+
readonly type: "function";
|
|
258
|
+
}, {
|
|
259
|
+
readonly inputs: readonly [];
|
|
260
|
+
readonly name: "requestOwnershipHandover";
|
|
261
|
+
readonly outputs: readonly [];
|
|
262
|
+
readonly stateMutability: "payable";
|
|
263
|
+
readonly type: "function";
|
|
264
|
+
}, {
|
|
265
|
+
readonly inputs: readonly [{
|
|
266
|
+
readonly internalType: "uint256";
|
|
267
|
+
readonly name: "_flaunchFeeThreshold";
|
|
268
|
+
readonly type: "uint256";
|
|
269
|
+
}];
|
|
270
|
+
readonly name: "setFlaunchFeeThreshold";
|
|
271
|
+
readonly outputs: readonly [];
|
|
272
|
+
readonly stateMutability: "nonpayable";
|
|
273
|
+
readonly type: "function";
|
|
274
|
+
}, {
|
|
275
|
+
readonly inputs: readonly [{
|
|
276
|
+
readonly components: readonly [{
|
|
277
|
+
readonly internalType: "Currency";
|
|
278
|
+
readonly name: "currency0";
|
|
279
|
+
readonly type: "address";
|
|
280
|
+
}, {
|
|
281
|
+
readonly internalType: "Currency";
|
|
282
|
+
readonly name: "currency1";
|
|
283
|
+
readonly type: "address";
|
|
284
|
+
}, {
|
|
285
|
+
readonly internalType: "uint24";
|
|
286
|
+
readonly name: "fee";
|
|
287
|
+
readonly type: "uint24";
|
|
288
|
+
}, {
|
|
289
|
+
readonly internalType: "int24";
|
|
290
|
+
readonly name: "tickSpacing";
|
|
291
|
+
readonly type: "int24";
|
|
292
|
+
}, {
|
|
293
|
+
readonly internalType: "contract IHooks";
|
|
294
|
+
readonly name: "hooks";
|
|
295
|
+
readonly type: "address";
|
|
296
|
+
}];
|
|
297
|
+
readonly internalType: "struct PoolKey";
|
|
298
|
+
readonly name: "_poolKey";
|
|
299
|
+
readonly type: "tuple";
|
|
300
|
+
}];
|
|
301
|
+
readonly name: "setPool";
|
|
302
|
+
readonly outputs: readonly [];
|
|
303
|
+
readonly stateMutability: "nonpayable";
|
|
304
|
+
readonly type: "function";
|
|
305
|
+
}, {
|
|
306
|
+
readonly inputs: readonly [{
|
|
307
|
+
readonly internalType: "address";
|
|
308
|
+
readonly name: "newOwner";
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
}];
|
|
311
|
+
readonly name: "transferOwnership";
|
|
312
|
+
readonly outputs: readonly [];
|
|
313
|
+
readonly stateMutability: "payable";
|
|
314
|
+
readonly type: "function";
|
|
315
|
+
}, {
|
|
316
|
+
readonly inputs: readonly [];
|
|
317
|
+
readonly name: "usdcToken";
|
|
318
|
+
readonly outputs: readonly [{
|
|
319
|
+
readonly internalType: "Currency";
|
|
320
|
+
readonly name: "";
|
|
321
|
+
readonly type: "address";
|
|
322
|
+
}];
|
|
323
|
+
readonly stateMutability: "view";
|
|
324
|
+
readonly type: "function";
|
|
325
|
+
}, {
|
|
326
|
+
readonly inputs: readonly [];
|
|
327
|
+
readonly name: "usdcToken0";
|
|
328
|
+
readonly outputs: readonly [{
|
|
329
|
+
readonly internalType: "bool";
|
|
330
|
+
readonly name: "";
|
|
331
|
+
readonly type: "bool";
|
|
332
|
+
}];
|
|
333
|
+
readonly stateMutability: "view";
|
|
334
|
+
readonly type: "function";
|
|
335
|
+
}];
|
|
336
|
+
//# sourceMappingURL=InitialPrice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitialPrice.d.ts","sourceRoot":"","sources":["../../src/abi/InitialPrice.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgRlB,CAAC"}
|
|
@@ -50,7 +50,6 @@ export interface WatchPoolSwapParams<TFLETHIsCurrencyZero extends boolean | unde
|
|
|
50
50
|
filterByPoolId?: HexString;
|
|
51
51
|
}
|
|
52
52
|
export interface FlaunchParams {
|
|
53
|
-
flaunchingETHFees: bigint;
|
|
54
53
|
name: string;
|
|
55
54
|
symbol: string;
|
|
56
55
|
tokenUri: string;
|
|
@@ -59,7 +58,6 @@ export interface FlaunchParams {
|
|
|
59
58
|
creator: Address;
|
|
60
59
|
creatorFeeAllocationPercent: number;
|
|
61
60
|
flaunchAt?: bigint;
|
|
62
|
-
premineAmount?: bigint;
|
|
63
61
|
}
|
|
64
62
|
export interface FlaunchIPFSParams extends Omit<FlaunchParams, "tokenUri">, IPFSParams {
|
|
65
63
|
}
|
|
@@ -71,6 +69,11 @@ export declare class ReadFlaunchPositionManager {
|
|
|
71
69
|
readonly TOTAL_SUPPLY: bigint;
|
|
72
70
|
constructor(address: Address, drift?: Drift);
|
|
73
71
|
isValidCoin(coinAddress: Address): Promise<boolean>;
|
|
72
|
+
getFlaunchingFee(params: {
|
|
73
|
+
sender: Address;
|
|
74
|
+
initialPriceParams: HexString;
|
|
75
|
+
slippagePercent?: number;
|
|
76
|
+
}): Promise<bigint>;
|
|
74
77
|
watchPoolCreated({ onPoolCreated, startBlockNumber, }: WatchPoolCreatedParams): Promise<{
|
|
75
78
|
cleanup: () => void;
|
|
76
79
|
pollPoolCreatedNow: () => Promise<void>;
|
|
@@ -83,7 +86,7 @@ export declare class ReadFlaunchPositionManager {
|
|
|
83
86
|
export declare class ReadWriteFlaunchPositionManager extends ReadFlaunchPositionManager {
|
|
84
87
|
contract: ReadWriteContract<FlaunchPositionManagerABI>;
|
|
85
88
|
constructor(address: Address, drift?: Drift<ReadWriteAdapter>);
|
|
86
|
-
flaunch({
|
|
87
|
-
flaunchIPFS({
|
|
89
|
+
flaunch({ name, symbol, tokenUri, fairLaunchPercent, initialMarketCapUSD, creator, creatorFeeAllocationPercent, flaunchAt, }: FlaunchParams): Promise<`0x${string}`>;
|
|
90
|
+
flaunchIPFS({ name, symbol, fairLaunchPercent, initialMarketCapUSD, creator, creatorFeeAllocationPercent, flaunchAt, metadata, pinataConfig, }: FlaunchIPFSParams): Promise<`0x${string}`>;
|
|
88
91
|
}
|
|
89
92
|
//# sourceMappingURL=FlaunchPositionManagerClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchPositionManagerClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAErB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FlaunchPositionManagerClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAErB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,yBAAyB,EACzB,aAAa,CACd,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AAE/C,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,CA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a,+BAAgC,SAAQ,0BAA0B;IACrE,QAAQ,EAAE,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;gBAG7D,OAAO,EAAE,OAAO,EAChB,KAAK,GAAE,KAAK,CAAC,gBAAgB,CAAiB;IAK1C,OAAO,CAAC,EACZ,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,EACP,2BAA2B,EAC3B,SAAS,GACV,EAAE,aAAa;IAgDV,WAAW,CAAC,EAChB,IAAI,EACJ,MAAM,EACN,iBAAiB,EACjB,mBAAmB,EACnB,OAAO,EACP,2BAA2B,EAC3B,SAAS,EACT,QAAQ,EACR,YAAY,GACb,EAAE,iBAAiB;CAiBrB"}
|
|
@@ -50,7 +50,6 @@ export interface WatchPoolSwapParams<TFLETHIsCurrencyZero extends boolean | unde
|
|
|
50
50
|
filterByPoolId?: HexString;
|
|
51
51
|
}
|
|
52
52
|
export interface FlaunchParams {
|
|
53
|
-
flaunchingETHFees: bigint;
|
|
54
53
|
name: string;
|
|
55
54
|
symbol: string;
|
|
56
55
|
tokenUri: string;
|
|
@@ -60,7 +59,6 @@ export interface FlaunchParams {
|
|
|
60
59
|
creator: Address;
|
|
61
60
|
creatorFeeAllocationPercent: number;
|
|
62
61
|
flaunchAt?: bigint;
|
|
63
|
-
premineAmount?: bigint;
|
|
64
62
|
}
|
|
65
63
|
export interface FlaunchIPFSParams extends Omit<FlaunchParams, "tokenUri">, IPFSParams {
|
|
66
64
|
}
|
|
@@ -72,6 +70,12 @@ export declare class ReadFlaunchPositionManagerV1_1 {
|
|
|
72
70
|
readonly TOTAL_SUPPLY: bigint;
|
|
73
71
|
constructor(address: Address, drift?: Drift);
|
|
74
72
|
isValidCoin(coinAddress: Address): Promise<boolean>;
|
|
73
|
+
getFlaunchingMarketCap(initialPriceParams: HexString): Promise<bigint>;
|
|
74
|
+
getFlaunchingFee(params: {
|
|
75
|
+
sender: Address;
|
|
76
|
+
initialPriceParams: HexString;
|
|
77
|
+
slippagePercent?: number;
|
|
78
|
+
}): Promise<bigint>;
|
|
75
79
|
watchPoolCreated({ onPoolCreated, startBlockNumber, }: WatchPoolCreatedParams): Promise<{
|
|
76
80
|
cleanup: () => void;
|
|
77
81
|
pollPoolCreatedNow: () => Promise<void>;
|
|
@@ -80,11 +84,20 @@ export declare class ReadFlaunchPositionManagerV1_1 {
|
|
|
80
84
|
cleanup: () => void;
|
|
81
85
|
pollPoolSwapNow: () => Promise<void>;
|
|
82
86
|
}>;
|
|
87
|
+
initialPrice(): Promise<`0x${string}`>;
|
|
83
88
|
}
|
|
84
89
|
export declare class ReadWriteFlaunchPositionManagerV1_1 extends ReadFlaunchPositionManagerV1_1 {
|
|
85
90
|
contract: ReadWriteContract<FlaunchPositionManagerV1_1ABI>;
|
|
86
91
|
constructor(address: Address, drift?: Drift<ReadWriteAdapter>);
|
|
87
|
-
|
|
88
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Flaunches a new token directly from the position manager.
|
|
94
|
+
* For premine support, flaunch via the FlaunchZapClient.
|
|
95
|
+
*/
|
|
96
|
+
flaunch({ name, symbol, tokenUri, fairLaunchPercent, fairLaunchDuration, initialMarketCapUSD, creator, creatorFeeAllocationPercent, flaunchAt, }: FlaunchParams): Promise<`0x${string}`>;
|
|
97
|
+
/**
|
|
98
|
+
* Flaunches a new token directly from the position manager by uploading the token metadata to IPFS.
|
|
99
|
+
* For premine support, flaunch via the FlaunchZapClient.
|
|
100
|
+
*/
|
|
101
|
+
flaunchIPFS({ name, symbol, fairLaunchPercent, fairLaunchDuration, initialMarketCapUSD, creator, creatorFeeAllocationPercent, flaunchAt, metadata, pinataConfig, }: FlaunchIPFSParams): Promise<`0x${string}`>;
|
|
89
102
|
}
|
|
90
103
|
//# sourceMappingURL=FlaunchPositionManagerV1_1Client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchPositionManagerV1_1Client.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerV1_1Client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAErB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FlaunchPositionManagerV1_1Client.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchPositionManagerV1_1Client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAErB,SAAS,EACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAElF,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,MAAM,MAAM,6BAA6B,GACvC,OAAO,6BAA6B,CAAC;AACvC,MAAM,MAAM,cAAc,GAAG,QAAQ,CACnC,6BAA6B,EAC7B,aAAa,CACd,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,MAAM,MAAM,eAAe,GAAG,cAAc,EAAE,CAAC;AAE/C,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,CAAC,EACd,IAAI,EACJ,mBAAmB,GACpB,EAAE;QACD,IAAI,EAAE,eAAe,CAAC;QACtB,mBAAmB,EAAE,OAAO,CAAC;KAC9B,KAAK,IAAI,CAAC;IACX,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,CAChC,6BAA6B,EAC7B,UAAU,CACX,GAAG;IACF,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA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MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,2BAA2B,EAC3B,SAAS,GACV,EAAE,aAAa;IAiDhB;;;OAGG;IACG,WAAW,CAAC,EAChB,IAAI,EACJ,MAAM,EACN,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,OAAO,EACP,2BAA2B,EAC3B,SAAS,EACT,QAAQ,EACR,YAAY,GACb,EAAE,iBAAiB;CAkBrB"}
|
|
@@ -1,24 +1,9 @@
|
|
|
1
|
-
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter } from "@delvtech/drift";
|
|
1
|
+
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type ReadWriteAdapter, type HexString } from "@delvtech/drift";
|
|
2
2
|
import { FlaunchZapAbi } from "../abi/FlaunchZap";
|
|
3
3
|
import { IPFSParams } from "../types";
|
|
4
|
+
import { ReadFlaunchPositionManagerV1_1 } from "./FlaunchPositionManagerV1_1Client";
|
|
4
5
|
export type FlaunchZapABI = typeof FlaunchZapAbi;
|
|
5
|
-
/**
|
|
6
|
-
* Base client for interacting with the FlaunchZap contract in read-only mode
|
|
7
|
-
* Provides basic contract initialization
|
|
8
|
-
*/
|
|
9
|
-
export declare class ReadFlaunchZap {
|
|
10
|
-
readonly contract: ReadContract<FlaunchZapABI>;
|
|
11
|
-
readonly TOTAL_SUPPLY: bigint;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a new ReadFlaunchZap instance
|
|
14
|
-
* @param address - The address of the FlaunchZap contract
|
|
15
|
-
* @param drift - Optional drift instance for contract interactions (creates new instance if not provided)
|
|
16
|
-
* @throws Error if address is not provided
|
|
17
|
-
*/
|
|
18
|
-
constructor(address: Address, drift?: Drift);
|
|
19
|
-
}
|
|
20
6
|
export interface FlaunchParams {
|
|
21
|
-
flaunchingETHFees: bigint;
|
|
22
7
|
name: string;
|
|
23
8
|
symbol: string;
|
|
24
9
|
tokenUri: string;
|
|
@@ -30,20 +15,65 @@ export interface FlaunchParams {
|
|
|
30
15
|
flaunchAt?: bigint;
|
|
31
16
|
premineAmount?: bigint;
|
|
32
17
|
}
|
|
18
|
+
export interface FlaunchIPFSParams extends Omit<FlaunchParams, "tokenUri">, IPFSParams {
|
|
19
|
+
}
|
|
33
20
|
export interface FlaunchWithRevenueManagerParams extends FlaunchParams {
|
|
34
21
|
revenueManagerInstanceAddress: Address;
|
|
35
22
|
}
|
|
36
23
|
export interface FlaunchWithRevenueManagerIPFSParams extends Omit<FlaunchWithRevenueManagerParams, "tokenUri">, IPFSParams {
|
|
37
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Base client for interacting with the FlaunchZap contract in read-only mode
|
|
27
|
+
* Provides basic contract initialization
|
|
28
|
+
*/
|
|
29
|
+
export declare class ReadFlaunchZap {
|
|
30
|
+
drift: Drift;
|
|
31
|
+
chainId: number;
|
|
32
|
+
readonly contract: ReadContract<FlaunchZapABI>;
|
|
33
|
+
readonly TOTAL_SUPPLY: bigint;
|
|
34
|
+
readonly readPositionManagerV1_1: ReadFlaunchPositionManagerV1_1;
|
|
35
|
+
/**
|
|
36
|
+
* Creates a new ReadFlaunchZap instance
|
|
37
|
+
* @param chainId - The chain ID of the contract
|
|
38
|
+
* @param address - The address of the FlaunchZap contract
|
|
39
|
+
* @param drift - Optional drift instance for contract interactions (creates new instance if not provided)
|
|
40
|
+
* @throws Error if address is not provided
|
|
41
|
+
*/
|
|
42
|
+
constructor(chainId: number, address: Address, drift?: Drift);
|
|
43
|
+
getPremineCostInWei(params: {
|
|
44
|
+
initialPriceParams: HexString;
|
|
45
|
+
premineAmount: bigint;
|
|
46
|
+
slippagePercent?: number;
|
|
47
|
+
}): Promise<bigint>;
|
|
48
|
+
getFlaunchingFee(params: {
|
|
49
|
+
sender: Address;
|
|
50
|
+
initialPriceParams: HexString;
|
|
51
|
+
slippagePercent?: number;
|
|
52
|
+
}): Promise<bigint>;
|
|
53
|
+
/**
|
|
54
|
+
* Calculates the ETH required to flaunch a token, takes into account the ETH for premine and the flaunching fee
|
|
55
|
+
*/
|
|
56
|
+
ethRequiredToFlaunch(params: {
|
|
57
|
+
premineAmount: bigint;
|
|
58
|
+
initialPriceParams: HexString;
|
|
59
|
+
slippagePercent?: number;
|
|
60
|
+
}): Promise<bigint>;
|
|
61
|
+
}
|
|
38
62
|
/**
|
|
39
63
|
* Extended client for interacting with the FlaunchZap contract with write capabilities
|
|
40
64
|
*/
|
|
41
65
|
export declare class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
42
|
-
chainId: number;
|
|
43
66
|
contract: ReadWriteContract<FlaunchZapABI>;
|
|
44
67
|
constructor(chainId: number, address: Address, drift?: Drift<ReadWriteAdapter>);
|
|
45
68
|
/**
|
|
46
|
-
*
|
|
69
|
+
* Flaunches a new token, supports premine
|
|
70
|
+
* @param params - Parameters for the flaunch
|
|
71
|
+
* @returns Transaction response for the flaunch creation
|
|
72
|
+
*/
|
|
73
|
+
flaunch(params: FlaunchParams): Promise<`0x${string}`>;
|
|
74
|
+
flaunchIPFS(params: FlaunchIPFSParams): Promise<`0x${string}`>;
|
|
75
|
+
/**
|
|
76
|
+
* Flaunches a new token for a revenue manager
|
|
47
77
|
* @param params - Parameters for the flaunch with revenue manager
|
|
48
78
|
* @param params.name - The name of the token
|
|
49
79
|
* @param params.symbol - The symbol of the token
|
|
@@ -61,7 +91,7 @@ export declare class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
61
91
|
*/
|
|
62
92
|
flaunchWithRevenueManager(params: FlaunchWithRevenueManagerParams): Promise<`0x${string}`>;
|
|
63
93
|
/**
|
|
64
|
-
*
|
|
94
|
+
* Flaunches a new token for a revenue manager, storing the token metadata on IPFS
|
|
65
95
|
* @param params - Parameters for the flaunch including all revenue manager params and IPFS metadata
|
|
66
96
|
* @returns Promise resolving to the transaction response for the flaunch creation
|
|
67
97
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchZapClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchZapClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"FlaunchZapClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchZapClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AAKpF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,EACrC,UAAU;CAAG;AAEjB,MAAM,WAAW,+BAAgC,SAAQ,aAAa;IACpE,6BAA6B,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,mCACf,SAAQ,IAAI,CAAC,+BAA+B,EAAE,UAAU,CAAC,EACvD,UAAU;CAAG;AAEj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, type HexString } from "@delvtech/drift";
|
|
2
|
+
import { InitialPriceAbi } from "../abi/InitialPrice";
|
|
3
|
+
export type InitialPriceABI = typeof InitialPriceAbi;
|
|
4
|
+
export declare class ReadInitialPrice {
|
|
5
|
+
readonly contract: ReadContract<InitialPriceABI>;
|
|
6
|
+
constructor(address: Address, drift?: Drift);
|
|
7
|
+
/**
|
|
8
|
+
* Returns a flaunching fee of 0.1% of the initial market cap IF the market cap is greater than 10k & the sender is not fee exempt
|
|
9
|
+
* @param params - The parameters for the flaunching fee calculation
|
|
10
|
+
* @param params.sender - The address of the sender
|
|
11
|
+
* @param params.initialPriceParams - The initial price parameters
|
|
12
|
+
* @returns The flaunching fee
|
|
13
|
+
*/
|
|
14
|
+
getFlaunchingFee(params: {
|
|
15
|
+
sender: Address;
|
|
16
|
+
initialPriceParams: HexString;
|
|
17
|
+
}): Promise<bigint>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=InitialPriceClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InitialPriceClient.d.ts","sourceRoot":"","sources":["../../src/clients/InitialPriceClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAIV,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC;AAErD,qBAAa,gBAAgB;IAC3B,SAAgB,QAAQ,EAAE,YAAY,CAAC,eAAe,CAAC,CAAC;gBAE5C,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAqB;IAW1D;;;;;;OAMG;IACH,gBAAgB,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,OAAO,CAAC;QAAC,kBAAkB,EAAE,SAAS,CAAA;KAAE;CAM5E"}
|
|
@@ -22,9 +22,9 @@ export declare class ReadPermit2 {
|
|
|
22
22
|
* @returns Promise<{amount: bigint, expiration: bigint, nonce: bigint}> - The allowance details
|
|
23
23
|
*/
|
|
24
24
|
allowance(owner: Address, coinAddress: Address, spender: Address): Promise<{
|
|
25
|
-
nonce: number;
|
|
26
25
|
amount: bigint;
|
|
27
26
|
expiration: number;
|
|
27
|
+
nonce: number;
|
|
28
28
|
}>;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=Permit2Client.d.ts.map
|
package/dist/helpers/index.cjs
CHANGED
|
@@ -16,9 +16,22 @@ const uint256ToBytes32 = (value) => {
|
|
|
16
16
|
return viem.pad(viem.encodeAbiParameters([{ type: "uint256", name: "value" }], [value]), { size: 32, dir: "right" });
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
// List of public IPFS gateways to cycle through
|
|
20
|
+
const IPFS_GATEWAYS = [
|
|
21
|
+
"https://gateway.pinata.cloud/ipfs/",
|
|
22
|
+
"https://ipfs.io/ipfs/",
|
|
23
|
+
"https://dweb.link/ipfs/",
|
|
24
|
+
];
|
|
25
|
+
// Counter to track the current gateway index
|
|
26
|
+
let currentGatewayIndex = 0;
|
|
19
27
|
const resolveIPFS = (value) => {
|
|
20
28
|
if (value.startsWith("ipfs://")) {
|
|
21
|
-
|
|
29
|
+
const cid = value.slice(7);
|
|
30
|
+
// Get the next gateway and increment the counter
|
|
31
|
+
const gateway = IPFS_GATEWAYS[currentGatewayIndex];
|
|
32
|
+
// Update the counter, cycling back to 0 when we reach the end
|
|
33
|
+
currentGatewayIndex = (currentGatewayIndex + 1) % IPFS_GATEWAYS.length;
|
|
34
|
+
return `${gateway}${cid}`;
|
|
22
35
|
}
|
|
23
36
|
return value;
|
|
24
37
|
};
|