@gitmyabi/fellowshipdutchauction 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FellowshipDutchAuction = exports.FellowshipDutchAuctionAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * FellowshipDutchAuction ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.FellowshipDutchAuctionAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "tokenContract_",
16
+ "type": "address"
17
+ },
18
+ {
19
+ "internalType": "uint256",
20
+ "name": "startTime_",
21
+ "type": "uint256"
22
+ },
23
+ {
24
+ "internalType": "uint256",
25
+ "name": "startPrice_",
26
+ "type": "uint256"
27
+ },
28
+ {
29
+ "internalType": "uint256",
30
+ "name": "earlyPriceDrop",
31
+ "type": "uint256"
32
+ },
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "transitionPrice",
36
+ "type": "uint256"
37
+ },
38
+ {
39
+ "internalType": "uint256",
40
+ "name": "latePriceDrop",
41
+ "type": "uint256"
42
+ },
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "restPrice",
46
+ "type": "uint256"
47
+ },
48
+ {
49
+ "internalType": "uint256",
50
+ "name": "earlyAccessDuration_",
51
+ "type": "uint256"
52
+ },
53
+ {
54
+ "internalType": "uint16[]",
55
+ "name": "shufflerConfig",
56
+ "type": "uint16[]"
57
+ }
58
+ ],
59
+ "stateMutability": "nonpayable",
60
+ "type": "constructor"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "AlreadyStarted",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "ContractIsPaused",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "ContractNotPaused",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "EarlyAccessWithoutPass",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [
84
+ {
85
+ "internalType": "uint256",
86
+ "name": "amount",
87
+ "type": "uint256"
88
+ },
89
+ {
90
+ "internalType": "bytes",
91
+ "name": "data",
92
+ "type": "bytes"
93
+ }
94
+ ],
95
+ "name": "FailedWithdraw",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "NotYetStarted",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "SoldOut",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "anonymous": false,
110
+ "inputs": [
111
+ {
112
+ "indexed": true,
113
+ "internalType": "address",
114
+ "name": "previousOwner",
115
+ "type": "address"
116
+ },
117
+ {
118
+ "indexed": true,
119
+ "internalType": "address",
120
+ "name": "newOwner",
121
+ "type": "address"
122
+ }
123
+ ],
124
+ "name": "OwnershipTransferred",
125
+ "type": "event"
126
+ },
127
+ {
128
+ "anonymous": false,
129
+ "inputs": [],
130
+ "name": "Paused",
131
+ "type": "event"
132
+ },
133
+ {
134
+ "anonymous": false,
135
+ "inputs": [
136
+ {
137
+ "indexed": false,
138
+ "internalType": "address",
139
+ "name": "purchaser",
140
+ "type": "address"
141
+ },
142
+ {
143
+ "indexed": false,
144
+ "internalType": "uint256",
145
+ "name": "tokenId",
146
+ "type": "uint256"
147
+ },
148
+ {
149
+ "indexed": false,
150
+ "internalType": "uint256",
151
+ "name": "price",
152
+ "type": "uint256"
153
+ }
154
+ ],
155
+ "name": "Purchase",
156
+ "type": "event"
157
+ },
158
+ {
159
+ "anonymous": false,
160
+ "inputs": [
161
+ {
162
+ "indexed": false,
163
+ "internalType": "address",
164
+ "name": "recipient",
165
+ "type": "address"
166
+ },
167
+ {
168
+ "indexed": false,
169
+ "internalType": "uint256",
170
+ "name": "amount",
171
+ "type": "uint256"
172
+ }
173
+ ],
174
+ "name": "Refund",
175
+ "type": "event"
176
+ },
177
+ {
178
+ "anonymous": false,
179
+ "inputs": [
180
+ {
181
+ "indexed": false,
182
+ "internalType": "address",
183
+ "name": "recipient",
184
+ "type": "address"
185
+ },
186
+ {
187
+ "indexed": false,
188
+ "internalType": "uint256",
189
+ "name": "quantity",
190
+ "type": "uint256"
191
+ },
192
+ {
193
+ "indexed": false,
194
+ "internalType": "uint256",
195
+ "name": "totalReserved",
196
+ "type": "uint256"
197
+ }
198
+ ],
199
+ "name": "Reservation",
200
+ "type": "event"
201
+ },
202
+ {
203
+ "anonymous": false,
204
+ "inputs": [],
205
+ "name": "Unpaused",
206
+ "type": "event"
207
+ },
208
+ {
209
+ "inputs": [
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "",
213
+ "type": "uint256"
214
+ }
215
+ ],
216
+ "name": "auctionStages",
217
+ "outputs": [
218
+ {
219
+ "internalType": "uint256",
220
+ "name": "priceDropPerSlot",
221
+ "type": "uint256"
222
+ },
223
+ {
224
+ "internalType": "uint256",
225
+ "name": "endPrice",
226
+ "type": "uint256"
227
+ },
228
+ {
229
+ "internalType": "uint256",
230
+ "name": "duration",
231
+ "type": "uint256"
232
+ }
233
+ ],
234
+ "stateMutability": "view",
235
+ "type": "function"
236
+ },
237
+ {
238
+ "inputs": [],
239
+ "name": "currentPrice",
240
+ "outputs": [
241
+ {
242
+ "internalType": "uint256",
243
+ "name": "price",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "stateMutability": "view",
248
+ "type": "function"
249
+ },
250
+ {
251
+ "inputs": [
252
+ {
253
+ "internalType": "address",
254
+ "name": "",
255
+ "type": "address"
256
+ }
257
+ ],
258
+ "name": "discountsCount",
259
+ "outputs": [
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "",
263
+ "type": "uint256"
264
+ }
265
+ ],
266
+ "stateMutability": "view",
267
+ "type": "function"
268
+ },
269
+ {
270
+ "inputs": [],
271
+ "name": "earlyAccessDuration",
272
+ "outputs": [
273
+ {
274
+ "internalType": "uint256",
275
+ "name": "",
276
+ "type": "uint256"
277
+ }
278
+ ],
279
+ "stateMutability": "view",
280
+ "type": "function"
281
+ },
282
+ {
283
+ "inputs": [],
284
+ "name": "isPaused",
285
+ "outputs": [
286
+ {
287
+ "internalType": "bool",
288
+ "name": "",
289
+ "type": "bool"
290
+ }
291
+ ],
292
+ "stateMutability": "view",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [],
297
+ "name": "isPublic",
298
+ "outputs": [
299
+ {
300
+ "internalType": "bool",
301
+ "name": "",
302
+ "type": "bool"
303
+ }
304
+ ],
305
+ "stateMutability": "view",
306
+ "type": "function"
307
+ },
308
+ {
309
+ "inputs": [],
310
+ "name": "lowestPrice",
311
+ "outputs": [
312
+ {
313
+ "internalType": "uint256",
314
+ "name": "",
315
+ "type": "uint256"
316
+ }
317
+ ],
318
+ "stateMutability": "view",
319
+ "type": "function"
320
+ },
321
+ {
322
+ "inputs": [
323
+ {
324
+ "internalType": "address",
325
+ "name": "",
326
+ "type": "address"
327
+ }
328
+ ],
329
+ "name": "mintCount",
330
+ "outputs": [
331
+ {
332
+ "internalType": "uint256",
333
+ "name": "",
334
+ "type": "uint256"
335
+ }
336
+ ],
337
+ "stateMutability": "view",
338
+ "type": "function"
339
+ },
340
+ {
341
+ "inputs": [],
342
+ "name": "mintLimit",
343
+ "outputs": [
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "",
347
+ "type": "uint256"
348
+ }
349
+ ],
350
+ "stateMutability": "view",
351
+ "type": "function"
352
+ },
353
+ {
354
+ "inputs": [
355
+ {
356
+ "internalType": "uint256",
357
+ "name": "quantity",
358
+ "type": "uint256"
359
+ }
360
+ ],
361
+ "name": "mintMultiple",
362
+ "outputs": [],
363
+ "stateMutability": "payable",
364
+ "type": "function"
365
+ },
366
+ {
367
+ "inputs": [
368
+ {
369
+ "internalType": "address",
370
+ "name": "",
371
+ "type": "address"
372
+ }
373
+ ],
374
+ "name": "mintPayment",
375
+ "outputs": [
376
+ {
377
+ "internalType": "uint256",
378
+ "name": "",
379
+ "type": "uint256"
380
+ }
381
+ ],
382
+ "stateMutability": "view",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "inputs": [],
387
+ "name": "owner",
388
+ "outputs": [
389
+ {
390
+ "internalType": "address",
391
+ "name": "",
392
+ "type": "address"
393
+ }
394
+ ],
395
+ "stateMutability": "view",
396
+ "type": "function"
397
+ },
398
+ {
399
+ "inputs": [],
400
+ "name": "pause",
401
+ "outputs": [],
402
+ "stateMutability": "nonpayable",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [],
407
+ "name": "refund",
408
+ "outputs": [
409
+ {
410
+ "internalType": "uint256",
411
+ "name": "",
412
+ "type": "uint256"
413
+ }
414
+ ],
415
+ "stateMutability": "nonpayable",
416
+ "type": "function"
417
+ },
418
+ {
419
+ "inputs": [
420
+ {
421
+ "internalType": "address",
422
+ "name": "minter",
423
+ "type": "address"
424
+ }
425
+ ],
426
+ "name": "refundAvailable",
427
+ "outputs": [
428
+ {
429
+ "internalType": "uint256",
430
+ "name": "",
431
+ "type": "uint256"
432
+ }
433
+ ],
434
+ "stateMutability": "view",
435
+ "type": "function"
436
+ },
437
+ {
438
+ "inputs": [],
439
+ "name": "renounceOwnership",
440
+ "outputs": [],
441
+ "stateMutability": "nonpayable",
442
+ "type": "function"
443
+ },
444
+ {
445
+ "inputs": [
446
+ {
447
+ "internalType": "uint256",
448
+ "name": "duration",
449
+ "type": "uint256"
450
+ }
451
+ ],
452
+ "name": "setEarlyAccessDuration",
453
+ "outputs": [],
454
+ "stateMutability": "nonpayable",
455
+ "type": "function"
456
+ },
457
+ {
458
+ "inputs": [
459
+ {
460
+ "internalType": "address",
461
+ "name": "tokenContract_",
462
+ "type": "address"
463
+ }
464
+ ],
465
+ "name": "setMintable",
466
+ "outputs": [],
467
+ "stateMutability": "nonpayable",
468
+ "type": "function"
469
+ },
470
+ {
471
+ "inputs": [
472
+ {
473
+ "internalType": "uint256",
474
+ "name": "startPrice_",
475
+ "type": "uint256"
476
+ },
477
+ {
478
+ "components": [
479
+ {
480
+ "internalType": "uint256",
481
+ "name": "priceDropPerSlot",
482
+ "type": "uint256"
483
+ },
484
+ {
485
+ "internalType": "uint256",
486
+ "name": "endPrice",
487
+ "type": "uint256"
488
+ }
489
+ ],
490
+ "internalType": "struct AuctionStageConfiguration[]",
491
+ "name": "stages_",
492
+ "type": "tuple[]"
493
+ }
494
+ ],
495
+ "name": "setPricing",
496
+ "outputs": [],
497
+ "stateMutability": "nonpayable",
498
+ "type": "function"
499
+ },
500
+ {
501
+ "inputs": [
502
+ {
503
+ "internalType": "uint256",
504
+ "name": "startTime_",
505
+ "type": "uint256"
506
+ }
507
+ ],
508
+ "name": "setStartTime",
509
+ "outputs": [],
510
+ "stateMutability": "nonpayable",
511
+ "type": "function"
512
+ },
513
+ {
514
+ "inputs": [],
515
+ "name": "startPrice",
516
+ "outputs": [
517
+ {
518
+ "internalType": "uint256",
519
+ "name": "",
520
+ "type": "uint256"
521
+ }
522
+ ],
523
+ "stateMutability": "view",
524
+ "type": "function"
525
+ },
526
+ {
527
+ "inputs": [],
528
+ "name": "startTime",
529
+ "outputs": [
530
+ {
531
+ "internalType": "uint256",
532
+ "name": "",
533
+ "type": "uint256"
534
+ }
535
+ ],
536
+ "stateMutability": "view",
537
+ "type": "function"
538
+ },
539
+ {
540
+ "inputs": [
541
+ {
542
+ "internalType": "bytes4",
543
+ "name": "interfaceId",
544
+ "type": "bytes4"
545
+ }
546
+ ],
547
+ "name": "supportsInterface",
548
+ "outputs": [
549
+ {
550
+ "internalType": "bool",
551
+ "name": "",
552
+ "type": "bool"
553
+ }
554
+ ],
555
+ "stateMutability": "pure",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [],
560
+ "name": "tokenContract",
561
+ "outputs": [
562
+ {
563
+ "internalType": "address",
564
+ "name": "",
565
+ "type": "address"
566
+ }
567
+ ],
568
+ "stateMutability": "view",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [],
573
+ "name": "totalMintedWithDiscount",
574
+ "outputs": [
575
+ {
576
+ "internalType": "uint256",
577
+ "name": "",
578
+ "type": "uint256"
579
+ }
580
+ ],
581
+ "stateMutability": "view",
582
+ "type": "function"
583
+ },
584
+ {
585
+ "inputs": [
586
+ {
587
+ "internalType": "address",
588
+ "name": "newOwner",
589
+ "type": "address"
590
+ }
591
+ ],
592
+ "name": "transferOwnership",
593
+ "outputs": [],
594
+ "stateMutability": "nonpayable",
595
+ "type": "function"
596
+ },
597
+ {
598
+ "inputs": [],
599
+ "name": "unpause",
600
+ "outputs": [],
601
+ "stateMutability": "nonpayable",
602
+ "type": "function"
603
+ },
604
+ {
605
+ "inputs": [
606
+ {
607
+ "internalType": "address",
608
+ "name": "recipient",
609
+ "type": "address"
610
+ }
611
+ ],
612
+ "name": "withdraw",
613
+ "outputs": [],
614
+ "stateMutability": "nonpayable",
615
+ "type": "function"
616
+ }
617
+ ];
618
+ /**
619
+ * FellowshipDutchAuction Contract Class
620
+ *
621
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
622
+ *
623
+ * @example
624
+ * ```typescript
625
+ * import { createPublicClient, createWalletClient, http } from 'viem';
626
+ * import { mainnet } from 'viem/chains';
627
+ * import { FellowshipDutchAuction } from 'FellowshipDutchAuction';
628
+ *
629
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
630
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
631
+ *
632
+ * const contract = new FellowshipDutchAuction('0x...', { publicClient, walletClient });
633
+ *
634
+ * // Read functions
635
+ * const result = await contract.balanceOf('0x...');
636
+ *
637
+ * // Write functions
638
+ * const hash = await contract.transfer('0x...', 1000n);
639
+ *
640
+ * // Simulate transactions (dry-run)
641
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
642
+ * console.log('Gas estimate:', simulation.request.gas);
643
+ *
644
+ * // Watch events
645
+ * const unwatch = contract.watch.Transfer((event) => {
646
+ * console.log('Transfer event:', event);
647
+ * });
648
+ * ```
649
+ */
650
+ class FellowshipDutchAuction {
651
+ constructor(address, clients) {
652
+ this.contractAddress = address;
653
+ this.publicClient = clients.publicClient;
654
+ this.contract = (0, viem_1.getContract)({
655
+ address,
656
+ abi: exports.FellowshipDutchAuctionAbi,
657
+ client: {
658
+ public: clients.publicClient,
659
+ wallet: clients.walletClient,
660
+ },
661
+ });
662
+ }
663
+ /**
664
+ * Get the contract address
665
+ */
666
+ get address() {
667
+ return this.contractAddress;
668
+ }
669
+ /**
670
+ * Get the underlying viem contract instance.
671
+ */
672
+ getContract() {
673
+ return this.contract;
674
+ }
675
+ /**
676
+ * auctionStages
677
+ * view
678
+ */
679
+ async auctionStages(arg0) {
680
+ return this.contract.read.auctionStages([arg0]);
681
+ }
682
+ /**
683
+ * currentPrice
684
+ * view
685
+ */
686
+ async currentPrice() {
687
+ return this.contract.read.currentPrice();
688
+ }
689
+ /**
690
+ * discountsCount
691
+ * view
692
+ */
693
+ async discountsCount(arg0) {
694
+ return this.contract.read.discountsCount([arg0]);
695
+ }
696
+ /**
697
+ * earlyAccessDuration
698
+ * view
699
+ */
700
+ async earlyAccessDuration() {
701
+ return this.contract.read.earlyAccessDuration();
702
+ }
703
+ /**
704
+ * isPaused
705
+ * view
706
+ */
707
+ async isPaused() {
708
+ return this.contract.read.isPaused();
709
+ }
710
+ /**
711
+ * isPublic
712
+ * view
713
+ */
714
+ async isPublic() {
715
+ return this.contract.read.isPublic();
716
+ }
717
+ /**
718
+ * lowestPrice
719
+ * view
720
+ */
721
+ async lowestPrice() {
722
+ return this.contract.read.lowestPrice();
723
+ }
724
+ /**
725
+ * mintCount
726
+ * view
727
+ */
728
+ async mintCount(arg0) {
729
+ return this.contract.read.mintCount([arg0]);
730
+ }
731
+ /**
732
+ * mintLimit
733
+ * view
734
+ */
735
+ async mintLimit() {
736
+ return this.contract.read.mintLimit();
737
+ }
738
+ /**
739
+ * mintPayment
740
+ * view
741
+ */
742
+ async mintPayment(arg0) {
743
+ return this.contract.read.mintPayment([arg0]);
744
+ }
745
+ /**
746
+ * owner
747
+ * view
748
+ */
749
+ async owner() {
750
+ return this.contract.read.owner();
751
+ }
752
+ /**
753
+ * refundAvailable
754
+ * view
755
+ */
756
+ async refundAvailable(minter) {
757
+ return this.contract.read.refundAvailable([minter]);
758
+ }
759
+ /**
760
+ * startPrice
761
+ * view
762
+ */
763
+ async startPrice() {
764
+ return this.contract.read.startPrice();
765
+ }
766
+ /**
767
+ * startTime
768
+ * view
769
+ */
770
+ async startTime() {
771
+ return this.contract.read.startTime();
772
+ }
773
+ /**
774
+ * supportsInterface
775
+ * pure
776
+ */
777
+ async supportsInterface(interfaceId) {
778
+ return this.contract.read.supportsInterface([interfaceId]);
779
+ }
780
+ /**
781
+ * tokenContract
782
+ * view
783
+ */
784
+ async tokenContract() {
785
+ return this.contract.read.tokenContract();
786
+ }
787
+ /**
788
+ * totalMintedWithDiscount
789
+ * view
790
+ */
791
+ async totalMintedWithDiscount() {
792
+ return this.contract.read.totalMintedWithDiscount();
793
+ }
794
+ /**
795
+ * mintMultiple
796
+ * payable
797
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
798
+ */
799
+ async mintMultiple(quantity, options) {
800
+ if (!this.contract.write) {
801
+ throw new Error('Wallet client is required for write operations');
802
+ }
803
+ return this.contract.write.mintMultiple([quantity], options);
804
+ }
805
+ /**
806
+ * pause
807
+ * nonpayable
808
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
809
+ */
810
+ async pause(options) {
811
+ if (!this.contract.write) {
812
+ throw new Error('Wallet client is required for write operations');
813
+ }
814
+ return this.contract.write.pause(options);
815
+ }
816
+ /**
817
+ * refund
818
+ * nonpayable
819
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
820
+ */
821
+ async refund(options) {
822
+ if (!this.contract.write) {
823
+ throw new Error('Wallet client is required for write operations');
824
+ }
825
+ return this.contract.write.refund(options);
826
+ }
827
+ /**
828
+ * renounceOwnership
829
+ * nonpayable
830
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
831
+ */
832
+ async renounceOwnership(options) {
833
+ if (!this.contract.write) {
834
+ throw new Error('Wallet client is required for write operations');
835
+ }
836
+ return this.contract.write.renounceOwnership(options);
837
+ }
838
+ /**
839
+ * setEarlyAccessDuration
840
+ * nonpayable
841
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
842
+ */
843
+ async setEarlyAccessDuration(duration, options) {
844
+ if (!this.contract.write) {
845
+ throw new Error('Wallet client is required for write operations');
846
+ }
847
+ return this.contract.write.setEarlyAccessDuration([duration], options);
848
+ }
849
+ /**
850
+ * setMintable
851
+ * nonpayable
852
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
853
+ */
854
+ async setMintable(tokenContract_, options) {
855
+ if (!this.contract.write) {
856
+ throw new Error('Wallet client is required for write operations');
857
+ }
858
+ return this.contract.write.setMintable([tokenContract_], options);
859
+ }
860
+ /**
861
+ * setPricing
862
+ * nonpayable
863
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
864
+ */
865
+ async setPricing(startPrice_, stages_, options) {
866
+ if (!this.contract.write) {
867
+ throw new Error('Wallet client is required for write operations');
868
+ }
869
+ return this.contract.write.setPricing([startPrice_, stages_], options);
870
+ }
871
+ /**
872
+ * setStartTime
873
+ * nonpayable
874
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
875
+ */
876
+ async setStartTime(startTime_, options) {
877
+ if (!this.contract.write) {
878
+ throw new Error('Wallet client is required for write operations');
879
+ }
880
+ return this.contract.write.setStartTime([startTime_], options);
881
+ }
882
+ /**
883
+ * transferOwnership
884
+ * nonpayable
885
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
886
+ */
887
+ async transferOwnership(newOwner, options) {
888
+ if (!this.contract.write) {
889
+ throw new Error('Wallet client is required for write operations');
890
+ }
891
+ return this.contract.write.transferOwnership([newOwner], options);
892
+ }
893
+ /**
894
+ * unpause
895
+ * nonpayable
896
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
897
+ */
898
+ async unpause(options) {
899
+ if (!this.contract.write) {
900
+ throw new Error('Wallet client is required for write operations');
901
+ }
902
+ return this.contract.write.unpause(options);
903
+ }
904
+ /**
905
+ * withdraw
906
+ * nonpayable
907
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
908
+ */
909
+ async withdraw(recipient, options) {
910
+ if (!this.contract.write) {
911
+ throw new Error('Wallet client is required for write operations');
912
+ }
913
+ return this.contract.write.withdraw([recipient], options);
914
+ }
915
+ /**
916
+ * Simulate contract write operations (dry-run without sending transaction)
917
+ *
918
+ * @example
919
+ * const result = await contract.simulate.transfer('0x...', 1000n);
920
+ * console.log('Gas estimate:', result.request.gas);
921
+ * console.log('Would succeed:', result.result);
922
+ */
923
+ get simulate() {
924
+ const contract = this.contract;
925
+ if (!contract.simulate) {
926
+ throw new Error('Public client is required for simulation');
927
+ }
928
+ return {
929
+ /**
930
+ * Simulate mintMultiple
931
+ * Returns gas estimate and result without sending transaction
932
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
933
+ */
934
+ async mintMultiple(quantity, options) {
935
+ return contract.simulate.mintMultiple([quantity], options);
936
+ },
937
+ /**
938
+ * Simulate pause
939
+ * Returns gas estimate and result without sending transaction
940
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
941
+ */
942
+ async pause(options) {
943
+ return contract.simulate.pause(options);
944
+ },
945
+ /**
946
+ * Simulate refund
947
+ * Returns gas estimate and result without sending transaction
948
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
949
+ */
950
+ async refund(options) {
951
+ return contract.simulate.refund(options);
952
+ },
953
+ /**
954
+ * Simulate renounceOwnership
955
+ * Returns gas estimate and result without sending transaction
956
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
957
+ */
958
+ async renounceOwnership(options) {
959
+ return contract.simulate.renounceOwnership(options);
960
+ },
961
+ /**
962
+ * Simulate setEarlyAccessDuration
963
+ * Returns gas estimate and result without sending transaction
964
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
965
+ */
966
+ async setEarlyAccessDuration(duration, options) {
967
+ return contract.simulate.setEarlyAccessDuration([duration], options);
968
+ },
969
+ /**
970
+ * Simulate setMintable
971
+ * Returns gas estimate and result without sending transaction
972
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
973
+ */
974
+ async setMintable(tokenContract_, options) {
975
+ return contract.simulate.setMintable([tokenContract_], options);
976
+ },
977
+ /**
978
+ * Simulate setPricing
979
+ * Returns gas estimate and result without sending transaction
980
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
981
+ */
982
+ async setPricing(startPrice_, stages_, options) {
983
+ return contract.simulate.setPricing([startPrice_, stages_], options);
984
+ },
985
+ /**
986
+ * Simulate setStartTime
987
+ * Returns gas estimate and result without sending transaction
988
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
989
+ */
990
+ async setStartTime(startTime_, options) {
991
+ return contract.simulate.setStartTime([startTime_], options);
992
+ },
993
+ /**
994
+ * Simulate transferOwnership
995
+ * Returns gas estimate and result without sending transaction
996
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
997
+ */
998
+ async transferOwnership(newOwner, options) {
999
+ return contract.simulate.transferOwnership([newOwner], options);
1000
+ },
1001
+ /**
1002
+ * Simulate unpause
1003
+ * Returns gas estimate and result without sending transaction
1004
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1005
+ */
1006
+ async unpause(options) {
1007
+ return contract.simulate.unpause(options);
1008
+ },
1009
+ /**
1010
+ * Simulate withdraw
1011
+ * Returns gas estimate and result without sending transaction
1012
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1013
+ */
1014
+ async withdraw(recipient, options) {
1015
+ return contract.simulate.withdraw([recipient], options);
1016
+ }
1017
+ };
1018
+ }
1019
+ /**
1020
+ * Watch contract events
1021
+ *
1022
+ * @example
1023
+ * // Watch all Transfer events
1024
+ * const unwatch = contract.watch.Transfer((event) => {
1025
+ * console.log('Transfer:', event);
1026
+ * });
1027
+ *
1028
+ * // Stop watching
1029
+ * unwatch();
1030
+ */
1031
+ get watch() {
1032
+ return {
1033
+ /**
1034
+ * Watch OwnershipTransferred events
1035
+ * @param callback Function to call when event is emitted
1036
+ * @param filter Optional filter for indexed parameters
1037
+ * @returns Unwatch function to stop listening
1038
+ */
1039
+ OwnershipTransferred: (callback, filter) => {
1040
+ return this.publicClient.watchContractEvent({
1041
+ address: this.contractAddress,
1042
+ abi: exports.FellowshipDutchAuctionAbi,
1043
+ eventName: 'OwnershipTransferred',
1044
+ args: filter,
1045
+ onLogs: (logs) => {
1046
+ logs.forEach((log) => {
1047
+ callback(log.args);
1048
+ });
1049
+ },
1050
+ });
1051
+ },
1052
+ /**
1053
+ * Watch Paused events
1054
+ * @param callback Function to call when event is emitted
1055
+ * @param filter Optional filter for indexed parameters
1056
+ * @returns Unwatch function to stop listening
1057
+ */
1058
+ Paused: (callback) => {
1059
+ return this.publicClient.watchContractEvent({
1060
+ address: this.contractAddress,
1061
+ abi: exports.FellowshipDutchAuctionAbi,
1062
+ eventName: 'Paused',
1063
+ onLogs: (logs) => {
1064
+ logs.forEach((log) => {
1065
+ callback(log.args);
1066
+ });
1067
+ },
1068
+ });
1069
+ },
1070
+ /**
1071
+ * Watch Purchase events
1072
+ * @param callback Function to call when event is emitted
1073
+ * @param filter Optional filter for indexed parameters
1074
+ * @returns Unwatch function to stop listening
1075
+ */
1076
+ Purchase: (callback) => {
1077
+ return this.publicClient.watchContractEvent({
1078
+ address: this.contractAddress,
1079
+ abi: exports.FellowshipDutchAuctionAbi,
1080
+ eventName: 'Purchase',
1081
+ onLogs: (logs) => {
1082
+ logs.forEach((log) => {
1083
+ callback(log.args);
1084
+ });
1085
+ },
1086
+ });
1087
+ },
1088
+ /**
1089
+ * Watch Refund events
1090
+ * @param callback Function to call when event is emitted
1091
+ * @param filter Optional filter for indexed parameters
1092
+ * @returns Unwatch function to stop listening
1093
+ */
1094
+ Refund: (callback) => {
1095
+ return this.publicClient.watchContractEvent({
1096
+ address: this.contractAddress,
1097
+ abi: exports.FellowshipDutchAuctionAbi,
1098
+ eventName: 'Refund',
1099
+ onLogs: (logs) => {
1100
+ logs.forEach((log) => {
1101
+ callback(log.args);
1102
+ });
1103
+ },
1104
+ });
1105
+ },
1106
+ /**
1107
+ * Watch Reservation events
1108
+ * @param callback Function to call when event is emitted
1109
+ * @param filter Optional filter for indexed parameters
1110
+ * @returns Unwatch function to stop listening
1111
+ */
1112
+ Reservation: (callback) => {
1113
+ return this.publicClient.watchContractEvent({
1114
+ address: this.contractAddress,
1115
+ abi: exports.FellowshipDutchAuctionAbi,
1116
+ eventName: 'Reservation',
1117
+ onLogs: (logs) => {
1118
+ logs.forEach((log) => {
1119
+ callback(log.args);
1120
+ });
1121
+ },
1122
+ });
1123
+ },
1124
+ /**
1125
+ * Watch Unpaused events
1126
+ * @param callback Function to call when event is emitted
1127
+ * @param filter Optional filter for indexed parameters
1128
+ * @returns Unwatch function to stop listening
1129
+ */
1130
+ Unpaused: (callback) => {
1131
+ return this.publicClient.watchContractEvent({
1132
+ address: this.contractAddress,
1133
+ abi: exports.FellowshipDutchAuctionAbi,
1134
+ eventName: 'Unpaused',
1135
+ onLogs: (logs) => {
1136
+ logs.forEach((log) => {
1137
+ callback(log.args);
1138
+ });
1139
+ },
1140
+ });
1141
+ }
1142
+ };
1143
+ }
1144
+ }
1145
+ exports.FellowshipDutchAuction = FellowshipDutchAuction;