@hammerock/cca-sdk 0.1.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.
@@ -0,0 +1,2717 @@
1
+ import * as viem from 'viem';
2
+ import { Address, Hex } from 'viem';
3
+ export { Address, Chain, Hex } from 'viem';
4
+ import { B as BeaconClient, D as DiscoveredAuction, A as AuctionInfo, a as AuctionStatus, b as AuctionState, c as AuctionSummary } from './erc20-C3yff839.js';
5
+ export { d as BeaconClientConfig, C as Checkpoint, T as TokenMetadata, e as assertChainMatches, f as assertSupportedChain, g as createBeaconClient, h as erc20MetadataAbi, i as formatTokenAmount, j as getTokenMetadata, k as getTokenMetadataBatch } from './erc20-C3yff839.js';
6
+ import * as viem_chains from 'viem/chains';
7
+
8
+ declare const auctionAbi: readonly [{
9
+ readonly type: "constructor";
10
+ readonly inputs: readonly [{
11
+ readonly name: "_token";
12
+ readonly type: "address";
13
+ readonly internalType: "address";
14
+ }, {
15
+ readonly name: "_totalSupply";
16
+ readonly type: "uint128";
17
+ readonly internalType: "uint128";
18
+ }, {
19
+ readonly name: "_parameters";
20
+ readonly type: "tuple";
21
+ readonly internalType: "struct AuctionParameters";
22
+ readonly components: readonly [{
23
+ readonly name: "currency";
24
+ readonly type: "address";
25
+ readonly internalType: "address";
26
+ }, {
27
+ readonly name: "tokensRecipient";
28
+ readonly type: "address";
29
+ readonly internalType: "address";
30
+ }, {
31
+ readonly name: "fundsRecipient";
32
+ readonly type: "address";
33
+ readonly internalType: "address";
34
+ }, {
35
+ readonly name: "startBlock";
36
+ readonly type: "uint64";
37
+ readonly internalType: "uint64";
38
+ }, {
39
+ readonly name: "endBlock";
40
+ readonly type: "uint64";
41
+ readonly internalType: "uint64";
42
+ }, {
43
+ readonly name: "claimBlock";
44
+ readonly type: "uint64";
45
+ readonly internalType: "uint64";
46
+ }, {
47
+ readonly name: "tickSpacing";
48
+ readonly type: "uint256";
49
+ readonly internalType: "uint256";
50
+ }, {
51
+ readonly name: "validationHook";
52
+ readonly type: "address";
53
+ readonly internalType: "address";
54
+ }, {
55
+ readonly name: "floorPrice";
56
+ readonly type: "uint256";
57
+ readonly internalType: "uint256";
58
+ }, {
59
+ readonly name: "requiredCurrencyRaised";
60
+ readonly type: "uint128";
61
+ readonly internalType: "uint128";
62
+ }, {
63
+ readonly name: "auctionStepsData";
64
+ readonly type: "bytes";
65
+ readonly internalType: "bytes";
66
+ }];
67
+ }];
68
+ readonly stateMutability: "nonpayable";
69
+ }, {
70
+ readonly type: "function";
71
+ readonly name: "MAX_BID_PRICE";
72
+ readonly inputs: readonly [];
73
+ readonly outputs: readonly [{
74
+ readonly name: "";
75
+ readonly type: "uint256";
76
+ readonly internalType: "uint256";
77
+ }];
78
+ readonly stateMutability: "view";
79
+ }, {
80
+ readonly type: "function";
81
+ readonly name: "MAX_BLOCK_NUMBER";
82
+ readonly inputs: readonly [];
83
+ readonly outputs: readonly [{
84
+ readonly name: "";
85
+ readonly type: "uint64";
86
+ readonly internalType: "uint64";
87
+ }];
88
+ readonly stateMutability: "view";
89
+ }, {
90
+ readonly type: "function";
91
+ readonly name: "MAX_TICK_PTR";
92
+ readonly inputs: readonly [];
93
+ readonly outputs: readonly [{
94
+ readonly name: "";
95
+ readonly type: "uint256";
96
+ readonly internalType: "uint256";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ }, {
100
+ readonly type: "function";
101
+ readonly name: "bids";
102
+ readonly inputs: readonly [{
103
+ readonly name: "bidId";
104
+ readonly type: "uint256";
105
+ readonly internalType: "uint256";
106
+ }];
107
+ readonly outputs: readonly [{
108
+ readonly name: "";
109
+ readonly type: "tuple";
110
+ readonly internalType: "struct Bid";
111
+ readonly components: readonly [{
112
+ readonly name: "startBlock";
113
+ readonly type: "uint64";
114
+ readonly internalType: "uint64";
115
+ }, {
116
+ readonly name: "startCumulativeMps";
117
+ readonly type: "uint24";
118
+ readonly internalType: "uint24";
119
+ }, {
120
+ readonly name: "exitedBlock";
121
+ readonly type: "uint64";
122
+ readonly internalType: "uint64";
123
+ }, {
124
+ readonly name: "maxPrice";
125
+ readonly type: "uint256";
126
+ readonly internalType: "uint256";
127
+ }, {
128
+ readonly name: "owner";
129
+ readonly type: "address";
130
+ readonly internalType: "address";
131
+ }, {
132
+ readonly name: "amountQ96";
133
+ readonly type: "uint256";
134
+ readonly internalType: "uint256";
135
+ }, {
136
+ readonly name: "tokensFilled";
137
+ readonly type: "uint256";
138
+ readonly internalType: "uint256";
139
+ }];
140
+ }];
141
+ readonly stateMutability: "view";
142
+ }, {
143
+ readonly type: "function";
144
+ readonly name: "checkpoint";
145
+ readonly inputs: readonly [];
146
+ readonly outputs: readonly [{
147
+ readonly name: "";
148
+ readonly type: "tuple";
149
+ readonly internalType: "struct Checkpoint";
150
+ readonly components: readonly [{
151
+ readonly name: "clearingPrice";
152
+ readonly type: "uint256";
153
+ readonly internalType: "uint256";
154
+ }, {
155
+ readonly name: "currencyRaisedAtClearingPriceQ96_X7";
156
+ readonly type: "uint256";
157
+ readonly internalType: "ValueX7";
158
+ }, {
159
+ readonly name: "cumulativeMpsPerPrice";
160
+ readonly type: "uint256";
161
+ readonly internalType: "uint256";
162
+ }, {
163
+ readonly name: "cumulativeMps";
164
+ readonly type: "uint24";
165
+ readonly internalType: "uint24";
166
+ }, {
167
+ readonly name: "prev";
168
+ readonly type: "uint64";
169
+ readonly internalType: "uint64";
170
+ }, {
171
+ readonly name: "next";
172
+ readonly type: "uint64";
173
+ readonly internalType: "uint64";
174
+ }];
175
+ }];
176
+ readonly stateMutability: "nonpayable";
177
+ }, {
178
+ readonly type: "function";
179
+ readonly name: "checkpoints";
180
+ readonly inputs: readonly [{
181
+ readonly name: "blockNumber";
182
+ readonly type: "uint64";
183
+ readonly internalType: "uint64";
184
+ }];
185
+ readonly outputs: readonly [{
186
+ readonly name: "";
187
+ readonly type: "tuple";
188
+ readonly internalType: "struct Checkpoint";
189
+ readonly components: readonly [{
190
+ readonly name: "clearingPrice";
191
+ readonly type: "uint256";
192
+ readonly internalType: "uint256";
193
+ }, {
194
+ readonly name: "currencyRaisedAtClearingPriceQ96_X7";
195
+ readonly type: "uint256";
196
+ readonly internalType: "ValueX7";
197
+ }, {
198
+ readonly name: "cumulativeMpsPerPrice";
199
+ readonly type: "uint256";
200
+ readonly internalType: "uint256";
201
+ }, {
202
+ readonly name: "cumulativeMps";
203
+ readonly type: "uint24";
204
+ readonly internalType: "uint24";
205
+ }, {
206
+ readonly name: "prev";
207
+ readonly type: "uint64";
208
+ readonly internalType: "uint64";
209
+ }, {
210
+ readonly name: "next";
211
+ readonly type: "uint64";
212
+ readonly internalType: "uint64";
213
+ }];
214
+ }];
215
+ readonly stateMutability: "view";
216
+ }, {
217
+ readonly type: "function";
218
+ readonly name: "claimBlock";
219
+ readonly inputs: readonly [];
220
+ readonly outputs: readonly [{
221
+ readonly name: "";
222
+ readonly type: "uint64";
223
+ readonly internalType: "uint64";
224
+ }];
225
+ readonly stateMutability: "view";
226
+ }, {
227
+ readonly type: "function";
228
+ readonly name: "claimTokens";
229
+ readonly inputs: readonly [{
230
+ readonly name: "_bidId";
231
+ readonly type: "uint256";
232
+ readonly internalType: "uint256";
233
+ }];
234
+ readonly outputs: readonly [];
235
+ readonly stateMutability: "nonpayable";
236
+ }, {
237
+ readonly type: "function";
238
+ readonly name: "claimTokensBatch";
239
+ readonly inputs: readonly [{
240
+ readonly name: "_owner";
241
+ readonly type: "address";
242
+ readonly internalType: "address";
243
+ }, {
244
+ readonly name: "_bidIds";
245
+ readonly type: "uint256[]";
246
+ readonly internalType: "uint256[]";
247
+ }];
248
+ readonly outputs: readonly [];
249
+ readonly stateMutability: "nonpayable";
250
+ }, {
251
+ readonly type: "function";
252
+ readonly name: "clearingPrice";
253
+ readonly inputs: readonly [];
254
+ readonly outputs: readonly [{
255
+ readonly name: "";
256
+ readonly type: "uint256";
257
+ readonly internalType: "uint256";
258
+ }];
259
+ readonly stateMutability: "view";
260
+ }, {
261
+ readonly type: "function";
262
+ readonly name: "currency";
263
+ readonly inputs: readonly [];
264
+ readonly outputs: readonly [{
265
+ readonly name: "";
266
+ readonly type: "address";
267
+ readonly internalType: "address";
268
+ }];
269
+ readonly stateMutability: "view";
270
+ }, {
271
+ readonly type: "function";
272
+ readonly name: "currencyRaised";
273
+ readonly inputs: readonly [];
274
+ readonly outputs: readonly [{
275
+ readonly name: "";
276
+ readonly type: "uint256";
277
+ readonly internalType: "uint256";
278
+ }];
279
+ readonly stateMutability: "view";
280
+ }, {
281
+ readonly type: "function";
282
+ readonly name: "currencyRaisedQ96_X7";
283
+ readonly inputs: readonly [];
284
+ readonly outputs: readonly [{
285
+ readonly name: "";
286
+ readonly type: "uint256";
287
+ readonly internalType: "ValueX7";
288
+ }];
289
+ readonly stateMutability: "view";
290
+ }, {
291
+ readonly type: "function";
292
+ readonly name: "endBlock";
293
+ readonly inputs: readonly [];
294
+ readonly outputs: readonly [{
295
+ readonly name: "";
296
+ readonly type: "uint64";
297
+ readonly internalType: "uint64";
298
+ }];
299
+ readonly stateMutability: "view";
300
+ }, {
301
+ readonly type: "function";
302
+ readonly name: "exitBid";
303
+ readonly inputs: readonly [{
304
+ readonly name: "_bidId";
305
+ readonly type: "uint256";
306
+ readonly internalType: "uint256";
307
+ }];
308
+ readonly outputs: readonly [];
309
+ readonly stateMutability: "nonpayable";
310
+ }, {
311
+ readonly type: "function";
312
+ readonly name: "exitPartiallyFilledBid";
313
+ readonly inputs: readonly [{
314
+ readonly name: "_bidId";
315
+ readonly type: "uint256";
316
+ readonly internalType: "uint256";
317
+ }, {
318
+ readonly name: "_lastFullyFilledCheckpointBlock";
319
+ readonly type: "uint64";
320
+ readonly internalType: "uint64";
321
+ }, {
322
+ readonly name: "_outbidBlock";
323
+ readonly type: "uint64";
324
+ readonly internalType: "uint64";
325
+ }];
326
+ readonly outputs: readonly [];
327
+ readonly stateMutability: "nonpayable";
328
+ }, {
329
+ readonly type: "function";
330
+ readonly name: "floorPrice";
331
+ readonly inputs: readonly [];
332
+ readonly outputs: readonly [{
333
+ readonly name: "";
334
+ readonly type: "uint256";
335
+ readonly internalType: "uint256";
336
+ }];
337
+ readonly stateMutability: "view";
338
+ }, {
339
+ readonly type: "function";
340
+ readonly name: "forceIterateOverTicks";
341
+ readonly inputs: readonly [{
342
+ readonly name: "_untilTickPrice";
343
+ readonly type: "uint256";
344
+ readonly internalType: "uint256";
345
+ }];
346
+ readonly outputs: readonly [{
347
+ readonly name: "";
348
+ readonly type: "uint256";
349
+ readonly internalType: "uint256";
350
+ }];
351
+ readonly stateMutability: "nonpayable";
352
+ }, {
353
+ readonly type: "function";
354
+ readonly name: "fundsRecipient";
355
+ readonly inputs: readonly [];
356
+ readonly outputs: readonly [{
357
+ readonly name: "";
358
+ readonly type: "address";
359
+ readonly internalType: "address";
360
+ }];
361
+ readonly stateMutability: "view";
362
+ }, {
363
+ readonly type: "function";
364
+ readonly name: "isGraduated";
365
+ readonly inputs: readonly [];
366
+ readonly outputs: readonly [{
367
+ readonly name: "";
368
+ readonly type: "bool";
369
+ readonly internalType: "bool";
370
+ }];
371
+ readonly stateMutability: "view";
372
+ }, {
373
+ readonly type: "function";
374
+ readonly name: "lastCheckpointedBlock";
375
+ readonly inputs: readonly [];
376
+ readonly outputs: readonly [{
377
+ readonly name: "";
378
+ readonly type: "uint64";
379
+ readonly internalType: "uint64";
380
+ }];
381
+ readonly stateMutability: "view";
382
+ }, {
383
+ readonly type: "function";
384
+ readonly name: "latestCheckpoint";
385
+ readonly inputs: readonly [];
386
+ readonly outputs: readonly [{
387
+ readonly name: "";
388
+ readonly type: "tuple";
389
+ readonly internalType: "struct Checkpoint";
390
+ readonly components: readonly [{
391
+ readonly name: "clearingPrice";
392
+ readonly type: "uint256";
393
+ readonly internalType: "uint256";
394
+ }, {
395
+ readonly name: "currencyRaisedAtClearingPriceQ96_X7";
396
+ readonly type: "uint256";
397
+ readonly internalType: "ValueX7";
398
+ }, {
399
+ readonly name: "cumulativeMpsPerPrice";
400
+ readonly type: "uint256";
401
+ readonly internalType: "uint256";
402
+ }, {
403
+ readonly name: "cumulativeMps";
404
+ readonly type: "uint24";
405
+ readonly internalType: "uint24";
406
+ }, {
407
+ readonly name: "prev";
408
+ readonly type: "uint64";
409
+ readonly internalType: "uint64";
410
+ }, {
411
+ readonly name: "next";
412
+ readonly type: "uint64";
413
+ readonly internalType: "uint64";
414
+ }];
415
+ }];
416
+ readonly stateMutability: "view";
417
+ }, {
418
+ readonly type: "function";
419
+ readonly name: "lbpInitializationParams";
420
+ readonly inputs: readonly [];
421
+ readonly outputs: readonly [{
422
+ readonly name: "params";
423
+ readonly type: "tuple";
424
+ readonly internalType: "struct LBPInitializationParams";
425
+ readonly components: readonly [{
426
+ readonly name: "initialPriceX96";
427
+ readonly type: "uint256";
428
+ readonly internalType: "uint256";
429
+ }, {
430
+ readonly name: "tokensSold";
431
+ readonly type: "uint256";
432
+ readonly internalType: "uint256";
433
+ }, {
434
+ readonly name: "currencyRaised";
435
+ readonly type: "uint256";
436
+ readonly internalType: "uint256";
437
+ }];
438
+ }];
439
+ readonly stateMutability: "view";
440
+ }, {
441
+ readonly type: "function";
442
+ readonly name: "nextActiveTickPrice";
443
+ readonly inputs: readonly [];
444
+ readonly outputs: readonly [{
445
+ readonly name: "";
446
+ readonly type: "uint256";
447
+ readonly internalType: "uint256";
448
+ }];
449
+ readonly stateMutability: "view";
450
+ }, {
451
+ readonly type: "function";
452
+ readonly name: "nextBidId";
453
+ readonly inputs: readonly [];
454
+ readonly outputs: readonly [{
455
+ readonly name: "";
456
+ readonly type: "uint256";
457
+ readonly internalType: "uint256";
458
+ }];
459
+ readonly stateMutability: "view";
460
+ }, {
461
+ readonly type: "function";
462
+ readonly name: "onTokensReceived";
463
+ readonly inputs: readonly [];
464
+ readonly outputs: readonly [];
465
+ readonly stateMutability: "nonpayable";
466
+ }, {
467
+ readonly type: "function";
468
+ readonly name: "pointer";
469
+ readonly inputs: readonly [];
470
+ readonly outputs: readonly [{
471
+ readonly name: "";
472
+ readonly type: "address";
473
+ readonly internalType: "address";
474
+ }];
475
+ readonly stateMutability: "view";
476
+ }, {
477
+ readonly type: "function";
478
+ readonly name: "startBlock";
479
+ readonly inputs: readonly [];
480
+ readonly outputs: readonly [{
481
+ readonly name: "";
482
+ readonly type: "uint64";
483
+ readonly internalType: "uint64";
484
+ }];
485
+ readonly stateMutability: "view";
486
+ }, {
487
+ readonly type: "function";
488
+ readonly name: "step";
489
+ readonly inputs: readonly [];
490
+ readonly outputs: readonly [{
491
+ readonly name: "";
492
+ readonly type: "tuple";
493
+ readonly internalType: "struct AuctionStep";
494
+ readonly components: readonly [{
495
+ readonly name: "mps";
496
+ readonly type: "uint24";
497
+ readonly internalType: "uint24";
498
+ }, {
499
+ readonly name: "startBlock";
500
+ readonly type: "uint64";
501
+ readonly internalType: "uint64";
502
+ }, {
503
+ readonly name: "endBlock";
504
+ readonly type: "uint64";
505
+ readonly internalType: "uint64";
506
+ }];
507
+ }];
508
+ readonly stateMutability: "view";
509
+ }, {
510
+ readonly type: "function";
511
+ readonly name: "submitBid";
512
+ readonly inputs: readonly [{
513
+ readonly name: "_maxPrice";
514
+ readonly type: "uint256";
515
+ readonly internalType: "uint256";
516
+ }, {
517
+ readonly name: "_amount";
518
+ readonly type: "uint128";
519
+ readonly internalType: "uint128";
520
+ }, {
521
+ readonly name: "_owner";
522
+ readonly type: "address";
523
+ readonly internalType: "address";
524
+ }, {
525
+ readonly name: "_hookData";
526
+ readonly type: "bytes";
527
+ readonly internalType: "bytes";
528
+ }];
529
+ readonly outputs: readonly [{
530
+ readonly name: "";
531
+ readonly type: "uint256";
532
+ readonly internalType: "uint256";
533
+ }];
534
+ readonly stateMutability: "payable";
535
+ }, {
536
+ readonly type: "function";
537
+ readonly name: "submitBid";
538
+ readonly inputs: readonly [{
539
+ readonly name: "_maxPrice";
540
+ readonly type: "uint256";
541
+ readonly internalType: "uint256";
542
+ }, {
543
+ readonly name: "_amount";
544
+ readonly type: "uint128";
545
+ readonly internalType: "uint128";
546
+ }, {
547
+ readonly name: "_owner";
548
+ readonly type: "address";
549
+ readonly internalType: "address";
550
+ }, {
551
+ readonly name: "_prevTickPrice";
552
+ readonly type: "uint256";
553
+ readonly internalType: "uint256";
554
+ }, {
555
+ readonly name: "_hookData";
556
+ readonly type: "bytes";
557
+ readonly internalType: "bytes";
558
+ }];
559
+ readonly outputs: readonly [{
560
+ readonly name: "";
561
+ readonly type: "uint256";
562
+ readonly internalType: "uint256";
563
+ }];
564
+ readonly stateMutability: "payable";
565
+ }, {
566
+ readonly type: "function";
567
+ readonly name: "sumCurrencyDemandAboveClearingQ96";
568
+ readonly inputs: readonly [];
569
+ readonly outputs: readonly [{
570
+ readonly name: "";
571
+ readonly type: "uint256";
572
+ readonly internalType: "uint256";
573
+ }];
574
+ readonly stateMutability: "view";
575
+ }, {
576
+ readonly type: "function";
577
+ readonly name: "supportsInterface";
578
+ readonly inputs: readonly [{
579
+ readonly name: "interfaceId";
580
+ readonly type: "bytes4";
581
+ readonly internalType: "bytes4";
582
+ }];
583
+ readonly outputs: readonly [{
584
+ readonly name: "";
585
+ readonly type: "bool";
586
+ readonly internalType: "bool";
587
+ }];
588
+ readonly stateMutability: "pure";
589
+ }, {
590
+ readonly type: "function";
591
+ readonly name: "sweepCurrency";
592
+ readonly inputs: readonly [];
593
+ readonly outputs: readonly [];
594
+ readonly stateMutability: "nonpayable";
595
+ }, {
596
+ readonly type: "function";
597
+ readonly name: "sweepCurrencyBlock";
598
+ readonly inputs: readonly [];
599
+ readonly outputs: readonly [{
600
+ readonly name: "";
601
+ readonly type: "uint256";
602
+ readonly internalType: "uint256";
603
+ }];
604
+ readonly stateMutability: "view";
605
+ }, {
606
+ readonly type: "function";
607
+ readonly name: "sweepUnsoldTokens";
608
+ readonly inputs: readonly [];
609
+ readonly outputs: readonly [];
610
+ readonly stateMutability: "nonpayable";
611
+ }, {
612
+ readonly type: "function";
613
+ readonly name: "sweepUnsoldTokensBlock";
614
+ readonly inputs: readonly [];
615
+ readonly outputs: readonly [{
616
+ readonly name: "";
617
+ readonly type: "uint256";
618
+ readonly internalType: "uint256";
619
+ }];
620
+ readonly stateMutability: "view";
621
+ }, {
622
+ readonly type: "function";
623
+ readonly name: "tickSpacing";
624
+ readonly inputs: readonly [];
625
+ readonly outputs: readonly [{
626
+ readonly name: "";
627
+ readonly type: "uint256";
628
+ readonly internalType: "uint256";
629
+ }];
630
+ readonly stateMutability: "view";
631
+ }, {
632
+ readonly type: "function";
633
+ readonly name: "ticks";
634
+ readonly inputs: readonly [{
635
+ readonly name: "price";
636
+ readonly type: "uint256";
637
+ readonly internalType: "uint256";
638
+ }];
639
+ readonly outputs: readonly [{
640
+ readonly name: "";
641
+ readonly type: "tuple";
642
+ readonly internalType: "struct Tick";
643
+ readonly components: readonly [{
644
+ readonly name: "next";
645
+ readonly type: "uint256";
646
+ readonly internalType: "uint256";
647
+ }, {
648
+ readonly name: "currencyDemandQ96";
649
+ readonly type: "uint256";
650
+ readonly internalType: "uint256";
651
+ }];
652
+ }];
653
+ readonly stateMutability: "view";
654
+ }, {
655
+ readonly type: "function";
656
+ readonly name: "token";
657
+ readonly inputs: readonly [];
658
+ readonly outputs: readonly [{
659
+ readonly name: "";
660
+ readonly type: "address";
661
+ readonly internalType: "address";
662
+ }];
663
+ readonly stateMutability: "view";
664
+ }, {
665
+ readonly type: "function";
666
+ readonly name: "tokensRecipient";
667
+ readonly inputs: readonly [];
668
+ readonly outputs: readonly [{
669
+ readonly name: "";
670
+ readonly type: "address";
671
+ readonly internalType: "address";
672
+ }];
673
+ readonly stateMutability: "view";
674
+ }, {
675
+ readonly type: "function";
676
+ readonly name: "totalCleared";
677
+ readonly inputs: readonly [];
678
+ readonly outputs: readonly [{
679
+ readonly name: "";
680
+ readonly type: "uint256";
681
+ readonly internalType: "uint256";
682
+ }];
683
+ readonly stateMutability: "view";
684
+ }, {
685
+ readonly type: "function";
686
+ readonly name: "totalClearedQ96_X7";
687
+ readonly inputs: readonly [];
688
+ readonly outputs: readonly [{
689
+ readonly name: "";
690
+ readonly type: "uint256";
691
+ readonly internalType: "ValueX7";
692
+ }];
693
+ readonly stateMutability: "view";
694
+ }, {
695
+ readonly type: "function";
696
+ readonly name: "totalSupply";
697
+ readonly inputs: readonly [];
698
+ readonly outputs: readonly [{
699
+ readonly name: "";
700
+ readonly type: "uint128";
701
+ readonly internalType: "uint128";
702
+ }];
703
+ readonly stateMutability: "view";
704
+ }, {
705
+ readonly type: "function";
706
+ readonly name: "validationHook";
707
+ readonly inputs: readonly [];
708
+ readonly outputs: readonly [{
709
+ readonly name: "";
710
+ readonly type: "address";
711
+ readonly internalType: "contract IValidationHook";
712
+ }];
713
+ readonly stateMutability: "view";
714
+ }, {
715
+ readonly type: "event";
716
+ readonly name: "AuctionStepRecorded";
717
+ readonly inputs: readonly [{
718
+ readonly name: "startBlock";
719
+ readonly type: "uint256";
720
+ readonly indexed: false;
721
+ readonly internalType: "uint256";
722
+ }, {
723
+ readonly name: "endBlock";
724
+ readonly type: "uint256";
725
+ readonly indexed: false;
726
+ readonly internalType: "uint256";
727
+ }, {
728
+ readonly name: "mps";
729
+ readonly type: "uint24";
730
+ readonly indexed: false;
731
+ readonly internalType: "uint24";
732
+ }];
733
+ readonly anonymous: false;
734
+ }, {
735
+ readonly type: "event";
736
+ readonly name: "BidExited";
737
+ readonly inputs: readonly [{
738
+ readonly name: "bidId";
739
+ readonly type: "uint256";
740
+ readonly indexed: true;
741
+ readonly internalType: "uint256";
742
+ }, {
743
+ readonly name: "owner";
744
+ readonly type: "address";
745
+ readonly indexed: true;
746
+ readonly internalType: "address";
747
+ }, {
748
+ readonly name: "tokensFilled";
749
+ readonly type: "uint256";
750
+ readonly indexed: false;
751
+ readonly internalType: "uint256";
752
+ }, {
753
+ readonly name: "currencyRefunded";
754
+ readonly type: "uint256";
755
+ readonly indexed: false;
756
+ readonly internalType: "uint256";
757
+ }];
758
+ readonly anonymous: false;
759
+ }, {
760
+ readonly type: "event";
761
+ readonly name: "BidSubmitted";
762
+ readonly inputs: readonly [{
763
+ readonly name: "id";
764
+ readonly type: "uint256";
765
+ readonly indexed: true;
766
+ readonly internalType: "uint256";
767
+ }, {
768
+ readonly name: "owner";
769
+ readonly type: "address";
770
+ readonly indexed: true;
771
+ readonly internalType: "address";
772
+ }, {
773
+ readonly name: "price";
774
+ readonly type: "uint256";
775
+ readonly indexed: false;
776
+ readonly internalType: "uint256";
777
+ }, {
778
+ readonly name: "amount";
779
+ readonly type: "uint128";
780
+ readonly indexed: false;
781
+ readonly internalType: "uint128";
782
+ }];
783
+ readonly anonymous: false;
784
+ }, {
785
+ readonly type: "event";
786
+ readonly name: "CheckpointUpdated";
787
+ readonly inputs: readonly [{
788
+ readonly name: "blockNumber";
789
+ readonly type: "uint256";
790
+ readonly indexed: false;
791
+ readonly internalType: "uint256";
792
+ }, {
793
+ readonly name: "clearingPrice";
794
+ readonly type: "uint256";
795
+ readonly indexed: false;
796
+ readonly internalType: "uint256";
797
+ }, {
798
+ readonly name: "cumulativeMps";
799
+ readonly type: "uint24";
800
+ readonly indexed: false;
801
+ readonly internalType: "uint24";
802
+ }];
803
+ readonly anonymous: false;
804
+ }, {
805
+ readonly type: "event";
806
+ readonly name: "ClearingPriceUpdated";
807
+ readonly inputs: readonly [{
808
+ readonly name: "blockNumber";
809
+ readonly type: "uint256";
810
+ readonly indexed: false;
811
+ readonly internalType: "uint256";
812
+ }, {
813
+ readonly name: "clearingPrice";
814
+ readonly type: "uint256";
815
+ readonly indexed: false;
816
+ readonly internalType: "uint256";
817
+ }];
818
+ readonly anonymous: false;
819
+ }, {
820
+ readonly type: "event";
821
+ readonly name: "CurrencySwept";
822
+ readonly inputs: readonly [{
823
+ readonly name: "fundsRecipient";
824
+ readonly type: "address";
825
+ readonly indexed: true;
826
+ readonly internalType: "address";
827
+ }, {
828
+ readonly name: "currencyAmount";
829
+ readonly type: "uint256";
830
+ readonly indexed: false;
831
+ readonly internalType: "uint256";
832
+ }];
833
+ readonly anonymous: false;
834
+ }, {
835
+ readonly type: "event";
836
+ readonly name: "NextActiveTickUpdated";
837
+ readonly inputs: readonly [{
838
+ readonly name: "price";
839
+ readonly type: "uint256";
840
+ readonly indexed: false;
841
+ readonly internalType: "uint256";
842
+ }];
843
+ readonly anonymous: false;
844
+ }, {
845
+ readonly type: "event";
846
+ readonly name: "TickInitialized";
847
+ readonly inputs: readonly [{
848
+ readonly name: "price";
849
+ readonly type: "uint256";
850
+ readonly indexed: false;
851
+ readonly internalType: "uint256";
852
+ }];
853
+ readonly anonymous: false;
854
+ }, {
855
+ readonly type: "event";
856
+ readonly name: "TokensClaimed";
857
+ readonly inputs: readonly [{
858
+ readonly name: "bidId";
859
+ readonly type: "uint256";
860
+ readonly indexed: true;
861
+ readonly internalType: "uint256";
862
+ }, {
863
+ readonly name: "owner";
864
+ readonly type: "address";
865
+ readonly indexed: true;
866
+ readonly internalType: "address";
867
+ }, {
868
+ readonly name: "tokensFilled";
869
+ readonly type: "uint256";
870
+ readonly indexed: false;
871
+ readonly internalType: "uint256";
872
+ }];
873
+ readonly anonymous: false;
874
+ }, {
875
+ readonly type: "event";
876
+ readonly name: "TokensReceived";
877
+ readonly inputs: readonly [{
878
+ readonly name: "totalSupply";
879
+ readonly type: "uint256";
880
+ readonly indexed: false;
881
+ readonly internalType: "uint256";
882
+ }];
883
+ readonly anonymous: false;
884
+ }, {
885
+ readonly type: "event";
886
+ readonly name: "TokensSwept";
887
+ readonly inputs: readonly [{
888
+ readonly name: "tokensRecipient";
889
+ readonly type: "address";
890
+ readonly indexed: true;
891
+ readonly internalType: "address";
892
+ }, {
893
+ readonly name: "tokensAmount";
894
+ readonly type: "uint256";
895
+ readonly indexed: false;
896
+ readonly internalType: "uint256";
897
+ }];
898
+ readonly anonymous: false;
899
+ }, {
900
+ readonly type: "error";
901
+ readonly name: "AuctionIsNotFinalized";
902
+ readonly inputs: readonly [];
903
+ }, {
904
+ readonly type: "error";
905
+ readonly name: "AuctionIsNotOver";
906
+ readonly inputs: readonly [];
907
+ }, {
908
+ readonly type: "error";
909
+ readonly name: "AuctionIsOver";
910
+ readonly inputs: readonly [];
911
+ }, {
912
+ readonly type: "error";
913
+ readonly name: "AuctionNotStarted";
914
+ readonly inputs: readonly [];
915
+ }, {
916
+ readonly type: "error";
917
+ readonly name: "AuctionSoldOut";
918
+ readonly inputs: readonly [];
919
+ }, {
920
+ readonly type: "error";
921
+ readonly name: "BatchClaimDifferentOwner";
922
+ readonly inputs: readonly [{
923
+ readonly name: "expectedOwner";
924
+ readonly type: "address";
925
+ readonly internalType: "address";
926
+ }, {
927
+ readonly name: "receivedOwner";
928
+ readonly type: "address";
929
+ readonly internalType: "address";
930
+ }];
931
+ }, {
932
+ readonly type: "error";
933
+ readonly name: "BidAlreadyExited";
934
+ readonly inputs: readonly [];
935
+ }, {
936
+ readonly type: "error";
937
+ readonly name: "BidAmountTooSmall";
938
+ readonly inputs: readonly [];
939
+ }, {
940
+ readonly type: "error";
941
+ readonly name: "BidIdDoesNotExist";
942
+ readonly inputs: readonly [{
943
+ readonly name: "bidId";
944
+ readonly type: "uint256";
945
+ readonly internalType: "uint256";
946
+ }];
947
+ }, {
948
+ readonly type: "error";
949
+ readonly name: "BidMustBeAboveClearingPrice";
950
+ readonly inputs: readonly [];
951
+ }, {
952
+ readonly type: "error";
953
+ readonly name: "BidNotExited";
954
+ readonly inputs: readonly [];
955
+ }, {
956
+ readonly type: "error";
957
+ readonly name: "BidOwnerCannotBeZeroAddress";
958
+ readonly inputs: readonly [];
959
+ }, {
960
+ readonly type: "error";
961
+ readonly name: "CannotExitBid";
962
+ readonly inputs: readonly [];
963
+ }, {
964
+ readonly type: "error";
965
+ readonly name: "CannotPartiallyExitBidBeforeEndBlock";
966
+ readonly inputs: readonly [];
967
+ }, {
968
+ readonly type: "error";
969
+ readonly name: "CannotPartiallyExitBidBeforeGraduation";
970
+ readonly inputs: readonly [];
971
+ }, {
972
+ readonly type: "error";
973
+ readonly name: "CannotSweepCurrency";
974
+ readonly inputs: readonly [];
975
+ }, {
976
+ readonly type: "error";
977
+ readonly name: "CannotSweepTokens";
978
+ readonly inputs: readonly [];
979
+ }, {
980
+ readonly type: "error";
981
+ readonly name: "CannotUpdateUninitializedTick";
982
+ readonly inputs: readonly [];
983
+ }, {
984
+ readonly type: "error";
985
+ readonly name: "CheckpointBlockNotIncreasing";
986
+ readonly inputs: readonly [];
987
+ }, {
988
+ readonly type: "error";
989
+ readonly name: "ClaimBlockIsBeforeEndBlock";
990
+ readonly inputs: readonly [];
991
+ }, {
992
+ readonly type: "error";
993
+ readonly name: "CurrencyIsNotNative";
994
+ readonly inputs: readonly [];
995
+ }, {
996
+ readonly type: "error";
997
+ readonly name: "ERC20TransferFailed";
998
+ readonly inputs: readonly [];
999
+ }, {
1000
+ readonly type: "error";
1001
+ readonly name: "FloorPriceAndTickSpacingGreaterThanMaxBidPrice";
1002
+ readonly inputs: readonly [{
1003
+ readonly name: "nextTick";
1004
+ readonly type: "uint256";
1005
+ readonly internalType: "uint256";
1006
+ }, {
1007
+ readonly name: "maxBidPrice";
1008
+ readonly type: "uint256";
1009
+ readonly internalType: "uint256";
1010
+ }];
1011
+ }, {
1012
+ readonly type: "error";
1013
+ readonly name: "FloorPriceAndTickSpacingTooLarge";
1014
+ readonly inputs: readonly [];
1015
+ }, {
1016
+ readonly type: "error";
1017
+ readonly name: "FloorPriceIsZero";
1018
+ readonly inputs: readonly [];
1019
+ }, {
1020
+ readonly type: "error";
1021
+ readonly name: "FloorPriceTooLow";
1022
+ readonly inputs: readonly [];
1023
+ }, {
1024
+ readonly type: "error";
1025
+ readonly name: "FundsRecipientIsZero";
1026
+ readonly inputs: readonly [];
1027
+ }, {
1028
+ readonly type: "error";
1029
+ readonly name: "InvalidAmount";
1030
+ readonly inputs: readonly [];
1031
+ }, {
1032
+ readonly type: "error";
1033
+ readonly name: "InvalidAuctionDataLength";
1034
+ readonly inputs: readonly [];
1035
+ }, {
1036
+ readonly type: "error";
1037
+ readonly name: "InvalidBidPriceTooHigh";
1038
+ readonly inputs: readonly [{
1039
+ readonly name: "maxPrice";
1040
+ readonly type: "uint256";
1041
+ readonly internalType: "uint256";
1042
+ }, {
1043
+ readonly name: "maxBidPrice";
1044
+ readonly type: "uint256";
1045
+ readonly internalType: "uint256";
1046
+ }];
1047
+ }, {
1048
+ readonly type: "error";
1049
+ readonly name: "InvalidBidUnableToClear";
1050
+ readonly inputs: readonly [];
1051
+ }, {
1052
+ readonly type: "error";
1053
+ readonly name: "InvalidEndBlock";
1054
+ readonly inputs: readonly [];
1055
+ }, {
1056
+ readonly type: "error";
1057
+ readonly name: "InvalidEndBlockGivenStepData";
1058
+ readonly inputs: readonly [{
1059
+ readonly name: "actualEndBlock";
1060
+ readonly type: "uint64";
1061
+ readonly internalType: "uint64";
1062
+ }, {
1063
+ readonly name: "expectedEndBlock";
1064
+ readonly type: "uint64";
1065
+ readonly internalType: "uint64";
1066
+ }];
1067
+ }, {
1068
+ readonly type: "error";
1069
+ readonly name: "InvalidLastFullyFilledCheckpointHint";
1070
+ readonly inputs: readonly [];
1071
+ }, {
1072
+ readonly type: "error";
1073
+ readonly name: "InvalidOutbidBlockCheckpointHint";
1074
+ readonly inputs: readonly [];
1075
+ }, {
1076
+ readonly type: "error";
1077
+ readonly name: "InvalidStepDataMps";
1078
+ readonly inputs: readonly [{
1079
+ readonly name: "actualMps";
1080
+ readonly type: "uint256";
1081
+ readonly internalType: "uint256";
1082
+ }, {
1083
+ readonly name: "expectedMps";
1084
+ readonly type: "uint256";
1085
+ readonly internalType: "uint256";
1086
+ }];
1087
+ }, {
1088
+ readonly type: "error";
1089
+ readonly name: "InvalidTickPrice";
1090
+ readonly inputs: readonly [];
1091
+ }, {
1092
+ readonly type: "error";
1093
+ readonly name: "InvalidTokenAmountReceived";
1094
+ readonly inputs: readonly [];
1095
+ }, {
1096
+ readonly type: "error";
1097
+ readonly name: "MpsRemainingIsZero";
1098
+ readonly inputs: readonly [];
1099
+ }, {
1100
+ readonly type: "error";
1101
+ readonly name: "NativeTransferFailed";
1102
+ readonly inputs: readonly [];
1103
+ }, {
1104
+ readonly type: "error";
1105
+ readonly name: "NotClaimable";
1106
+ readonly inputs: readonly [];
1107
+ }, {
1108
+ readonly type: "error";
1109
+ readonly name: "NotGraduated";
1110
+ readonly inputs: readonly [];
1111
+ }, {
1112
+ readonly type: "error";
1113
+ readonly name: "Reentrancy";
1114
+ readonly inputs: readonly [];
1115
+ }, {
1116
+ readonly type: "error";
1117
+ readonly name: "StepBlockDeltaCannotBeZero";
1118
+ readonly inputs: readonly [];
1119
+ }, {
1120
+ readonly type: "error";
1121
+ readonly name: "StepLib__InvalidOffsetNotAtStepBoundary";
1122
+ readonly inputs: readonly [];
1123
+ }, {
1124
+ readonly type: "error";
1125
+ readonly name: "StepLib__InvalidOffsetTooLarge";
1126
+ readonly inputs: readonly [];
1127
+ }, {
1128
+ readonly type: "error";
1129
+ readonly name: "TickHintMustBeGreaterThanNextActiveTickPrice";
1130
+ readonly inputs: readonly [{
1131
+ readonly name: "tickPrice";
1132
+ readonly type: "uint256";
1133
+ readonly internalType: "uint256";
1134
+ }, {
1135
+ readonly name: "nextActiveTickPrice";
1136
+ readonly type: "uint256";
1137
+ readonly internalType: "uint256";
1138
+ }];
1139
+ }, {
1140
+ readonly type: "error";
1141
+ readonly name: "TickNotInitialized";
1142
+ readonly inputs: readonly [];
1143
+ }, {
1144
+ readonly type: "error";
1145
+ readonly name: "TickPreviousPriceInvalid";
1146
+ readonly inputs: readonly [];
1147
+ }, {
1148
+ readonly type: "error";
1149
+ readonly name: "TickPriceNotAtBoundary";
1150
+ readonly inputs: readonly [];
1151
+ }, {
1152
+ readonly type: "error";
1153
+ readonly name: "TickPriceNotIncreasing";
1154
+ readonly inputs: readonly [];
1155
+ }, {
1156
+ readonly type: "error";
1157
+ readonly name: "TickSpacingTooSmall";
1158
+ readonly inputs: readonly [];
1159
+ }, {
1160
+ readonly type: "error";
1161
+ readonly name: "TokenAndCurrencyCannotBeTheSame";
1162
+ readonly inputs: readonly [];
1163
+ }, {
1164
+ readonly type: "error";
1165
+ readonly name: "TokenIsAddressZero";
1166
+ readonly inputs: readonly [];
1167
+ }, {
1168
+ readonly type: "error";
1169
+ readonly name: "TokenTransferFailed";
1170
+ readonly inputs: readonly [];
1171
+ }, {
1172
+ readonly type: "error";
1173
+ readonly name: "TokensNotReceived";
1174
+ readonly inputs: readonly [];
1175
+ }, {
1176
+ readonly type: "error";
1177
+ readonly name: "TokensRecipientIsZero";
1178
+ readonly inputs: readonly [];
1179
+ }, {
1180
+ readonly type: "error";
1181
+ readonly name: "TotalSupplyIsTooLarge";
1182
+ readonly inputs: readonly [];
1183
+ }, {
1184
+ readonly type: "error";
1185
+ readonly name: "TotalSupplyIsZero";
1186
+ readonly inputs: readonly [];
1187
+ }, {
1188
+ readonly type: "error";
1189
+ readonly name: "ValidationHookCallFailed";
1190
+ readonly inputs: readonly [{
1191
+ readonly name: "reason";
1192
+ readonly type: "bytes";
1193
+ readonly internalType: "bytes";
1194
+ }];
1195
+ }];
1196
+
1197
+ declare const factoryAbi: readonly [{
1198
+ readonly type: "function";
1199
+ readonly name: "getAuctionAddress";
1200
+ readonly inputs: readonly [{
1201
+ readonly name: "token";
1202
+ readonly type: "address";
1203
+ readonly internalType: "address";
1204
+ }, {
1205
+ readonly name: "amount";
1206
+ readonly type: "uint256";
1207
+ readonly internalType: "uint256";
1208
+ }, {
1209
+ readonly name: "configData";
1210
+ readonly type: "bytes";
1211
+ readonly internalType: "bytes";
1212
+ }, {
1213
+ readonly name: "salt";
1214
+ readonly type: "bytes32";
1215
+ readonly internalType: "bytes32";
1216
+ }, {
1217
+ readonly name: "sender";
1218
+ readonly type: "address";
1219
+ readonly internalType: "address";
1220
+ }];
1221
+ readonly outputs: readonly [{
1222
+ readonly name: "";
1223
+ readonly type: "address";
1224
+ readonly internalType: "address";
1225
+ }];
1226
+ readonly stateMutability: "view";
1227
+ }, {
1228
+ readonly type: "function";
1229
+ readonly name: "initializeDistribution";
1230
+ readonly inputs: readonly [{
1231
+ readonly name: "token";
1232
+ readonly type: "address";
1233
+ readonly internalType: "address";
1234
+ }, {
1235
+ readonly name: "amount";
1236
+ readonly type: "uint256";
1237
+ readonly internalType: "uint256";
1238
+ }, {
1239
+ readonly name: "configData";
1240
+ readonly type: "bytes";
1241
+ readonly internalType: "bytes";
1242
+ }, {
1243
+ readonly name: "salt";
1244
+ readonly type: "bytes32";
1245
+ readonly internalType: "bytes32";
1246
+ }];
1247
+ readonly outputs: readonly [{
1248
+ readonly name: "distributionContract";
1249
+ readonly type: "address";
1250
+ readonly internalType: "contract IDistributionContract";
1251
+ }];
1252
+ readonly stateMutability: "nonpayable";
1253
+ }, {
1254
+ readonly type: "event";
1255
+ readonly name: "AuctionCreated";
1256
+ readonly inputs: readonly [{
1257
+ readonly name: "auction";
1258
+ readonly type: "address";
1259
+ readonly indexed: true;
1260
+ readonly internalType: "address";
1261
+ }, {
1262
+ readonly name: "token";
1263
+ readonly type: "address";
1264
+ readonly indexed: true;
1265
+ readonly internalType: "address";
1266
+ }, {
1267
+ readonly name: "amount";
1268
+ readonly type: "uint256";
1269
+ readonly indexed: false;
1270
+ readonly internalType: "uint256";
1271
+ }, {
1272
+ readonly name: "configData";
1273
+ readonly type: "bytes";
1274
+ readonly indexed: false;
1275
+ readonly internalType: "bytes";
1276
+ }];
1277
+ readonly anonymous: false;
1278
+ }, {
1279
+ readonly type: "error";
1280
+ readonly name: "InvalidTokenAmount";
1281
+ readonly inputs: readonly [{
1282
+ readonly name: "amount";
1283
+ readonly type: "uint256";
1284
+ readonly internalType: "uint256";
1285
+ }];
1286
+ }];
1287
+
1288
+ declare const auctionStateLensAbi: readonly [{
1289
+ readonly type: "function";
1290
+ readonly name: "revertWithState";
1291
+ readonly inputs: readonly [{
1292
+ readonly name: "auction";
1293
+ readonly type: "address";
1294
+ readonly internalType: "contract IContinuousClearingAuction";
1295
+ }];
1296
+ readonly outputs: readonly [];
1297
+ readonly stateMutability: "nonpayable";
1298
+ }, {
1299
+ readonly type: "function";
1300
+ readonly name: "state";
1301
+ readonly inputs: readonly [{
1302
+ readonly name: "auction";
1303
+ readonly type: "address";
1304
+ readonly internalType: "contract IContinuousClearingAuction";
1305
+ }];
1306
+ readonly outputs: readonly [{
1307
+ readonly name: "";
1308
+ readonly type: "tuple";
1309
+ readonly internalType: "struct AuctionState";
1310
+ readonly components: readonly [{
1311
+ readonly name: "checkpoint";
1312
+ readonly type: "tuple";
1313
+ readonly internalType: "struct Checkpoint";
1314
+ readonly components: readonly [{
1315
+ readonly name: "clearingPrice";
1316
+ readonly type: "uint256";
1317
+ readonly internalType: "uint256";
1318
+ }, {
1319
+ readonly name: "currencyRaisedAtClearingPriceQ96_X7";
1320
+ readonly type: "uint256";
1321
+ readonly internalType: "ValueX7";
1322
+ }, {
1323
+ readonly name: "cumulativeMpsPerPrice";
1324
+ readonly type: "uint256";
1325
+ readonly internalType: "uint256";
1326
+ }, {
1327
+ readonly name: "cumulativeMps";
1328
+ readonly type: "uint24";
1329
+ readonly internalType: "uint24";
1330
+ }, {
1331
+ readonly name: "prev";
1332
+ readonly type: "uint64";
1333
+ readonly internalType: "uint64";
1334
+ }, {
1335
+ readonly name: "next";
1336
+ readonly type: "uint64";
1337
+ readonly internalType: "uint64";
1338
+ }];
1339
+ }, {
1340
+ readonly name: "currencyRaised";
1341
+ readonly type: "uint256";
1342
+ readonly internalType: "uint256";
1343
+ }, {
1344
+ readonly name: "totalCleared";
1345
+ readonly type: "uint256";
1346
+ readonly internalType: "uint256";
1347
+ }, {
1348
+ readonly name: "isGraduated";
1349
+ readonly type: "bool";
1350
+ readonly internalType: "bool";
1351
+ }];
1352
+ }];
1353
+ readonly stateMutability: "nonpayable";
1354
+ }, {
1355
+ readonly type: "error";
1356
+ readonly name: "CheckpointFailed";
1357
+ readonly inputs: readonly [];
1358
+ }, {
1359
+ readonly type: "error";
1360
+ readonly name: "InvalidRevertReasonLength";
1361
+ readonly inputs: readonly [];
1362
+ }];
1363
+ /** Deployed runtime bytecode, for eth_call state-override reads.
1364
+ * Lets Beacon run the lens without deploying it. */
1365
+ declare const auctionStateLensDeployedBytecode: "0x608060405234801561000f575f80fd5b5060043610610034575f3560e01c806321a13d371461003857806331e658a51461004d575b5f80fd5b61004b61004636600461048a565b610076565b005b61006061005b36600461048a565b6102c7565b60405161006d91906104bd565b60405180910390f35b8073ffffffffffffffffffffffffffffffffffffffff1663c2c4c5c16040518163ffffffff1660e01b815260040160c0604051808303815f875af19250505080156100fc575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526100f991810190610620565b60015b610132576040517fd027b09000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60405180608001604052808381526020018473ffffffffffffffffffffffffffffffffffffffff1663998ba4fc6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561018d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101b1919061063a565b81526020018473ffffffffffffffffffffffffffffffffffffffff16633e9d91746040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101ff573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610223919061063a565b81526020018473ffffffffffffffffffffffffffffffffffffffff16639e5f26026040518163ffffffff1660e01b8152600401602060405180830381865afa158015610271573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102959190610660565b151581525090505f816040516020016102ae91906104bd565b6040516020818303038152906040529050805160208201fd5b60408051610140810182525f6080820181815260a0830182905260c0830182905260e083018290526101008301829052610120830182905282526020820181905291810182905260608101919091526040517f21a13d3700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015230906321a13d37906024015f604051808303815f87803b15801561037a575f80fd5b505af192505050801561038b575060015b6103ce573d8080156103b8576040519150601f19603f3d011682016040523d82523d5f602084013e6103bd565b606091505b506103c7816103d3565b9392505050565b919050565b60408051610140810182525f6080820181815260a0830182905260c0830182905260e083018290526101008301829052610120830182905282526020820181905291810182905260608101919091528151610120146104705760208251111561043e57815160208301fd5b6040517fa75357f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b818060200190518101906104849190610679565b92915050565b5f6020828403121561049a575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146103c7575f80fd5b5f61012082019050825180518352602081015160208401526040810151604084015262ffffff606082015116606084015267ffffffffffffffff608082015116608084015267ffffffffffffffff60a08201511660a084015250602083015160c0830152604083015160e0830152606083015161053f61010084018215159052565b5092915050565b60405160c0810167ffffffffffffffff8111828210171561058e577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405290565b805167ffffffffffffffff811681146103ce575f80fd5b5f60c082840312156105bb575f80fd5b6105c3610546565b825181526020808401519082015260408084015190820152606083015190915062ffffff811681146105f3575f80fd5b606082015261060460808301610594565b608082015261061560a08301610594565b60a082015292915050565b5f60c08284031215610630575f80fd5b6103c783836105ab565b5f6020828403121561064a575f80fd5b5051919050565b805180151581146103ce575f80fd5b5f60208284031215610670575f80fd5b6103c782610651565b5f61012082840312801561068b575f80fd5b506040516080810167ffffffffffffffff811182821017156106d4577f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040526106e184846105ab565b815260c0830151602082015260e083015160408201526107046101008401610651565b6060820152939250505056fea164736f6c634300081a000a";
1366
+
1367
+ /** Upstream tag these ABIs were compiled from. */
1368
+ declare const UPSTREAM_TAG = "v1.1.0";
1369
+ /** Exact upstream commit these ABIs were compiled from. */
1370
+ declare const UPSTREAM_COMMIT = "a0aabaa45d8677a4944fc04d5dea2c4b499b3d3a";
1371
+
1372
+ /** Mirrors `struct AuctionParameters`. */
1373
+ interface AuctionParameters {
1374
+ /** Currency to raise in. `address(0)` for native ETH. */
1375
+ currency: Address;
1376
+ /** Receives leftover unsold tokens. */
1377
+ tokensRecipient: Address;
1378
+ /** Receives the raised funds. */
1379
+ fundsRecipient: Address;
1380
+ startBlock: bigint;
1381
+ endBlock: bigint;
1382
+ /** Block from which bidders can claim. Must be >= endBlock. */
1383
+ claimBlock: bigint;
1384
+ tickSpacing: bigint;
1385
+ /** Optional pre-bid hook. `address(0)` for none. */
1386
+ validationHook: Address;
1387
+ /** Q96-encoded starting price. */
1388
+ floorPriceQ96: bigint;
1389
+ /** Currency that must be raised for the auction to graduate. */
1390
+ requiredCurrencyRaised: bigint;
1391
+ /** Packed supply schedule. Build with {@link buildAuctionSteps}. */
1392
+ auctionStepsData: Hex;
1393
+ }
1394
+ /** One entry of the supply schedule. */
1395
+ interface AuctionStep {
1396
+ /** Milli-bips of supply released per block during this step. uint24. */
1397
+ mps: number;
1398
+ /** How many blocks this step lasts. uint40, must be > 0. */
1399
+ blockDelta: number;
1400
+ }
1401
+ /** `ConstantsLib.MIN_FLOOR_PRICE` - `type(uint32).max + 1`. */
1402
+ declare const MIN_FLOOR_PRICE = 4294967296n;
1403
+ /** `ConstantsLib.MIN_TICK_SPACING`. */
1404
+ declare const MIN_TICK_SPACING = 2n;
1405
+ declare class AuctionParametersError extends Error {
1406
+ }
1407
+ /**
1408
+ * Pack steps into `auctionStepsData`.
1409
+ *
1410
+ * Each step is one 8-byte word: `uint24 mps | uint40 blockDelta`.
1411
+ */
1412
+ declare function packAuctionSteps(steps: readonly AuctionStep[]): Hex;
1413
+ /** Unpack `auctionStepsData` back into steps. */
1414
+ declare function unpackAuctionSteps(data: Hex): AuctionStep[];
1415
+ /**
1416
+ * Build a schedule that releases the whole supply evenly over `durationBlocks`.
1417
+ *
1418
+ * The contract requires `sum(mps * blockDelta) == MPS` exactly. `MPS` (1e7)
1419
+ * rarely divides evenly by a duration, so this emits a flat step for all but
1420
+ * the last block and puts the remainder on the final block, rather than
1421
+ * silently rounding and reverting with `InvalidStepDataMps`.
1422
+ */
1423
+ declare function buildAuctionSteps(durationBlocks: number): AuctionStep[];
1424
+ /** Total supply released by a schedule, which must equal `MPS`. */
1425
+ declare function totalMps(steps: readonly AuctionStep[]): bigint;
1426
+ /** Total blocks a schedule spans. */
1427
+ declare function totalBlocks(steps: readonly AuctionStep[]): bigint;
1428
+ /**
1429
+ * Validate parameters against every constructor rule, before spending gas.
1430
+ * Throws on the first violation, naming the revert it would have caused.
1431
+ */
1432
+ declare function validateAuctionParameters(params: AuctionParameters): void;
1433
+ /**
1434
+ * ABI-encode parameters into the factory's `configData`.
1435
+ * Validates first - the factory decodes this blindly and the auction's
1436
+ * constructor is where a bad value surfaces, after the gas is spent.
1437
+ */
1438
+ declare function encodeAuctionParameters(params: AuctionParameters): Hex;
1439
+ /**
1440
+ * Decode a factory `AuctionCreated` event's `configData`.
1441
+ * Lets the directory show how any auction was configured.
1442
+ */
1443
+ declare function decodeAuctionParameters(configData: Hex): AuctionParameters;
1444
+
1445
+ /**
1446
+ * `ContinuousClearingAuctionFactory` v1.1.0.
1447
+ *
1448
+ * Deployed through the deterministic CREATE2 deployer (`0x4e59b448...`), so the
1449
+ * address is identical on every chain Uniswap has launched CCA on.
1450
+ *
1451
+ * VERIFIED on Sepolia: the deployed runtime bytecode is byte-for-byte identical
1452
+ * to a local `forge build` of upstream tag v1.1.0. Re-check with
1453
+ * `./contracts/sync-abis.sh` and a bytecode diff before trusting a new chain.
1454
+ */
1455
+ declare const FACTORY_ADDRESS: Address;
1456
+ /**
1457
+ * Block each chain's factory was created at - where auction discovery starts
1458
+ * scanning. Scanning from 0 instead wastes thousands of RPC calls.
1459
+ */
1460
+ declare const FACTORY_DEPLOY_BLOCK: Record<number, bigint>;
1461
+ /**
1462
+ * Testnets Beacon is allowed to talk to.
1463
+ *
1464
+ * Only Sepolia is verified end-to-end today; the other two are listed because
1465
+ * the factory is a cross-chain singleton, but their deploy blocks are unknown
1466
+ * (discovery will need an explicit `fromBlock`).
1467
+ */
1468
+ declare const SUPPORTED_CHAINS: {
1469
+ readonly 11155111: {
1470
+ blockExplorers: {
1471
+ readonly default: {
1472
+ readonly name: "Etherscan";
1473
+ readonly url: "https://sepolia.etherscan.io";
1474
+ readonly apiUrl: "https://api-sepolia.etherscan.io/api";
1475
+ };
1476
+ };
1477
+ blockTime?: number | undefined | undefined;
1478
+ contracts: {
1479
+ readonly multicall3: {
1480
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1481
+ readonly blockCreated: 751532;
1482
+ };
1483
+ readonly ensUniversalResolver: {
1484
+ readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
1485
+ readonly blockCreated: 8928790;
1486
+ };
1487
+ };
1488
+ ensTlds?: readonly string[] | undefined;
1489
+ id: 11155111;
1490
+ name: "Sepolia";
1491
+ nativeCurrency: {
1492
+ readonly name: "Sepolia Ether";
1493
+ readonly symbol: "ETH";
1494
+ readonly decimals: 18;
1495
+ };
1496
+ experimental_preconfirmationTime?: number | undefined | undefined;
1497
+ rpcUrls: {
1498
+ readonly default: {
1499
+ readonly http: readonly ["https://11155111.rpc.thirdweb.com"];
1500
+ };
1501
+ };
1502
+ sourceId?: number | undefined | undefined;
1503
+ supportsTransactionReplacementDetection?: boolean | undefined | undefined;
1504
+ testnet: true;
1505
+ custom?: Record<string, unknown> | undefined;
1506
+ extendSchema?: Record<string, unknown> | undefined;
1507
+ fees?: viem.ChainFees<undefined> | undefined;
1508
+ formatters?: undefined;
1509
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1510
+ client: viem.Client;
1511
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1512
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1513
+ client: viem.Client;
1514
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1515
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1516
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1517
+ }] | undefined;
1518
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
1519
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1520
+ };
1521
+ readonly 84532: {
1522
+ blockExplorers: {
1523
+ readonly default: {
1524
+ readonly name: "Basescan";
1525
+ readonly url: "https://sepolia.basescan.org";
1526
+ readonly apiUrl: "https://api-sepolia.basescan.org/api";
1527
+ };
1528
+ };
1529
+ blockTime: 2000;
1530
+ contracts: {
1531
+ readonly disputeGameFactory: {
1532
+ readonly 11155111: {
1533
+ readonly address: "0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1";
1534
+ };
1535
+ };
1536
+ readonly l2OutputOracle: {
1537
+ readonly 11155111: {
1538
+ readonly address: "0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254";
1539
+ };
1540
+ };
1541
+ readonly portal: {
1542
+ readonly 11155111: {
1543
+ readonly address: "0x49f53e41452c74589e85ca1677426ba426459e85";
1544
+ readonly blockCreated: 4446677;
1545
+ };
1546
+ };
1547
+ readonly l1StandardBridge: {
1548
+ readonly 11155111: {
1549
+ readonly address: "0xfd0Bf71F60660E2f608ed56e1659C450eB113120";
1550
+ readonly blockCreated: 4446677;
1551
+ };
1552
+ };
1553
+ readonly multicall3: {
1554
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1555
+ readonly blockCreated: 1059647;
1556
+ };
1557
+ readonly gasPriceOracle: {
1558
+ readonly address: "0x420000000000000000000000000000000000000F";
1559
+ };
1560
+ readonly l1Block: {
1561
+ readonly address: "0x4200000000000000000000000000000000000015";
1562
+ };
1563
+ readonly l2CrossDomainMessenger: {
1564
+ readonly address: "0x4200000000000000000000000000000000000007";
1565
+ };
1566
+ readonly l2Erc721Bridge: {
1567
+ readonly address: "0x4200000000000000000000000000000000000014";
1568
+ };
1569
+ readonly l2StandardBridge: {
1570
+ readonly address: "0x4200000000000000000000000000000000000010";
1571
+ };
1572
+ readonly l2ToL1MessagePasser: {
1573
+ readonly address: "0x4200000000000000000000000000000000000016";
1574
+ };
1575
+ };
1576
+ ensTlds?: readonly string[] | undefined;
1577
+ id: 84532;
1578
+ name: "Base Sepolia";
1579
+ nativeCurrency: {
1580
+ readonly name: "Sepolia Ether";
1581
+ readonly symbol: "ETH";
1582
+ readonly decimals: 18;
1583
+ };
1584
+ experimental_preconfirmationTime?: number | undefined | undefined;
1585
+ rpcUrls: {
1586
+ readonly default: {
1587
+ readonly http: readonly ["https://sepolia.base.org"];
1588
+ };
1589
+ };
1590
+ sourceId: 11155111;
1591
+ supportsTransactionReplacementDetection?: boolean | undefined | undefined;
1592
+ testnet: true;
1593
+ custom?: Record<string, unknown> | undefined;
1594
+ extendSchema?: Record<string, unknown> | undefined;
1595
+ fees?: viem.ChainFees<undefined> | undefined;
1596
+ formatters: {
1597
+ readonly block: {
1598
+ exclude: [] | undefined;
1599
+ format: (args: viem_chains.OpStackRpcBlock, action?: string | undefined) => {
1600
+ baseFeePerGas: bigint | null;
1601
+ blobGasUsed: bigint;
1602
+ difficulty: bigint;
1603
+ excessBlobGas: bigint;
1604
+ extraData: viem.Hex;
1605
+ gasLimit: bigint;
1606
+ gasUsed: bigint;
1607
+ hash: `0x${string}` | null;
1608
+ logsBloom: `0x${string}` | null;
1609
+ miner: `0x${string}`;
1610
+ mixHash: viem.Hash;
1611
+ nonce: `0x${string}` | null;
1612
+ number: bigint | null;
1613
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
1614
+ parentHash: viem.Hash;
1615
+ receiptsRoot: viem.Hex;
1616
+ sealFields: viem.Hex[];
1617
+ sha3Uncles: viem.Hash;
1618
+ size: bigint;
1619
+ stateRoot: viem.Hash;
1620
+ timestamp: bigint;
1621
+ totalDifficulty: bigint | null;
1622
+ transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
1623
+ transactionsRoot: viem.Hash;
1624
+ uncles: viem.Hash[];
1625
+ withdrawals?: viem.Withdrawal[] | undefined | undefined;
1626
+ withdrawalsRoot?: `0x${string}` | undefined;
1627
+ } & {};
1628
+ type: "block";
1629
+ };
1630
+ readonly transaction: {
1631
+ exclude: [] | undefined;
1632
+ format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
1633
+ blockHash: `0x${string}` | null;
1634
+ blockNumber: bigint | null;
1635
+ blockTimestamp?: bigint | undefined;
1636
+ from: `0x${string}`;
1637
+ gas: bigint;
1638
+ hash: viem.Hash;
1639
+ input: viem.Hex;
1640
+ nonce: number;
1641
+ r: viem.Hex;
1642
+ s: viem.Hex;
1643
+ to: `0x${string}` | null;
1644
+ transactionIndex: number | null;
1645
+ typeHex: viem.Hex | null;
1646
+ v: bigint;
1647
+ value: bigint;
1648
+ yParity: number;
1649
+ gasPrice?: undefined | undefined;
1650
+ maxFeePerBlobGas?: undefined | undefined;
1651
+ maxFeePerGas: bigint;
1652
+ maxPriorityFeePerGas: bigint;
1653
+ isSystemTx?: boolean;
1654
+ mint?: bigint | undefined | undefined;
1655
+ sourceHash: viem.Hex;
1656
+ type: "deposit";
1657
+ } | {
1658
+ r: viem.Hex;
1659
+ s: viem.Hex;
1660
+ v: bigint;
1661
+ to: `0x${string}` | null;
1662
+ from: `0x${string}`;
1663
+ gas: bigint;
1664
+ nonce: number;
1665
+ value: bigint;
1666
+ blockHash: `0x${string}` | null;
1667
+ blockNumber: bigint | null;
1668
+ blockTimestamp?: bigint | undefined;
1669
+ hash: viem.Hash;
1670
+ input: viem.Hex;
1671
+ transactionIndex: number | null;
1672
+ typeHex: viem.Hex | null;
1673
+ accessList?: undefined | undefined;
1674
+ authorizationList?: undefined | undefined;
1675
+ blobVersionedHashes?: undefined | undefined;
1676
+ chainId?: number | undefined;
1677
+ yParity?: undefined | undefined;
1678
+ type: "legacy";
1679
+ gasPrice: bigint;
1680
+ maxFeePerBlobGas?: undefined | undefined;
1681
+ maxFeePerGas?: undefined | undefined;
1682
+ maxPriorityFeePerGas?: undefined | undefined;
1683
+ isSystemTx?: undefined | undefined;
1684
+ mint?: undefined | undefined;
1685
+ sourceHash?: undefined | undefined;
1686
+ } | {
1687
+ blockHash: `0x${string}` | null;
1688
+ blockNumber: bigint | null;
1689
+ blockTimestamp?: bigint | undefined;
1690
+ from: `0x${string}`;
1691
+ gas: bigint;
1692
+ hash: viem.Hash;
1693
+ input: viem.Hex;
1694
+ nonce: number;
1695
+ r: viem.Hex;
1696
+ s: viem.Hex;
1697
+ to: `0x${string}` | null;
1698
+ transactionIndex: number | null;
1699
+ typeHex: viem.Hex | null;
1700
+ v: bigint;
1701
+ value: bigint;
1702
+ yParity: number;
1703
+ accessList: viem.AccessList;
1704
+ authorizationList?: undefined | undefined;
1705
+ blobVersionedHashes?: undefined | undefined;
1706
+ chainId: number;
1707
+ type: "eip2930";
1708
+ gasPrice: bigint;
1709
+ maxFeePerBlobGas?: undefined | undefined;
1710
+ maxFeePerGas?: undefined | undefined;
1711
+ maxPriorityFeePerGas?: undefined | undefined;
1712
+ isSystemTx?: undefined | undefined;
1713
+ mint?: undefined | undefined;
1714
+ sourceHash?: undefined | undefined;
1715
+ } | {
1716
+ blockHash: `0x${string}` | null;
1717
+ blockNumber: bigint | null;
1718
+ blockTimestamp?: bigint | undefined;
1719
+ from: `0x${string}`;
1720
+ gas: bigint;
1721
+ hash: viem.Hash;
1722
+ input: viem.Hex;
1723
+ nonce: number;
1724
+ r: viem.Hex;
1725
+ s: viem.Hex;
1726
+ to: `0x${string}` | null;
1727
+ transactionIndex: number | null;
1728
+ typeHex: viem.Hex | null;
1729
+ v: bigint;
1730
+ value: bigint;
1731
+ yParity: number;
1732
+ accessList: viem.AccessList;
1733
+ authorizationList?: undefined | undefined;
1734
+ blobVersionedHashes?: undefined | undefined;
1735
+ chainId: number;
1736
+ type: "eip1559";
1737
+ gasPrice?: undefined | undefined;
1738
+ maxFeePerBlobGas?: undefined | undefined;
1739
+ maxFeePerGas: bigint;
1740
+ maxPriorityFeePerGas: bigint;
1741
+ isSystemTx?: undefined | undefined;
1742
+ mint?: undefined | undefined;
1743
+ sourceHash?: undefined | undefined;
1744
+ } | {
1745
+ blockHash: `0x${string}` | null;
1746
+ blockNumber: bigint | null;
1747
+ blockTimestamp?: bigint | undefined;
1748
+ from: `0x${string}`;
1749
+ gas: bigint;
1750
+ hash: viem.Hash;
1751
+ input: viem.Hex;
1752
+ nonce: number;
1753
+ r: viem.Hex;
1754
+ s: viem.Hex;
1755
+ to: `0x${string}` | null;
1756
+ transactionIndex: number | null;
1757
+ typeHex: viem.Hex | null;
1758
+ v: bigint;
1759
+ value: bigint;
1760
+ yParity: number;
1761
+ accessList: viem.AccessList;
1762
+ authorizationList?: undefined | undefined;
1763
+ blobVersionedHashes: readonly viem.Hex[];
1764
+ chainId: number;
1765
+ type: "eip4844";
1766
+ gasPrice?: undefined | undefined;
1767
+ maxFeePerBlobGas: bigint;
1768
+ maxFeePerGas: bigint;
1769
+ maxPriorityFeePerGas: bigint;
1770
+ isSystemTx?: undefined | undefined;
1771
+ mint?: undefined | undefined;
1772
+ sourceHash?: undefined | undefined;
1773
+ } | {
1774
+ blockHash: `0x${string}` | null;
1775
+ blockNumber: bigint | null;
1776
+ blockTimestamp?: bigint | undefined;
1777
+ from: `0x${string}`;
1778
+ gas: bigint;
1779
+ hash: viem.Hash;
1780
+ input: viem.Hex;
1781
+ nonce: number;
1782
+ r: viem.Hex;
1783
+ s: viem.Hex;
1784
+ to: `0x${string}` | null;
1785
+ transactionIndex: number | null;
1786
+ typeHex: viem.Hex | null;
1787
+ v: bigint;
1788
+ value: bigint;
1789
+ yParity: number;
1790
+ accessList: viem.AccessList;
1791
+ authorizationList: viem.SignedAuthorizationList;
1792
+ blobVersionedHashes?: undefined | undefined;
1793
+ chainId: number;
1794
+ type: "eip7702";
1795
+ gasPrice?: undefined | undefined;
1796
+ maxFeePerBlobGas?: undefined | undefined;
1797
+ maxFeePerGas: bigint;
1798
+ maxPriorityFeePerGas: bigint;
1799
+ isSystemTx?: undefined | undefined;
1800
+ mint?: undefined | undefined;
1801
+ sourceHash?: undefined | undefined;
1802
+ }) & {};
1803
+ type: "transaction";
1804
+ };
1805
+ readonly transactionReceipt: {
1806
+ exclude: [] | undefined;
1807
+ format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
1808
+ blobGasPrice?: bigint | undefined;
1809
+ blobGasUsed?: bigint | undefined;
1810
+ blockHash: viem.Hash;
1811
+ blockNumber: bigint;
1812
+ blockTimestamp?: bigint | undefined;
1813
+ contractAddress: `0x${string}` | null | undefined;
1814
+ cumulativeGasUsed: bigint;
1815
+ effectiveGasPrice: bigint;
1816
+ from: `0x${string}`;
1817
+ gasUsed: bigint;
1818
+ logs: viem.Log<bigint, number, false>[];
1819
+ logsBloom: viem.Hex;
1820
+ root?: `0x${string}` | undefined;
1821
+ status: "success" | "reverted";
1822
+ to: `0x${string}` | null;
1823
+ transactionHash: viem.Hash;
1824
+ transactionIndex: number;
1825
+ type: viem.TransactionType;
1826
+ depositNonce?: bigint | undefined | undefined;
1827
+ depositReceiptVersion?: number | undefined | undefined;
1828
+ l1GasPrice: bigint | null;
1829
+ l1GasUsed: bigint | null;
1830
+ l1Fee: bigint | null;
1831
+ l1FeeScalar: number | null;
1832
+ } & {};
1833
+ type: "transactionReceipt";
1834
+ };
1835
+ };
1836
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
1837
+ client: viem.Client;
1838
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1839
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
1840
+ client: viem.Client;
1841
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
1842
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
1843
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
1844
+ }] | undefined;
1845
+ serializers: {
1846
+ readonly transaction: typeof viem_chains.serializeTransactionOpStack;
1847
+ };
1848
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
1849
+ readonly network: "base-sepolia";
1850
+ };
1851
+ readonly 1301: {
1852
+ blockExplorers: {
1853
+ readonly default: {
1854
+ readonly name: "Uniscan";
1855
+ readonly url: "https://sepolia.uniscan.xyz";
1856
+ readonly apiUrl: "https://api-sepolia.uniscan.xyz/api";
1857
+ };
1858
+ };
1859
+ blockTime: 1000;
1860
+ contracts: {
1861
+ readonly multicall3: {
1862
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
1863
+ readonly blockCreated: 0;
1864
+ };
1865
+ readonly portal: {
1866
+ readonly 11155111: {
1867
+ readonly address: "0x0d83dab629f0e0F9d36c0Cbc89B69a489f0751bD";
1868
+ };
1869
+ };
1870
+ readonly l1StandardBridge: {
1871
+ readonly 11155111: {
1872
+ readonly address: "0xea58fcA6849d79EAd1f26608855c2D6407d54Ce2";
1873
+ };
1874
+ };
1875
+ readonly disputeGameFactory: {
1876
+ readonly 11155111: {
1877
+ readonly address: "0xeff73e5aa3B9AEC32c659Aa3E00444d20a84394b";
1878
+ };
1879
+ };
1880
+ readonly gasPriceOracle: {
1881
+ readonly address: "0x420000000000000000000000000000000000000F";
1882
+ };
1883
+ readonly l1Block: {
1884
+ readonly address: "0x4200000000000000000000000000000000000015";
1885
+ };
1886
+ readonly l2CrossDomainMessenger: {
1887
+ readonly address: "0x4200000000000000000000000000000000000007";
1888
+ };
1889
+ readonly l2Erc721Bridge: {
1890
+ readonly address: "0x4200000000000000000000000000000000000014";
1891
+ };
1892
+ readonly l2StandardBridge: {
1893
+ readonly address: "0x4200000000000000000000000000000000000010";
1894
+ };
1895
+ readonly l2ToL1MessagePasser: {
1896
+ readonly address: "0x4200000000000000000000000000000000000016";
1897
+ };
1898
+ };
1899
+ ensTlds?: readonly string[] | undefined;
1900
+ id: 1301;
1901
+ name: "Unichain Sepolia";
1902
+ nativeCurrency: {
1903
+ readonly name: "Ether";
1904
+ readonly symbol: "ETH";
1905
+ readonly decimals: 18;
1906
+ };
1907
+ experimental_preconfirmationTime?: number | undefined | undefined;
1908
+ rpcUrls: {
1909
+ readonly default: {
1910
+ readonly http: readonly ["https://sepolia.unichain.org"];
1911
+ };
1912
+ };
1913
+ sourceId: 11155111;
1914
+ supportsTransactionReplacementDetection?: boolean | undefined | undefined;
1915
+ testnet: true;
1916
+ custom?: Record<string, unknown> | undefined;
1917
+ extendSchema?: Record<string, unknown> | undefined;
1918
+ fees?: viem.ChainFees<undefined> | undefined;
1919
+ formatters: {
1920
+ readonly block: {
1921
+ exclude: [] | undefined;
1922
+ format: (args: viem_chains.OpStackRpcBlock, action?: string | undefined) => {
1923
+ baseFeePerGas: bigint | null;
1924
+ blobGasUsed: bigint;
1925
+ difficulty: bigint;
1926
+ excessBlobGas: bigint;
1927
+ extraData: viem.Hex;
1928
+ gasLimit: bigint;
1929
+ gasUsed: bigint;
1930
+ hash: `0x${string}` | null;
1931
+ logsBloom: `0x${string}` | null;
1932
+ miner: `0x${string}`;
1933
+ mixHash: viem.Hash;
1934
+ nonce: `0x${string}` | null;
1935
+ number: bigint | null;
1936
+ parentBeaconBlockRoot?: `0x${string}` | undefined;
1937
+ parentHash: viem.Hash;
1938
+ receiptsRoot: viem.Hex;
1939
+ sealFields: viem.Hex[];
1940
+ sha3Uncles: viem.Hash;
1941
+ size: bigint;
1942
+ stateRoot: viem.Hash;
1943
+ timestamp: bigint;
1944
+ totalDifficulty: bigint | null;
1945
+ transactions: `0x${string}`[] | viem_chains.OpStackTransaction<boolean>[];
1946
+ transactionsRoot: viem.Hash;
1947
+ uncles: viem.Hash[];
1948
+ withdrawals?: viem.Withdrawal[] | undefined | undefined;
1949
+ withdrawalsRoot?: `0x${string}` | undefined;
1950
+ } & {};
1951
+ type: "block";
1952
+ };
1953
+ readonly transaction: {
1954
+ exclude: [] | undefined;
1955
+ format: (args: viem_chains.OpStackRpcTransaction, action?: string | undefined) => ({
1956
+ blockHash: `0x${string}` | null;
1957
+ blockNumber: bigint | null;
1958
+ blockTimestamp?: bigint | undefined;
1959
+ from: `0x${string}`;
1960
+ gas: bigint;
1961
+ hash: viem.Hash;
1962
+ input: viem.Hex;
1963
+ nonce: number;
1964
+ r: viem.Hex;
1965
+ s: viem.Hex;
1966
+ to: `0x${string}` | null;
1967
+ transactionIndex: number | null;
1968
+ typeHex: viem.Hex | null;
1969
+ v: bigint;
1970
+ value: bigint;
1971
+ yParity: number;
1972
+ gasPrice?: undefined | undefined;
1973
+ maxFeePerBlobGas?: undefined | undefined;
1974
+ maxFeePerGas: bigint;
1975
+ maxPriorityFeePerGas: bigint;
1976
+ isSystemTx?: boolean;
1977
+ mint?: bigint | undefined | undefined;
1978
+ sourceHash: viem.Hex;
1979
+ type: "deposit";
1980
+ } | {
1981
+ r: viem.Hex;
1982
+ s: viem.Hex;
1983
+ v: bigint;
1984
+ to: `0x${string}` | null;
1985
+ from: `0x${string}`;
1986
+ gas: bigint;
1987
+ nonce: number;
1988
+ value: bigint;
1989
+ blockHash: `0x${string}` | null;
1990
+ blockNumber: bigint | null;
1991
+ blockTimestamp?: bigint | undefined;
1992
+ hash: viem.Hash;
1993
+ input: viem.Hex;
1994
+ transactionIndex: number | null;
1995
+ typeHex: viem.Hex | null;
1996
+ accessList?: undefined | undefined;
1997
+ authorizationList?: undefined | undefined;
1998
+ blobVersionedHashes?: undefined | undefined;
1999
+ chainId?: number | undefined;
2000
+ yParity?: undefined | undefined;
2001
+ type: "legacy";
2002
+ gasPrice: bigint;
2003
+ maxFeePerBlobGas?: undefined | undefined;
2004
+ maxFeePerGas?: undefined | undefined;
2005
+ maxPriorityFeePerGas?: undefined | undefined;
2006
+ isSystemTx?: undefined | undefined;
2007
+ mint?: undefined | undefined;
2008
+ sourceHash?: undefined | undefined;
2009
+ } | {
2010
+ blockHash: `0x${string}` | null;
2011
+ blockNumber: bigint | null;
2012
+ blockTimestamp?: bigint | undefined;
2013
+ from: `0x${string}`;
2014
+ gas: bigint;
2015
+ hash: viem.Hash;
2016
+ input: viem.Hex;
2017
+ nonce: number;
2018
+ r: viem.Hex;
2019
+ s: viem.Hex;
2020
+ to: `0x${string}` | null;
2021
+ transactionIndex: number | null;
2022
+ typeHex: viem.Hex | null;
2023
+ v: bigint;
2024
+ value: bigint;
2025
+ yParity: number;
2026
+ accessList: viem.AccessList;
2027
+ authorizationList?: undefined | undefined;
2028
+ blobVersionedHashes?: undefined | undefined;
2029
+ chainId: number;
2030
+ type: "eip2930";
2031
+ gasPrice: bigint;
2032
+ maxFeePerBlobGas?: undefined | undefined;
2033
+ maxFeePerGas?: undefined | undefined;
2034
+ maxPriorityFeePerGas?: undefined | undefined;
2035
+ isSystemTx?: undefined | undefined;
2036
+ mint?: undefined | undefined;
2037
+ sourceHash?: undefined | undefined;
2038
+ } | {
2039
+ blockHash: `0x${string}` | null;
2040
+ blockNumber: bigint | null;
2041
+ blockTimestamp?: bigint | undefined;
2042
+ from: `0x${string}`;
2043
+ gas: bigint;
2044
+ hash: viem.Hash;
2045
+ input: viem.Hex;
2046
+ nonce: number;
2047
+ r: viem.Hex;
2048
+ s: viem.Hex;
2049
+ to: `0x${string}` | null;
2050
+ transactionIndex: number | null;
2051
+ typeHex: viem.Hex | null;
2052
+ v: bigint;
2053
+ value: bigint;
2054
+ yParity: number;
2055
+ accessList: viem.AccessList;
2056
+ authorizationList?: undefined | undefined;
2057
+ blobVersionedHashes?: undefined | undefined;
2058
+ chainId: number;
2059
+ type: "eip1559";
2060
+ gasPrice?: undefined | undefined;
2061
+ maxFeePerBlobGas?: undefined | undefined;
2062
+ maxFeePerGas: bigint;
2063
+ maxPriorityFeePerGas: bigint;
2064
+ isSystemTx?: undefined | undefined;
2065
+ mint?: undefined | undefined;
2066
+ sourceHash?: undefined | undefined;
2067
+ } | {
2068
+ blockHash: `0x${string}` | null;
2069
+ blockNumber: bigint | null;
2070
+ blockTimestamp?: bigint | undefined;
2071
+ from: `0x${string}`;
2072
+ gas: bigint;
2073
+ hash: viem.Hash;
2074
+ input: viem.Hex;
2075
+ nonce: number;
2076
+ r: viem.Hex;
2077
+ s: viem.Hex;
2078
+ to: `0x${string}` | null;
2079
+ transactionIndex: number | null;
2080
+ typeHex: viem.Hex | null;
2081
+ v: bigint;
2082
+ value: bigint;
2083
+ yParity: number;
2084
+ accessList: viem.AccessList;
2085
+ authorizationList?: undefined | undefined;
2086
+ blobVersionedHashes: readonly viem.Hex[];
2087
+ chainId: number;
2088
+ type: "eip4844";
2089
+ gasPrice?: undefined | undefined;
2090
+ maxFeePerBlobGas: bigint;
2091
+ maxFeePerGas: bigint;
2092
+ maxPriorityFeePerGas: bigint;
2093
+ isSystemTx?: undefined | undefined;
2094
+ mint?: undefined | undefined;
2095
+ sourceHash?: undefined | undefined;
2096
+ } | {
2097
+ blockHash: `0x${string}` | null;
2098
+ blockNumber: bigint | null;
2099
+ blockTimestamp?: bigint | undefined;
2100
+ from: `0x${string}`;
2101
+ gas: bigint;
2102
+ hash: viem.Hash;
2103
+ input: viem.Hex;
2104
+ nonce: number;
2105
+ r: viem.Hex;
2106
+ s: viem.Hex;
2107
+ to: `0x${string}` | null;
2108
+ transactionIndex: number | null;
2109
+ typeHex: viem.Hex | null;
2110
+ v: bigint;
2111
+ value: bigint;
2112
+ yParity: number;
2113
+ accessList: viem.AccessList;
2114
+ authorizationList: viem.SignedAuthorizationList;
2115
+ blobVersionedHashes?: undefined | undefined;
2116
+ chainId: number;
2117
+ type: "eip7702";
2118
+ gasPrice?: undefined | undefined;
2119
+ maxFeePerBlobGas?: undefined | undefined;
2120
+ maxFeePerGas: bigint;
2121
+ maxPriorityFeePerGas: bigint;
2122
+ isSystemTx?: undefined | undefined;
2123
+ mint?: undefined | undefined;
2124
+ sourceHash?: undefined | undefined;
2125
+ }) & {};
2126
+ type: "transaction";
2127
+ };
2128
+ readonly transactionReceipt: {
2129
+ exclude: [] | undefined;
2130
+ format: (args: viem_chains.OpStackRpcTransactionReceipt, action?: string | undefined) => {
2131
+ blobGasPrice?: bigint | undefined;
2132
+ blobGasUsed?: bigint | undefined;
2133
+ blockHash: viem.Hash;
2134
+ blockNumber: bigint;
2135
+ blockTimestamp?: bigint | undefined;
2136
+ contractAddress: `0x${string}` | null | undefined;
2137
+ cumulativeGasUsed: bigint;
2138
+ effectiveGasPrice: bigint;
2139
+ from: `0x${string}`;
2140
+ gasUsed: bigint;
2141
+ logs: viem.Log<bigint, number, false>[];
2142
+ logsBloom: viem.Hex;
2143
+ root?: `0x${string}` | undefined;
2144
+ status: "success" | "reverted";
2145
+ to: `0x${string}` | null;
2146
+ transactionHash: viem.Hash;
2147
+ transactionIndex: number;
2148
+ type: viem.TransactionType;
2149
+ depositNonce?: bigint | undefined | undefined;
2150
+ depositReceiptVersion?: number | undefined | undefined;
2151
+ l1GasPrice: bigint | null;
2152
+ l1GasUsed: bigint | null;
2153
+ l1Fee: bigint | null;
2154
+ l1FeeScalar: number | null;
2155
+ } & {};
2156
+ type: "transactionReceipt";
2157
+ };
2158
+ };
2159
+ prepareTransactionRequest?: ((args: viem.PrepareTransactionRequestParameters, options: {
2160
+ client: viem.Client;
2161
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2162
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | [fn: ((args: viem.PrepareTransactionRequestParameters, options: {
2163
+ client: viem.Client;
2164
+ phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
2165
+ }) => Promise<viem.PrepareTransactionRequestParameters>) | undefined, options: {
2166
+ runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
2167
+ }] | undefined;
2168
+ serializers: {
2169
+ readonly transaction: typeof viem_chains.serializeTransactionOpStack;
2170
+ };
2171
+ verifyHash?: ((client: viem.Client, parameters: viem.VerifyHashActionParameters) => Promise<viem.VerifyHashActionReturnType>) | undefined;
2172
+ };
2173
+ };
2174
+ type SupportedChainId = keyof typeof SUPPORTED_CHAINS;
2175
+ /**
2176
+ * Approximate seconds per block, used to turn a block countdown into a human
2177
+ * "time remaining". Estimates - block times drift.
2178
+ */
2179
+ declare const BLOCK_TIME_SECONDS: Record<number, number>;
2180
+ /**
2181
+ * Maximum block span for a single `eth_getLogs` call.
2182
+ *
2183
+ * Public Sepolia RPCs reject anything wider with
2184
+ * `-32701: exceed maximum block range: 50000`, and some clients surface that as
2185
+ * an empty result rather than an error - which looks exactly like "no auctions
2186
+ * exist". Discovery always chunks.
2187
+ */
2188
+ declare const DEFAULT_LOG_CHUNK_SIZE = 50000n;
2189
+ /** `address(0)` - the currency sentinel meaning native ETH. */
2190
+ declare const NATIVE_CURRENCY: Address;
2191
+ /**
2192
+ * Canonical Permit2, deployed at the same address on every chain.
2193
+ *
2194
+ * ERC-20 bids do NOT approve the auction. `ContinuousClearingAuction.submitBid`
2195
+ * pulls the bid currency with `SafeTransferLib.permit2TransferFrom`, which
2196
+ * calls Permit2's `transferFrom(from,to,uint160,token)`. A bidder therefore
2197
+ * needs an ERC-20 approval to THIS address, plus a Permit2 allowance naming the
2198
+ * auction as spender. Matches solady's `SafeTransferLib.PERMIT2`.
2199
+ */
2200
+ declare const PERMIT2_ADDRESS: Address;
2201
+
2202
+ /** The factory event that announces every new auction. */
2203
+ declare const auctionCreatedEvent: {
2204
+ readonly type: "event";
2205
+ readonly name: "AuctionCreated";
2206
+ readonly inputs: readonly [{
2207
+ readonly name: "auction";
2208
+ readonly type: "address";
2209
+ readonly indexed: true;
2210
+ readonly internalType: "address";
2211
+ }, {
2212
+ readonly name: "token";
2213
+ readonly type: "address";
2214
+ readonly indexed: true;
2215
+ readonly internalType: "address";
2216
+ }, {
2217
+ readonly name: "amount";
2218
+ readonly type: "uint256";
2219
+ readonly indexed: false;
2220
+ readonly internalType: "uint256";
2221
+ }, {
2222
+ readonly name: "configData";
2223
+ readonly type: "bytes";
2224
+ readonly indexed: false;
2225
+ readonly internalType: "bytes";
2226
+ }];
2227
+ readonly anonymous: false;
2228
+ };
2229
+ interface ScanOptions {
2230
+ /** First block to scan. Defaults to the factory's deploy block. */
2231
+ fromBlock?: bigint;
2232
+ /** Last block to scan. Defaults to the current head. */
2233
+ toBlock?: bigint;
2234
+ /** Blocks per `eth_getLogs` request. Defaults to 50,000. */
2235
+ chunkSize?: bigint;
2236
+ /**
2237
+ * Re-query a chunk that came back empty, this many times, before believing it.
2238
+ *
2239
+ * Some public RPCs (observed on ethereum-sepolia-rpc.publicnode.com) are load
2240
+ * balanced across backends with incomplete log indexes and answer an
2241
+ * identical `eth_getLogs` with either the real logs or an empty array, with no
2242
+ * error. That silently under-reports auctions. Re-querying an empty chunk
2243
+ * reduces the chance of believing a false empty, but CANNOT eliminate it -
2244
+ * the real fix is a reliable RPC endpoint. Defaults to 2.
2245
+ */
2246
+ emptyChunkRetries?: number;
2247
+ /**
2248
+ * Called when an empty chunk turned out to be a lie on retry. A caller seeing
2249
+ * these should switch RPC providers rather than trust the scan.
2250
+ */
2251
+ onAnomaly?: (anomaly: {
2252
+ fromBlock: bigint;
2253
+ toBlock: bigint;
2254
+ recoveredLogs: number;
2255
+ }) => void;
2256
+ /** Called after each chunk, for progress reporting on long scans. */
2257
+ onProgress?: (progress: {
2258
+ fromBlock: bigint;
2259
+ toBlock: bigint;
2260
+ scannedTo: bigint;
2261
+ headBlock: bigint;
2262
+ found: number;
2263
+ }) => void;
2264
+ }
2265
+ /**
2266
+ * Scan a block range for `AuctionCreated` events, chunked.
2267
+ *
2268
+ * Returns auctions in chain order (oldest first). On a chunk failure the chunk
2269
+ * size is halved and retried, so a stricter-than-expected RPC degrades into a
2270
+ * slower scan rather than a wrong answer.
2271
+ */
2272
+ declare function scanAuctions(client: BeaconClient, options?: ScanOptions): Promise<DiscoveredAuction[]>;
2273
+ /**
2274
+ * Watch for auctions created from now on.
2275
+ *
2276
+ * Polls rather than subscribing, so it works over plain HTTP RPC with no
2277
+ * WebSocket endpoint. Returns an unwatch function.
2278
+ */
2279
+ declare function watchAuctions(client: BeaconClient, onAuction: (auction: DiscoveredAuction) => void, options?: {
2280
+ pollingIntervalMs?: number;
2281
+ onError?: (error: Error) => void;
2282
+ }): () => void;
2283
+ /**
2284
+ * Auctions created for a specific token.
2285
+ * Uses an indexed-topic filter so the RPC does the work, not the client.
2286
+ */
2287
+ declare function scanAuctionsForToken(client: BeaconClient, token: Address, options?: ScanOptions): Promise<DiscoveredAuction[]>;
2288
+
2289
+ /**
2290
+ * Private-key format normalisation.
2291
+ *
2292
+ * This module does exactly one thing: turn a key string into the `0x`-prefixed
2293
+ * form viem requires, or throw. It never logs, never stores, and never returns
2294
+ * anything derived from the key other than the key itself.
2295
+ *
2296
+ * It exists because wallets and key exporters disagree about the `0x` prefix -
2297
+ * Foundry's `cast wallet new` prints one, several UIs do not - and bouncing a
2298
+ * user back to edit their `.env` over two characters is a poor trade for the
2299
+ * risk of them pasting the key somewhere less safe while they fix it.
2300
+ */
2301
+ /** A 32-byte private key in the form viem expects. */
2302
+ type PrivateKeyHex = `0x${string}`;
2303
+ declare class PrivateKeyFormatError extends Error {
2304
+ }
2305
+ /**
2306
+ * Normalise a private key to `0x` + 64 hex characters.
2307
+ *
2308
+ * Accepts the key with or without the prefix. Every error message here is
2309
+ * deliberately written to describe the SHAPE of the problem and never to echo
2310
+ * any part of the value.
2311
+ *
2312
+ * @throws PrivateKeyFormatError when the value is not a 32-byte hex key.
2313
+ */
2314
+ declare function normalizePrivateKey(raw: string | undefined, envVarName: string): PrivateKeyHex;
2315
+ /** True when a key is present and well-formed, without throwing. */
2316
+ declare function isValidPrivateKey(raw: string | undefined): boolean;
2317
+
2318
+ /**
2319
+ * Q96 fixed-point helpers.
2320
+ *
2321
+ * CCA encodes prices as Q96: a value multiplied by 2^96. This module is the
2322
+ * ONLY place in Beacon that converts between Q96 and human-readable numbers.
2323
+ * The web app, widget, bot and agent all import from here rather than
2324
+ * reimplementing `/ 2 ** 96` with floating point.
2325
+ *
2326
+ * Everything here is exact BigInt arithmetic except {@link q96ToNumber}, which
2327
+ * is explicitly lossy and documented as such.
2328
+ */
2329
+ /** 2^96 - the Q96 fixed-point scaling factor. */
2330
+ declare const Q96: bigint;
2331
+ /**
2332
+ * MPS ("milli-bips", one thousandth of a basis point) = 1e7.
2333
+ *
2334
+ * The auction tracks how much of its supply SCHEDULE has been released as a
2335
+ * `cumulativeMps` out of `MPS`. Note this tracks the schedule, not sales: an
2336
+ * auction that ends with no bids still reaches `MPS`.
2337
+ * Mirrors `ConstantsLib.MPS` upstream.
2338
+ */
2339
+ declare const MPS = 10000000n;
2340
+ /** X7 values are scaled by MPS to avoid intermediate division. Mirrors `ValueX7`. */
2341
+ declare const X7 = 10000000n;
2342
+ /**
2343
+ * Convert a Q96 value to an exact decimal string.
2344
+ *
2345
+ * Exact for the requested precision - the fractional part is computed with
2346
+ * BigInt division and truncated (never rounded up), so the result never
2347
+ * overstates a price.
2348
+ *
2349
+ * @param valueQ96 The Q96-encoded value.
2350
+ * @param precision Fractional digits to emit. Defaults to 18.
2351
+ * @param trimTrailingZeros Drop trailing fractional zeros. Defaults to true.
2352
+ */
2353
+ declare function q96ToDecimalString(valueQ96: bigint, precision?: number, trimTrailingZeros?: boolean): string;
2354
+ /**
2355
+ * Convert a Q96 value to a JavaScript number.
2356
+ *
2357
+ * LOSSY. `number` is a float64, so values beyond ~2^53 or with more than ~15
2358
+ * significant digits lose precision. Use for charts, sorting and display only -
2359
+ * never for anything that gets sent back on-chain. Use
2360
+ * {@link q96ToDecimalString} when exactness matters.
2361
+ */
2362
+ declare function q96ToNumber(valueQ96: bigint): number;
2363
+ /**
2364
+ * Convert a decimal value to Q96, exactly.
2365
+ *
2366
+ * Accepts a string (preferred - no float rounding) or a number. Fractional
2367
+ * digits beyond what Q96 can represent are truncated.
2368
+ *
2369
+ * @throws TypeError on a malformed or non-finite input.
2370
+ */
2371
+ declare function decimalToQ96(decimal: string | number): bigint;
2372
+ /**
2373
+ * Format a Q96 value for human display.
2374
+ *
2375
+ * Unlike {@link q96ToDecimalString}, which truncates for exactness, this ROUNDS
2376
+ * half-up at the chosen precision. That matters: 0.0001 is not exactly
2377
+ * representable in Q96, so a truncating formatter renders it as
2378
+ * "0.0000999999999999" - technically accurate and useless in a UI.
2379
+ *
2380
+ * For values below 1 the digit budget starts at the first non-zero digit, so
2381
+ * very small prices stay readable instead of showing a wall of zeros.
2382
+ *
2383
+ * @param significantDigits Digits to keep after the first significant one
2384
+ * (or fractional digits, for values >= 1). Defaults to 6.
2385
+ */
2386
+ declare function formatQ96(valueQ96: bigint, significantDigits?: number): string;
2387
+ /**
2388
+ * Fraction of the supply schedule released so far, from a checkpoint's
2389
+ * `cumulativeMps`. Returns a value in [0, 1]. Not the fraction sold.
2390
+ */
2391
+ declare function mpsToFraction(cumulativeMps: bigint | number): number;
2392
+ /** Percentage of the supply schedule released so far, e.g. `"12.34"`. */
2393
+ declare function formatMpsPercent(cumulativeMps: bigint | number, fractionDigits?: number): string;
2394
+ /** Unwrap a ValueX7 (a value pre-multiplied by MPS) back to its base units. */
2395
+ declare function fromValueX7(valueX7: bigint): bigint;
2396
+ /**
2397
+ * Format a Q96 value compactly, switching to scientific notation when a value
2398
+ * is too small to read as a decimal.
2399
+ *
2400
+ * Real CCA clearing prices on Sepolia are around 5.4e-20. Rendered plainly that
2401
+ * is "0.000000000000000000054212" - 25 characters of mostly zeros, which
2402
+ * destroys a table layout and is genuinely hard to compare at a glance. Below
2403
+ * 1e-6 this switches to "5.4212e-20".
2404
+ *
2405
+ * Rounding is inherited from {@link formatQ96}, so the compact and plain
2406
+ * renderings of the same value never disagree.
2407
+ */
2408
+ declare function formatQ96Compact(valueQ96: bigint, significantDigits?: number): string;
2409
+
2410
+ /**
2411
+ * Address the lens bytecode is injected at when no deployed lens is configured.
2412
+ * Arbitrary and unused on-chain: it only has to be an address nothing else
2413
+ * occupies for the duration of the call. Must be EIP-55 checksummed - viem
2414
+ * rejects a mixed-case address whose checksum does not validate.
2415
+ */
2416
+ declare const LENS_OVERRIDE_ADDRESS: Address;
2417
+ /**
2418
+ * Read an auction's live state through `AuctionStateLens.state()`.
2419
+ *
2420
+ * This is the freshest possible view: the lens checkpoints the auction inside
2421
+ * the simulated call, so the clearing price reflects the current block rather
2422
+ * than the last block someone happened to bid in.
2423
+ */
2424
+ declare function getAuctionState(client: BeaconClient, auction: Address): Promise<AuctionState>;
2425
+ /**
2426
+ * Read an auction's static configuration in a single multicall.
2427
+ * These values never change, so callers can cache them freely.
2428
+ */
2429
+ declare function getAuctionInfo(client: BeaconClient, auction: Address): Promise<AuctionInfo>;
2430
+ /** The auction's current clearing price, Q96-encoded. A cheap `view` read. */
2431
+ declare function getClearingPrice(client: BeaconClient, auction: Address): Promise<bigint>;
2432
+ /** Whether the auction has raised enough to seed the pool. */
2433
+ declare function isGraduated(client: BeaconClient, auction: Address): Promise<boolean>;
2434
+ /** Derive an auction's lifecycle position from the current block. */
2435
+ declare function deriveStatus(info: AuctionInfo, blockNumber: bigint): AuctionStatus;
2436
+ /**
2437
+ * Everything a UI needs about one auction, with the derived values (status,
2438
+ * progress, time remaining) computed once here instead of in each app.
2439
+ */
2440
+ declare function getAuctionSummary(client: BeaconClient, auction: Address, options?: {
2441
+ info?: AuctionInfo;
2442
+ blockNumber?: bigint;
2443
+ }): Promise<AuctionSummary>;
2444
+ /** A summary that failed to load, so one bad auction cannot blank a directory page. */
2445
+ interface FailedAuctionSummary {
2446
+ auction: Address;
2447
+ error: Error;
2448
+ }
2449
+ declare function isFailedSummary(result: AuctionSummary | FailedAuctionSummary): result is FailedAuctionSummary;
2450
+ /**
2451
+ * Summarise many auctions with bounded concurrency, so a directory page listing
2452
+ * dozens of auctions does not open dozens of simultaneous RPC calls.
2453
+ */
2454
+ declare function getAuctionSummaries(client: BeaconClient, auctions: readonly Address[], options?: {
2455
+ concurrency?: number;
2456
+ }): Promise<(AuctionSummary | FailedAuctionSummary)[]>;
2457
+ /**
2458
+ * The cheap, batchable slice of live state used by directory list views.
2459
+ *
2460
+ * Every field here is a `view` function on the auction, so a whole page of
2461
+ * auctions resolves in one multicall - no lens, no per-auction round trips.
2462
+ * Use {@link getAuctionState} when you need the freshest checkpointed state.
2463
+ */
2464
+ interface AuctionListState {
2465
+ auction: Address;
2466
+ clearingPriceQ96: bigint;
2467
+ isGraduated: boolean;
2468
+ currencyRaised: bigint;
2469
+ totalCleared: bigint;
2470
+ }
2471
+ /** Read {@link AuctionListState} for many auctions in a single multicall. */
2472
+ declare function getAuctionListStates(client: BeaconClient, auctions: readonly Address[]): Promise<Map<Address, AuctionListState>>;
2473
+
2474
+ /** ERC-20 approval + balance surface. */
2475
+ declare const erc20ApprovalAbi: readonly [{
2476
+ readonly type: "function";
2477
+ readonly name: "symbol";
2478
+ readonly inputs: readonly [];
2479
+ readonly outputs: readonly [{
2480
+ readonly type: "string";
2481
+ }];
2482
+ readonly stateMutability: "view";
2483
+ }, {
2484
+ readonly type: "function";
2485
+ readonly name: "name";
2486
+ readonly inputs: readonly [];
2487
+ readonly outputs: readonly [{
2488
+ readonly type: "string";
2489
+ }];
2490
+ readonly stateMutability: "view";
2491
+ }, {
2492
+ readonly type: "function";
2493
+ readonly name: "decimals";
2494
+ readonly inputs: readonly [];
2495
+ readonly outputs: readonly [{
2496
+ readonly type: "uint8";
2497
+ }];
2498
+ readonly stateMutability: "view";
2499
+ }, {
2500
+ readonly type: "function";
2501
+ readonly name: "allowance";
2502
+ readonly inputs: readonly [{
2503
+ readonly name: "owner";
2504
+ readonly type: "address";
2505
+ }, {
2506
+ readonly name: "spender";
2507
+ readonly type: "address";
2508
+ }];
2509
+ readonly outputs: readonly [{
2510
+ readonly type: "uint256";
2511
+ }];
2512
+ readonly stateMutability: "view";
2513
+ }, {
2514
+ readonly type: "function";
2515
+ readonly name: "approve";
2516
+ readonly inputs: readonly [{
2517
+ readonly name: "spender";
2518
+ readonly type: "address";
2519
+ }, {
2520
+ readonly name: "amount";
2521
+ readonly type: "uint256";
2522
+ }];
2523
+ readonly outputs: readonly [{
2524
+ readonly type: "bool";
2525
+ }];
2526
+ readonly stateMutability: "nonpayable";
2527
+ }, {
2528
+ readonly type: "function";
2529
+ readonly name: "balanceOf";
2530
+ readonly inputs: readonly [{
2531
+ readonly name: "account";
2532
+ readonly type: "address";
2533
+ }];
2534
+ readonly outputs: readonly [{
2535
+ readonly type: "uint256";
2536
+ }];
2537
+ readonly stateMutability: "view";
2538
+ }];
2539
+ /** Permit2 AllowanceTransfer, the second half of the ERC-20 approval flow. */
2540
+ declare const permit2Abi: readonly [{
2541
+ readonly type: "function";
2542
+ readonly name: "allowance";
2543
+ readonly inputs: readonly [{
2544
+ readonly name: "user";
2545
+ readonly type: "address";
2546
+ }, {
2547
+ readonly name: "token";
2548
+ readonly type: "address";
2549
+ }, {
2550
+ readonly name: "spender";
2551
+ readonly type: "address";
2552
+ }];
2553
+ readonly outputs: readonly [{
2554
+ readonly name: "amount";
2555
+ readonly type: "uint160";
2556
+ }, {
2557
+ readonly name: "expiration";
2558
+ readonly type: "uint48";
2559
+ }, {
2560
+ readonly name: "nonce";
2561
+ readonly type: "uint48";
2562
+ }];
2563
+ readonly stateMutability: "view";
2564
+ }, {
2565
+ readonly type: "function";
2566
+ readonly name: "approve";
2567
+ readonly inputs: readonly [{
2568
+ readonly name: "token";
2569
+ readonly type: "address";
2570
+ }, {
2571
+ readonly name: "spender";
2572
+ readonly type: "address";
2573
+ }, {
2574
+ readonly name: "amount";
2575
+ readonly type: "uint160";
2576
+ }, {
2577
+ readonly name: "expiration";
2578
+ readonly type: "uint48";
2579
+ }];
2580
+ readonly outputs: readonly [];
2581
+ readonly stateMutability: "nonpayable";
2582
+ }];
2583
+ interface TransactionRequest {
2584
+ to: Address;
2585
+ data: Hex;
2586
+ value: bigint;
2587
+ }
2588
+ /**
2589
+ * Round a price DOWN to the nearest tick boundary.
2590
+ *
2591
+ * `submitBid` reverts with `TickPriceNotAtBoundary()` unless `maxPrice` is an
2592
+ * exact multiple of the auction's `tickSpacing` - the same rule the constructor
2593
+ * applies to the floor price, but it also applies to every bid. A price typed
2594
+ * by a human almost never lands on a boundary, so it has to be snapped.
2595
+ *
2596
+ * Rounding DOWN is the only safe direction: it can only lower the ceiling a
2597
+ * bidder is committing to, never raise it above what they asked for.
2598
+ */
2599
+ declare function alignPriceToTickBoundary(priceQ96: bigint, tickSpacing: bigint): bigint;
2600
+ /** True when a price sits exactly on a tick boundary. */
2601
+ declare function isPriceOnTickBoundary(priceQ96: bigint, tickSpacing: bigint): boolean;
2602
+ interface SubmitBidParams {
2603
+ auction: Address;
2604
+ /** Highest price the bidder will pay, Q96-encoded. Use `decimalToQ96`. */
2605
+ maxPriceQ96: bigint;
2606
+ /** Bid size, in the currency's smallest unit. uint128 on-chain. */
2607
+ amount: bigint;
2608
+ /** Who owns the resulting bid. */
2609
+ owner: Address;
2610
+ /** Extra data for a validation hook, if the auction has one. */
2611
+ hookData?: Hex;
2612
+ /** True when the auction's currency is native ETH, so `value` must be sent. */
2613
+ isNativeCurrency: boolean;
2614
+ /**
2615
+ * Search hint: the initialised tick at or below `maxPriceQ96`. Omit to use
2616
+ * the floor price, which is always correct but costs more gas.
2617
+ * See {@link getPrevTickHint}.
2618
+ */
2619
+ prevTickPriceQ96?: bigint;
2620
+ /**
2621
+ * The auction's tick spacing. When given, the price is checked against it so
2622
+ * a misaligned bid fails here with a clear message instead of on-chain with
2623
+ * an opaque `TickPriceNotAtBoundary()`.
2624
+ */
2625
+ tickSpacing?: bigint;
2626
+ }
2627
+ /**
2628
+ * Encode a `submitBid` call.
2629
+ *
2630
+ * @throws RangeError if the amount does not fit the contract's `uint128`.
2631
+ */
2632
+ declare function encodeSubmitBid(params: SubmitBidParams): TransactionRequest;
2633
+ /**
2634
+ * Look up a `prevTickPrice` hint.
2635
+ *
2636
+ * The auction inserts a bid by walking initialised ticks upward from this
2637
+ * price. `nextActiveTickPrice()` is the next initialised tick above the current
2638
+ * clearing price, so it is a strictly better starting point than the floor
2639
+ * whenever the bid sits above it. Anything at or above `maxPrice` would make
2640
+ * the contract search past the target, so those fall back to the floor.
2641
+ *
2642
+ * A wrong hint cannot make a bid execute at a different price - it only affects
2643
+ * how far the contract searches - but a hint above the target reverts, so this
2644
+ * is deliberately conservative.
2645
+ */
2646
+ declare function getPrevTickHint(client: BeaconClient, auction: Address, maxPriceQ96: bigint): Promise<bigint>;
2647
+ /** Approve Permit2 to move the bid currency. Step 1 of 2 for ERC-20 bids. */
2648
+ declare function encodeApproveErc20ToPermit2(currency: Address, amount?: bigint): TransactionRequest;
2649
+ /**
2650
+ * Grant the auction a Permit2 allowance. Step 2 of 2 for ERC-20 bids.
2651
+ *
2652
+ * @param expiration Unix seconds. Defaults to 30 days out; Permit2 stores this
2653
+ * as a uint48, and an expired allowance fails at transfer time.
2654
+ */
2655
+ declare function encodeApprovePermit2(currency: Address, auction: Address, amount?: bigint, expiration?: bigint): TransactionRequest;
2656
+ interface BidReadiness {
2657
+ /** Whether the bidder holds enough of the currency. */
2658
+ hasBalance: boolean;
2659
+ balance: bigint;
2660
+ /** ERC-20 allowance granted to Permit2. Unlimited for native currency. */
2661
+ erc20AllowanceToPermit2: bigint;
2662
+ /** Permit2 allowance granted to the auction. Unlimited for native currency. */
2663
+ permit2AllowanceToAuction: bigint;
2664
+ /** When the Permit2 allowance lapses, as unix seconds. */
2665
+ permit2Expiration: bigint;
2666
+ /** True when step 1 (ERC-20 -> Permit2) is still needed. */
2667
+ needsErc20Approval: boolean;
2668
+ /** True when step 2 (Permit2 -> auction) is still needed. */
2669
+ needsPermit2Approval: boolean;
2670
+ /** Convenience: either approval step is outstanding. */
2671
+ needsApproval: boolean;
2672
+ }
2673
+ /**
2674
+ * Check whether a bidder can actually submit a given bid right now.
2675
+ *
2676
+ * Native-currency auctions need no approvals at all, so those are reported as
2677
+ * unlimited rather than pretending an allowance was read.
2678
+ */
2679
+ declare function checkBidReadiness(client: BeaconClient, params: {
2680
+ auction: Address;
2681
+ currency: Address;
2682
+ bidder: Address;
2683
+ amount: bigint;
2684
+ }): Promise<BidReadiness>;
2685
+ /**
2686
+ * Every transaction needed to place this bid, in order.
2687
+ * One entry for a native bid; up to three for an ERC-20 bid.
2688
+ */
2689
+ declare function buildBidTransactions(params: {
2690
+ auction: Address;
2691
+ currency: Address;
2692
+ maxPriceQ96: bigint;
2693
+ amount: bigint;
2694
+ owner: Address;
2695
+ readiness: BidReadiness;
2696
+ prevTickPriceQ96?: bigint;
2697
+ hookData?: Hex;
2698
+ /** When given, the price is snapped down to a boundary before encoding. */
2699
+ tickSpacing?: bigint;
2700
+ }): Array<{
2701
+ label: string;
2702
+ request: TransactionRequest;
2703
+ }>;
2704
+ /**
2705
+ * Why a bid cannot be submitted, or `null` when it can.
2706
+ * Callers use this to disable a bid button with an honest reason.
2707
+ */
2708
+ declare function describeBidBlocker(input: {
2709
+ status: "pending" | "live" | "ended";
2710
+ amount: bigint;
2711
+ maxPriceQ96: bigint;
2712
+ floorPriceQ96: bigint;
2713
+ tickSpacing?: bigint;
2714
+ readiness?: BidReadiness;
2715
+ }): string | null;
2716
+
2717
+ export { AuctionInfo, type AuctionListState, type AuctionParameters, AuctionParametersError, AuctionState, AuctionStatus, type AuctionStep, AuctionSummary, BLOCK_TIME_SECONDS, BeaconClient, type BidReadiness, DEFAULT_LOG_CHUNK_SIZE, DiscoveredAuction, FACTORY_ADDRESS, FACTORY_DEPLOY_BLOCK, type FailedAuctionSummary, LENS_OVERRIDE_ADDRESS, MIN_FLOOR_PRICE, MIN_TICK_SPACING, MPS, NATIVE_CURRENCY, PERMIT2_ADDRESS, PrivateKeyFormatError, type PrivateKeyHex, Q96, SUPPORTED_CHAINS, type ScanOptions, type SubmitBidParams, type SupportedChainId, type TransactionRequest, UPSTREAM_COMMIT, UPSTREAM_TAG, X7, alignPriceToTickBoundary, auctionAbi, auctionCreatedEvent, auctionStateLensAbi, auctionStateLensDeployedBytecode, buildAuctionSteps, buildBidTransactions, checkBidReadiness, decimalToQ96, decodeAuctionParameters, deriveStatus, describeBidBlocker, encodeApproveErc20ToPermit2, encodeApprovePermit2, encodeAuctionParameters, encodeSubmitBid, erc20ApprovalAbi, factoryAbi, formatMpsPercent, formatQ96, formatQ96Compact, fromValueX7, getAuctionInfo, getAuctionListStates, getAuctionState, getAuctionSummaries, getAuctionSummary, getClearingPrice, getPrevTickHint, isFailedSummary, isGraduated, isPriceOnTickBoundary, isValidPrivateKey, mpsToFraction, normalizePrivateKey, packAuctionSteps, permit2Abi, q96ToDecimalString, q96ToNumber, scanAuctions, scanAuctionsForToken, totalBlocks, totalMps, unpackAuctionSteps, validateAuctionParameters, watchAuctions };