@gitmyabi/shrimps 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,1403 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Shrimp_json = exports.Shrimp_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * Shrimp_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.Shrimp_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "maxSupply_",
16
+ "type": "uint256"
17
+ },
18
+ {
19
+ "internalType": "string",
20
+ "name": "baseTokenURI_",
21
+ "type": "string"
22
+ }
23
+ ],
24
+ "stateMutability": "nonpayable",
25
+ "type": "constructor"
26
+ },
27
+ {
28
+ "inputs": [],
29
+ "name": "ApprovalCallerNotOwnerNorApproved",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "ApprovalQueryForNonexistentToken",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "ApprovalToCurrentOwner",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "ApproveToCaller",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "BalanceQueryForZeroAddress",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "MintToZeroAddress",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "MintZeroQuantity",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "OwnerQueryForNonexistentToken",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "TransferCallerNotOwnerNorApproved",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "TransferFromIncorrectOwner",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "TransferToNonERC721ReceiverImplementer",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "TransferToZeroAddress",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "owner",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "approved",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": true,
104
+ "internalType": "uint256",
105
+ "name": "tokenId",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "name": "Approval",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": true,
117
+ "internalType": "address",
118
+ "name": "owner",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": true,
123
+ "internalType": "address",
124
+ "name": "operator",
125
+ "type": "address"
126
+ },
127
+ {
128
+ "indexed": false,
129
+ "internalType": "bool",
130
+ "name": "approved",
131
+ "type": "bool"
132
+ }
133
+ ],
134
+ "name": "ApprovalForAll",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [
140
+ {
141
+ "indexed": true,
142
+ "internalType": "address",
143
+ "name": "previousOwner",
144
+ "type": "address"
145
+ },
146
+ {
147
+ "indexed": true,
148
+ "internalType": "address",
149
+ "name": "newOwner",
150
+ "type": "address"
151
+ }
152
+ ],
153
+ "name": "OwnershipTransferred",
154
+ "type": "event"
155
+ },
156
+ {
157
+ "anonymous": false,
158
+ "inputs": [
159
+ {
160
+ "indexed": true,
161
+ "internalType": "address",
162
+ "name": "from",
163
+ "type": "address"
164
+ },
165
+ {
166
+ "indexed": true,
167
+ "internalType": "address",
168
+ "name": "to",
169
+ "type": "address"
170
+ },
171
+ {
172
+ "indexed": true,
173
+ "internalType": "uint256",
174
+ "name": "tokenId",
175
+ "type": "uint256"
176
+ }
177
+ ],
178
+ "name": "Transfer",
179
+ "type": "event"
180
+ },
181
+ {
182
+ "inputs": [
183
+ {
184
+ "internalType": "address",
185
+ "name": "to",
186
+ "type": "address"
187
+ },
188
+ {
189
+ "internalType": "uint256",
190
+ "name": "tokenId",
191
+ "type": "uint256"
192
+ }
193
+ ],
194
+ "name": "approve",
195
+ "outputs": [],
196
+ "stateMutability": "nonpayable",
197
+ "type": "function"
198
+ },
199
+ {
200
+ "inputs": [
201
+ {
202
+ "internalType": "address",
203
+ "name": "owner",
204
+ "type": "address"
205
+ }
206
+ ],
207
+ "name": "balanceOf",
208
+ "outputs": [
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "",
212
+ "type": "uint256"
213
+ }
214
+ ],
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [],
220
+ "name": "baseTokenURILocked",
221
+ "outputs": [
222
+ {
223
+ "internalType": "bool",
224
+ "name": "",
225
+ "type": "bool"
226
+ }
227
+ ],
228
+ "stateMutability": "view",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "inputs": [
233
+ {
234
+ "internalType": "uint256",
235
+ "name": "tokenId",
236
+ "type": "uint256"
237
+ }
238
+ ],
239
+ "name": "burn",
240
+ "outputs": [],
241
+ "stateMutability": "nonpayable",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "currentMode",
247
+ "outputs": [
248
+ {
249
+ "internalType": "enum Shrimp.ReleaseMode",
250
+ "name": "",
251
+ "type": "uint8"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [],
259
+ "name": "endSale",
260
+ "outputs": [],
261
+ "stateMutability": "nonpayable",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "freeClaimed",
267
+ "outputs": [
268
+ {
269
+ "internalType": "uint32",
270
+ "name": "",
271
+ "type": "uint32"
272
+ }
273
+ ],
274
+ "stateMutability": "view",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [
279
+ {
280
+ "internalType": "address",
281
+ "name": "a",
282
+ "type": "address"
283
+ }
284
+ ],
285
+ "name": "freeFishClaimed",
286
+ "outputs": [
287
+ {
288
+ "internalType": "bool",
289
+ "name": "",
290
+ "type": "bool"
291
+ }
292
+ ],
293
+ "stateMutability": "view",
294
+ "type": "function"
295
+ },
296
+ {
297
+ "inputs": [
298
+ {
299
+ "internalType": "uint256",
300
+ "name": "fishCount",
301
+ "type": "uint256"
302
+ }
303
+ ],
304
+ "name": "generalFishing",
305
+ "outputs": [],
306
+ "stateMutability": "payable",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [
311
+ {
312
+ "internalType": "uint256",
313
+ "name": "fishCount",
314
+ "type": "uint256"
315
+ }
316
+ ],
317
+ "name": "generalFreeFishing",
318
+ "outputs": [],
319
+ "stateMutability": "payable",
320
+ "type": "function"
321
+ },
322
+ {
323
+ "inputs": [
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "tokenId",
327
+ "type": "uint256"
328
+ }
329
+ ],
330
+ "name": "getApproved",
331
+ "outputs": [
332
+ {
333
+ "internalType": "address",
334
+ "name": "",
335
+ "type": "address"
336
+ }
337
+ ],
338
+ "stateMutability": "view",
339
+ "type": "function"
340
+ },
341
+ {
342
+ "inputs": [],
343
+ "name": "getWalletAddresses",
344
+ "outputs": [
345
+ {
346
+ "internalType": "address",
347
+ "name": "aeAddress",
348
+ "type": "address"
349
+ },
350
+ {
351
+ "internalType": "address",
352
+ "name": "lmdAddress",
353
+ "type": "address"
354
+ }
355
+ ],
356
+ "stateMutability": "view",
357
+ "type": "function"
358
+ },
359
+ {
360
+ "inputs": [
361
+ {
362
+ "internalType": "address",
363
+ "name": "owner",
364
+ "type": "address"
365
+ },
366
+ {
367
+ "internalType": "address",
368
+ "name": "operator",
369
+ "type": "address"
370
+ }
371
+ ],
372
+ "name": "isApprovedForAll",
373
+ "outputs": [
374
+ {
375
+ "internalType": "bool",
376
+ "name": "",
377
+ "type": "bool"
378
+ }
379
+ ],
380
+ "stateMutability": "view",
381
+ "type": "function"
382
+ },
383
+ {
384
+ "inputs": [],
385
+ "name": "lockBaseTokenURI",
386
+ "outputs": [],
387
+ "stateMutability": "nonpayable",
388
+ "type": "function"
389
+ },
390
+ {
391
+ "inputs": [],
392
+ "name": "maxSupply",
393
+ "outputs": [
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "",
397
+ "type": "uint256"
398
+ }
399
+ ],
400
+ "stateMutability": "view",
401
+ "type": "function"
402
+ },
403
+ {
404
+ "inputs": [],
405
+ "name": "name",
406
+ "outputs": [
407
+ {
408
+ "internalType": "string",
409
+ "name": "",
410
+ "type": "string"
411
+ }
412
+ ],
413
+ "stateMutability": "view",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [],
418
+ "name": "owner",
419
+ "outputs": [
420
+ {
421
+ "internalType": "address",
422
+ "name": "",
423
+ "type": "address"
424
+ }
425
+ ],
426
+ "stateMutability": "view",
427
+ "type": "function"
428
+ },
429
+ {
430
+ "inputs": [
431
+ {
432
+ "internalType": "uint256",
433
+ "name": "tokenId",
434
+ "type": "uint256"
435
+ }
436
+ ],
437
+ "name": "ownerOf",
438
+ "outputs": [
439
+ {
440
+ "internalType": "address",
441
+ "name": "",
442
+ "type": "address"
443
+ }
444
+ ],
445
+ "stateMutability": "view",
446
+ "type": "function"
447
+ },
448
+ {
449
+ "inputs": [],
450
+ "name": "price",
451
+ "outputs": [
452
+ {
453
+ "internalType": "uint256",
454
+ "name": "",
455
+ "type": "uint256"
456
+ }
457
+ ],
458
+ "stateMutability": "view",
459
+ "type": "function"
460
+ },
461
+ {
462
+ "inputs": [],
463
+ "name": "renounceOwnership",
464
+ "outputs": [],
465
+ "stateMutability": "nonpayable",
466
+ "type": "function"
467
+ },
468
+ {
469
+ "inputs": [
470
+ {
471
+ "internalType": "address",
472
+ "name": "from",
473
+ "type": "address"
474
+ },
475
+ {
476
+ "internalType": "address",
477
+ "name": "to",
478
+ "type": "address"
479
+ },
480
+ {
481
+ "internalType": "uint256",
482
+ "name": "tokenId",
483
+ "type": "uint256"
484
+ }
485
+ ],
486
+ "name": "safeTransferFrom",
487
+ "outputs": [],
488
+ "stateMutability": "nonpayable",
489
+ "type": "function"
490
+ },
491
+ {
492
+ "inputs": [
493
+ {
494
+ "internalType": "address",
495
+ "name": "from",
496
+ "type": "address"
497
+ },
498
+ {
499
+ "internalType": "address",
500
+ "name": "to",
501
+ "type": "address"
502
+ },
503
+ {
504
+ "internalType": "uint256",
505
+ "name": "tokenId",
506
+ "type": "uint256"
507
+ },
508
+ {
509
+ "internalType": "bytes",
510
+ "name": "_data",
511
+ "type": "bytes"
512
+ }
513
+ ],
514
+ "name": "safeTransferFrom",
515
+ "outputs": [],
516
+ "stateMutability": "nonpayable",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "inputs": [
521
+ {
522
+ "internalType": "address",
523
+ "name": "operator",
524
+ "type": "address"
525
+ },
526
+ {
527
+ "internalType": "bool",
528
+ "name": "approved",
529
+ "type": "bool"
530
+ }
531
+ ],
532
+ "name": "setApprovalForAll",
533
+ "outputs": [],
534
+ "stateMutability": "nonpayable",
535
+ "type": "function"
536
+ },
537
+ {
538
+ "inputs": [
539
+ {
540
+ "internalType": "string",
541
+ "name": "baseTokenURI_",
542
+ "type": "string"
543
+ }
544
+ ],
545
+ "name": "setBaseURI",
546
+ "outputs": [],
547
+ "stateMutability": "nonpayable",
548
+ "type": "function"
549
+ },
550
+ {
551
+ "inputs": [
552
+ {
553
+ "internalType": "bytes32",
554
+ "name": "merkRoot",
555
+ "type": "bytes32"
556
+ }
557
+ ],
558
+ "name": "setFreeFishMerkleRoot",
559
+ "outputs": [],
560
+ "stateMutability": "nonpayable",
561
+ "type": "function"
562
+ },
563
+ {
564
+ "inputs": [
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "newNumber",
568
+ "type": "uint256"
569
+ }
570
+ ],
571
+ "name": "setMaxFish",
572
+ "outputs": [],
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [
578
+ {
579
+ "internalType": "uint256",
580
+ "name": "newPrice",
581
+ "type": "uint256"
582
+ }
583
+ ],
584
+ "name": "setPrice",
585
+ "outputs": [],
586
+ "stateMutability": "nonpayable",
587
+ "type": "function"
588
+ },
589
+ {
590
+ "inputs": [
591
+ {
592
+ "internalType": "address",
593
+ "name": "a",
594
+ "type": "address"
595
+ }
596
+ ],
597
+ "name": "setWalletAddresses",
598
+ "outputs": [],
599
+ "stateMutability": "nonpayable",
600
+ "type": "function"
601
+ },
602
+ {
603
+ "inputs": [],
604
+ "name": "startDevTeam",
605
+ "outputs": [],
606
+ "stateMutability": "nonpayable",
607
+ "type": "function"
608
+ },
609
+ {
610
+ "inputs": [],
611
+ "name": "startGeneralSale",
612
+ "outputs": [],
613
+ "stateMutability": "nonpayable",
614
+ "type": "function"
615
+ },
616
+ {
617
+ "inputs": [
618
+ {
619
+ "internalType": "bytes4",
620
+ "name": "interfaceId",
621
+ "type": "bytes4"
622
+ }
623
+ ],
624
+ "name": "supportsInterface",
625
+ "outputs": [
626
+ {
627
+ "internalType": "bool",
628
+ "name": "",
629
+ "type": "bool"
630
+ }
631
+ ],
632
+ "stateMutability": "view",
633
+ "type": "function"
634
+ },
635
+ {
636
+ "inputs": [],
637
+ "name": "symbol",
638
+ "outputs": [
639
+ {
640
+ "internalType": "string",
641
+ "name": "",
642
+ "type": "string"
643
+ }
644
+ ],
645
+ "stateMutability": "view",
646
+ "type": "function"
647
+ },
648
+ {
649
+ "inputs": [
650
+ {
651
+ "internalType": "uint256",
652
+ "name": "tokenId",
653
+ "type": "uint256"
654
+ }
655
+ ],
656
+ "name": "tokenURI",
657
+ "outputs": [
658
+ {
659
+ "internalType": "string",
660
+ "name": "",
661
+ "type": "string"
662
+ }
663
+ ],
664
+ "stateMutability": "view",
665
+ "type": "function"
666
+ },
667
+ {
668
+ "inputs": [],
669
+ "name": "totalSupply",
670
+ "outputs": [
671
+ {
672
+ "internalType": "uint256",
673
+ "name": "",
674
+ "type": "uint256"
675
+ }
676
+ ],
677
+ "stateMutability": "view",
678
+ "type": "function"
679
+ },
680
+ {
681
+ "inputs": [
682
+ {
683
+ "internalType": "address",
684
+ "name": "from",
685
+ "type": "address"
686
+ },
687
+ {
688
+ "internalType": "address",
689
+ "name": "to",
690
+ "type": "address"
691
+ },
692
+ {
693
+ "internalType": "uint256",
694
+ "name": "tokenId",
695
+ "type": "uint256"
696
+ }
697
+ ],
698
+ "name": "transferFrom",
699
+ "outputs": [],
700
+ "stateMutability": "nonpayable",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [
705
+ {
706
+ "internalType": "address",
707
+ "name": "newOwner",
708
+ "type": "address"
709
+ }
710
+ ],
711
+ "name": "transferOwnership",
712
+ "outputs": [],
713
+ "stateMutability": "nonpayable",
714
+ "type": "function"
715
+ },
716
+ {
717
+ "inputs": [
718
+ {
719
+ "internalType": "bytes32[]",
720
+ "name": "_merkleProof",
721
+ "type": "bytes32[]"
722
+ },
723
+ {
724
+ "internalType": "uint256",
725
+ "name": "fishCount",
726
+ "type": "uint256"
727
+ }
728
+ ],
729
+ "name": "whitelistFreeFishing",
730
+ "outputs": [],
731
+ "stateMutability": "payable",
732
+ "type": "function"
733
+ },
734
+ {
735
+ "inputs": [],
736
+ "name": "withdraw",
737
+ "outputs": [],
738
+ "stateMutability": "nonpayable",
739
+ "type": "function"
740
+ }
741
+ ];
742
+ /**
743
+ * Shrimp_json Contract Class
744
+ *
745
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
746
+ *
747
+ * @example
748
+ * ```typescript
749
+ * import { createPublicClient, createWalletClient, http } from 'viem';
750
+ * import { mainnet } from 'viem/chains';
751
+ * import { Shrimp_json } from 'Shrimp_json';
752
+ *
753
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
754
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
755
+ *
756
+ * const contract = new Shrimp_json('0x...', { publicClient, walletClient });
757
+ *
758
+ * // Read functions
759
+ * const result = await contract.balanceOf('0x...');
760
+ *
761
+ * // Write functions
762
+ * const hash = await contract.transfer('0x...', 1000n);
763
+ *
764
+ * // Simulate transactions (dry-run)
765
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
766
+ * console.log('Gas estimate:', simulation.request.gas);
767
+ *
768
+ * // Watch events
769
+ * const unwatch = contract.watch.Transfer((event) => {
770
+ * console.log('Transfer event:', event);
771
+ * });
772
+ * ```
773
+ */
774
+ class Shrimp_json {
775
+ constructor(address, clients) {
776
+ this.contractAddress = address;
777
+ this.publicClient = clients.publicClient;
778
+ this.contract = (0, viem_1.getContract)({
779
+ address,
780
+ abi: exports.Shrimp_jsonAbi,
781
+ client: {
782
+ public: clients.publicClient,
783
+ wallet: clients.walletClient,
784
+ },
785
+ });
786
+ }
787
+ /**
788
+ * Get the contract address
789
+ */
790
+ get address() {
791
+ return this.contractAddress;
792
+ }
793
+ /**
794
+ * Get the underlying viem contract instance
795
+ */
796
+ getContract() {
797
+ return this.contract;
798
+ }
799
+ /**
800
+ * balanceOf
801
+ * view
802
+ */
803
+ async balanceOf(owner) {
804
+ return this.contract.read.balanceOf([owner]);
805
+ }
806
+ /**
807
+ * baseTokenURILocked
808
+ * view
809
+ */
810
+ async baseTokenURILocked() {
811
+ return this.contract.read.baseTokenURILocked();
812
+ }
813
+ /**
814
+ * currentMode
815
+ * view
816
+ */
817
+ async currentMode() {
818
+ return this.contract.read.currentMode();
819
+ }
820
+ /**
821
+ * freeClaimed
822
+ * view
823
+ */
824
+ async freeClaimed() {
825
+ return this.contract.read.freeClaimed();
826
+ }
827
+ /**
828
+ * freeFishClaimed
829
+ * view
830
+ */
831
+ async freeFishClaimed(a) {
832
+ return this.contract.read.freeFishClaimed([a]);
833
+ }
834
+ /**
835
+ * getApproved
836
+ * view
837
+ */
838
+ async getApproved(tokenId) {
839
+ return this.contract.read.getApproved([tokenId]);
840
+ }
841
+ /**
842
+ * getWalletAddresses
843
+ * view
844
+ */
845
+ async getWalletAddresses() {
846
+ return this.contract.read.getWalletAddresses();
847
+ }
848
+ /**
849
+ * isApprovedForAll
850
+ * view
851
+ */
852
+ async isApprovedForAll(owner, operator) {
853
+ return this.contract.read.isApprovedForAll([owner, operator]);
854
+ }
855
+ /**
856
+ * maxSupply
857
+ * view
858
+ */
859
+ async maxSupply() {
860
+ return this.contract.read.maxSupply();
861
+ }
862
+ /**
863
+ * name
864
+ * view
865
+ */
866
+ async name() {
867
+ return this.contract.read.name();
868
+ }
869
+ /**
870
+ * owner
871
+ * view
872
+ */
873
+ async owner() {
874
+ return this.contract.read.owner();
875
+ }
876
+ /**
877
+ * ownerOf
878
+ * view
879
+ */
880
+ async ownerOf(tokenId) {
881
+ return this.contract.read.ownerOf([tokenId]);
882
+ }
883
+ /**
884
+ * price
885
+ * view
886
+ */
887
+ async price() {
888
+ return this.contract.read.price();
889
+ }
890
+ /**
891
+ * supportsInterface
892
+ * view
893
+ */
894
+ async supportsInterface(interfaceId) {
895
+ return this.contract.read.supportsInterface([interfaceId]);
896
+ }
897
+ /**
898
+ * symbol
899
+ * view
900
+ */
901
+ async symbol() {
902
+ return this.contract.read.symbol();
903
+ }
904
+ /**
905
+ * tokenURI
906
+ * view
907
+ */
908
+ async tokenURI(tokenId) {
909
+ return this.contract.read.tokenURI([tokenId]);
910
+ }
911
+ /**
912
+ * totalSupply
913
+ * view
914
+ */
915
+ async totalSupply() {
916
+ return this.contract.read.totalSupply();
917
+ }
918
+ /**
919
+ * approve
920
+ * nonpayable
921
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
922
+ */
923
+ async approve(to, tokenId, options) {
924
+ if (!this.contract.write) {
925
+ throw new Error('Wallet client is required for write operations');
926
+ }
927
+ return this.contract.write.approve([to, tokenId], options);
928
+ }
929
+ /**
930
+ * burn
931
+ * nonpayable
932
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
933
+ */
934
+ async burn(tokenId, options) {
935
+ if (!this.contract.write) {
936
+ throw new Error('Wallet client is required for write operations');
937
+ }
938
+ return this.contract.write.burn([tokenId], options);
939
+ }
940
+ /**
941
+ * endSale
942
+ * nonpayable
943
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
944
+ */
945
+ async endSale(options) {
946
+ if (!this.contract.write) {
947
+ throw new Error('Wallet client is required for write operations');
948
+ }
949
+ return this.contract.write.endSale(options);
950
+ }
951
+ /**
952
+ * generalFishing
953
+ * payable
954
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
955
+ */
956
+ async generalFishing(fishCount, options) {
957
+ if (!this.contract.write) {
958
+ throw new Error('Wallet client is required for write operations');
959
+ }
960
+ return this.contract.write.generalFishing([fishCount], options);
961
+ }
962
+ /**
963
+ * generalFreeFishing
964
+ * payable
965
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
966
+ */
967
+ async generalFreeFishing(fishCount, options) {
968
+ if (!this.contract.write) {
969
+ throw new Error('Wallet client is required for write operations');
970
+ }
971
+ return this.contract.write.generalFreeFishing([fishCount], options);
972
+ }
973
+ /**
974
+ * lockBaseTokenURI
975
+ * nonpayable
976
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
977
+ */
978
+ async lockBaseTokenURI(options) {
979
+ if (!this.contract.write) {
980
+ throw new Error('Wallet client is required for write operations');
981
+ }
982
+ return this.contract.write.lockBaseTokenURI(options);
983
+ }
984
+ /**
985
+ * renounceOwnership
986
+ * nonpayable
987
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
988
+ */
989
+ async renounceOwnership(options) {
990
+ if (!this.contract.write) {
991
+ throw new Error('Wallet client is required for write operations');
992
+ }
993
+ return this.contract.write.renounceOwnership(options);
994
+ }
995
+ async safeTransferFrom(...args) {
996
+ if (!this.contract.write) {
997
+ throw new Error('Wallet client is required for write operations');
998
+ }
999
+ return this.contract.write.safeTransferFrom(args);
1000
+ }
1001
+ /**
1002
+ * setApprovalForAll
1003
+ * nonpayable
1004
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1005
+ */
1006
+ async setApprovalForAll(operator, approved, options) {
1007
+ if (!this.contract.write) {
1008
+ throw new Error('Wallet client is required for write operations');
1009
+ }
1010
+ return this.contract.write.setApprovalForAll([operator, approved], options);
1011
+ }
1012
+ /**
1013
+ * setBaseURI
1014
+ * nonpayable
1015
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1016
+ */
1017
+ async setBaseURI(baseTokenURI_, options) {
1018
+ if (!this.contract.write) {
1019
+ throw new Error('Wallet client is required for write operations');
1020
+ }
1021
+ return this.contract.write.setBaseURI([baseTokenURI_], options);
1022
+ }
1023
+ /**
1024
+ * setFreeFishMerkleRoot
1025
+ * nonpayable
1026
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1027
+ */
1028
+ async setFreeFishMerkleRoot(merkRoot, options) {
1029
+ if (!this.contract.write) {
1030
+ throw new Error('Wallet client is required for write operations');
1031
+ }
1032
+ return this.contract.write.setFreeFishMerkleRoot([merkRoot], options);
1033
+ }
1034
+ /**
1035
+ * setMaxFish
1036
+ * nonpayable
1037
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1038
+ */
1039
+ async setMaxFish(newNumber, options) {
1040
+ if (!this.contract.write) {
1041
+ throw new Error('Wallet client is required for write operations');
1042
+ }
1043
+ return this.contract.write.setMaxFish([newNumber], options);
1044
+ }
1045
+ /**
1046
+ * setPrice
1047
+ * nonpayable
1048
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1049
+ */
1050
+ async setPrice(newPrice, options) {
1051
+ if (!this.contract.write) {
1052
+ throw new Error('Wallet client is required for write operations');
1053
+ }
1054
+ return this.contract.write.setPrice([newPrice], options);
1055
+ }
1056
+ /**
1057
+ * setWalletAddresses
1058
+ * nonpayable
1059
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1060
+ */
1061
+ async setWalletAddresses(a, options) {
1062
+ if (!this.contract.write) {
1063
+ throw new Error('Wallet client is required for write operations');
1064
+ }
1065
+ return this.contract.write.setWalletAddresses([a], options);
1066
+ }
1067
+ /**
1068
+ * startDevTeam
1069
+ * nonpayable
1070
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1071
+ */
1072
+ async startDevTeam(options) {
1073
+ if (!this.contract.write) {
1074
+ throw new Error('Wallet client is required for write operations');
1075
+ }
1076
+ return this.contract.write.startDevTeam(options);
1077
+ }
1078
+ /**
1079
+ * startGeneralSale
1080
+ * nonpayable
1081
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1082
+ */
1083
+ async startGeneralSale(options) {
1084
+ if (!this.contract.write) {
1085
+ throw new Error('Wallet client is required for write operations');
1086
+ }
1087
+ return this.contract.write.startGeneralSale(options);
1088
+ }
1089
+ /**
1090
+ * transferFrom
1091
+ * nonpayable
1092
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1093
+ */
1094
+ async transferFrom(from, to, tokenId, options) {
1095
+ if (!this.contract.write) {
1096
+ throw new Error('Wallet client is required for write operations');
1097
+ }
1098
+ return this.contract.write.transferFrom([from, to, tokenId], options);
1099
+ }
1100
+ /**
1101
+ * transferOwnership
1102
+ * nonpayable
1103
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1104
+ */
1105
+ async transferOwnership(newOwner, options) {
1106
+ if (!this.contract.write) {
1107
+ throw new Error('Wallet client is required for write operations');
1108
+ }
1109
+ return this.contract.write.transferOwnership([newOwner], options);
1110
+ }
1111
+ /**
1112
+ * whitelistFreeFishing
1113
+ * payable
1114
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1115
+ */
1116
+ async whitelistFreeFishing(_merkleProof, fishCount, options) {
1117
+ if (!this.contract.write) {
1118
+ throw new Error('Wallet client is required for write operations');
1119
+ }
1120
+ return this.contract.write.whitelistFreeFishing([_merkleProof, fishCount], options);
1121
+ }
1122
+ /**
1123
+ * withdraw
1124
+ * nonpayable
1125
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1126
+ */
1127
+ async withdraw(options) {
1128
+ if (!this.contract.write) {
1129
+ throw new Error('Wallet client is required for write operations');
1130
+ }
1131
+ return this.contract.write.withdraw(options);
1132
+ }
1133
+ /**
1134
+ * Simulate contract write operations (dry-run without sending transaction)
1135
+ *
1136
+ * @example
1137
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1138
+ * console.log('Gas estimate:', result.request.gas);
1139
+ * console.log('Would succeed:', result.result);
1140
+ */
1141
+ get simulate() {
1142
+ const contract = this.contract;
1143
+ if (!contract.simulate) {
1144
+ throw new Error('Public client is required for simulation');
1145
+ }
1146
+ return {
1147
+ /**
1148
+ * Simulate approve
1149
+ * Returns gas estimate and result without sending transaction
1150
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1151
+ */
1152
+ async approve(to, tokenId, options) {
1153
+ return contract.simulate.approve([to, tokenId], options);
1154
+ },
1155
+ /**
1156
+ * Simulate burn
1157
+ * Returns gas estimate and result without sending transaction
1158
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1159
+ */
1160
+ async burn(tokenId, options) {
1161
+ return contract.simulate.burn([tokenId], options);
1162
+ },
1163
+ /**
1164
+ * Simulate endSale
1165
+ * Returns gas estimate and result without sending transaction
1166
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1167
+ */
1168
+ async endSale(options) {
1169
+ return contract.simulate.endSale(options);
1170
+ },
1171
+ /**
1172
+ * Simulate generalFishing
1173
+ * Returns gas estimate and result without sending transaction
1174
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1175
+ */
1176
+ async generalFishing(fishCount, options) {
1177
+ return contract.simulate.generalFishing([fishCount], options);
1178
+ },
1179
+ /**
1180
+ * Simulate generalFreeFishing
1181
+ * Returns gas estimate and result without sending transaction
1182
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1183
+ */
1184
+ async generalFreeFishing(fishCount, options) {
1185
+ return contract.simulate.generalFreeFishing([fishCount], options);
1186
+ },
1187
+ /**
1188
+ * Simulate lockBaseTokenURI
1189
+ * Returns gas estimate and result without sending transaction
1190
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1191
+ */
1192
+ async lockBaseTokenURI(options) {
1193
+ return contract.simulate.lockBaseTokenURI(options);
1194
+ },
1195
+ /**
1196
+ * Simulate renounceOwnership
1197
+ * Returns gas estimate and result without sending transaction
1198
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1199
+ */
1200
+ async renounceOwnership(options) {
1201
+ return contract.simulate.renounceOwnership(options);
1202
+ },
1203
+ /**
1204
+ * Simulate safeTransferFrom
1205
+ * Returns gas estimate and result without sending transaction
1206
+ * Supports multiple overloads: (address, address, uint256), (address, address, uint256, bytes)
1207
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1208
+ */
1209
+ async safeTransferFrom(...args) {
1210
+ return contract.simulate.safeTransferFrom(args);
1211
+ },
1212
+ /**
1213
+ * Simulate setApprovalForAll
1214
+ * Returns gas estimate and result without sending transaction
1215
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1216
+ */
1217
+ async setApprovalForAll(operator, approved, options) {
1218
+ return contract.simulate.setApprovalForAll([operator, approved], options);
1219
+ },
1220
+ /**
1221
+ * Simulate setBaseURI
1222
+ * Returns gas estimate and result without sending transaction
1223
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1224
+ */
1225
+ async setBaseURI(baseTokenURI_, options) {
1226
+ return contract.simulate.setBaseURI([baseTokenURI_], options);
1227
+ },
1228
+ /**
1229
+ * Simulate setFreeFishMerkleRoot
1230
+ * Returns gas estimate and result without sending transaction
1231
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1232
+ */
1233
+ async setFreeFishMerkleRoot(merkRoot, options) {
1234
+ return contract.simulate.setFreeFishMerkleRoot([merkRoot], options);
1235
+ },
1236
+ /**
1237
+ * Simulate setMaxFish
1238
+ * Returns gas estimate and result without sending transaction
1239
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1240
+ */
1241
+ async setMaxFish(newNumber, options) {
1242
+ return contract.simulate.setMaxFish([newNumber], options);
1243
+ },
1244
+ /**
1245
+ * Simulate setPrice
1246
+ * Returns gas estimate and result without sending transaction
1247
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1248
+ */
1249
+ async setPrice(newPrice, options) {
1250
+ return contract.simulate.setPrice([newPrice], options);
1251
+ },
1252
+ /**
1253
+ * Simulate setWalletAddresses
1254
+ * Returns gas estimate and result without sending transaction
1255
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1256
+ */
1257
+ async setWalletAddresses(a, options) {
1258
+ return contract.simulate.setWalletAddresses([a], options);
1259
+ },
1260
+ /**
1261
+ * Simulate startDevTeam
1262
+ * Returns gas estimate and result without sending transaction
1263
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1264
+ */
1265
+ async startDevTeam(options) {
1266
+ return contract.simulate.startDevTeam(options);
1267
+ },
1268
+ /**
1269
+ * Simulate startGeneralSale
1270
+ * Returns gas estimate and result without sending transaction
1271
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1272
+ */
1273
+ async startGeneralSale(options) {
1274
+ return contract.simulate.startGeneralSale(options);
1275
+ },
1276
+ /**
1277
+ * Simulate transferFrom
1278
+ * Returns gas estimate and result without sending transaction
1279
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1280
+ */
1281
+ async transferFrom(from, to, tokenId, options) {
1282
+ return contract.simulate.transferFrom([from, to, tokenId], options);
1283
+ },
1284
+ /**
1285
+ * Simulate transferOwnership
1286
+ * Returns gas estimate and result without sending transaction
1287
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1288
+ */
1289
+ async transferOwnership(newOwner, options) {
1290
+ return contract.simulate.transferOwnership([newOwner], options);
1291
+ },
1292
+ /**
1293
+ * Simulate whitelistFreeFishing
1294
+ * Returns gas estimate and result without sending transaction
1295
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1296
+ */
1297
+ async whitelistFreeFishing(_merkleProof, fishCount, options) {
1298
+ return contract.simulate.whitelistFreeFishing([_merkleProof, fishCount], options);
1299
+ },
1300
+ /**
1301
+ * Simulate withdraw
1302
+ * Returns gas estimate and result without sending transaction
1303
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1304
+ */
1305
+ async withdraw(options) {
1306
+ return contract.simulate.withdraw(options);
1307
+ }
1308
+ };
1309
+ }
1310
+ /**
1311
+ * Watch contract events
1312
+ *
1313
+ * @example
1314
+ * // Watch all Transfer events
1315
+ * const unwatch = contract.watch.Transfer((event) => {
1316
+ * console.log('Transfer:', event);
1317
+ * });
1318
+ *
1319
+ * // Stop watching
1320
+ * unwatch();
1321
+ */
1322
+ get watch() {
1323
+ return {
1324
+ /**
1325
+ * Watch Approval events
1326
+ * @param callback Function to call when event is emitted
1327
+ * @param filter Optional filter for indexed parameters
1328
+ * @returns Unwatch function to stop listening
1329
+ */
1330
+ Approval: (callback, filter) => {
1331
+ return this.publicClient.watchContractEvent({
1332
+ address: this.contractAddress,
1333
+ abi: exports.Shrimp_jsonAbi,
1334
+ eventName: 'Approval',
1335
+ args: filter,
1336
+ onLogs: (logs) => {
1337
+ logs.forEach((log) => {
1338
+ callback(log.args);
1339
+ });
1340
+ },
1341
+ });
1342
+ },
1343
+ /**
1344
+ * Watch ApprovalForAll events
1345
+ * @param callback Function to call when event is emitted
1346
+ * @param filter Optional filter for indexed parameters
1347
+ * @returns Unwatch function to stop listening
1348
+ */
1349
+ ApprovalForAll: (callback, filter) => {
1350
+ return this.publicClient.watchContractEvent({
1351
+ address: this.contractAddress,
1352
+ abi: exports.Shrimp_jsonAbi,
1353
+ eventName: 'ApprovalForAll',
1354
+ args: filter,
1355
+ onLogs: (logs) => {
1356
+ logs.forEach((log) => {
1357
+ callback(log.args);
1358
+ });
1359
+ },
1360
+ });
1361
+ },
1362
+ /**
1363
+ * Watch OwnershipTransferred events
1364
+ * @param callback Function to call when event is emitted
1365
+ * @param filter Optional filter for indexed parameters
1366
+ * @returns Unwatch function to stop listening
1367
+ */
1368
+ OwnershipTransferred: (callback, filter) => {
1369
+ return this.publicClient.watchContractEvent({
1370
+ address: this.contractAddress,
1371
+ abi: exports.Shrimp_jsonAbi,
1372
+ eventName: 'OwnershipTransferred',
1373
+ args: filter,
1374
+ onLogs: (logs) => {
1375
+ logs.forEach((log) => {
1376
+ callback(log.args);
1377
+ });
1378
+ },
1379
+ });
1380
+ },
1381
+ /**
1382
+ * Watch Transfer events
1383
+ * @param callback Function to call when event is emitted
1384
+ * @param filter Optional filter for indexed parameters
1385
+ * @returns Unwatch function to stop listening
1386
+ */
1387
+ Transfer: (callback, filter) => {
1388
+ return this.publicClient.watchContractEvent({
1389
+ address: this.contractAddress,
1390
+ abi: exports.Shrimp_jsonAbi,
1391
+ eventName: 'Transfer',
1392
+ args: filter,
1393
+ onLogs: (logs) => {
1394
+ logs.forEach((log) => {
1395
+ callback(log.args);
1396
+ });
1397
+ },
1398
+ });
1399
+ }
1400
+ };
1401
+ }
1402
+ }
1403
+ exports.Shrimp_json = Shrimp_json;