liquid-sdk 1.0.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/index.mjs ADDED
@@ -0,0 +1,1326 @@
1
+ // src/client.ts
2
+ import {
3
+ decodeEventLog,
4
+ encodeAbiParameters,
5
+ encodePacked,
6
+ keccak256,
7
+ getAddress,
8
+ zeroAddress
9
+ } from "viem";
10
+ import { base as base2 } from "viem/chains";
11
+
12
+ // src/constants.ts
13
+ import { base } from "viem/chains";
14
+ var ADDRESSES = {
15
+ FACTORY: "0x0000003482fe299E72d4908368044A8A173BE576",
16
+ POOL_EXTENSION_ALLOWLIST: "0x000003Afb1b070F037D2871eE0A6b8c8f53F7B77",
17
+ FEE_LOCKER: "0x000008B9242b7e4432f6c4b1EeAD93562f9Cc94d",
18
+ LP_LOCKER: "0x00000548732DfA56Be1257cE44D0CFc3B46dDb2A",
19
+ LP_LOCKER_FEE_CONVERSION: "0x00000547518784420CEeF761fb18D884bb908102",
20
+ VAULT: "0x000001c5263F4d64CdC343cDA9C8bF961CF8376c",
21
+ HOOK_DYNAMIC_FEE_V2: "0x2A2F73CDDa098d639bd8Bbcd7dF2bf24E06728cC",
22
+ HOOK_STATIC_FEE_V2: "0xb2401c5369AaCF62F8d615623C7F68F84da428Cc",
23
+ SNIPER_AUCTION_V2: "0x000007b64003ee07a69576F98859a0a36b854260",
24
+ SNIPER_UTIL_V2: "0x000003Ee0cb9B0C82C6C7FCB7b81a9883F285270",
25
+ MEV_BLOCK_DELAY: "0x0000035D83588954F3c581c3A66251b3F06AD5e4",
26
+ AIRDROP_V2: "0x00000C222442512b08446D33dd9754a7F260BE79",
27
+ UNIV4_ETH_DEV_BUY: "0x00000d7DE1f0A3FA7957F5d8A2b97B0E24e5783D",
28
+ LIQUID_DEPLOYER_LIB: "0x00000f88b2d37A2006F2F0C8552d22E0b8945202"
29
+ };
30
+ var EXTERNAL = {
31
+ POOL_MANAGER: "0x498581fF718922c3f8e6A244956aF099B2652b2b",
32
+ WETH: "0x4200000000000000000000000000000000000006",
33
+ UNIVERSAL_ROUTER: "0x6fF5693b99212Da76ad316178A184AB56D299b43",
34
+ PERMIT2: "0x000000000022D473030F116dDEE9F6B43aC78BA3"
35
+ };
36
+ var FEE = {
37
+ /** Fee denominator used by Uniswap v4 (1,000,000 = 100%) */
38
+ DENOMINATOR: 1e6,
39
+ /** Protocol fee numerator: 200,000 / 1,000,000 = 20% of LP fees */
40
+ PROTOCOL_FEE_NUMERATOR: 2e5,
41
+ /** Max LP fee: 10% (100,000 / 1,000,000) */
42
+ MAX_LP_FEE: 1e5,
43
+ /** Max MEV fee: 80% (800,000 / 1,000,000) */
44
+ MAX_MEV_FEE: 8e5,
45
+ /** BPS denominator for token supply splits */
46
+ BPS: 1e4
47
+ };
48
+ var TOKEN = {
49
+ /** Total supply for every token: 100 billion with 18 decimals */
50
+ SUPPLY: 100000000000n * 10n ** 18n,
51
+ DECIMALS: 18,
52
+ MAX_EXTENSIONS: 10,
53
+ MAX_EXTENSION_BPS: 9e3
54
+ };
55
+ var DEFAULT_CHAIN = base;
56
+ var DEFAULT_CHAIN_ID = 8453;
57
+
58
+ // src/abis/LiquidFactory.ts
59
+ var LiquidFactoryAbi = [
60
+ {
61
+ type: "function",
62
+ name: "deployToken",
63
+ inputs: [
64
+ {
65
+ name: "deploymentConfig",
66
+ type: "tuple",
67
+ components: [
68
+ {
69
+ name: "tokenConfig",
70
+ type: "tuple",
71
+ components: [
72
+ { name: "tokenAdmin", type: "address" },
73
+ { name: "name", type: "string" },
74
+ { name: "symbol", type: "string" },
75
+ { name: "salt", type: "bytes32" },
76
+ { name: "image", type: "string" },
77
+ { name: "metadata", type: "string" },
78
+ { name: "context", type: "string" },
79
+ { name: "originatingChainId", type: "uint256" }
80
+ ]
81
+ },
82
+ {
83
+ name: "poolConfig",
84
+ type: "tuple",
85
+ components: [
86
+ { name: "hook", type: "address" },
87
+ { name: "pairedToken", type: "address" },
88
+ { name: "tickIfToken0IsLiquid", type: "int24" },
89
+ { name: "tickSpacing", type: "int24" },
90
+ { name: "poolData", type: "bytes" }
91
+ ]
92
+ },
93
+ {
94
+ name: "lockerConfig",
95
+ type: "tuple",
96
+ components: [
97
+ { name: "locker", type: "address" },
98
+ { name: "rewardAdmins", type: "address[]" },
99
+ { name: "rewardRecipients", type: "address[]" },
100
+ { name: "rewardBps", type: "uint16[]" },
101
+ { name: "tickLower", type: "int24[]" },
102
+ { name: "tickUpper", type: "int24[]" },
103
+ { name: "positionBps", type: "uint16[]" },
104
+ { name: "lockerData", type: "bytes" }
105
+ ]
106
+ },
107
+ {
108
+ name: "mevModuleConfig",
109
+ type: "tuple",
110
+ components: [
111
+ { name: "mevModule", type: "address" },
112
+ { name: "mevModuleData", type: "bytes" }
113
+ ]
114
+ },
115
+ {
116
+ name: "extensionConfigs",
117
+ type: "tuple[]",
118
+ components: [
119
+ { name: "extension", type: "address" },
120
+ { name: "msgValue", type: "uint256" },
121
+ { name: "extensionBps", type: "uint16" },
122
+ { name: "extensionData", type: "bytes" }
123
+ ]
124
+ }
125
+ ]
126
+ }
127
+ ],
128
+ outputs: [{ name: "tokenAddress", type: "address" }],
129
+ stateMutability: "payable"
130
+ },
131
+ {
132
+ type: "function",
133
+ name: "tokenDeploymentInfo",
134
+ inputs: [{ name: "token", type: "address" }],
135
+ outputs: [
136
+ {
137
+ name: "",
138
+ type: "tuple",
139
+ components: [
140
+ { name: "token", type: "address" },
141
+ { name: "hook", type: "address" },
142
+ { name: "locker", type: "address" },
143
+ { name: "extensions", type: "address[]" }
144
+ ]
145
+ }
146
+ ],
147
+ stateMutability: "view"
148
+ },
149
+ {
150
+ type: "function",
151
+ name: "deploymentInfoForToken",
152
+ inputs: [{ name: "token", type: "address" }],
153
+ outputs: [
154
+ { name: "token", type: "address" },
155
+ { name: "hook", type: "address" },
156
+ { name: "locker", type: "address" }
157
+ ],
158
+ stateMutability: "view"
159
+ },
160
+ {
161
+ type: "function",
162
+ name: "deprecated",
163
+ inputs: [],
164
+ outputs: [{ name: "", type: "bool" }],
165
+ stateMutability: "view"
166
+ },
167
+ {
168
+ type: "function",
169
+ name: "TOKEN_SUPPLY",
170
+ inputs: [],
171
+ outputs: [{ name: "", type: "uint256" }],
172
+ stateMutability: "view"
173
+ },
174
+ {
175
+ type: "function",
176
+ name: "BPS",
177
+ inputs: [],
178
+ outputs: [{ name: "", type: "uint256" }],
179
+ stateMutability: "view"
180
+ },
181
+ {
182
+ type: "function",
183
+ name: "teamFeeRecipient",
184
+ inputs: [],
185
+ outputs: [{ name: "", type: "address" }],
186
+ stateMutability: "view"
187
+ },
188
+ {
189
+ type: "function",
190
+ name: "enabledLockers",
191
+ inputs: [
192
+ { name: "locker", type: "address" },
193
+ { name: "hook", type: "address" }
194
+ ],
195
+ outputs: [{ name: "enabled", type: "bool" }],
196
+ stateMutability: "view"
197
+ },
198
+ {
199
+ type: "event",
200
+ name: "TokenCreated",
201
+ inputs: [
202
+ { name: "msgSender", type: "address", indexed: false },
203
+ { name: "tokenAddress", type: "address", indexed: true },
204
+ { name: "tokenAdmin", type: "address", indexed: true },
205
+ { name: "tokenImage", type: "string", indexed: false },
206
+ { name: "tokenName", type: "string", indexed: false },
207
+ { name: "tokenSymbol", type: "string", indexed: false },
208
+ { name: "tokenMetadata", type: "string", indexed: false },
209
+ { name: "tokenContext", type: "string", indexed: false },
210
+ { name: "startingTick", type: "int24", indexed: false },
211
+ { name: "poolHook", type: "address", indexed: false },
212
+ { name: "poolId", type: "bytes32", indexed: false },
213
+ { name: "pairedToken", type: "address", indexed: false },
214
+ { name: "locker", type: "address", indexed: false },
215
+ { name: "mevModule", type: "address", indexed: false },
216
+ { name: "extensionsSupply", type: "uint256", indexed: false },
217
+ { name: "extensions", type: "address[]", indexed: false }
218
+ ],
219
+ anonymous: false
220
+ }
221
+ ];
222
+
223
+ // src/abis/LiquidFeeLocker.ts
224
+ var LiquidFeeLockerAbi = [
225
+ {
226
+ type: "function",
227
+ name: "availableFees",
228
+ inputs: [
229
+ { name: "feeOwner", type: "address" },
230
+ { name: "token", type: "address" }
231
+ ],
232
+ outputs: [{ name: "", type: "uint256" }],
233
+ stateMutability: "view"
234
+ },
235
+ {
236
+ type: "function",
237
+ name: "feesToClaim",
238
+ inputs: [
239
+ { name: "feeOwner", type: "address" },
240
+ { name: "token", type: "address" }
241
+ ],
242
+ outputs: [{ name: "balance", type: "uint256" }],
243
+ stateMutability: "view"
244
+ },
245
+ {
246
+ type: "function",
247
+ name: "claim",
248
+ inputs: [
249
+ { name: "feeOwner", type: "address" },
250
+ { name: "token", type: "address" }
251
+ ],
252
+ outputs: [],
253
+ stateMutability: "nonpayable"
254
+ }
255
+ ];
256
+
257
+ // src/abis/LiquidHookDynamicFeeV2.ts
258
+ var LiquidHookDynamicFeeV2Abi = [
259
+ {
260
+ type: "function",
261
+ name: "liquidIsToken0",
262
+ inputs: [{ name: "", type: "bytes32" }],
263
+ outputs: [{ name: "", type: "bool" }],
264
+ stateMutability: "view"
265
+ },
266
+ {
267
+ type: "function",
268
+ name: "poolConfigVars",
269
+ inputs: [{ name: "poolId", type: "bytes32" }],
270
+ outputs: [
271
+ {
272
+ name: "",
273
+ type: "tuple",
274
+ components: [
275
+ { name: "baseFee", type: "uint24" },
276
+ { name: "maxLpFee", type: "uint24" },
277
+ { name: "referenceTickFilterPeriod", type: "uint256" },
278
+ { name: "resetPeriod", type: "uint256" },
279
+ { name: "resetTickFilter", type: "int24" },
280
+ { name: "feeControlNumerator", type: "uint256" },
281
+ { name: "decayFilterBps", type: "uint24" }
282
+ ]
283
+ }
284
+ ],
285
+ stateMutability: "view"
286
+ },
287
+ {
288
+ type: "function",
289
+ name: "poolFeeVars",
290
+ inputs: [{ name: "poolId", type: "bytes32" }],
291
+ outputs: [
292
+ {
293
+ name: "",
294
+ type: "tuple",
295
+ components: [
296
+ { name: "referenceTick", type: "int24" },
297
+ { name: "resetTick", type: "int24" },
298
+ { name: "resetTickTimestamp", type: "uint256" },
299
+ { name: "lastSwapTimestamp", type: "uint256" },
300
+ { name: "appliedVR", type: "uint24" },
301
+ { name: "prevVA", type: "uint24" }
302
+ ]
303
+ }
304
+ ],
305
+ stateMutability: "view"
306
+ },
307
+ {
308
+ type: "function",
309
+ name: "poolCreationTimestamp",
310
+ inputs: [{ name: "", type: "bytes32" }],
311
+ outputs: [{ name: "", type: "uint256" }],
312
+ stateMutability: "view"
313
+ },
314
+ {
315
+ type: "function",
316
+ name: "protocolFee",
317
+ inputs: [],
318
+ outputs: [{ name: "", type: "uint24" }],
319
+ stateMutability: "view"
320
+ },
321
+ {
322
+ type: "function",
323
+ name: "factory",
324
+ inputs: [],
325
+ outputs: [{ name: "", type: "address" }],
326
+ stateMutability: "view"
327
+ },
328
+ {
329
+ type: "function",
330
+ name: "poolManager",
331
+ inputs: [],
332
+ outputs: [{ name: "", type: "address" }],
333
+ stateMutability: "view"
334
+ },
335
+ {
336
+ type: "function",
337
+ name: "locker",
338
+ inputs: [],
339
+ outputs: [{ name: "", type: "address" }],
340
+ stateMutability: "view"
341
+ },
342
+ {
343
+ type: "function",
344
+ name: "mevModule",
345
+ inputs: [{ name: "", type: "bytes32" }],
346
+ outputs: [{ name: "", type: "address" }],
347
+ stateMutability: "view"
348
+ },
349
+ {
350
+ type: "function",
351
+ name: "mevModuleEnabled",
352
+ inputs: [{ name: "", type: "bytes32" }],
353
+ outputs: [{ name: "", type: "bool" }],
354
+ stateMutability: "view"
355
+ }
356
+ ];
357
+
358
+ // src/abis/LiquidVault.ts
359
+ var LiquidVaultAbi = [
360
+ {
361
+ type: "function",
362
+ name: "allocation",
363
+ inputs: [{ name: "", type: "address" }],
364
+ outputs: [
365
+ { name: "token", type: "address" },
366
+ { name: "amountTotal", type: "uint256" },
367
+ { name: "amountClaimed", type: "uint256" },
368
+ { name: "lockupEndTime", type: "uint256" },
369
+ { name: "vestingEndTime", type: "uint256" },
370
+ { name: "admin", type: "address" }
371
+ ],
372
+ stateMutability: "view"
373
+ },
374
+ {
375
+ type: "function",
376
+ name: "amountAvailableToClaim",
377
+ inputs: [{ name: "token", type: "address" }],
378
+ outputs: [{ name: "", type: "uint256" }],
379
+ stateMutability: "view"
380
+ },
381
+ {
382
+ type: "function",
383
+ name: "claim",
384
+ inputs: [{ name: "token", type: "address" }],
385
+ outputs: [],
386
+ stateMutability: "nonpayable"
387
+ }
388
+ ];
389
+
390
+ // src/abis/LiquidSniperAuctionV2.ts
391
+ var LiquidSniperAuctionV2Abi = [
392
+ {
393
+ type: "function",
394
+ name: "nextAuctionBlock",
395
+ inputs: [{ name: "poolId", type: "bytes32" }],
396
+ outputs: [{ name: "nextAuctionBlock", type: "uint256" }],
397
+ stateMutability: "view"
398
+ },
399
+ {
400
+ type: "function",
401
+ name: "round",
402
+ inputs: [{ name: "poolId", type: "bytes32" }],
403
+ outputs: [{ name: "round", type: "uint256" }],
404
+ stateMutability: "view"
405
+ },
406
+ {
407
+ type: "function",
408
+ name: "gasPeg",
409
+ inputs: [{ name: "poolId", type: "bytes32" }],
410
+ outputs: [{ name: "gasPeg", type: "uint256" }],
411
+ stateMutability: "view"
412
+ },
413
+ {
414
+ type: "function",
415
+ name: "feeConfig",
416
+ inputs: [{ name: "poolId", type: "bytes32" }],
417
+ outputs: [
418
+ { name: "startingFee", type: "uint24" },
419
+ { name: "endingFee", type: "uint24" },
420
+ { name: "secondsToDecay", type: "uint256" }
421
+ ],
422
+ stateMutability: "view"
423
+ },
424
+ {
425
+ type: "function",
426
+ name: "getFee",
427
+ inputs: [{ name: "poolId", type: "bytes32" }],
428
+ outputs: [{ name: "", type: "uint24" }],
429
+ stateMutability: "view"
430
+ },
431
+ {
432
+ type: "function",
433
+ name: "poolDecayStartTime",
434
+ inputs: [{ name: "poolId", type: "bytes32" }],
435
+ outputs: [{ name: "poolDecayStartTime", type: "uint256" }],
436
+ stateMutability: "view"
437
+ },
438
+ {
439
+ type: "function",
440
+ name: "maxRounds",
441
+ inputs: [],
442
+ outputs: [{ name: "", type: "uint256" }],
443
+ stateMutability: "view"
444
+ },
445
+ {
446
+ type: "function",
447
+ name: "blocksBetweenAuction",
448
+ inputs: [],
449
+ outputs: [{ name: "", type: "uint256" }],
450
+ stateMutability: "view"
451
+ },
452
+ {
453
+ type: "function",
454
+ name: "blocksBetweenDeploymentAndFirstAuction",
455
+ inputs: [],
456
+ outputs: [{ name: "", type: "uint256" }],
457
+ stateMutability: "view"
458
+ },
459
+ {
460
+ type: "function",
461
+ name: "paymentPerGasUnit",
462
+ inputs: [],
463
+ outputs: [{ name: "", type: "uint256" }],
464
+ stateMutability: "view"
465
+ }
466
+ ];
467
+
468
+ // src/abis/LiquidSniperUtilV2.ts
469
+ var LiquidSniperUtilV2Abi = [
470
+ {
471
+ type: "function",
472
+ name: "bidInAuction",
473
+ inputs: [
474
+ {
475
+ name: "swapParams",
476
+ type: "tuple",
477
+ components: [
478
+ {
479
+ name: "poolKey",
480
+ type: "tuple",
481
+ components: [
482
+ { name: "currency0", type: "address" },
483
+ { name: "currency1", type: "address" },
484
+ { name: "fee", type: "uint24" },
485
+ { name: "tickSpacing", type: "int24" },
486
+ { name: "hooks", type: "address" }
487
+ ]
488
+ },
489
+ { name: "zeroForOne", type: "bool" },
490
+ { name: "amountIn", type: "uint128" },
491
+ { name: "amountOutMinimum", type: "uint128" },
492
+ { name: "hookData", type: "bytes" }
493
+ ]
494
+ },
495
+ { name: "round", type: "uint256" }
496
+ ],
497
+ outputs: [],
498
+ stateMutability: "payable"
499
+ },
500
+ {
501
+ type: "function",
502
+ name: "getTxGasPriceForBidAmount",
503
+ inputs: [
504
+ { name: "auctionGasPeg", type: "uint256" },
505
+ { name: "desiredBidAmount", type: "uint256" }
506
+ ],
507
+ outputs: [{ name: "txGasPrice", type: "uint256" }],
508
+ stateMutability: "view"
509
+ }
510
+ ];
511
+
512
+ // src/abis/LiquidAirdropV2.ts
513
+ var LiquidAirdropV2Abi = [
514
+ {
515
+ type: "function",
516
+ name: "airdrops",
517
+ inputs: [{ name: "token", type: "address" }],
518
+ outputs: [
519
+ { name: "admin", type: "address" },
520
+ { name: "merkleRoot", type: "bytes32" },
521
+ { name: "totalSupply", type: "uint256" },
522
+ { name: "totalClaimed", type: "uint256" },
523
+ { name: "lockupEndTime", type: "uint256" },
524
+ { name: "vestingEndTime", type: "uint256" },
525
+ { name: "adminClaimTime", type: "uint256" },
526
+ { name: "adminClaimed", type: "bool" }
527
+ ],
528
+ stateMutability: "view"
529
+ },
530
+ {
531
+ type: "function",
532
+ name: "amountAvailableToClaim",
533
+ inputs: [
534
+ { name: "token", type: "address" },
535
+ { name: "recipient", type: "address" },
536
+ { name: "allocatedAmount", type: "uint256" }
537
+ ],
538
+ outputs: [{ name: "", type: "uint256" }],
539
+ stateMutability: "view"
540
+ },
541
+ {
542
+ type: "function",
543
+ name: "claim",
544
+ inputs: [
545
+ { name: "token", type: "address" },
546
+ { name: "recipient", type: "address" },
547
+ { name: "allocatedAmount", type: "uint256" },
548
+ { name: "proof", type: "bytes32[]" }
549
+ ],
550
+ outputs: [],
551
+ stateMutability: "nonpayable"
552
+ },
553
+ {
554
+ type: "function",
555
+ name: "CLAIM_EXPIRATION_INTERVAL",
556
+ inputs: [],
557
+ outputs: [{ name: "", type: "uint256" }],
558
+ stateMutability: "view"
559
+ },
560
+ {
561
+ type: "function",
562
+ name: "MIN_LOCKUP_DURATION",
563
+ inputs: [],
564
+ outputs: [{ name: "", type: "uint256" }],
565
+ stateMutability: "view"
566
+ }
567
+ ];
568
+
569
+ // src/abis/LiquidPoolExtensionAllowlist.ts
570
+ var LiquidPoolExtensionAllowlistAbi = [
571
+ {
572
+ type: "function",
573
+ name: "enabledExtensions",
574
+ inputs: [{ name: "extension", type: "address" }],
575
+ outputs: [{ name: "enabled", type: "bool" }],
576
+ stateMutability: "view"
577
+ }
578
+ ];
579
+
580
+ // src/abis/LiquidMevBlockDelay.ts
581
+ var LiquidMevBlockDelayAbi = [
582
+ {
583
+ type: "function",
584
+ name: "blockDelay",
585
+ inputs: [],
586
+ outputs: [{ name: "", type: "uint256" }],
587
+ stateMutability: "view"
588
+ },
589
+ {
590
+ type: "function",
591
+ name: "poolUnlockTime",
592
+ inputs: [{ name: "poolId", type: "bytes32" }],
593
+ outputs: [{ name: "", type: "uint256" }],
594
+ stateMutability: "view"
595
+ }
596
+ ];
597
+
598
+ // src/abis/LiquidLpLocker.ts
599
+ var LiquidLpLockerAbi = [
600
+ {
601
+ type: "function",
602
+ name: "tokenRewards",
603
+ inputs: [{ name: "token", type: "address" }],
604
+ outputs: [
605
+ {
606
+ name: "",
607
+ type: "tuple",
608
+ components: [
609
+ { name: "token", type: "address" },
610
+ {
611
+ name: "poolKey",
612
+ type: "tuple",
613
+ components: [
614
+ { name: "currency0", type: "address" },
615
+ { name: "currency1", type: "address" },
616
+ { name: "fee", type: "uint24" },
617
+ { name: "tickSpacing", type: "int24" },
618
+ { name: "hooks", type: "address" }
619
+ ]
620
+ },
621
+ { name: "positionId", type: "uint256" },
622
+ { name: "numPositions", type: "uint256" },
623
+ { name: "rewardBps", type: "uint16[]" },
624
+ { name: "rewardAdmins", type: "address[]" },
625
+ { name: "rewardRecipients", type: "address[]" }
626
+ ]
627
+ }
628
+ ],
629
+ stateMutability: "view"
630
+ },
631
+ {
632
+ type: "function",
633
+ name: "collectRewards",
634
+ inputs: [{ name: "token", type: "address" }],
635
+ outputs: [],
636
+ stateMutability: "nonpayable"
637
+ },
638
+ {
639
+ type: "function",
640
+ name: "collectRewardsWithoutUnlock",
641
+ inputs: [{ name: "token", type: "address" }],
642
+ outputs: [],
643
+ stateMutability: "nonpayable"
644
+ },
645
+ {
646
+ type: "function",
647
+ name: "updateRewardAdmin",
648
+ inputs: [
649
+ { name: "token", type: "address" },
650
+ { name: "rewardIndex", type: "uint256" },
651
+ { name: "newAdmin", type: "address" }
652
+ ],
653
+ outputs: [],
654
+ stateMutability: "nonpayable"
655
+ },
656
+ {
657
+ type: "function",
658
+ name: "updateRewardRecipient",
659
+ inputs: [
660
+ { name: "token", type: "address" },
661
+ { name: "rewardIndex", type: "uint256" },
662
+ { name: "newRecipient", type: "address" }
663
+ ],
664
+ outputs: [],
665
+ stateMutability: "nonpayable"
666
+ },
667
+ {
668
+ type: "function",
669
+ name: "version",
670
+ inputs: [],
671
+ outputs: [{ name: "", type: "string" }],
672
+ stateMutability: "view"
673
+ }
674
+ ];
675
+
676
+ // src/abis/ERC20.ts
677
+ var ERC20Abi = [
678
+ {
679
+ type: "function",
680
+ name: "name",
681
+ inputs: [],
682
+ outputs: [{ name: "", type: "string" }],
683
+ stateMutability: "view"
684
+ },
685
+ {
686
+ type: "function",
687
+ name: "symbol",
688
+ inputs: [],
689
+ outputs: [{ name: "", type: "string" }],
690
+ stateMutability: "view"
691
+ },
692
+ {
693
+ type: "function",
694
+ name: "decimals",
695
+ inputs: [],
696
+ outputs: [{ name: "", type: "uint8" }],
697
+ stateMutability: "view"
698
+ },
699
+ {
700
+ type: "function",
701
+ name: "totalSupply",
702
+ inputs: [],
703
+ outputs: [{ name: "", type: "uint256" }],
704
+ stateMutability: "view"
705
+ },
706
+ {
707
+ type: "function",
708
+ name: "balanceOf",
709
+ inputs: [{ name: "account", type: "address" }],
710
+ outputs: [{ name: "", type: "uint256" }],
711
+ stateMutability: "view"
712
+ },
713
+ {
714
+ type: "function",
715
+ name: "allowance",
716
+ inputs: [
717
+ { name: "owner", type: "address" },
718
+ { name: "spender", type: "address" }
719
+ ],
720
+ outputs: [{ name: "", type: "uint256" }],
721
+ stateMutability: "view"
722
+ },
723
+ {
724
+ type: "function",
725
+ name: "approve",
726
+ inputs: [
727
+ { name: "spender", type: "address" },
728
+ { name: "value", type: "uint256" }
729
+ ],
730
+ outputs: [{ name: "", type: "bool" }],
731
+ stateMutability: "nonpayable"
732
+ },
733
+ {
734
+ type: "function",
735
+ name: "transfer",
736
+ inputs: [
737
+ { name: "to", type: "address" },
738
+ { name: "value", type: "uint256" }
739
+ ],
740
+ outputs: [{ name: "", type: "bool" }],
741
+ stateMutability: "nonpayable"
742
+ }
743
+ ];
744
+
745
+ // src/client.ts
746
+ var LiquidSDK = class {
747
+ publicClient;
748
+ walletClient;
749
+ constructor(config) {
750
+ this.publicClient = config.publicClient;
751
+ this.walletClient = config.walletClient;
752
+ }
753
+ // ── Dev Buy Helper ───────────────────────────────────────────────
754
+ /**
755
+ * Build an ExtensionConfig for a dev buy (buy tokens with ETH at launch).
756
+ * The paired token must be WETH for simple dev buys.
757
+ */
758
+ buildDevBuyExtension(devBuy) {
759
+ const extensionData = encodeAbiParameters(
760
+ [
761
+ {
762
+ type: "tuple",
763
+ components: [
764
+ {
765
+ type: "tuple",
766
+ name: "pairedTokenPoolKey",
767
+ components: [
768
+ { type: "address", name: "currency0" },
769
+ { type: "address", name: "currency1" },
770
+ { type: "uint24", name: "fee" },
771
+ { type: "int24", name: "tickSpacing" },
772
+ { type: "address", name: "hooks" }
773
+ ]
774
+ },
775
+ { type: "uint128", name: "pairedTokenAmountOutMinimum" },
776
+ { type: "address", name: "recipient" }
777
+ ]
778
+ }
779
+ ],
780
+ [
781
+ {
782
+ pairedTokenPoolKey: {
783
+ currency0: zeroAddress,
784
+ currency1: zeroAddress,
785
+ fee: 0,
786
+ tickSpacing: 0,
787
+ hooks: zeroAddress
788
+ },
789
+ pairedTokenAmountOutMinimum: 0n,
790
+ recipient: devBuy.recipient
791
+ }
792
+ ]
793
+ );
794
+ return {
795
+ extension: ADDRESSES.UNIV4_ETH_DEV_BUY,
796
+ msgValue: devBuy.ethAmount,
797
+ extensionBps: 0,
798
+ extensionData
799
+ };
800
+ }
801
+ // ── Token Deployment ─────────────────────────────────────────────
802
+ async deployToken(params) {
803
+ if (!this.walletClient?.account) {
804
+ throw new Error("walletClient with account required for deployToken");
805
+ }
806
+ const account = this.walletClient.account.address;
807
+ const deploymentConfig = {
808
+ tokenConfig: {
809
+ tokenAdmin: params.tokenAdmin ?? account,
810
+ name: params.name,
811
+ symbol: params.symbol,
812
+ salt: params.salt ?? keccak256(
813
+ encodePacked(
814
+ ["string", "string", "uint256"],
815
+ [params.name, params.symbol, BigInt(Date.now())]
816
+ )
817
+ ),
818
+ image: params.image ?? "",
819
+ metadata: params.metadata ?? "",
820
+ context: params.context ?? "",
821
+ originatingChainId: BigInt(DEFAULT_CHAIN_ID)
822
+ },
823
+ poolConfig: {
824
+ hook: params.hook ?? ADDRESSES.HOOK_DYNAMIC_FEE_V2,
825
+ pairedToken: params.pairedToken ?? EXTERNAL.WETH,
826
+ tickIfToken0IsLiquid: params.tickIfToken0IsLiquid ?? -198720,
827
+ tickSpacing: params.tickSpacing ?? 60,
828
+ poolData: params.poolData ?? "0x"
829
+ },
830
+ lockerConfig: {
831
+ locker: params.locker ?? ADDRESSES.LP_LOCKER,
832
+ rewardAdmins: params.rewardAdmins ?? [account],
833
+ rewardRecipients: params.rewardRecipients ?? [account],
834
+ rewardBps: params.rewardBps ?? [1e4],
835
+ tickLower: params.tickLower ?? [-887220],
836
+ tickUpper: params.tickUpper ?? [887220],
837
+ positionBps: params.positionBps ?? [1e4],
838
+ lockerData: params.lockerData ?? "0x"
839
+ },
840
+ mevModuleConfig: {
841
+ mevModule: params.mevModule ?? ADDRESSES.MEV_BLOCK_DELAY,
842
+ mevModuleData: params.mevModuleData ?? "0x"
843
+ },
844
+ extensionConfigs: [...params.extensions ?? []]
845
+ };
846
+ if (params.devBuy) {
847
+ deploymentConfig.extensionConfigs.push(
848
+ this.buildDevBuyExtension(params.devBuy)
849
+ );
850
+ }
851
+ const msgValue = deploymentConfig.extensionConfigs.reduce(
852
+ (sum, ext) => sum + ext.msgValue,
853
+ 0n
854
+ );
855
+ const txHash = await this.walletClient.writeContract({
856
+ address: ADDRESSES.FACTORY,
857
+ abi: LiquidFactoryAbi,
858
+ functionName: "deployToken",
859
+ args: [deploymentConfig],
860
+ value: msgValue,
861
+ chain: base2,
862
+ account: this.walletClient.account
863
+ });
864
+ const receipt = await this.publicClient.waitForTransactionReceipt({
865
+ hash: txHash
866
+ });
867
+ const tokenCreatedLog = receipt.logs.find((log) => {
868
+ try {
869
+ const decoded2 = decodeEventLog({
870
+ abi: LiquidFactoryAbi,
871
+ data: log.data,
872
+ topics: log.topics
873
+ });
874
+ return decoded2.eventName === "TokenCreated";
875
+ } catch {
876
+ return false;
877
+ }
878
+ });
879
+ if (!tokenCreatedLog) {
880
+ throw new Error("TokenCreated event not found in transaction receipt");
881
+ }
882
+ const decoded = decodeEventLog({
883
+ abi: LiquidFactoryAbi,
884
+ data: tokenCreatedLog.data,
885
+ topics: tokenCreatedLog.topics
886
+ });
887
+ const args = decoded.args;
888
+ return {
889
+ tokenAddress: getAddress(args.tokenAddress),
890
+ txHash,
891
+ event: {
892
+ msgSender: args.msgSender,
893
+ tokenAddress: args.tokenAddress,
894
+ tokenAdmin: args.tokenAdmin,
895
+ tokenImage: args.tokenImage,
896
+ tokenName: args.tokenName,
897
+ tokenSymbol: args.tokenSymbol,
898
+ tokenMetadata: args.tokenMetadata,
899
+ tokenContext: args.tokenContext,
900
+ startingTick: args.startingTick,
901
+ poolHook: args.poolHook,
902
+ poolId: args.poolId,
903
+ pairedToken: args.pairedToken,
904
+ locker: args.locker,
905
+ mevModule: args.mevModule,
906
+ extensionsSupply: args.extensionsSupply,
907
+ extensions: args.extensions
908
+ }
909
+ };
910
+ }
911
+ // ── Token Info ────────────────────────────────────────────────────
912
+ async getDeploymentInfo(tokenAddress) {
913
+ const result = await this.publicClient.readContract({
914
+ address: ADDRESSES.FACTORY,
915
+ abi: LiquidFactoryAbi,
916
+ functionName: "tokenDeploymentInfo",
917
+ args: [tokenAddress]
918
+ });
919
+ const data = result;
920
+ return {
921
+ token: data.token,
922
+ hook: data.hook,
923
+ locker: data.locker,
924
+ extensions: data.extensions
925
+ };
926
+ }
927
+ async getTokenInfo(tokenAddress) {
928
+ const [name, symbol, decimals, totalSupply] = await Promise.all([
929
+ this.publicClient.readContract({
930
+ address: tokenAddress,
931
+ abi: ERC20Abi,
932
+ functionName: "name"
933
+ }),
934
+ this.publicClient.readContract({
935
+ address: tokenAddress,
936
+ abi: ERC20Abi,
937
+ functionName: "symbol"
938
+ }),
939
+ this.publicClient.readContract({
940
+ address: tokenAddress,
941
+ abi: ERC20Abi,
942
+ functionName: "decimals"
943
+ }),
944
+ this.publicClient.readContract({
945
+ address: tokenAddress,
946
+ abi: ERC20Abi,
947
+ functionName: "totalSupply"
948
+ })
949
+ ]);
950
+ const deployment = await this.getDeploymentInfo(tokenAddress);
951
+ return {
952
+ address: tokenAddress,
953
+ name,
954
+ symbol,
955
+ decimals,
956
+ totalSupply,
957
+ deployment
958
+ };
959
+ }
960
+ // ── Pool Info ─────────────────────────────────────────────────────
961
+ async getPoolConfig(poolId, hookAddress) {
962
+ const hook = hookAddress ?? ADDRESSES.HOOK_DYNAMIC_FEE_V2;
963
+ const result = await this.publicClient.readContract({
964
+ address: hook,
965
+ abi: LiquidHookDynamicFeeV2Abi,
966
+ functionName: "poolConfigVars",
967
+ args: [poolId]
968
+ });
969
+ const data = result;
970
+ return {
971
+ baseFee: data.baseFee,
972
+ maxLpFee: data.maxLpFee,
973
+ referenceTickFilterPeriod: data.referenceTickFilterPeriod,
974
+ resetPeriod: data.resetPeriod,
975
+ resetTickFilter: data.resetTickFilter,
976
+ feeControlNumerator: data.feeControlNumerator,
977
+ decayFilterBps: data.decayFilterBps
978
+ };
979
+ }
980
+ async getPoolFeeState(poolId, hookAddress) {
981
+ const hook = hookAddress ?? ADDRESSES.HOOK_DYNAMIC_FEE_V2;
982
+ const result = await this.publicClient.readContract({
983
+ address: hook,
984
+ abi: LiquidHookDynamicFeeV2Abi,
985
+ functionName: "poolFeeVars",
986
+ args: [poolId]
987
+ });
988
+ const data = result;
989
+ return {
990
+ referenceTick: data.referenceTick,
991
+ resetTick: data.resetTick,
992
+ resetTickTimestamp: data.resetTickTimestamp,
993
+ lastSwapTimestamp: data.lastSwapTimestamp,
994
+ appliedVR: data.appliedVR,
995
+ prevVA: data.prevVA
996
+ };
997
+ }
998
+ async getPoolCreationTimestamp(poolId, hookAddress) {
999
+ const hook = hookAddress ?? ADDRESSES.HOOK_DYNAMIC_FEE_V2;
1000
+ return await this.publicClient.readContract({
1001
+ address: hook,
1002
+ abi: LiquidHookDynamicFeeV2Abi,
1003
+ functionName: "poolCreationTimestamp",
1004
+ args: [poolId]
1005
+ });
1006
+ }
1007
+ async isLiquidToken0(poolId, hookAddress) {
1008
+ const hook = hookAddress ?? ADDRESSES.HOOK_DYNAMIC_FEE_V2;
1009
+ return await this.publicClient.readContract({
1010
+ address: hook,
1011
+ abi: LiquidHookDynamicFeeV2Abi,
1012
+ functionName: "liquidIsToken0",
1013
+ args: [poolId]
1014
+ });
1015
+ }
1016
+ // ── Fee Claims ────────────────────────────────────────────────────
1017
+ async getAvailableFees(feeOwner, tokenAddress) {
1018
+ return await this.publicClient.readContract({
1019
+ address: ADDRESSES.FEE_LOCKER,
1020
+ abi: LiquidFeeLockerAbi,
1021
+ functionName: "availableFees",
1022
+ args: [feeOwner, tokenAddress]
1023
+ });
1024
+ }
1025
+ async getFeesToClaim(feeOwner, tokenAddress) {
1026
+ return await this.publicClient.readContract({
1027
+ address: ADDRESSES.FEE_LOCKER,
1028
+ abi: LiquidFeeLockerAbi,
1029
+ functionName: "feesToClaim",
1030
+ args: [feeOwner, tokenAddress]
1031
+ });
1032
+ }
1033
+ async claimFees(feeOwner, tokenAddress) {
1034
+ if (!this.walletClient?.account) {
1035
+ throw new Error("walletClient with account required for claimFees");
1036
+ }
1037
+ return this.walletClient.writeContract({
1038
+ address: ADDRESSES.FEE_LOCKER,
1039
+ abi: LiquidFeeLockerAbi,
1040
+ functionName: "claim",
1041
+ args: [feeOwner, tokenAddress],
1042
+ chain: base2,
1043
+ account: this.walletClient.account
1044
+ });
1045
+ }
1046
+ // ── Vault ─────────────────────────────────────────────────────────
1047
+ async getVaultAllocation(tokenAddress) {
1048
+ const result = await this.publicClient.readContract({
1049
+ address: ADDRESSES.VAULT,
1050
+ abi: LiquidVaultAbi,
1051
+ functionName: "allocation",
1052
+ args: [tokenAddress]
1053
+ });
1054
+ const data = result;
1055
+ return {
1056
+ token: data[0] ?? data.token,
1057
+ amountTotal: data[1] ?? data.amountTotal,
1058
+ amountClaimed: data[2] ?? data.amountClaimed,
1059
+ lockupEndTime: data[3] ?? data.lockupEndTime,
1060
+ vestingEndTime: data[4] ?? data.vestingEndTime,
1061
+ admin: data[5] ?? data.admin
1062
+ };
1063
+ }
1064
+ async getVaultClaimable(tokenAddress) {
1065
+ return await this.publicClient.readContract({
1066
+ address: ADDRESSES.VAULT,
1067
+ abi: LiquidVaultAbi,
1068
+ functionName: "amountAvailableToClaim",
1069
+ args: [tokenAddress]
1070
+ });
1071
+ }
1072
+ async claimVault(tokenAddress) {
1073
+ if (!this.walletClient?.account) {
1074
+ throw new Error("walletClient with account required for claimVault");
1075
+ }
1076
+ return this.walletClient.writeContract({
1077
+ address: ADDRESSES.VAULT,
1078
+ abi: LiquidVaultAbi,
1079
+ functionName: "claim",
1080
+ args: [tokenAddress],
1081
+ chain: base2,
1082
+ account: this.walletClient.account
1083
+ });
1084
+ }
1085
+ // ── Factory Status ────────────────────────────────────────────────
1086
+ async isFactoryDeprecated() {
1087
+ return await this.publicClient.readContract({
1088
+ address: ADDRESSES.FACTORY,
1089
+ abi: LiquidFactoryAbi,
1090
+ functionName: "deprecated"
1091
+ });
1092
+ }
1093
+ async isLockerEnabled(locker, hook) {
1094
+ return await this.publicClient.readContract({
1095
+ address: ADDRESSES.FACTORY,
1096
+ abi: LiquidFactoryAbi,
1097
+ functionName: "enabledLockers",
1098
+ args: [locker, hook]
1099
+ });
1100
+ }
1101
+ // ── Sniper Auction ─────────────────────────────────────────────────
1102
+ async getAuctionState(poolId) {
1103
+ const [nextAuctionBlock, round, gasPeg, currentFee] = await Promise.all([
1104
+ this.publicClient.readContract({
1105
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1106
+ abi: LiquidSniperAuctionV2Abi,
1107
+ functionName: "nextAuctionBlock",
1108
+ args: [poolId]
1109
+ }),
1110
+ this.publicClient.readContract({
1111
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1112
+ abi: LiquidSniperAuctionV2Abi,
1113
+ functionName: "round",
1114
+ args: [poolId]
1115
+ }),
1116
+ this.publicClient.readContract({
1117
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1118
+ abi: LiquidSniperAuctionV2Abi,
1119
+ functionName: "gasPeg",
1120
+ args: [poolId]
1121
+ }),
1122
+ this.publicClient.readContract({
1123
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1124
+ abi: LiquidSniperAuctionV2Abi,
1125
+ functionName: "getFee",
1126
+ args: [poolId]
1127
+ })
1128
+ ]);
1129
+ return {
1130
+ nextAuctionBlock,
1131
+ round,
1132
+ gasPeg,
1133
+ currentFee
1134
+ };
1135
+ }
1136
+ async getAuctionFeeConfig(poolId) {
1137
+ const result = await this.publicClient.readContract({
1138
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1139
+ abi: LiquidSniperAuctionV2Abi,
1140
+ functionName: "feeConfig",
1141
+ args: [poolId]
1142
+ });
1143
+ const data = result;
1144
+ return {
1145
+ startingFee: Array.isArray(data) ? data[0] : data.startingFee,
1146
+ endingFee: Array.isArray(data) ? data[1] : data.endingFee,
1147
+ secondsToDecay: Array.isArray(data) ? data[2] : data.secondsToDecay
1148
+ };
1149
+ }
1150
+ async getAuctionDecayStartTime(poolId) {
1151
+ return await this.publicClient.readContract({
1152
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1153
+ abi: LiquidSniperAuctionV2Abi,
1154
+ functionName: "poolDecayStartTime",
1155
+ args: [poolId]
1156
+ });
1157
+ }
1158
+ async getAuctionMaxRounds() {
1159
+ return await this.publicClient.readContract({
1160
+ address: ADDRESSES.SNIPER_AUCTION_V2,
1161
+ abi: LiquidSniperAuctionV2Abi,
1162
+ functionName: "maxRounds"
1163
+ });
1164
+ }
1165
+ async getAuctionGasPriceForBid(auctionGasPeg, desiredBidAmount) {
1166
+ return await this.publicClient.readContract({
1167
+ address: ADDRESSES.SNIPER_UTIL_V2,
1168
+ abi: LiquidSniperUtilV2Abi,
1169
+ functionName: "getTxGasPriceForBidAmount",
1170
+ args: [auctionGasPeg, desiredBidAmount]
1171
+ });
1172
+ }
1173
+ // ── Airdrop ─────────────────────────────────────────────────────────
1174
+ async getAirdropInfo(tokenAddress) {
1175
+ const result = await this.publicClient.readContract({
1176
+ address: ADDRESSES.AIRDROP_V2,
1177
+ abi: LiquidAirdropV2Abi,
1178
+ functionName: "airdrops",
1179
+ args: [tokenAddress]
1180
+ });
1181
+ const data = result;
1182
+ return {
1183
+ admin: Array.isArray(data) ? data[0] : data.admin,
1184
+ merkleRoot: Array.isArray(data) ? data[1] : data.merkleRoot,
1185
+ totalSupply: Array.isArray(data) ? data[2] : data.totalSupply,
1186
+ totalClaimed: Array.isArray(data) ? data[3] : data.totalClaimed,
1187
+ lockupEndTime: Array.isArray(data) ? data[4] : data.lockupEndTime,
1188
+ vestingEndTime: Array.isArray(data) ? data[5] : data.vestingEndTime,
1189
+ adminClaimTime: Array.isArray(data) ? data[6] : data.adminClaimTime,
1190
+ adminClaimed: Array.isArray(data) ? data[7] : data.adminClaimed
1191
+ };
1192
+ }
1193
+ async getAirdropClaimable(tokenAddress, recipient, allocatedAmount) {
1194
+ return await this.publicClient.readContract({
1195
+ address: ADDRESSES.AIRDROP_V2,
1196
+ abi: LiquidAirdropV2Abi,
1197
+ functionName: "amountAvailableToClaim",
1198
+ args: [tokenAddress, recipient, allocatedAmount]
1199
+ });
1200
+ }
1201
+ async claimAirdrop(tokenAddress, recipient, allocatedAmount, proof) {
1202
+ if (!this.walletClient?.account) {
1203
+ throw new Error("walletClient with account required for claimAirdrop");
1204
+ }
1205
+ return this.walletClient.writeContract({
1206
+ address: ADDRESSES.AIRDROP_V2,
1207
+ abi: LiquidAirdropV2Abi,
1208
+ functionName: "claim",
1209
+ args: [tokenAddress, recipient, allocatedAmount, proof],
1210
+ chain: base2,
1211
+ account: this.walletClient.account
1212
+ });
1213
+ }
1214
+ // ── LP Locker ───────────────────────────────────────────────────────
1215
+ async getTokenRewards(tokenAddress, lockerAddress) {
1216
+ const locker = lockerAddress ?? ADDRESSES.LP_LOCKER;
1217
+ const result = await this.publicClient.readContract({
1218
+ address: locker,
1219
+ abi: LiquidLpLockerAbi,
1220
+ functionName: "tokenRewards",
1221
+ args: [tokenAddress]
1222
+ });
1223
+ const data = result;
1224
+ return {
1225
+ token: data.token,
1226
+ poolKey: data.poolKey,
1227
+ positionId: data.positionId,
1228
+ numPositions: data.numPositions,
1229
+ rewardBps: [...data.rewardBps],
1230
+ rewardAdmins: [...data.rewardAdmins],
1231
+ rewardRecipients: [...data.rewardRecipients]
1232
+ };
1233
+ }
1234
+ async collectRewards(tokenAddress, lockerAddress) {
1235
+ if (!this.walletClient?.account) {
1236
+ throw new Error("walletClient with account required for collectRewards");
1237
+ }
1238
+ const locker = lockerAddress ?? ADDRESSES.LP_LOCKER;
1239
+ return this.walletClient.writeContract({
1240
+ address: locker,
1241
+ abi: LiquidLpLockerAbi,
1242
+ functionName: "collectRewards",
1243
+ args: [tokenAddress],
1244
+ chain: base2,
1245
+ account: this.walletClient.account
1246
+ });
1247
+ }
1248
+ async collectRewardsWithoutUnlock(tokenAddress, lockerAddress) {
1249
+ if (!this.walletClient?.account) {
1250
+ throw new Error(
1251
+ "walletClient with account required for collectRewardsWithoutUnlock"
1252
+ );
1253
+ }
1254
+ const locker = lockerAddress ?? ADDRESSES.LP_LOCKER;
1255
+ return this.walletClient.writeContract({
1256
+ address: locker,
1257
+ abi: LiquidLpLockerAbi,
1258
+ functionName: "collectRewardsWithoutUnlock",
1259
+ args: [tokenAddress],
1260
+ chain: base2,
1261
+ account: this.walletClient.account
1262
+ });
1263
+ }
1264
+ async updateRewardRecipient(tokenAddress, rewardIndex, newRecipient, lockerAddress) {
1265
+ if (!this.walletClient?.account) {
1266
+ throw new Error(
1267
+ "walletClient with account required for updateRewardRecipient"
1268
+ );
1269
+ }
1270
+ const locker = lockerAddress ?? ADDRESSES.LP_LOCKER;
1271
+ return this.walletClient.writeContract({
1272
+ address: locker,
1273
+ abi: LiquidLpLockerAbi,
1274
+ functionName: "updateRewardRecipient",
1275
+ args: [tokenAddress, rewardIndex, newRecipient],
1276
+ chain: base2,
1277
+ account: this.walletClient.account
1278
+ });
1279
+ }
1280
+ // ── Pool Extension Allowlist ────────────────────────────────────────
1281
+ async isExtensionEnabled(extensionAddress) {
1282
+ return await this.publicClient.readContract({
1283
+ address: ADDRESSES.POOL_EXTENSION_ALLOWLIST,
1284
+ abi: LiquidPoolExtensionAllowlistAbi,
1285
+ functionName: "enabledExtensions",
1286
+ args: [extensionAddress]
1287
+ });
1288
+ }
1289
+ // ── MEV Block Delay ─────────────────────────────────────────────────
1290
+ async getMevBlockDelay() {
1291
+ return await this.publicClient.readContract({
1292
+ address: ADDRESSES.MEV_BLOCK_DELAY,
1293
+ abi: LiquidMevBlockDelayAbi,
1294
+ functionName: "blockDelay"
1295
+ });
1296
+ }
1297
+ async getPoolUnlockTime(poolId) {
1298
+ return await this.publicClient.readContract({
1299
+ address: ADDRESSES.MEV_BLOCK_DELAY,
1300
+ abi: LiquidMevBlockDelayAbi,
1301
+ functionName: "poolUnlockTime",
1302
+ args: [poolId]
1303
+ });
1304
+ }
1305
+ };
1306
+ export {
1307
+ ADDRESSES,
1308
+ DEFAULT_CHAIN,
1309
+ DEFAULT_CHAIN_ID,
1310
+ ERC20Abi,
1311
+ EXTERNAL,
1312
+ FEE,
1313
+ LiquidAirdropV2Abi,
1314
+ LiquidFactoryAbi,
1315
+ LiquidFeeLockerAbi,
1316
+ LiquidHookDynamicFeeV2Abi,
1317
+ LiquidLpLockerAbi,
1318
+ LiquidMevBlockDelayAbi,
1319
+ LiquidPoolExtensionAllowlistAbi,
1320
+ LiquidSDK,
1321
+ LiquidSniperAuctionV2Abi,
1322
+ LiquidSniperUtilV2Abi,
1323
+ LiquidVaultAbi,
1324
+ TOKEN
1325
+ };
1326
+ //# sourceMappingURL=index.mjs.map