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