@gitmyabi/railgunsmartwallet 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,3174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RailgunSmartWallet_json = exports.RailgunSmartWallet_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * RailgunSmartWallet_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.RailgunSmartWallet_jsonAbi = [
11
+ {
12
+ "anonymous": false,
13
+ "inputs": [
14
+ {
15
+ "indexed": true,
16
+ "internalType": "address",
17
+ "name": "token",
18
+ "type": "address"
19
+ }
20
+ ],
21
+ "name": "AddToBlocklist",
22
+ "type": "event"
23
+ },
24
+ {
25
+ "anonymous": false,
26
+ "inputs": [
27
+ {
28
+ "indexed": false,
29
+ "internalType": "uint256",
30
+ "name": "shieldFee",
31
+ "type": "uint256"
32
+ },
33
+ {
34
+ "indexed": false,
35
+ "internalType": "uint256",
36
+ "name": "unshieldFee",
37
+ "type": "uint256"
38
+ },
39
+ {
40
+ "indexed": false,
41
+ "internalType": "uint256",
42
+ "name": "nftFee",
43
+ "type": "uint256"
44
+ }
45
+ ],
46
+ "name": "FeeChange",
47
+ "type": "event"
48
+ },
49
+ {
50
+ "anonymous": false,
51
+ "inputs": [
52
+ {
53
+ "indexed": false,
54
+ "internalType": "uint8",
55
+ "name": "version",
56
+ "type": "uint8"
57
+ }
58
+ ],
59
+ "name": "Initialized",
60
+ "type": "event"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [
65
+ {
66
+ "indexed": false,
67
+ "internalType": "uint16",
68
+ "name": "treeNumber",
69
+ "type": "uint16"
70
+ },
71
+ {
72
+ "indexed": false,
73
+ "internalType": "bytes32[]",
74
+ "name": "nullifier",
75
+ "type": "bytes32[]"
76
+ }
77
+ ],
78
+ "name": "Nullified",
79
+ "type": "event"
80
+ },
81
+ {
82
+ "anonymous": false,
83
+ "inputs": [
84
+ {
85
+ "indexed": true,
86
+ "internalType": "address",
87
+ "name": "previousOwner",
88
+ "type": "address"
89
+ },
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "newOwner",
94
+ "type": "address"
95
+ }
96
+ ],
97
+ "name": "OwnershipTransferred",
98
+ "type": "event"
99
+ },
100
+ {
101
+ "anonymous": false,
102
+ "inputs": [
103
+ {
104
+ "indexed": true,
105
+ "internalType": "address",
106
+ "name": "token",
107
+ "type": "address"
108
+ }
109
+ ],
110
+ "name": "RemoveFromBlocklist",
111
+ "type": "event"
112
+ },
113
+ {
114
+ "anonymous": false,
115
+ "inputs": [
116
+ {
117
+ "indexed": false,
118
+ "internalType": "uint256",
119
+ "name": "treeNumber",
120
+ "type": "uint256"
121
+ },
122
+ {
123
+ "indexed": false,
124
+ "internalType": "uint256",
125
+ "name": "startPosition",
126
+ "type": "uint256"
127
+ },
128
+ {
129
+ "components": [
130
+ {
131
+ "internalType": "bytes32",
132
+ "name": "npk",
133
+ "type": "bytes32"
134
+ },
135
+ {
136
+ "components": [
137
+ {
138
+ "internalType": "enum TokenType",
139
+ "name": "tokenType",
140
+ "type": "uint8"
141
+ },
142
+ {
143
+ "internalType": "address",
144
+ "name": "tokenAddress",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "internalType": "uint256",
149
+ "name": "tokenSubID",
150
+ "type": "uint256"
151
+ }
152
+ ],
153
+ "internalType": "struct TokenData",
154
+ "name": "token",
155
+ "type": "tuple"
156
+ },
157
+ {
158
+ "internalType": "uint120",
159
+ "name": "value",
160
+ "type": "uint120"
161
+ }
162
+ ],
163
+ "indexed": false,
164
+ "internalType": "struct CommitmentPreimage[]",
165
+ "name": "commitments",
166
+ "type": "tuple[]"
167
+ },
168
+ {
169
+ "components": [
170
+ {
171
+ "internalType": "bytes32[3]",
172
+ "name": "encryptedBundle",
173
+ "type": "bytes32[3]"
174
+ },
175
+ {
176
+ "internalType": "bytes32",
177
+ "name": "shieldKey",
178
+ "type": "bytes32"
179
+ }
180
+ ],
181
+ "indexed": false,
182
+ "internalType": "struct ShieldCiphertext[]",
183
+ "name": "shieldCiphertext",
184
+ "type": "tuple[]"
185
+ },
186
+ {
187
+ "indexed": false,
188
+ "internalType": "uint256[]",
189
+ "name": "fees",
190
+ "type": "uint256[]"
191
+ }
192
+ ],
193
+ "name": "Shield",
194
+ "type": "event"
195
+ },
196
+ {
197
+ "anonymous": false,
198
+ "inputs": [
199
+ {
200
+ "indexed": false,
201
+ "internalType": "uint256",
202
+ "name": "treeNumber",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "indexed": false,
207
+ "internalType": "uint256",
208
+ "name": "startPosition",
209
+ "type": "uint256"
210
+ },
211
+ {
212
+ "indexed": false,
213
+ "internalType": "bytes32[]",
214
+ "name": "hash",
215
+ "type": "bytes32[]"
216
+ },
217
+ {
218
+ "components": [
219
+ {
220
+ "internalType": "bytes32[4]",
221
+ "name": "ciphertext",
222
+ "type": "bytes32[4]"
223
+ },
224
+ {
225
+ "internalType": "bytes32",
226
+ "name": "blindedSenderViewingKey",
227
+ "type": "bytes32"
228
+ },
229
+ {
230
+ "internalType": "bytes32",
231
+ "name": "blindedReceiverViewingKey",
232
+ "type": "bytes32"
233
+ },
234
+ {
235
+ "internalType": "bytes",
236
+ "name": "annotationData",
237
+ "type": "bytes"
238
+ },
239
+ {
240
+ "internalType": "bytes",
241
+ "name": "memo",
242
+ "type": "bytes"
243
+ }
244
+ ],
245
+ "indexed": false,
246
+ "internalType": "struct CommitmentCiphertext[]",
247
+ "name": "ciphertext",
248
+ "type": "tuple[]"
249
+ }
250
+ ],
251
+ "name": "Transact",
252
+ "type": "event"
253
+ },
254
+ {
255
+ "anonymous": false,
256
+ "inputs": [
257
+ {
258
+ "indexed": false,
259
+ "internalType": "address",
260
+ "name": "treasury",
261
+ "type": "address"
262
+ }
263
+ ],
264
+ "name": "TreasuryChange",
265
+ "type": "event"
266
+ },
267
+ {
268
+ "anonymous": false,
269
+ "inputs": [
270
+ {
271
+ "indexed": false,
272
+ "internalType": "address",
273
+ "name": "to",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "components": [
278
+ {
279
+ "internalType": "enum TokenType",
280
+ "name": "tokenType",
281
+ "type": "uint8"
282
+ },
283
+ {
284
+ "internalType": "address",
285
+ "name": "tokenAddress",
286
+ "type": "address"
287
+ },
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "tokenSubID",
291
+ "type": "uint256"
292
+ }
293
+ ],
294
+ "indexed": false,
295
+ "internalType": "struct TokenData",
296
+ "name": "token",
297
+ "type": "tuple"
298
+ },
299
+ {
300
+ "indexed": false,
301
+ "internalType": "uint256",
302
+ "name": "amount",
303
+ "type": "uint256"
304
+ },
305
+ {
306
+ "indexed": false,
307
+ "internalType": "uint256",
308
+ "name": "fee",
309
+ "type": "uint256"
310
+ }
311
+ ],
312
+ "name": "Unshield",
313
+ "type": "event"
314
+ },
315
+ {
316
+ "anonymous": false,
317
+ "inputs": [
318
+ {
319
+ "indexed": false,
320
+ "internalType": "uint256",
321
+ "name": "nullifiers",
322
+ "type": "uint256"
323
+ },
324
+ {
325
+ "indexed": false,
326
+ "internalType": "uint256",
327
+ "name": "commitments",
328
+ "type": "uint256"
329
+ },
330
+ {
331
+ "components": [
332
+ {
333
+ "internalType": "string",
334
+ "name": "artifactsIPFSHash",
335
+ "type": "string"
336
+ },
337
+ {
338
+ "components": [
339
+ {
340
+ "internalType": "uint256",
341
+ "name": "x",
342
+ "type": "uint256"
343
+ },
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "y",
347
+ "type": "uint256"
348
+ }
349
+ ],
350
+ "internalType": "struct G1Point",
351
+ "name": "alpha1",
352
+ "type": "tuple"
353
+ },
354
+ {
355
+ "components": [
356
+ {
357
+ "internalType": "uint256[2]",
358
+ "name": "x",
359
+ "type": "uint256[2]"
360
+ },
361
+ {
362
+ "internalType": "uint256[2]",
363
+ "name": "y",
364
+ "type": "uint256[2]"
365
+ }
366
+ ],
367
+ "internalType": "struct G2Point",
368
+ "name": "beta2",
369
+ "type": "tuple"
370
+ },
371
+ {
372
+ "components": [
373
+ {
374
+ "internalType": "uint256[2]",
375
+ "name": "x",
376
+ "type": "uint256[2]"
377
+ },
378
+ {
379
+ "internalType": "uint256[2]",
380
+ "name": "y",
381
+ "type": "uint256[2]"
382
+ }
383
+ ],
384
+ "internalType": "struct G2Point",
385
+ "name": "gamma2",
386
+ "type": "tuple"
387
+ },
388
+ {
389
+ "components": [
390
+ {
391
+ "internalType": "uint256[2]",
392
+ "name": "x",
393
+ "type": "uint256[2]"
394
+ },
395
+ {
396
+ "internalType": "uint256[2]",
397
+ "name": "y",
398
+ "type": "uint256[2]"
399
+ }
400
+ ],
401
+ "internalType": "struct G2Point",
402
+ "name": "delta2",
403
+ "type": "tuple"
404
+ },
405
+ {
406
+ "components": [
407
+ {
408
+ "internalType": "uint256",
409
+ "name": "x",
410
+ "type": "uint256"
411
+ },
412
+ {
413
+ "internalType": "uint256",
414
+ "name": "y",
415
+ "type": "uint256"
416
+ }
417
+ ],
418
+ "internalType": "struct G1Point[]",
419
+ "name": "ic",
420
+ "type": "tuple[]"
421
+ }
422
+ ],
423
+ "indexed": false,
424
+ "internalType": "struct VerifyingKey",
425
+ "name": "verifyingKey",
426
+ "type": "tuple"
427
+ }
428
+ ],
429
+ "name": "VerifyingKeySet",
430
+ "type": "event"
431
+ },
432
+ {
433
+ "inputs": [],
434
+ "name": "ZERO_VALUE",
435
+ "outputs": [
436
+ {
437
+ "internalType": "bytes32",
438
+ "name": "",
439
+ "type": "bytes32"
440
+ }
441
+ ],
442
+ "stateMutability": "view",
443
+ "type": "function"
444
+ },
445
+ {
446
+ "inputs": [
447
+ {
448
+ "internalType": "address[]",
449
+ "name": "_tokens",
450
+ "type": "address[]"
451
+ }
452
+ ],
453
+ "name": "addToBlocklist",
454
+ "outputs": [],
455
+ "stateMutability": "nonpayable",
456
+ "type": "function"
457
+ },
458
+ {
459
+ "inputs": [
460
+ {
461
+ "internalType": "uint256",
462
+ "name": "vector",
463
+ "type": "uint256"
464
+ }
465
+ ],
466
+ "name": "addVector",
467
+ "outputs": [],
468
+ "stateMutability": "nonpayable",
469
+ "type": "function"
470
+ },
471
+ {
472
+ "inputs": [
473
+ {
474
+ "internalType": "uint120",
475
+ "name": "_shieldFee",
476
+ "type": "uint120"
477
+ },
478
+ {
479
+ "internalType": "uint120",
480
+ "name": "_unshieldFee",
481
+ "type": "uint120"
482
+ },
483
+ {
484
+ "internalType": "uint256",
485
+ "name": "_nftFee",
486
+ "type": "uint256"
487
+ }
488
+ ],
489
+ "name": "changeFee",
490
+ "outputs": [],
491
+ "stateMutability": "nonpayable",
492
+ "type": "function"
493
+ },
494
+ {
495
+ "inputs": [
496
+ {
497
+ "internalType": "address payable",
498
+ "name": "_treasury",
499
+ "type": "address"
500
+ }
501
+ ],
502
+ "name": "changeTreasury",
503
+ "outputs": [],
504
+ "stateMutability": "nonpayable",
505
+ "type": "function"
506
+ },
507
+ {
508
+ "inputs": [],
509
+ "name": "checkSafetyVectors",
510
+ "outputs": [],
511
+ "stateMutability": "nonpayable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [
516
+ {
517
+ "internalType": "uint136",
518
+ "name": "_amount",
519
+ "type": "uint136"
520
+ },
521
+ {
522
+ "internalType": "bool",
523
+ "name": "_isInclusive",
524
+ "type": "bool"
525
+ },
526
+ {
527
+ "internalType": "uint120",
528
+ "name": "_feeBP",
529
+ "type": "uint120"
530
+ }
531
+ ],
532
+ "name": "getFee",
533
+ "outputs": [
534
+ {
535
+ "internalType": "uint120",
536
+ "name": "",
537
+ "type": "uint120"
538
+ },
539
+ {
540
+ "internalType": "uint120",
541
+ "name": "",
542
+ "type": "uint120"
543
+ }
544
+ ],
545
+ "stateMutability": "pure",
546
+ "type": "function"
547
+ },
548
+ {
549
+ "inputs": [
550
+ {
551
+ "internalType": "uint256",
552
+ "name": "_newCommitments",
553
+ "type": "uint256"
554
+ }
555
+ ],
556
+ "name": "getInsertionTreeNumberAndStartingIndex",
557
+ "outputs": [
558
+ {
559
+ "internalType": "uint256",
560
+ "name": "",
561
+ "type": "uint256"
562
+ },
563
+ {
564
+ "internalType": "uint256",
565
+ "name": "",
566
+ "type": "uint256"
567
+ }
568
+ ],
569
+ "stateMutability": "view",
570
+ "type": "function"
571
+ },
572
+ {
573
+ "inputs": [
574
+ {
575
+ "components": [
576
+ {
577
+ "internalType": "enum TokenType",
578
+ "name": "tokenType",
579
+ "type": "uint8"
580
+ },
581
+ {
582
+ "internalType": "address",
583
+ "name": "tokenAddress",
584
+ "type": "address"
585
+ },
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "tokenSubID",
589
+ "type": "uint256"
590
+ }
591
+ ],
592
+ "internalType": "struct TokenData",
593
+ "name": "_tokenData",
594
+ "type": "tuple"
595
+ }
596
+ ],
597
+ "name": "getTokenID",
598
+ "outputs": [
599
+ {
600
+ "internalType": "bytes32",
601
+ "name": "",
602
+ "type": "bytes32"
603
+ }
604
+ ],
605
+ "stateMutability": "pure",
606
+ "type": "function"
607
+ },
608
+ {
609
+ "inputs": [
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "_nullifiers",
613
+ "type": "uint256"
614
+ },
615
+ {
616
+ "internalType": "uint256",
617
+ "name": "_commitments",
618
+ "type": "uint256"
619
+ }
620
+ ],
621
+ "name": "getVerificationKey",
622
+ "outputs": [
623
+ {
624
+ "components": [
625
+ {
626
+ "internalType": "string",
627
+ "name": "artifactsIPFSHash",
628
+ "type": "string"
629
+ },
630
+ {
631
+ "components": [
632
+ {
633
+ "internalType": "uint256",
634
+ "name": "x",
635
+ "type": "uint256"
636
+ },
637
+ {
638
+ "internalType": "uint256",
639
+ "name": "y",
640
+ "type": "uint256"
641
+ }
642
+ ],
643
+ "internalType": "struct G1Point",
644
+ "name": "alpha1",
645
+ "type": "tuple"
646
+ },
647
+ {
648
+ "components": [
649
+ {
650
+ "internalType": "uint256[2]",
651
+ "name": "x",
652
+ "type": "uint256[2]"
653
+ },
654
+ {
655
+ "internalType": "uint256[2]",
656
+ "name": "y",
657
+ "type": "uint256[2]"
658
+ }
659
+ ],
660
+ "internalType": "struct G2Point",
661
+ "name": "beta2",
662
+ "type": "tuple"
663
+ },
664
+ {
665
+ "components": [
666
+ {
667
+ "internalType": "uint256[2]",
668
+ "name": "x",
669
+ "type": "uint256[2]"
670
+ },
671
+ {
672
+ "internalType": "uint256[2]",
673
+ "name": "y",
674
+ "type": "uint256[2]"
675
+ }
676
+ ],
677
+ "internalType": "struct G2Point",
678
+ "name": "gamma2",
679
+ "type": "tuple"
680
+ },
681
+ {
682
+ "components": [
683
+ {
684
+ "internalType": "uint256[2]",
685
+ "name": "x",
686
+ "type": "uint256[2]"
687
+ },
688
+ {
689
+ "internalType": "uint256[2]",
690
+ "name": "y",
691
+ "type": "uint256[2]"
692
+ }
693
+ ],
694
+ "internalType": "struct G2Point",
695
+ "name": "delta2",
696
+ "type": "tuple"
697
+ },
698
+ {
699
+ "components": [
700
+ {
701
+ "internalType": "uint256",
702
+ "name": "x",
703
+ "type": "uint256"
704
+ },
705
+ {
706
+ "internalType": "uint256",
707
+ "name": "y",
708
+ "type": "uint256"
709
+ }
710
+ ],
711
+ "internalType": "struct G1Point[]",
712
+ "name": "ic",
713
+ "type": "tuple[]"
714
+ }
715
+ ],
716
+ "internalType": "struct VerifyingKey",
717
+ "name": "",
718
+ "type": "tuple"
719
+ }
720
+ ],
721
+ "stateMutability": "view",
722
+ "type": "function"
723
+ },
724
+ {
725
+ "inputs": [
726
+ {
727
+ "components": [
728
+ {
729
+ "internalType": "uint16",
730
+ "name": "treeNumber",
731
+ "type": "uint16"
732
+ },
733
+ {
734
+ "internalType": "uint72",
735
+ "name": "minGasPrice",
736
+ "type": "uint72"
737
+ },
738
+ {
739
+ "internalType": "enum UnshieldType",
740
+ "name": "unshield",
741
+ "type": "uint8"
742
+ },
743
+ {
744
+ "internalType": "uint64",
745
+ "name": "chainID",
746
+ "type": "uint64"
747
+ },
748
+ {
749
+ "internalType": "address",
750
+ "name": "adaptContract",
751
+ "type": "address"
752
+ },
753
+ {
754
+ "internalType": "bytes32",
755
+ "name": "adaptParams",
756
+ "type": "bytes32"
757
+ },
758
+ {
759
+ "components": [
760
+ {
761
+ "internalType": "bytes32[4]",
762
+ "name": "ciphertext",
763
+ "type": "bytes32[4]"
764
+ },
765
+ {
766
+ "internalType": "bytes32",
767
+ "name": "blindedSenderViewingKey",
768
+ "type": "bytes32"
769
+ },
770
+ {
771
+ "internalType": "bytes32",
772
+ "name": "blindedReceiverViewingKey",
773
+ "type": "bytes32"
774
+ },
775
+ {
776
+ "internalType": "bytes",
777
+ "name": "annotationData",
778
+ "type": "bytes"
779
+ },
780
+ {
781
+ "internalType": "bytes",
782
+ "name": "memo",
783
+ "type": "bytes"
784
+ }
785
+ ],
786
+ "internalType": "struct CommitmentCiphertext[]",
787
+ "name": "commitmentCiphertext",
788
+ "type": "tuple[]"
789
+ }
790
+ ],
791
+ "internalType": "struct BoundParams",
792
+ "name": "_boundParams",
793
+ "type": "tuple"
794
+ }
795
+ ],
796
+ "name": "hashBoundParams",
797
+ "outputs": [
798
+ {
799
+ "internalType": "uint256",
800
+ "name": "",
801
+ "type": "uint256"
802
+ }
803
+ ],
804
+ "stateMutability": "pure",
805
+ "type": "function"
806
+ },
807
+ {
808
+ "inputs": [
809
+ {
810
+ "components": [
811
+ {
812
+ "internalType": "bytes32",
813
+ "name": "npk",
814
+ "type": "bytes32"
815
+ },
816
+ {
817
+ "components": [
818
+ {
819
+ "internalType": "enum TokenType",
820
+ "name": "tokenType",
821
+ "type": "uint8"
822
+ },
823
+ {
824
+ "internalType": "address",
825
+ "name": "tokenAddress",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "internalType": "uint256",
830
+ "name": "tokenSubID",
831
+ "type": "uint256"
832
+ }
833
+ ],
834
+ "internalType": "struct TokenData",
835
+ "name": "token",
836
+ "type": "tuple"
837
+ },
838
+ {
839
+ "internalType": "uint120",
840
+ "name": "value",
841
+ "type": "uint120"
842
+ }
843
+ ],
844
+ "internalType": "struct CommitmentPreimage",
845
+ "name": "_commitmentPreimage",
846
+ "type": "tuple"
847
+ }
848
+ ],
849
+ "name": "hashCommitment",
850
+ "outputs": [
851
+ {
852
+ "internalType": "bytes32",
853
+ "name": "",
854
+ "type": "bytes32"
855
+ }
856
+ ],
857
+ "stateMutability": "pure",
858
+ "type": "function"
859
+ },
860
+ {
861
+ "inputs": [
862
+ {
863
+ "internalType": "bytes32",
864
+ "name": "_left",
865
+ "type": "bytes32"
866
+ },
867
+ {
868
+ "internalType": "bytes32",
869
+ "name": "_right",
870
+ "type": "bytes32"
871
+ }
872
+ ],
873
+ "name": "hashLeftRight",
874
+ "outputs": [
875
+ {
876
+ "internalType": "bytes32",
877
+ "name": "",
878
+ "type": "bytes32"
879
+ }
880
+ ],
881
+ "stateMutability": "pure",
882
+ "type": "function"
883
+ },
884
+ {
885
+ "inputs": [
886
+ {
887
+ "internalType": "address payable",
888
+ "name": "_treasury",
889
+ "type": "address"
890
+ },
891
+ {
892
+ "internalType": "uint120",
893
+ "name": "_shieldFee",
894
+ "type": "uint120"
895
+ },
896
+ {
897
+ "internalType": "uint120",
898
+ "name": "_unshieldFee",
899
+ "type": "uint120"
900
+ },
901
+ {
902
+ "internalType": "uint256",
903
+ "name": "_nftFee",
904
+ "type": "uint256"
905
+ },
906
+ {
907
+ "internalType": "address",
908
+ "name": "_owner",
909
+ "type": "address"
910
+ }
911
+ ],
912
+ "name": "initializeRailgunLogic",
913
+ "outputs": [],
914
+ "stateMutability": "nonpayable",
915
+ "type": "function"
916
+ },
917
+ {
918
+ "inputs": [],
919
+ "name": "lastEventBlock",
920
+ "outputs": [
921
+ {
922
+ "internalType": "uint256",
923
+ "name": "",
924
+ "type": "uint256"
925
+ }
926
+ ],
927
+ "stateMutability": "view",
928
+ "type": "function"
929
+ },
930
+ {
931
+ "inputs": [],
932
+ "name": "merkleRoot",
933
+ "outputs": [
934
+ {
935
+ "internalType": "bytes32",
936
+ "name": "",
937
+ "type": "bytes32"
938
+ }
939
+ ],
940
+ "stateMutability": "view",
941
+ "type": "function"
942
+ },
943
+ {
944
+ "inputs": [],
945
+ "name": "nextLeafIndex",
946
+ "outputs": [
947
+ {
948
+ "internalType": "uint256",
949
+ "name": "",
950
+ "type": "uint256"
951
+ }
952
+ ],
953
+ "stateMutability": "view",
954
+ "type": "function"
955
+ },
956
+ {
957
+ "inputs": [],
958
+ "name": "nftFee",
959
+ "outputs": [
960
+ {
961
+ "internalType": "uint256",
962
+ "name": "",
963
+ "type": "uint256"
964
+ }
965
+ ],
966
+ "stateMutability": "view",
967
+ "type": "function"
968
+ },
969
+ {
970
+ "inputs": [
971
+ {
972
+ "internalType": "uint256",
973
+ "name": "",
974
+ "type": "uint256"
975
+ },
976
+ {
977
+ "internalType": "bytes32",
978
+ "name": "",
979
+ "type": "bytes32"
980
+ }
981
+ ],
982
+ "name": "nullifiers",
983
+ "outputs": [
984
+ {
985
+ "internalType": "bool",
986
+ "name": "",
987
+ "type": "bool"
988
+ }
989
+ ],
990
+ "stateMutability": "view",
991
+ "type": "function"
992
+ },
993
+ {
994
+ "inputs": [],
995
+ "name": "owner",
996
+ "outputs": [
997
+ {
998
+ "internalType": "address",
999
+ "name": "",
1000
+ "type": "address"
1001
+ }
1002
+ ],
1003
+ "stateMutability": "view",
1004
+ "type": "function"
1005
+ },
1006
+ {
1007
+ "inputs": [
1008
+ {
1009
+ "internalType": "address[]",
1010
+ "name": "_tokens",
1011
+ "type": "address[]"
1012
+ }
1013
+ ],
1014
+ "name": "removeFromBlocklist",
1015
+ "outputs": [],
1016
+ "stateMutability": "nonpayable",
1017
+ "type": "function"
1018
+ },
1019
+ {
1020
+ "inputs": [
1021
+ {
1022
+ "internalType": "uint256",
1023
+ "name": "vector",
1024
+ "type": "uint256"
1025
+ }
1026
+ ],
1027
+ "name": "removeVector",
1028
+ "outputs": [],
1029
+ "stateMutability": "nonpayable",
1030
+ "type": "function"
1031
+ },
1032
+ {
1033
+ "inputs": [],
1034
+ "name": "renounceOwnership",
1035
+ "outputs": [],
1036
+ "stateMutability": "nonpayable",
1037
+ "type": "function"
1038
+ },
1039
+ {
1040
+ "inputs": [
1041
+ {
1042
+ "internalType": "uint256",
1043
+ "name": "",
1044
+ "type": "uint256"
1045
+ },
1046
+ {
1047
+ "internalType": "bytes32",
1048
+ "name": "",
1049
+ "type": "bytes32"
1050
+ }
1051
+ ],
1052
+ "name": "rootHistory",
1053
+ "outputs": [
1054
+ {
1055
+ "internalType": "bool",
1056
+ "name": "",
1057
+ "type": "bool"
1058
+ }
1059
+ ],
1060
+ "stateMutability": "view",
1061
+ "type": "function"
1062
+ },
1063
+ {
1064
+ "inputs": [
1065
+ {
1066
+ "internalType": "uint256",
1067
+ "name": "_nullifiers",
1068
+ "type": "uint256"
1069
+ },
1070
+ {
1071
+ "internalType": "uint256",
1072
+ "name": "_commitments",
1073
+ "type": "uint256"
1074
+ },
1075
+ {
1076
+ "components": [
1077
+ {
1078
+ "internalType": "string",
1079
+ "name": "artifactsIPFSHash",
1080
+ "type": "string"
1081
+ },
1082
+ {
1083
+ "components": [
1084
+ {
1085
+ "internalType": "uint256",
1086
+ "name": "x",
1087
+ "type": "uint256"
1088
+ },
1089
+ {
1090
+ "internalType": "uint256",
1091
+ "name": "y",
1092
+ "type": "uint256"
1093
+ }
1094
+ ],
1095
+ "internalType": "struct G1Point",
1096
+ "name": "alpha1",
1097
+ "type": "tuple"
1098
+ },
1099
+ {
1100
+ "components": [
1101
+ {
1102
+ "internalType": "uint256[2]",
1103
+ "name": "x",
1104
+ "type": "uint256[2]"
1105
+ },
1106
+ {
1107
+ "internalType": "uint256[2]",
1108
+ "name": "y",
1109
+ "type": "uint256[2]"
1110
+ }
1111
+ ],
1112
+ "internalType": "struct G2Point",
1113
+ "name": "beta2",
1114
+ "type": "tuple"
1115
+ },
1116
+ {
1117
+ "components": [
1118
+ {
1119
+ "internalType": "uint256[2]",
1120
+ "name": "x",
1121
+ "type": "uint256[2]"
1122
+ },
1123
+ {
1124
+ "internalType": "uint256[2]",
1125
+ "name": "y",
1126
+ "type": "uint256[2]"
1127
+ }
1128
+ ],
1129
+ "internalType": "struct G2Point",
1130
+ "name": "gamma2",
1131
+ "type": "tuple"
1132
+ },
1133
+ {
1134
+ "components": [
1135
+ {
1136
+ "internalType": "uint256[2]",
1137
+ "name": "x",
1138
+ "type": "uint256[2]"
1139
+ },
1140
+ {
1141
+ "internalType": "uint256[2]",
1142
+ "name": "y",
1143
+ "type": "uint256[2]"
1144
+ }
1145
+ ],
1146
+ "internalType": "struct G2Point",
1147
+ "name": "delta2",
1148
+ "type": "tuple"
1149
+ },
1150
+ {
1151
+ "components": [
1152
+ {
1153
+ "internalType": "uint256",
1154
+ "name": "x",
1155
+ "type": "uint256"
1156
+ },
1157
+ {
1158
+ "internalType": "uint256",
1159
+ "name": "y",
1160
+ "type": "uint256"
1161
+ }
1162
+ ],
1163
+ "internalType": "struct G1Point[]",
1164
+ "name": "ic",
1165
+ "type": "tuple[]"
1166
+ }
1167
+ ],
1168
+ "internalType": "struct VerifyingKey",
1169
+ "name": "_verifyingKey",
1170
+ "type": "tuple"
1171
+ }
1172
+ ],
1173
+ "name": "setVerificationKey",
1174
+ "outputs": [],
1175
+ "stateMutability": "nonpayable",
1176
+ "type": "function"
1177
+ },
1178
+ {
1179
+ "inputs": [
1180
+ {
1181
+ "components": [
1182
+ {
1183
+ "components": [
1184
+ {
1185
+ "internalType": "bytes32",
1186
+ "name": "npk",
1187
+ "type": "bytes32"
1188
+ },
1189
+ {
1190
+ "components": [
1191
+ {
1192
+ "internalType": "enum TokenType",
1193
+ "name": "tokenType",
1194
+ "type": "uint8"
1195
+ },
1196
+ {
1197
+ "internalType": "address",
1198
+ "name": "tokenAddress",
1199
+ "type": "address"
1200
+ },
1201
+ {
1202
+ "internalType": "uint256",
1203
+ "name": "tokenSubID",
1204
+ "type": "uint256"
1205
+ }
1206
+ ],
1207
+ "internalType": "struct TokenData",
1208
+ "name": "token",
1209
+ "type": "tuple"
1210
+ },
1211
+ {
1212
+ "internalType": "uint120",
1213
+ "name": "value",
1214
+ "type": "uint120"
1215
+ }
1216
+ ],
1217
+ "internalType": "struct CommitmentPreimage",
1218
+ "name": "preimage",
1219
+ "type": "tuple"
1220
+ },
1221
+ {
1222
+ "components": [
1223
+ {
1224
+ "internalType": "bytes32[3]",
1225
+ "name": "encryptedBundle",
1226
+ "type": "bytes32[3]"
1227
+ },
1228
+ {
1229
+ "internalType": "bytes32",
1230
+ "name": "shieldKey",
1231
+ "type": "bytes32"
1232
+ }
1233
+ ],
1234
+ "internalType": "struct ShieldCiphertext",
1235
+ "name": "ciphertext",
1236
+ "type": "tuple"
1237
+ }
1238
+ ],
1239
+ "internalType": "struct ShieldRequest[]",
1240
+ "name": "_shieldRequests",
1241
+ "type": "tuple[]"
1242
+ }
1243
+ ],
1244
+ "name": "shield",
1245
+ "outputs": [],
1246
+ "stateMutability": "nonpayable",
1247
+ "type": "function"
1248
+ },
1249
+ {
1250
+ "inputs": [],
1251
+ "name": "shieldFee",
1252
+ "outputs": [
1253
+ {
1254
+ "internalType": "uint120",
1255
+ "name": "",
1256
+ "type": "uint120"
1257
+ }
1258
+ ],
1259
+ "stateMutability": "view",
1260
+ "type": "function"
1261
+ },
1262
+ {
1263
+ "inputs": [
1264
+ {
1265
+ "internalType": "uint256",
1266
+ "name": "",
1267
+ "type": "uint256"
1268
+ }
1269
+ ],
1270
+ "name": "snarkSafetyVector",
1271
+ "outputs": [
1272
+ {
1273
+ "internalType": "bool",
1274
+ "name": "",
1275
+ "type": "bool"
1276
+ }
1277
+ ],
1278
+ "stateMutability": "view",
1279
+ "type": "function"
1280
+ },
1281
+ {
1282
+ "inputs": [
1283
+ {
1284
+ "components": [
1285
+ {
1286
+ "components": [
1287
+ {
1288
+ "components": [
1289
+ {
1290
+ "internalType": "uint256",
1291
+ "name": "x",
1292
+ "type": "uint256"
1293
+ },
1294
+ {
1295
+ "internalType": "uint256",
1296
+ "name": "y",
1297
+ "type": "uint256"
1298
+ }
1299
+ ],
1300
+ "internalType": "struct G1Point",
1301
+ "name": "a",
1302
+ "type": "tuple"
1303
+ },
1304
+ {
1305
+ "components": [
1306
+ {
1307
+ "internalType": "uint256[2]",
1308
+ "name": "x",
1309
+ "type": "uint256[2]"
1310
+ },
1311
+ {
1312
+ "internalType": "uint256[2]",
1313
+ "name": "y",
1314
+ "type": "uint256[2]"
1315
+ }
1316
+ ],
1317
+ "internalType": "struct G2Point",
1318
+ "name": "b",
1319
+ "type": "tuple"
1320
+ },
1321
+ {
1322
+ "components": [
1323
+ {
1324
+ "internalType": "uint256",
1325
+ "name": "x",
1326
+ "type": "uint256"
1327
+ },
1328
+ {
1329
+ "internalType": "uint256",
1330
+ "name": "y",
1331
+ "type": "uint256"
1332
+ }
1333
+ ],
1334
+ "internalType": "struct G1Point",
1335
+ "name": "c",
1336
+ "type": "tuple"
1337
+ }
1338
+ ],
1339
+ "internalType": "struct SnarkProof",
1340
+ "name": "proof",
1341
+ "type": "tuple"
1342
+ },
1343
+ {
1344
+ "internalType": "bytes32",
1345
+ "name": "merkleRoot",
1346
+ "type": "bytes32"
1347
+ },
1348
+ {
1349
+ "internalType": "bytes32[]",
1350
+ "name": "nullifiers",
1351
+ "type": "bytes32[]"
1352
+ },
1353
+ {
1354
+ "internalType": "bytes32[]",
1355
+ "name": "commitments",
1356
+ "type": "bytes32[]"
1357
+ },
1358
+ {
1359
+ "components": [
1360
+ {
1361
+ "internalType": "uint16",
1362
+ "name": "treeNumber",
1363
+ "type": "uint16"
1364
+ },
1365
+ {
1366
+ "internalType": "uint72",
1367
+ "name": "minGasPrice",
1368
+ "type": "uint72"
1369
+ },
1370
+ {
1371
+ "internalType": "enum UnshieldType",
1372
+ "name": "unshield",
1373
+ "type": "uint8"
1374
+ },
1375
+ {
1376
+ "internalType": "uint64",
1377
+ "name": "chainID",
1378
+ "type": "uint64"
1379
+ },
1380
+ {
1381
+ "internalType": "address",
1382
+ "name": "adaptContract",
1383
+ "type": "address"
1384
+ },
1385
+ {
1386
+ "internalType": "bytes32",
1387
+ "name": "adaptParams",
1388
+ "type": "bytes32"
1389
+ },
1390
+ {
1391
+ "components": [
1392
+ {
1393
+ "internalType": "bytes32[4]",
1394
+ "name": "ciphertext",
1395
+ "type": "bytes32[4]"
1396
+ },
1397
+ {
1398
+ "internalType": "bytes32",
1399
+ "name": "blindedSenderViewingKey",
1400
+ "type": "bytes32"
1401
+ },
1402
+ {
1403
+ "internalType": "bytes32",
1404
+ "name": "blindedReceiverViewingKey",
1405
+ "type": "bytes32"
1406
+ },
1407
+ {
1408
+ "internalType": "bytes",
1409
+ "name": "annotationData",
1410
+ "type": "bytes"
1411
+ },
1412
+ {
1413
+ "internalType": "bytes",
1414
+ "name": "memo",
1415
+ "type": "bytes"
1416
+ }
1417
+ ],
1418
+ "internalType": "struct CommitmentCiphertext[]",
1419
+ "name": "commitmentCiphertext",
1420
+ "type": "tuple[]"
1421
+ }
1422
+ ],
1423
+ "internalType": "struct BoundParams",
1424
+ "name": "boundParams",
1425
+ "type": "tuple"
1426
+ },
1427
+ {
1428
+ "components": [
1429
+ {
1430
+ "internalType": "bytes32",
1431
+ "name": "npk",
1432
+ "type": "bytes32"
1433
+ },
1434
+ {
1435
+ "components": [
1436
+ {
1437
+ "internalType": "enum TokenType",
1438
+ "name": "tokenType",
1439
+ "type": "uint8"
1440
+ },
1441
+ {
1442
+ "internalType": "address",
1443
+ "name": "tokenAddress",
1444
+ "type": "address"
1445
+ },
1446
+ {
1447
+ "internalType": "uint256",
1448
+ "name": "tokenSubID",
1449
+ "type": "uint256"
1450
+ }
1451
+ ],
1452
+ "internalType": "struct TokenData",
1453
+ "name": "token",
1454
+ "type": "tuple"
1455
+ },
1456
+ {
1457
+ "internalType": "uint120",
1458
+ "name": "value",
1459
+ "type": "uint120"
1460
+ }
1461
+ ],
1462
+ "internalType": "struct CommitmentPreimage",
1463
+ "name": "unshieldPreimage",
1464
+ "type": "tuple"
1465
+ }
1466
+ ],
1467
+ "internalType": "struct Transaction[]",
1468
+ "name": "_transactions",
1469
+ "type": "tuple[]"
1470
+ }
1471
+ ],
1472
+ "name": "sumCommitments",
1473
+ "outputs": [
1474
+ {
1475
+ "internalType": "uint256",
1476
+ "name": "",
1477
+ "type": "uint256"
1478
+ }
1479
+ ],
1480
+ "stateMutability": "pure",
1481
+ "type": "function"
1482
+ },
1483
+ {
1484
+ "inputs": [
1485
+ {
1486
+ "internalType": "address",
1487
+ "name": "",
1488
+ "type": "address"
1489
+ }
1490
+ ],
1491
+ "name": "tokenBlocklist",
1492
+ "outputs": [
1493
+ {
1494
+ "internalType": "bool",
1495
+ "name": "",
1496
+ "type": "bool"
1497
+ }
1498
+ ],
1499
+ "stateMutability": "view",
1500
+ "type": "function"
1501
+ },
1502
+ {
1503
+ "inputs": [
1504
+ {
1505
+ "internalType": "bytes32",
1506
+ "name": "",
1507
+ "type": "bytes32"
1508
+ }
1509
+ ],
1510
+ "name": "tokenIDMapping",
1511
+ "outputs": [
1512
+ {
1513
+ "internalType": "enum TokenType",
1514
+ "name": "tokenType",
1515
+ "type": "uint8"
1516
+ },
1517
+ {
1518
+ "internalType": "address",
1519
+ "name": "tokenAddress",
1520
+ "type": "address"
1521
+ },
1522
+ {
1523
+ "internalType": "uint256",
1524
+ "name": "tokenSubID",
1525
+ "type": "uint256"
1526
+ }
1527
+ ],
1528
+ "stateMutability": "view",
1529
+ "type": "function"
1530
+ },
1531
+ {
1532
+ "inputs": [
1533
+ {
1534
+ "components": [
1535
+ {
1536
+ "components": [
1537
+ {
1538
+ "components": [
1539
+ {
1540
+ "internalType": "uint256",
1541
+ "name": "x",
1542
+ "type": "uint256"
1543
+ },
1544
+ {
1545
+ "internalType": "uint256",
1546
+ "name": "y",
1547
+ "type": "uint256"
1548
+ }
1549
+ ],
1550
+ "internalType": "struct G1Point",
1551
+ "name": "a",
1552
+ "type": "tuple"
1553
+ },
1554
+ {
1555
+ "components": [
1556
+ {
1557
+ "internalType": "uint256[2]",
1558
+ "name": "x",
1559
+ "type": "uint256[2]"
1560
+ },
1561
+ {
1562
+ "internalType": "uint256[2]",
1563
+ "name": "y",
1564
+ "type": "uint256[2]"
1565
+ }
1566
+ ],
1567
+ "internalType": "struct G2Point",
1568
+ "name": "b",
1569
+ "type": "tuple"
1570
+ },
1571
+ {
1572
+ "components": [
1573
+ {
1574
+ "internalType": "uint256",
1575
+ "name": "x",
1576
+ "type": "uint256"
1577
+ },
1578
+ {
1579
+ "internalType": "uint256",
1580
+ "name": "y",
1581
+ "type": "uint256"
1582
+ }
1583
+ ],
1584
+ "internalType": "struct G1Point",
1585
+ "name": "c",
1586
+ "type": "tuple"
1587
+ }
1588
+ ],
1589
+ "internalType": "struct SnarkProof",
1590
+ "name": "proof",
1591
+ "type": "tuple"
1592
+ },
1593
+ {
1594
+ "internalType": "bytes32",
1595
+ "name": "merkleRoot",
1596
+ "type": "bytes32"
1597
+ },
1598
+ {
1599
+ "internalType": "bytes32[]",
1600
+ "name": "nullifiers",
1601
+ "type": "bytes32[]"
1602
+ },
1603
+ {
1604
+ "internalType": "bytes32[]",
1605
+ "name": "commitments",
1606
+ "type": "bytes32[]"
1607
+ },
1608
+ {
1609
+ "components": [
1610
+ {
1611
+ "internalType": "uint16",
1612
+ "name": "treeNumber",
1613
+ "type": "uint16"
1614
+ },
1615
+ {
1616
+ "internalType": "uint72",
1617
+ "name": "minGasPrice",
1618
+ "type": "uint72"
1619
+ },
1620
+ {
1621
+ "internalType": "enum UnshieldType",
1622
+ "name": "unshield",
1623
+ "type": "uint8"
1624
+ },
1625
+ {
1626
+ "internalType": "uint64",
1627
+ "name": "chainID",
1628
+ "type": "uint64"
1629
+ },
1630
+ {
1631
+ "internalType": "address",
1632
+ "name": "adaptContract",
1633
+ "type": "address"
1634
+ },
1635
+ {
1636
+ "internalType": "bytes32",
1637
+ "name": "adaptParams",
1638
+ "type": "bytes32"
1639
+ },
1640
+ {
1641
+ "components": [
1642
+ {
1643
+ "internalType": "bytes32[4]",
1644
+ "name": "ciphertext",
1645
+ "type": "bytes32[4]"
1646
+ },
1647
+ {
1648
+ "internalType": "bytes32",
1649
+ "name": "blindedSenderViewingKey",
1650
+ "type": "bytes32"
1651
+ },
1652
+ {
1653
+ "internalType": "bytes32",
1654
+ "name": "blindedReceiverViewingKey",
1655
+ "type": "bytes32"
1656
+ },
1657
+ {
1658
+ "internalType": "bytes",
1659
+ "name": "annotationData",
1660
+ "type": "bytes"
1661
+ },
1662
+ {
1663
+ "internalType": "bytes",
1664
+ "name": "memo",
1665
+ "type": "bytes"
1666
+ }
1667
+ ],
1668
+ "internalType": "struct CommitmentCiphertext[]",
1669
+ "name": "commitmentCiphertext",
1670
+ "type": "tuple[]"
1671
+ }
1672
+ ],
1673
+ "internalType": "struct BoundParams",
1674
+ "name": "boundParams",
1675
+ "type": "tuple"
1676
+ },
1677
+ {
1678
+ "components": [
1679
+ {
1680
+ "internalType": "bytes32",
1681
+ "name": "npk",
1682
+ "type": "bytes32"
1683
+ },
1684
+ {
1685
+ "components": [
1686
+ {
1687
+ "internalType": "enum TokenType",
1688
+ "name": "tokenType",
1689
+ "type": "uint8"
1690
+ },
1691
+ {
1692
+ "internalType": "address",
1693
+ "name": "tokenAddress",
1694
+ "type": "address"
1695
+ },
1696
+ {
1697
+ "internalType": "uint256",
1698
+ "name": "tokenSubID",
1699
+ "type": "uint256"
1700
+ }
1701
+ ],
1702
+ "internalType": "struct TokenData",
1703
+ "name": "token",
1704
+ "type": "tuple"
1705
+ },
1706
+ {
1707
+ "internalType": "uint120",
1708
+ "name": "value",
1709
+ "type": "uint120"
1710
+ }
1711
+ ],
1712
+ "internalType": "struct CommitmentPreimage",
1713
+ "name": "unshieldPreimage",
1714
+ "type": "tuple"
1715
+ }
1716
+ ],
1717
+ "internalType": "struct Transaction[]",
1718
+ "name": "_transactions",
1719
+ "type": "tuple[]"
1720
+ }
1721
+ ],
1722
+ "name": "transact",
1723
+ "outputs": [],
1724
+ "stateMutability": "nonpayable",
1725
+ "type": "function"
1726
+ },
1727
+ {
1728
+ "inputs": [
1729
+ {
1730
+ "internalType": "address",
1731
+ "name": "newOwner",
1732
+ "type": "address"
1733
+ }
1734
+ ],
1735
+ "name": "transferOwnership",
1736
+ "outputs": [],
1737
+ "stateMutability": "nonpayable",
1738
+ "type": "function"
1739
+ },
1740
+ {
1741
+ "inputs": [],
1742
+ "name": "treasury",
1743
+ "outputs": [
1744
+ {
1745
+ "internalType": "address payable",
1746
+ "name": "",
1747
+ "type": "address"
1748
+ }
1749
+ ],
1750
+ "stateMutability": "view",
1751
+ "type": "function"
1752
+ },
1753
+ {
1754
+ "inputs": [],
1755
+ "name": "treeNumber",
1756
+ "outputs": [
1757
+ {
1758
+ "internalType": "uint256",
1759
+ "name": "",
1760
+ "type": "uint256"
1761
+ }
1762
+ ],
1763
+ "stateMutability": "view",
1764
+ "type": "function"
1765
+ },
1766
+ {
1767
+ "inputs": [],
1768
+ "name": "unshieldFee",
1769
+ "outputs": [
1770
+ {
1771
+ "internalType": "uint120",
1772
+ "name": "",
1773
+ "type": "uint120"
1774
+ }
1775
+ ],
1776
+ "stateMutability": "view",
1777
+ "type": "function"
1778
+ },
1779
+ {
1780
+ "inputs": [
1781
+ {
1782
+ "components": [
1783
+ {
1784
+ "internalType": "bytes32",
1785
+ "name": "npk",
1786
+ "type": "bytes32"
1787
+ },
1788
+ {
1789
+ "components": [
1790
+ {
1791
+ "internalType": "enum TokenType",
1792
+ "name": "tokenType",
1793
+ "type": "uint8"
1794
+ },
1795
+ {
1796
+ "internalType": "address",
1797
+ "name": "tokenAddress",
1798
+ "type": "address"
1799
+ },
1800
+ {
1801
+ "internalType": "uint256",
1802
+ "name": "tokenSubID",
1803
+ "type": "uint256"
1804
+ }
1805
+ ],
1806
+ "internalType": "struct TokenData",
1807
+ "name": "token",
1808
+ "type": "tuple"
1809
+ },
1810
+ {
1811
+ "internalType": "uint120",
1812
+ "name": "value",
1813
+ "type": "uint120"
1814
+ }
1815
+ ],
1816
+ "internalType": "struct CommitmentPreimage",
1817
+ "name": "_note",
1818
+ "type": "tuple"
1819
+ }
1820
+ ],
1821
+ "name": "validateCommitmentPreimage",
1822
+ "outputs": [
1823
+ {
1824
+ "internalType": "bool",
1825
+ "name": "",
1826
+ "type": "bool"
1827
+ },
1828
+ {
1829
+ "internalType": "string",
1830
+ "name": "",
1831
+ "type": "string"
1832
+ }
1833
+ ],
1834
+ "stateMutability": "view",
1835
+ "type": "function"
1836
+ },
1837
+ {
1838
+ "inputs": [
1839
+ {
1840
+ "components": [
1841
+ {
1842
+ "components": [
1843
+ {
1844
+ "components": [
1845
+ {
1846
+ "internalType": "uint256",
1847
+ "name": "x",
1848
+ "type": "uint256"
1849
+ },
1850
+ {
1851
+ "internalType": "uint256",
1852
+ "name": "y",
1853
+ "type": "uint256"
1854
+ }
1855
+ ],
1856
+ "internalType": "struct G1Point",
1857
+ "name": "a",
1858
+ "type": "tuple"
1859
+ },
1860
+ {
1861
+ "components": [
1862
+ {
1863
+ "internalType": "uint256[2]",
1864
+ "name": "x",
1865
+ "type": "uint256[2]"
1866
+ },
1867
+ {
1868
+ "internalType": "uint256[2]",
1869
+ "name": "y",
1870
+ "type": "uint256[2]"
1871
+ }
1872
+ ],
1873
+ "internalType": "struct G2Point",
1874
+ "name": "b",
1875
+ "type": "tuple"
1876
+ },
1877
+ {
1878
+ "components": [
1879
+ {
1880
+ "internalType": "uint256",
1881
+ "name": "x",
1882
+ "type": "uint256"
1883
+ },
1884
+ {
1885
+ "internalType": "uint256",
1886
+ "name": "y",
1887
+ "type": "uint256"
1888
+ }
1889
+ ],
1890
+ "internalType": "struct G1Point",
1891
+ "name": "c",
1892
+ "type": "tuple"
1893
+ }
1894
+ ],
1895
+ "internalType": "struct SnarkProof",
1896
+ "name": "proof",
1897
+ "type": "tuple"
1898
+ },
1899
+ {
1900
+ "internalType": "bytes32",
1901
+ "name": "merkleRoot",
1902
+ "type": "bytes32"
1903
+ },
1904
+ {
1905
+ "internalType": "bytes32[]",
1906
+ "name": "nullifiers",
1907
+ "type": "bytes32[]"
1908
+ },
1909
+ {
1910
+ "internalType": "bytes32[]",
1911
+ "name": "commitments",
1912
+ "type": "bytes32[]"
1913
+ },
1914
+ {
1915
+ "components": [
1916
+ {
1917
+ "internalType": "uint16",
1918
+ "name": "treeNumber",
1919
+ "type": "uint16"
1920
+ },
1921
+ {
1922
+ "internalType": "uint72",
1923
+ "name": "minGasPrice",
1924
+ "type": "uint72"
1925
+ },
1926
+ {
1927
+ "internalType": "enum UnshieldType",
1928
+ "name": "unshield",
1929
+ "type": "uint8"
1930
+ },
1931
+ {
1932
+ "internalType": "uint64",
1933
+ "name": "chainID",
1934
+ "type": "uint64"
1935
+ },
1936
+ {
1937
+ "internalType": "address",
1938
+ "name": "adaptContract",
1939
+ "type": "address"
1940
+ },
1941
+ {
1942
+ "internalType": "bytes32",
1943
+ "name": "adaptParams",
1944
+ "type": "bytes32"
1945
+ },
1946
+ {
1947
+ "components": [
1948
+ {
1949
+ "internalType": "bytes32[4]",
1950
+ "name": "ciphertext",
1951
+ "type": "bytes32[4]"
1952
+ },
1953
+ {
1954
+ "internalType": "bytes32",
1955
+ "name": "blindedSenderViewingKey",
1956
+ "type": "bytes32"
1957
+ },
1958
+ {
1959
+ "internalType": "bytes32",
1960
+ "name": "blindedReceiverViewingKey",
1961
+ "type": "bytes32"
1962
+ },
1963
+ {
1964
+ "internalType": "bytes",
1965
+ "name": "annotationData",
1966
+ "type": "bytes"
1967
+ },
1968
+ {
1969
+ "internalType": "bytes",
1970
+ "name": "memo",
1971
+ "type": "bytes"
1972
+ }
1973
+ ],
1974
+ "internalType": "struct CommitmentCiphertext[]",
1975
+ "name": "commitmentCiphertext",
1976
+ "type": "tuple[]"
1977
+ }
1978
+ ],
1979
+ "internalType": "struct BoundParams",
1980
+ "name": "boundParams",
1981
+ "type": "tuple"
1982
+ },
1983
+ {
1984
+ "components": [
1985
+ {
1986
+ "internalType": "bytes32",
1987
+ "name": "npk",
1988
+ "type": "bytes32"
1989
+ },
1990
+ {
1991
+ "components": [
1992
+ {
1993
+ "internalType": "enum TokenType",
1994
+ "name": "tokenType",
1995
+ "type": "uint8"
1996
+ },
1997
+ {
1998
+ "internalType": "address",
1999
+ "name": "tokenAddress",
2000
+ "type": "address"
2001
+ },
2002
+ {
2003
+ "internalType": "uint256",
2004
+ "name": "tokenSubID",
2005
+ "type": "uint256"
2006
+ }
2007
+ ],
2008
+ "internalType": "struct TokenData",
2009
+ "name": "token",
2010
+ "type": "tuple"
2011
+ },
2012
+ {
2013
+ "internalType": "uint120",
2014
+ "name": "value",
2015
+ "type": "uint120"
2016
+ }
2017
+ ],
2018
+ "internalType": "struct CommitmentPreimage",
2019
+ "name": "unshieldPreimage",
2020
+ "type": "tuple"
2021
+ }
2022
+ ],
2023
+ "internalType": "struct Transaction",
2024
+ "name": "_transaction",
2025
+ "type": "tuple"
2026
+ }
2027
+ ],
2028
+ "name": "validateTransaction",
2029
+ "outputs": [
2030
+ {
2031
+ "internalType": "bool",
2032
+ "name": "",
2033
+ "type": "bool"
2034
+ },
2035
+ {
2036
+ "internalType": "string",
2037
+ "name": "",
2038
+ "type": "string"
2039
+ }
2040
+ ],
2041
+ "stateMutability": "view",
2042
+ "type": "function"
2043
+ },
2044
+ {
2045
+ "inputs": [
2046
+ {
2047
+ "components": [
2048
+ {
2049
+ "components": [
2050
+ {
2051
+ "components": [
2052
+ {
2053
+ "internalType": "uint256",
2054
+ "name": "x",
2055
+ "type": "uint256"
2056
+ },
2057
+ {
2058
+ "internalType": "uint256",
2059
+ "name": "y",
2060
+ "type": "uint256"
2061
+ }
2062
+ ],
2063
+ "internalType": "struct G1Point",
2064
+ "name": "a",
2065
+ "type": "tuple"
2066
+ },
2067
+ {
2068
+ "components": [
2069
+ {
2070
+ "internalType": "uint256[2]",
2071
+ "name": "x",
2072
+ "type": "uint256[2]"
2073
+ },
2074
+ {
2075
+ "internalType": "uint256[2]",
2076
+ "name": "y",
2077
+ "type": "uint256[2]"
2078
+ }
2079
+ ],
2080
+ "internalType": "struct G2Point",
2081
+ "name": "b",
2082
+ "type": "tuple"
2083
+ },
2084
+ {
2085
+ "components": [
2086
+ {
2087
+ "internalType": "uint256",
2088
+ "name": "x",
2089
+ "type": "uint256"
2090
+ },
2091
+ {
2092
+ "internalType": "uint256",
2093
+ "name": "y",
2094
+ "type": "uint256"
2095
+ }
2096
+ ],
2097
+ "internalType": "struct G1Point",
2098
+ "name": "c",
2099
+ "type": "tuple"
2100
+ }
2101
+ ],
2102
+ "internalType": "struct SnarkProof",
2103
+ "name": "proof",
2104
+ "type": "tuple"
2105
+ },
2106
+ {
2107
+ "internalType": "bytes32",
2108
+ "name": "merkleRoot",
2109
+ "type": "bytes32"
2110
+ },
2111
+ {
2112
+ "internalType": "bytes32[]",
2113
+ "name": "nullifiers",
2114
+ "type": "bytes32[]"
2115
+ },
2116
+ {
2117
+ "internalType": "bytes32[]",
2118
+ "name": "commitments",
2119
+ "type": "bytes32[]"
2120
+ },
2121
+ {
2122
+ "components": [
2123
+ {
2124
+ "internalType": "uint16",
2125
+ "name": "treeNumber",
2126
+ "type": "uint16"
2127
+ },
2128
+ {
2129
+ "internalType": "uint72",
2130
+ "name": "minGasPrice",
2131
+ "type": "uint72"
2132
+ },
2133
+ {
2134
+ "internalType": "enum UnshieldType",
2135
+ "name": "unshield",
2136
+ "type": "uint8"
2137
+ },
2138
+ {
2139
+ "internalType": "uint64",
2140
+ "name": "chainID",
2141
+ "type": "uint64"
2142
+ },
2143
+ {
2144
+ "internalType": "address",
2145
+ "name": "adaptContract",
2146
+ "type": "address"
2147
+ },
2148
+ {
2149
+ "internalType": "bytes32",
2150
+ "name": "adaptParams",
2151
+ "type": "bytes32"
2152
+ },
2153
+ {
2154
+ "components": [
2155
+ {
2156
+ "internalType": "bytes32[4]",
2157
+ "name": "ciphertext",
2158
+ "type": "bytes32[4]"
2159
+ },
2160
+ {
2161
+ "internalType": "bytes32",
2162
+ "name": "blindedSenderViewingKey",
2163
+ "type": "bytes32"
2164
+ },
2165
+ {
2166
+ "internalType": "bytes32",
2167
+ "name": "blindedReceiverViewingKey",
2168
+ "type": "bytes32"
2169
+ },
2170
+ {
2171
+ "internalType": "bytes",
2172
+ "name": "annotationData",
2173
+ "type": "bytes"
2174
+ },
2175
+ {
2176
+ "internalType": "bytes",
2177
+ "name": "memo",
2178
+ "type": "bytes"
2179
+ }
2180
+ ],
2181
+ "internalType": "struct CommitmentCiphertext[]",
2182
+ "name": "commitmentCiphertext",
2183
+ "type": "tuple[]"
2184
+ }
2185
+ ],
2186
+ "internalType": "struct BoundParams",
2187
+ "name": "boundParams",
2188
+ "type": "tuple"
2189
+ },
2190
+ {
2191
+ "components": [
2192
+ {
2193
+ "internalType": "bytes32",
2194
+ "name": "npk",
2195
+ "type": "bytes32"
2196
+ },
2197
+ {
2198
+ "components": [
2199
+ {
2200
+ "internalType": "enum TokenType",
2201
+ "name": "tokenType",
2202
+ "type": "uint8"
2203
+ },
2204
+ {
2205
+ "internalType": "address",
2206
+ "name": "tokenAddress",
2207
+ "type": "address"
2208
+ },
2209
+ {
2210
+ "internalType": "uint256",
2211
+ "name": "tokenSubID",
2212
+ "type": "uint256"
2213
+ }
2214
+ ],
2215
+ "internalType": "struct TokenData",
2216
+ "name": "token",
2217
+ "type": "tuple"
2218
+ },
2219
+ {
2220
+ "internalType": "uint120",
2221
+ "name": "value",
2222
+ "type": "uint120"
2223
+ }
2224
+ ],
2225
+ "internalType": "struct CommitmentPreimage",
2226
+ "name": "unshieldPreimage",
2227
+ "type": "tuple"
2228
+ }
2229
+ ],
2230
+ "internalType": "struct Transaction",
2231
+ "name": "_transaction",
2232
+ "type": "tuple"
2233
+ }
2234
+ ],
2235
+ "name": "verify",
2236
+ "outputs": [
2237
+ {
2238
+ "internalType": "bool",
2239
+ "name": "",
2240
+ "type": "bool"
2241
+ }
2242
+ ],
2243
+ "stateMutability": "view",
2244
+ "type": "function"
2245
+ },
2246
+ {
2247
+ "inputs": [
2248
+ {
2249
+ "components": [
2250
+ {
2251
+ "internalType": "string",
2252
+ "name": "artifactsIPFSHash",
2253
+ "type": "string"
2254
+ },
2255
+ {
2256
+ "components": [
2257
+ {
2258
+ "internalType": "uint256",
2259
+ "name": "x",
2260
+ "type": "uint256"
2261
+ },
2262
+ {
2263
+ "internalType": "uint256",
2264
+ "name": "y",
2265
+ "type": "uint256"
2266
+ }
2267
+ ],
2268
+ "internalType": "struct G1Point",
2269
+ "name": "alpha1",
2270
+ "type": "tuple"
2271
+ },
2272
+ {
2273
+ "components": [
2274
+ {
2275
+ "internalType": "uint256[2]",
2276
+ "name": "x",
2277
+ "type": "uint256[2]"
2278
+ },
2279
+ {
2280
+ "internalType": "uint256[2]",
2281
+ "name": "y",
2282
+ "type": "uint256[2]"
2283
+ }
2284
+ ],
2285
+ "internalType": "struct G2Point",
2286
+ "name": "beta2",
2287
+ "type": "tuple"
2288
+ },
2289
+ {
2290
+ "components": [
2291
+ {
2292
+ "internalType": "uint256[2]",
2293
+ "name": "x",
2294
+ "type": "uint256[2]"
2295
+ },
2296
+ {
2297
+ "internalType": "uint256[2]",
2298
+ "name": "y",
2299
+ "type": "uint256[2]"
2300
+ }
2301
+ ],
2302
+ "internalType": "struct G2Point",
2303
+ "name": "gamma2",
2304
+ "type": "tuple"
2305
+ },
2306
+ {
2307
+ "components": [
2308
+ {
2309
+ "internalType": "uint256[2]",
2310
+ "name": "x",
2311
+ "type": "uint256[2]"
2312
+ },
2313
+ {
2314
+ "internalType": "uint256[2]",
2315
+ "name": "y",
2316
+ "type": "uint256[2]"
2317
+ }
2318
+ ],
2319
+ "internalType": "struct G2Point",
2320
+ "name": "delta2",
2321
+ "type": "tuple"
2322
+ },
2323
+ {
2324
+ "components": [
2325
+ {
2326
+ "internalType": "uint256",
2327
+ "name": "x",
2328
+ "type": "uint256"
2329
+ },
2330
+ {
2331
+ "internalType": "uint256",
2332
+ "name": "y",
2333
+ "type": "uint256"
2334
+ }
2335
+ ],
2336
+ "internalType": "struct G1Point[]",
2337
+ "name": "ic",
2338
+ "type": "tuple[]"
2339
+ }
2340
+ ],
2341
+ "internalType": "struct VerifyingKey",
2342
+ "name": "_verifyingKey",
2343
+ "type": "tuple"
2344
+ },
2345
+ {
2346
+ "components": [
2347
+ {
2348
+ "components": [
2349
+ {
2350
+ "internalType": "uint256",
2351
+ "name": "x",
2352
+ "type": "uint256"
2353
+ },
2354
+ {
2355
+ "internalType": "uint256",
2356
+ "name": "y",
2357
+ "type": "uint256"
2358
+ }
2359
+ ],
2360
+ "internalType": "struct G1Point",
2361
+ "name": "a",
2362
+ "type": "tuple"
2363
+ },
2364
+ {
2365
+ "components": [
2366
+ {
2367
+ "internalType": "uint256[2]",
2368
+ "name": "x",
2369
+ "type": "uint256[2]"
2370
+ },
2371
+ {
2372
+ "internalType": "uint256[2]",
2373
+ "name": "y",
2374
+ "type": "uint256[2]"
2375
+ }
2376
+ ],
2377
+ "internalType": "struct G2Point",
2378
+ "name": "b",
2379
+ "type": "tuple"
2380
+ },
2381
+ {
2382
+ "components": [
2383
+ {
2384
+ "internalType": "uint256",
2385
+ "name": "x",
2386
+ "type": "uint256"
2387
+ },
2388
+ {
2389
+ "internalType": "uint256",
2390
+ "name": "y",
2391
+ "type": "uint256"
2392
+ }
2393
+ ],
2394
+ "internalType": "struct G1Point",
2395
+ "name": "c",
2396
+ "type": "tuple"
2397
+ }
2398
+ ],
2399
+ "internalType": "struct SnarkProof",
2400
+ "name": "_proof",
2401
+ "type": "tuple"
2402
+ },
2403
+ {
2404
+ "internalType": "uint256[]",
2405
+ "name": "_inputs",
2406
+ "type": "uint256[]"
2407
+ }
2408
+ ],
2409
+ "name": "verifyProof",
2410
+ "outputs": [
2411
+ {
2412
+ "internalType": "bool",
2413
+ "name": "",
2414
+ "type": "bool"
2415
+ }
2416
+ ],
2417
+ "stateMutability": "view",
2418
+ "type": "function"
2419
+ },
2420
+ {
2421
+ "inputs": [
2422
+ {
2423
+ "internalType": "uint256",
2424
+ "name": "",
2425
+ "type": "uint256"
2426
+ }
2427
+ ],
2428
+ "name": "zeros",
2429
+ "outputs": [
2430
+ {
2431
+ "internalType": "bytes32",
2432
+ "name": "",
2433
+ "type": "bytes32"
2434
+ }
2435
+ ],
2436
+ "stateMutability": "view",
2437
+ "type": "function"
2438
+ }
2439
+ ];
2440
+ /**
2441
+ * RailgunSmartWallet_json Contract Class
2442
+ *
2443
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
2444
+ *
2445
+ * @example
2446
+ * ```typescript
2447
+ * import { createPublicClient, createWalletClient, http } from 'viem';
2448
+ * import { mainnet } from 'viem/chains';
2449
+ * import { RailgunSmartWallet_json } from 'RailgunSmartWallet_json';
2450
+ *
2451
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
2452
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
2453
+ *
2454
+ * const contract = new RailgunSmartWallet_json('0x...', { publicClient, walletClient });
2455
+ *
2456
+ * // Read functions
2457
+ * const result = await contract.balanceOf('0x...');
2458
+ *
2459
+ * // Write functions
2460
+ * const hash = await contract.transfer('0x...', 1000n);
2461
+ *
2462
+ * // Simulate transactions (dry-run)
2463
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
2464
+ * console.log('Gas estimate:', simulation.request.gas);
2465
+ *
2466
+ * // Watch events
2467
+ * const unwatch = contract.watch.Transfer((event) => {
2468
+ * console.log('Transfer event:', event);
2469
+ * });
2470
+ * ```
2471
+ */
2472
+ class RailgunSmartWallet_json {
2473
+ constructor(address, clients) {
2474
+ this.contractAddress = address;
2475
+ this.publicClient = clients.publicClient;
2476
+ this.contract = (0, viem_1.getContract)({
2477
+ address,
2478
+ abi: exports.RailgunSmartWallet_jsonAbi,
2479
+ client: {
2480
+ public: clients.publicClient,
2481
+ wallet: clients.walletClient,
2482
+ },
2483
+ });
2484
+ }
2485
+ /**
2486
+ * Get the contract address
2487
+ */
2488
+ get address() {
2489
+ return this.contractAddress;
2490
+ }
2491
+ /**
2492
+ * Get the underlying viem contract instance
2493
+ */
2494
+ getContract() {
2495
+ return this.contract;
2496
+ }
2497
+ /**
2498
+ * ZERO_VALUE
2499
+ * view
2500
+ */
2501
+ async ZERO_VALUE() {
2502
+ return this.contract.read.ZERO_VALUE();
2503
+ }
2504
+ /**
2505
+ * getFee
2506
+ * pure
2507
+ */
2508
+ async getFee(_amount, _isInclusive, _feeBP) {
2509
+ return this.contract.read.getFee([_amount, _isInclusive, _feeBP]);
2510
+ }
2511
+ /**
2512
+ * getInsertionTreeNumberAndStartingIndex
2513
+ * view
2514
+ */
2515
+ async getInsertionTreeNumberAndStartingIndex(_newCommitments) {
2516
+ return this.contract.read.getInsertionTreeNumberAndStartingIndex([_newCommitments]);
2517
+ }
2518
+ /**
2519
+ * getTokenID
2520
+ * pure
2521
+ */
2522
+ async getTokenID(_tokenData) {
2523
+ return this.contract.read.getTokenID([_tokenData]);
2524
+ }
2525
+ /**
2526
+ * getVerificationKey
2527
+ * view
2528
+ */
2529
+ async getVerificationKey(_nullifiers, _commitments) {
2530
+ return this.contract.read.getVerificationKey([_nullifiers, _commitments]);
2531
+ }
2532
+ /**
2533
+ * hashBoundParams
2534
+ * pure
2535
+ */
2536
+ async hashBoundParams(_boundParams) {
2537
+ return this.contract.read.hashBoundParams([_boundParams]);
2538
+ }
2539
+ /**
2540
+ * hashCommitment
2541
+ * pure
2542
+ */
2543
+ async hashCommitment(_commitmentPreimage) {
2544
+ return this.contract.read.hashCommitment([_commitmentPreimage]);
2545
+ }
2546
+ /**
2547
+ * hashLeftRight
2548
+ * pure
2549
+ */
2550
+ async hashLeftRight(_left, _right) {
2551
+ return this.contract.read.hashLeftRight([_left, _right]);
2552
+ }
2553
+ /**
2554
+ * lastEventBlock
2555
+ * view
2556
+ */
2557
+ async lastEventBlock() {
2558
+ return this.contract.read.lastEventBlock();
2559
+ }
2560
+ /**
2561
+ * merkleRoot
2562
+ * view
2563
+ */
2564
+ async merkleRoot() {
2565
+ return this.contract.read.merkleRoot();
2566
+ }
2567
+ /**
2568
+ * nextLeafIndex
2569
+ * view
2570
+ */
2571
+ async nextLeafIndex() {
2572
+ return this.contract.read.nextLeafIndex();
2573
+ }
2574
+ /**
2575
+ * nftFee
2576
+ * view
2577
+ */
2578
+ async nftFee() {
2579
+ return this.contract.read.nftFee();
2580
+ }
2581
+ /**
2582
+ * nullifiers
2583
+ * view
2584
+ */
2585
+ async nullifiers(arg0, arg1) {
2586
+ return this.contract.read.nullifiers([arg0, arg1]);
2587
+ }
2588
+ /**
2589
+ * owner
2590
+ * view
2591
+ */
2592
+ async owner() {
2593
+ return this.contract.read.owner();
2594
+ }
2595
+ /**
2596
+ * rootHistory
2597
+ * view
2598
+ */
2599
+ async rootHistory(arg0, arg1) {
2600
+ return this.contract.read.rootHistory([arg0, arg1]);
2601
+ }
2602
+ /**
2603
+ * shieldFee
2604
+ * view
2605
+ */
2606
+ async shieldFee() {
2607
+ return this.contract.read.shieldFee();
2608
+ }
2609
+ /**
2610
+ * snarkSafetyVector
2611
+ * view
2612
+ */
2613
+ async snarkSafetyVector(arg0) {
2614
+ return this.contract.read.snarkSafetyVector([arg0]);
2615
+ }
2616
+ /**
2617
+ * sumCommitments
2618
+ * pure
2619
+ */
2620
+ async sumCommitments(_transactions) {
2621
+ return this.contract.read.sumCommitments([_transactions]);
2622
+ }
2623
+ /**
2624
+ * tokenBlocklist
2625
+ * view
2626
+ */
2627
+ async tokenBlocklist(arg0) {
2628
+ return this.contract.read.tokenBlocklist([arg0]);
2629
+ }
2630
+ /**
2631
+ * tokenIDMapping
2632
+ * view
2633
+ */
2634
+ async tokenIDMapping(arg0) {
2635
+ return this.contract.read.tokenIDMapping([arg0]);
2636
+ }
2637
+ /**
2638
+ * treasury
2639
+ * view
2640
+ */
2641
+ async treasury() {
2642
+ return this.contract.read.treasury();
2643
+ }
2644
+ /**
2645
+ * treeNumber
2646
+ * view
2647
+ */
2648
+ async treeNumber() {
2649
+ return this.contract.read.treeNumber();
2650
+ }
2651
+ /**
2652
+ * unshieldFee
2653
+ * view
2654
+ */
2655
+ async unshieldFee() {
2656
+ return this.contract.read.unshieldFee();
2657
+ }
2658
+ /**
2659
+ * validateCommitmentPreimage
2660
+ * view
2661
+ */
2662
+ async validateCommitmentPreimage(_note) {
2663
+ return this.contract.read.validateCommitmentPreimage([_note]);
2664
+ }
2665
+ /**
2666
+ * validateTransaction
2667
+ * view
2668
+ */
2669
+ async validateTransaction(_transaction) {
2670
+ return this.contract.read.validateTransaction([_transaction]);
2671
+ }
2672
+ /**
2673
+ * verify
2674
+ * view
2675
+ */
2676
+ async verify(_transaction) {
2677
+ return this.contract.read.verify([_transaction]);
2678
+ }
2679
+ /**
2680
+ * verifyProof
2681
+ * view
2682
+ */
2683
+ async verifyProof(_verifyingKey, _proof, _inputs) {
2684
+ return this.contract.read.verifyProof([_verifyingKey, _proof, _inputs]);
2685
+ }
2686
+ /**
2687
+ * zeros
2688
+ * view
2689
+ */
2690
+ async zeros(arg0) {
2691
+ return this.contract.read.zeros([arg0]);
2692
+ }
2693
+ /**
2694
+ * addToBlocklist
2695
+ * nonpayable
2696
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2697
+ */
2698
+ async addToBlocklist(_tokens, options) {
2699
+ if (!this.contract.write) {
2700
+ throw new Error('Wallet client is required for write operations');
2701
+ }
2702
+ return this.contract.write.addToBlocklist([_tokens], options);
2703
+ }
2704
+ /**
2705
+ * addVector
2706
+ * nonpayable
2707
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2708
+ */
2709
+ async addVector(vector, options) {
2710
+ if (!this.contract.write) {
2711
+ throw new Error('Wallet client is required for write operations');
2712
+ }
2713
+ return this.contract.write.addVector([vector], options);
2714
+ }
2715
+ /**
2716
+ * changeFee
2717
+ * nonpayable
2718
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2719
+ */
2720
+ async changeFee(_shieldFee, _unshieldFee, _nftFee, options) {
2721
+ if (!this.contract.write) {
2722
+ throw new Error('Wallet client is required for write operations');
2723
+ }
2724
+ return this.contract.write.changeFee([_shieldFee, _unshieldFee, _nftFee], options);
2725
+ }
2726
+ /**
2727
+ * changeTreasury
2728
+ * nonpayable
2729
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2730
+ */
2731
+ async changeTreasury(_treasury, options) {
2732
+ if (!this.contract.write) {
2733
+ throw new Error('Wallet client is required for write operations');
2734
+ }
2735
+ return this.contract.write.changeTreasury([_treasury], options);
2736
+ }
2737
+ /**
2738
+ * checkSafetyVectors
2739
+ * nonpayable
2740
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2741
+ */
2742
+ async checkSafetyVectors(options) {
2743
+ if (!this.contract.write) {
2744
+ throw new Error('Wallet client is required for write operations');
2745
+ }
2746
+ return this.contract.write.checkSafetyVectors(options);
2747
+ }
2748
+ /**
2749
+ * initializeRailgunLogic
2750
+ * nonpayable
2751
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2752
+ */
2753
+ async initializeRailgunLogic(_treasury, _shieldFee, _unshieldFee, _nftFee, _owner, options) {
2754
+ if (!this.contract.write) {
2755
+ throw new Error('Wallet client is required for write operations');
2756
+ }
2757
+ return this.contract.write.initializeRailgunLogic([_treasury, _shieldFee, _unshieldFee, _nftFee, _owner], options);
2758
+ }
2759
+ /**
2760
+ * removeFromBlocklist
2761
+ * nonpayable
2762
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2763
+ */
2764
+ async removeFromBlocklist(_tokens, options) {
2765
+ if (!this.contract.write) {
2766
+ throw new Error('Wallet client is required for write operations');
2767
+ }
2768
+ return this.contract.write.removeFromBlocklist([_tokens], options);
2769
+ }
2770
+ /**
2771
+ * removeVector
2772
+ * nonpayable
2773
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2774
+ */
2775
+ async removeVector(vector, options) {
2776
+ if (!this.contract.write) {
2777
+ throw new Error('Wallet client is required for write operations');
2778
+ }
2779
+ return this.contract.write.removeVector([vector], options);
2780
+ }
2781
+ /**
2782
+ * renounceOwnership
2783
+ * nonpayable
2784
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2785
+ */
2786
+ async renounceOwnership(options) {
2787
+ if (!this.contract.write) {
2788
+ throw new Error('Wallet client is required for write operations');
2789
+ }
2790
+ return this.contract.write.renounceOwnership(options);
2791
+ }
2792
+ /**
2793
+ * setVerificationKey
2794
+ * nonpayable
2795
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2796
+ */
2797
+ async setVerificationKey(_nullifiers, _commitments, _verifyingKey, options) {
2798
+ if (!this.contract.write) {
2799
+ throw new Error('Wallet client is required for write operations');
2800
+ }
2801
+ return this.contract.write.setVerificationKey([_nullifiers, _commitments, _verifyingKey], options);
2802
+ }
2803
+ /**
2804
+ * shield
2805
+ * nonpayable
2806
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2807
+ */
2808
+ async shield(_shieldRequests, options) {
2809
+ if (!this.contract.write) {
2810
+ throw new Error('Wallet client is required for write operations');
2811
+ }
2812
+ return this.contract.write.shield([_shieldRequests], options);
2813
+ }
2814
+ /**
2815
+ * transact
2816
+ * nonpayable
2817
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2818
+ */
2819
+ async transact(_transactions, options) {
2820
+ if (!this.contract.write) {
2821
+ throw new Error('Wallet client is required for write operations');
2822
+ }
2823
+ return this.contract.write.transact([_transactions], options);
2824
+ }
2825
+ /**
2826
+ * transferOwnership
2827
+ * nonpayable
2828
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2829
+ */
2830
+ async transferOwnership(newOwner, options) {
2831
+ if (!this.contract.write) {
2832
+ throw new Error('Wallet client is required for write operations');
2833
+ }
2834
+ return this.contract.write.transferOwnership([newOwner], options);
2835
+ }
2836
+ /**
2837
+ * Simulate contract write operations (dry-run without sending transaction)
2838
+ *
2839
+ * @example
2840
+ * const result = await contract.simulate.transfer('0x...', 1000n);
2841
+ * console.log('Gas estimate:', result.request.gas);
2842
+ * console.log('Would succeed:', result.result);
2843
+ */
2844
+ get simulate() {
2845
+ const contract = this.contract;
2846
+ if (!contract.simulate) {
2847
+ throw new Error('Public client is required for simulation');
2848
+ }
2849
+ return {
2850
+ /**
2851
+ * Simulate addToBlocklist
2852
+ * Returns gas estimate and result without sending transaction
2853
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2854
+ */
2855
+ async addToBlocklist(_tokens, options) {
2856
+ return contract.simulate.addToBlocklist([_tokens], options);
2857
+ },
2858
+ /**
2859
+ * Simulate addVector
2860
+ * Returns gas estimate and result without sending transaction
2861
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2862
+ */
2863
+ async addVector(vector, options) {
2864
+ return contract.simulate.addVector([vector], options);
2865
+ },
2866
+ /**
2867
+ * Simulate changeFee
2868
+ * Returns gas estimate and result without sending transaction
2869
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2870
+ */
2871
+ async changeFee(_shieldFee, _unshieldFee, _nftFee, options) {
2872
+ return contract.simulate.changeFee([_shieldFee, _unshieldFee, _nftFee], options);
2873
+ },
2874
+ /**
2875
+ * Simulate changeTreasury
2876
+ * Returns gas estimate and result without sending transaction
2877
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2878
+ */
2879
+ async changeTreasury(_treasury, options) {
2880
+ return contract.simulate.changeTreasury([_treasury], options);
2881
+ },
2882
+ /**
2883
+ * Simulate checkSafetyVectors
2884
+ * Returns gas estimate and result without sending transaction
2885
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2886
+ */
2887
+ async checkSafetyVectors(options) {
2888
+ return contract.simulate.checkSafetyVectors(options);
2889
+ },
2890
+ /**
2891
+ * Simulate initializeRailgunLogic
2892
+ * Returns gas estimate and result without sending transaction
2893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2894
+ */
2895
+ async initializeRailgunLogic(_treasury, _shieldFee, _unshieldFee, _nftFee, _owner, options) {
2896
+ return contract.simulate.initializeRailgunLogic([_treasury, _shieldFee, _unshieldFee, _nftFee, _owner], options);
2897
+ },
2898
+ /**
2899
+ * Simulate removeFromBlocklist
2900
+ * Returns gas estimate and result without sending transaction
2901
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2902
+ */
2903
+ async removeFromBlocklist(_tokens, options) {
2904
+ return contract.simulate.removeFromBlocklist([_tokens], options);
2905
+ },
2906
+ /**
2907
+ * Simulate removeVector
2908
+ * Returns gas estimate and result without sending transaction
2909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2910
+ */
2911
+ async removeVector(vector, options) {
2912
+ return contract.simulate.removeVector([vector], options);
2913
+ },
2914
+ /**
2915
+ * Simulate renounceOwnership
2916
+ * Returns gas estimate and result without sending transaction
2917
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2918
+ */
2919
+ async renounceOwnership(options) {
2920
+ return contract.simulate.renounceOwnership(options);
2921
+ },
2922
+ /**
2923
+ * Simulate setVerificationKey
2924
+ * Returns gas estimate and result without sending transaction
2925
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2926
+ */
2927
+ async setVerificationKey(_nullifiers, _commitments, _verifyingKey, options) {
2928
+ return contract.simulate.setVerificationKey([_nullifiers, _commitments, _verifyingKey], options);
2929
+ },
2930
+ /**
2931
+ * Simulate shield
2932
+ * Returns gas estimate and result without sending transaction
2933
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2934
+ */
2935
+ async shield(_shieldRequests, options) {
2936
+ return contract.simulate.shield([_shieldRequests], options);
2937
+ },
2938
+ /**
2939
+ * Simulate transact
2940
+ * Returns gas estimate and result without sending transaction
2941
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2942
+ */
2943
+ async transact(_transactions, options) {
2944
+ return contract.simulate.transact([_transactions], options);
2945
+ },
2946
+ /**
2947
+ * Simulate transferOwnership
2948
+ * Returns gas estimate and result without sending transaction
2949
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2950
+ */
2951
+ async transferOwnership(newOwner, options) {
2952
+ return contract.simulate.transferOwnership([newOwner], options);
2953
+ }
2954
+ };
2955
+ }
2956
+ /**
2957
+ * Watch contract events
2958
+ *
2959
+ * @example
2960
+ * // Watch all Transfer events
2961
+ * const unwatch = contract.watch.Transfer((event) => {
2962
+ * console.log('Transfer:', event);
2963
+ * });
2964
+ *
2965
+ * // Stop watching
2966
+ * unwatch();
2967
+ */
2968
+ get watch() {
2969
+ return {
2970
+ /**
2971
+ * Watch AddToBlocklist events
2972
+ * @param callback Function to call when event is emitted
2973
+ * @param filter Optional filter for indexed parameters
2974
+ * @returns Unwatch function to stop listening
2975
+ */
2976
+ AddToBlocklist: (callback, filter) => {
2977
+ return this.publicClient.watchContractEvent({
2978
+ address: this.contractAddress,
2979
+ abi: exports.RailgunSmartWallet_jsonAbi,
2980
+ eventName: 'AddToBlocklist',
2981
+ args: filter,
2982
+ onLogs: (logs) => {
2983
+ logs.forEach((log) => {
2984
+ callback(log.args);
2985
+ });
2986
+ },
2987
+ });
2988
+ },
2989
+ /**
2990
+ * Watch FeeChange events
2991
+ * @param callback Function to call when event is emitted
2992
+ * @param filter Optional filter for indexed parameters
2993
+ * @returns Unwatch function to stop listening
2994
+ */
2995
+ FeeChange: (callback) => {
2996
+ return this.publicClient.watchContractEvent({
2997
+ address: this.contractAddress,
2998
+ abi: exports.RailgunSmartWallet_jsonAbi,
2999
+ eventName: 'FeeChange',
3000
+ onLogs: (logs) => {
3001
+ logs.forEach((log) => {
3002
+ callback(log.args);
3003
+ });
3004
+ },
3005
+ });
3006
+ },
3007
+ /**
3008
+ * Watch Initialized events
3009
+ * @param callback Function to call when event is emitted
3010
+ * @param filter Optional filter for indexed parameters
3011
+ * @returns Unwatch function to stop listening
3012
+ */
3013
+ Initialized: (callback) => {
3014
+ return this.publicClient.watchContractEvent({
3015
+ address: this.contractAddress,
3016
+ abi: exports.RailgunSmartWallet_jsonAbi,
3017
+ eventName: 'Initialized',
3018
+ onLogs: (logs) => {
3019
+ logs.forEach((log) => {
3020
+ callback(log.args);
3021
+ });
3022
+ },
3023
+ });
3024
+ },
3025
+ /**
3026
+ * Watch Nullified events
3027
+ * @param callback Function to call when event is emitted
3028
+ * @param filter Optional filter for indexed parameters
3029
+ * @returns Unwatch function to stop listening
3030
+ */
3031
+ Nullified: (callback) => {
3032
+ return this.publicClient.watchContractEvent({
3033
+ address: this.contractAddress,
3034
+ abi: exports.RailgunSmartWallet_jsonAbi,
3035
+ eventName: 'Nullified',
3036
+ onLogs: (logs) => {
3037
+ logs.forEach((log) => {
3038
+ callback(log.args);
3039
+ });
3040
+ },
3041
+ });
3042
+ },
3043
+ /**
3044
+ * Watch OwnershipTransferred events
3045
+ * @param callback Function to call when event is emitted
3046
+ * @param filter Optional filter for indexed parameters
3047
+ * @returns Unwatch function to stop listening
3048
+ */
3049
+ OwnershipTransferred: (callback, filter) => {
3050
+ return this.publicClient.watchContractEvent({
3051
+ address: this.contractAddress,
3052
+ abi: exports.RailgunSmartWallet_jsonAbi,
3053
+ eventName: 'OwnershipTransferred',
3054
+ args: filter,
3055
+ onLogs: (logs) => {
3056
+ logs.forEach((log) => {
3057
+ callback(log.args);
3058
+ });
3059
+ },
3060
+ });
3061
+ },
3062
+ /**
3063
+ * Watch RemoveFromBlocklist events
3064
+ * @param callback Function to call when event is emitted
3065
+ * @param filter Optional filter for indexed parameters
3066
+ * @returns Unwatch function to stop listening
3067
+ */
3068
+ RemoveFromBlocklist: (callback, filter) => {
3069
+ return this.publicClient.watchContractEvent({
3070
+ address: this.contractAddress,
3071
+ abi: exports.RailgunSmartWallet_jsonAbi,
3072
+ eventName: 'RemoveFromBlocklist',
3073
+ args: filter,
3074
+ onLogs: (logs) => {
3075
+ logs.forEach((log) => {
3076
+ callback(log.args);
3077
+ });
3078
+ },
3079
+ });
3080
+ },
3081
+ /**
3082
+ * Watch Shield events
3083
+ * @param callback Function to call when event is emitted
3084
+ * @param filter Optional filter for indexed parameters
3085
+ * @returns Unwatch function to stop listening
3086
+ */
3087
+ Shield: (callback) => {
3088
+ return this.publicClient.watchContractEvent({
3089
+ address: this.contractAddress,
3090
+ abi: exports.RailgunSmartWallet_jsonAbi,
3091
+ eventName: 'Shield',
3092
+ onLogs: (logs) => {
3093
+ logs.forEach((log) => {
3094
+ callback(log.args);
3095
+ });
3096
+ },
3097
+ });
3098
+ },
3099
+ /**
3100
+ * Watch Transact events
3101
+ * @param callback Function to call when event is emitted
3102
+ * @param filter Optional filter for indexed parameters
3103
+ * @returns Unwatch function to stop listening
3104
+ */
3105
+ Transact: (callback) => {
3106
+ return this.publicClient.watchContractEvent({
3107
+ address: this.contractAddress,
3108
+ abi: exports.RailgunSmartWallet_jsonAbi,
3109
+ eventName: 'Transact',
3110
+ onLogs: (logs) => {
3111
+ logs.forEach((log) => {
3112
+ callback(log.args);
3113
+ });
3114
+ },
3115
+ });
3116
+ },
3117
+ /**
3118
+ * Watch TreasuryChange events
3119
+ * @param callback Function to call when event is emitted
3120
+ * @param filter Optional filter for indexed parameters
3121
+ * @returns Unwatch function to stop listening
3122
+ */
3123
+ TreasuryChange: (callback) => {
3124
+ return this.publicClient.watchContractEvent({
3125
+ address: this.contractAddress,
3126
+ abi: exports.RailgunSmartWallet_jsonAbi,
3127
+ eventName: 'TreasuryChange',
3128
+ onLogs: (logs) => {
3129
+ logs.forEach((log) => {
3130
+ callback(log.args);
3131
+ });
3132
+ },
3133
+ });
3134
+ },
3135
+ /**
3136
+ * Watch Unshield events
3137
+ * @param callback Function to call when event is emitted
3138
+ * @param filter Optional filter for indexed parameters
3139
+ * @returns Unwatch function to stop listening
3140
+ */
3141
+ Unshield: (callback) => {
3142
+ return this.publicClient.watchContractEvent({
3143
+ address: this.contractAddress,
3144
+ abi: exports.RailgunSmartWallet_jsonAbi,
3145
+ eventName: 'Unshield',
3146
+ onLogs: (logs) => {
3147
+ logs.forEach((log) => {
3148
+ callback(log.args);
3149
+ });
3150
+ },
3151
+ });
3152
+ },
3153
+ /**
3154
+ * Watch VerifyingKeySet events
3155
+ * @param callback Function to call when event is emitted
3156
+ * @param filter Optional filter for indexed parameters
3157
+ * @returns Unwatch function to stop listening
3158
+ */
3159
+ VerifyingKeySet: (callback) => {
3160
+ return this.publicClient.watchContractEvent({
3161
+ address: this.contractAddress,
3162
+ abi: exports.RailgunSmartWallet_jsonAbi,
3163
+ eventName: 'VerifyingKeySet',
3164
+ onLogs: (logs) => {
3165
+ logs.forEach((log) => {
3166
+ callback(log.args);
3167
+ });
3168
+ },
3169
+ });
3170
+ }
3171
+ };
3172
+ }
3173
+ }
3174
+ exports.RailgunSmartWallet_json = RailgunSmartWallet_json;