@underscore-finance/sdk 0.3.1 → 0.3.2

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.
Files changed (38) hide show
  1. package/dist/contracts/AddyRegistry_v1.d.ts +471 -0
  2. package/dist/contracts/AddyRegistry_v1.d.ts.map +1 -0
  3. package/dist/contracts/AddyRegistry_v1.js +592 -0
  4. package/dist/contracts/AddyRegistry_v2.d.ts +1048 -0
  5. package/dist/contracts/AddyRegistry_v2.d.ts.map +1 -0
  6. package/dist/contracts/AddyRegistry_v2.js +1311 -0
  7. package/dist/contracts/AgentFactory.js +1 -1
  8. package/dist/contracts/AgentFactory_v1.d.ts +1052 -0
  9. package/dist/contracts/AgentFactory_v1.d.ts.map +1 -0
  10. package/dist/contracts/AgentFactory_v1.js +1334 -0
  11. package/dist/contracts/AgentFactory_v2.d.ts +17 -3
  12. package/dist/contracts/AgentFactory_v2.d.ts.map +1 -1
  13. package/dist/contracts/AgentFactory_v2.js +23 -4
  14. package/dist/contracts/Agent_v2.d.ts +2707 -0
  15. package/dist/contracts/Agent_v2.d.ts.map +1 -0
  16. package/dist/contracts/Agent_v2.js +3456 -0
  17. package/dist/contracts/UserWalletConfig_v1.d.ts +1398 -0
  18. package/dist/contracts/UserWalletConfig_v1.d.ts.map +1 -0
  19. package/dist/contracts/UserWalletConfig_v1.js +1674 -0
  20. package/dist/contracts/UserWalletConfig_v2.d.ts +1466 -0
  21. package/dist/contracts/UserWalletConfig_v2.d.ts.map +1 -0
  22. package/dist/contracts/UserWalletConfig_v2.js +1762 -0
  23. package/dist/contracts/UserWallet_v1.d.ts +1978 -0
  24. package/dist/contracts/UserWallet_v1.d.ts.map +1 -0
  25. package/dist/contracts/UserWallet_v1.js +2579 -0
  26. package/dist/contracts/UserWallet_v2.d.ts +1956 -0
  27. package/dist/contracts/UserWallet_v2.d.ts.map +1 -0
  28. package/dist/contracts/UserWallet_v2.js +2551 -0
  29. package/dist/contracts/index.d.ts +8 -0
  30. package/dist/contracts/index.d.ts.map +1 -1
  31. package/dist/contracts/index.js +8 -0
  32. package/dist/contracts/sdk.d.ts +16 -0
  33. package/dist/contracts/sdk.d.ts.map +1 -1
  34. package/dist/contracts/sdk.js +16 -0
  35. package/dist/index.d.ts +43 -0
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +51 -0
  38. package/package.json +1 -1
@@ -0,0 +1,1311 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ anonymous: false,
9
+ inputs: [
10
+ {
11
+ indexed: true,
12
+ name: 'prevGov',
13
+ type: 'address',
14
+ },
15
+ {
16
+ indexed: true,
17
+ name: 'newGov',
18
+ type: 'address',
19
+ },
20
+ {
21
+ indexed: false,
22
+ name: 'confirmBlock',
23
+ type: 'uint256',
24
+ },
25
+ ],
26
+ name: 'GovChangeInitiated',
27
+ type: 'event',
28
+ },
29
+ {
30
+ anonymous: false,
31
+ inputs: [
32
+ {
33
+ indexed: true,
34
+ name: 'prevGov',
35
+ type: 'address',
36
+ },
37
+ {
38
+ indexed: true,
39
+ name: 'newGov',
40
+ type: 'address',
41
+ },
42
+ {
43
+ indexed: false,
44
+ name: 'initiatedBlock',
45
+ type: 'uint256',
46
+ },
47
+ {
48
+ indexed: false,
49
+ name: 'confirmBlock',
50
+ type: 'uint256',
51
+ },
52
+ ],
53
+ name: 'GovChangeConfirmed',
54
+ type: 'event',
55
+ },
56
+ {
57
+ anonymous: false,
58
+ inputs: [
59
+ {
60
+ indexed: true,
61
+ name: 'cancelledGov',
62
+ type: 'address',
63
+ },
64
+ {
65
+ indexed: false,
66
+ name: 'initiatedBlock',
67
+ type: 'uint256',
68
+ },
69
+ {
70
+ indexed: false,
71
+ name: 'confirmBlock',
72
+ type: 'uint256',
73
+ },
74
+ ],
75
+ name: 'GovChangeCancelled',
76
+ type: 'event',
77
+ },
78
+ {
79
+ anonymous: false,
80
+ inputs: [
81
+ {
82
+ indexed: false,
83
+ name: 'delayBlocks',
84
+ type: 'uint256',
85
+ },
86
+ ],
87
+ name: 'GovChangeDelaySet',
88
+ type: 'event',
89
+ },
90
+ {
91
+ anonymous: false,
92
+ inputs: [
93
+ {
94
+ indexed: true,
95
+ name: 'addr',
96
+ type: 'address',
97
+ },
98
+ {
99
+ indexed: false,
100
+ name: 'description',
101
+ type: 'string',
102
+ },
103
+ {
104
+ indexed: false,
105
+ name: 'confirmBlock',
106
+ type: 'uint256',
107
+ },
108
+ {
109
+ indexed: false,
110
+ name: 'registry',
111
+ type: 'string',
112
+ },
113
+ ],
114
+ name: 'NewAddyPending',
115
+ type: 'event',
116
+ },
117
+ {
118
+ anonymous: false,
119
+ inputs: [
120
+ {
121
+ indexed: true,
122
+ name: 'addr',
123
+ type: 'address',
124
+ },
125
+ {
126
+ indexed: false,
127
+ name: 'addyId',
128
+ type: 'uint256',
129
+ },
130
+ {
131
+ indexed: false,
132
+ name: 'description',
133
+ type: 'string',
134
+ },
135
+ {
136
+ indexed: false,
137
+ name: 'registry',
138
+ type: 'string',
139
+ },
140
+ ],
141
+ name: 'NewAddyConfirmed',
142
+ type: 'event',
143
+ },
144
+ {
145
+ anonymous: false,
146
+ inputs: [
147
+ {
148
+ indexed: false,
149
+ name: 'description',
150
+ type: 'string',
151
+ },
152
+ {
153
+ indexed: true,
154
+ name: 'addr',
155
+ type: 'address',
156
+ },
157
+ {
158
+ indexed: false,
159
+ name: 'initiatedBlock',
160
+ type: 'uint256',
161
+ },
162
+ {
163
+ indexed: false,
164
+ name: 'confirmBlock',
165
+ type: 'uint256',
166
+ },
167
+ {
168
+ indexed: false,
169
+ name: 'registry',
170
+ type: 'string',
171
+ },
172
+ ],
173
+ name: 'NewPendingAddyCancelled',
174
+ type: 'event',
175
+ },
176
+ {
177
+ anonymous: false,
178
+ inputs: [
179
+ {
180
+ indexed: false,
181
+ name: 'addyId',
182
+ type: 'uint256',
183
+ },
184
+ {
185
+ indexed: false,
186
+ name: 'description',
187
+ type: 'string',
188
+ },
189
+ {
190
+ indexed: true,
191
+ name: 'newAddr',
192
+ type: 'address',
193
+ },
194
+ {
195
+ indexed: true,
196
+ name: 'prevAddr',
197
+ type: 'address',
198
+ },
199
+ {
200
+ indexed: false,
201
+ name: 'version',
202
+ type: 'uint256',
203
+ },
204
+ {
205
+ indexed: false,
206
+ name: 'confirmBlock',
207
+ type: 'uint256',
208
+ },
209
+ {
210
+ indexed: false,
211
+ name: 'registry',
212
+ type: 'string',
213
+ },
214
+ ],
215
+ name: 'AddyUpdatePending',
216
+ type: 'event',
217
+ },
218
+ {
219
+ anonymous: false,
220
+ inputs: [
221
+ {
222
+ indexed: false,
223
+ name: 'addyId',
224
+ type: 'uint256',
225
+ },
226
+ {
227
+ indexed: false,
228
+ name: 'description',
229
+ type: 'string',
230
+ },
231
+ {
232
+ indexed: true,
233
+ name: 'newAddr',
234
+ type: 'address',
235
+ },
236
+ {
237
+ indexed: true,
238
+ name: 'prevAddr',
239
+ type: 'address',
240
+ },
241
+ {
242
+ indexed: false,
243
+ name: 'version',
244
+ type: 'uint256',
245
+ },
246
+ {
247
+ indexed: false,
248
+ name: 'registry',
249
+ type: 'string',
250
+ },
251
+ ],
252
+ name: 'AddyUpdateConfirmed',
253
+ type: 'event',
254
+ },
255
+ {
256
+ anonymous: false,
257
+ inputs: [
258
+ {
259
+ indexed: false,
260
+ name: 'addyId',
261
+ type: 'uint256',
262
+ },
263
+ {
264
+ indexed: false,
265
+ name: 'description',
266
+ type: 'string',
267
+ },
268
+ {
269
+ indexed: true,
270
+ name: 'newAddr',
271
+ type: 'address',
272
+ },
273
+ {
274
+ indexed: true,
275
+ name: 'prevAddr',
276
+ type: 'address',
277
+ },
278
+ {
279
+ indexed: false,
280
+ name: 'initiatedBlock',
281
+ type: 'uint256',
282
+ },
283
+ {
284
+ indexed: false,
285
+ name: 'confirmBlock',
286
+ type: 'uint256',
287
+ },
288
+ {
289
+ indexed: false,
290
+ name: 'registry',
291
+ type: 'string',
292
+ },
293
+ ],
294
+ name: 'AddyUpdateCancelled',
295
+ type: 'event',
296
+ },
297
+ {
298
+ anonymous: false,
299
+ inputs: [
300
+ {
301
+ indexed: false,
302
+ name: 'addyId',
303
+ type: 'uint256',
304
+ },
305
+ {
306
+ indexed: false,
307
+ name: 'description',
308
+ type: 'string',
309
+ },
310
+ {
311
+ indexed: true,
312
+ name: 'addr',
313
+ type: 'address',
314
+ },
315
+ {
316
+ indexed: false,
317
+ name: 'version',
318
+ type: 'uint256',
319
+ },
320
+ {
321
+ indexed: false,
322
+ name: 'confirmBlock',
323
+ type: 'uint256',
324
+ },
325
+ {
326
+ indexed: false,
327
+ name: 'registry',
328
+ type: 'string',
329
+ },
330
+ ],
331
+ name: 'AddyDisablePending',
332
+ type: 'event',
333
+ },
334
+ {
335
+ anonymous: false,
336
+ inputs: [
337
+ {
338
+ indexed: false,
339
+ name: 'addyId',
340
+ type: 'uint256',
341
+ },
342
+ {
343
+ indexed: false,
344
+ name: 'description',
345
+ type: 'string',
346
+ },
347
+ {
348
+ indexed: true,
349
+ name: 'addr',
350
+ type: 'address',
351
+ },
352
+ {
353
+ indexed: false,
354
+ name: 'version',
355
+ type: 'uint256',
356
+ },
357
+ {
358
+ indexed: false,
359
+ name: 'registry',
360
+ type: 'string',
361
+ },
362
+ ],
363
+ name: 'AddyDisableConfirmed',
364
+ type: 'event',
365
+ },
366
+ {
367
+ anonymous: false,
368
+ inputs: [
369
+ {
370
+ indexed: false,
371
+ name: 'addyId',
372
+ type: 'uint256',
373
+ },
374
+ {
375
+ indexed: false,
376
+ name: 'description',
377
+ type: 'string',
378
+ },
379
+ {
380
+ indexed: true,
381
+ name: 'addr',
382
+ type: 'address',
383
+ },
384
+ {
385
+ indexed: false,
386
+ name: 'initiatedBlock',
387
+ type: 'uint256',
388
+ },
389
+ {
390
+ indexed: false,
391
+ name: 'confirmBlock',
392
+ type: 'uint256',
393
+ },
394
+ {
395
+ indexed: false,
396
+ name: 'registry',
397
+ type: 'string',
398
+ },
399
+ ],
400
+ name: 'AddyDisableCancelled',
401
+ type: 'event',
402
+ },
403
+ {
404
+ anonymous: false,
405
+ inputs: [
406
+ {
407
+ indexed: false,
408
+ name: 'delayBlocks',
409
+ type: 'uint256',
410
+ },
411
+ {
412
+ indexed: false,
413
+ name: 'registry',
414
+ type: 'string',
415
+ },
416
+ ],
417
+ name: 'AddyChangeDelaySet',
418
+ type: 'event',
419
+ },
420
+ {
421
+ inputs: [
422
+ {
423
+ name: '_address',
424
+ type: 'address',
425
+ },
426
+ ],
427
+ name: 'canGovern',
428
+ outputs: [
429
+ {
430
+ name: '',
431
+ type: 'bool',
432
+ },
433
+ ],
434
+ stateMutability: 'view',
435
+ type: 'function',
436
+ },
437
+ {
438
+ inputs: [],
439
+ name: 'hasPendingGovChange',
440
+ outputs: [
441
+ {
442
+ name: '',
443
+ type: 'bool',
444
+ },
445
+ ],
446
+ stateMutability: 'view',
447
+ type: 'function',
448
+ },
449
+ {
450
+ inputs: [
451
+ {
452
+ name: '_newGov',
453
+ type: 'address',
454
+ },
455
+ ],
456
+ name: 'changeGovernance',
457
+ outputs: [],
458
+ stateMutability: 'nonpayable',
459
+ type: 'function',
460
+ },
461
+ {
462
+ inputs: [],
463
+ name: 'confirmGovernanceChange',
464
+ outputs: [],
465
+ stateMutability: 'nonpayable',
466
+ type: 'function',
467
+ },
468
+ {
469
+ inputs: [],
470
+ name: 'cancelGovernanceChange',
471
+ outputs: [],
472
+ stateMutability: 'nonpayable',
473
+ type: 'function',
474
+ },
475
+ {
476
+ inputs: [
477
+ {
478
+ name: '_numBlocks',
479
+ type: 'uint256',
480
+ },
481
+ ],
482
+ name: 'setGovernanceChangeDelay',
483
+ outputs: [],
484
+ stateMutability: 'nonpayable',
485
+ type: 'function',
486
+ },
487
+ {
488
+ inputs: [],
489
+ name: 'governance',
490
+ outputs: [
491
+ {
492
+ name: '',
493
+ type: 'address',
494
+ },
495
+ ],
496
+ stateMutability: 'view',
497
+ type: 'function',
498
+ },
499
+ {
500
+ inputs: [],
501
+ name: 'pendingGov',
502
+ outputs: [
503
+ {
504
+ components: [
505
+ {
506
+ name: 'newGov',
507
+ type: 'address',
508
+ },
509
+ {
510
+ name: 'initiatedBlock',
511
+ type: 'uint256',
512
+ },
513
+ {
514
+ name: 'confirmBlock',
515
+ type: 'uint256',
516
+ },
517
+ ],
518
+ name: '',
519
+ type: 'tuple',
520
+ },
521
+ ],
522
+ stateMutability: 'view',
523
+ type: 'function',
524
+ },
525
+ {
526
+ inputs: [],
527
+ name: 'govChangeDelay',
528
+ outputs: [
529
+ {
530
+ name: '',
531
+ type: 'uint256',
532
+ },
533
+ ],
534
+ stateMutability: 'view',
535
+ type: 'function',
536
+ },
537
+ {
538
+ inputs: [],
539
+ name: 'MIN_GOV_CHANGE_DELAY',
540
+ outputs: [
541
+ {
542
+ name: '',
543
+ type: 'uint256',
544
+ },
545
+ ],
546
+ stateMutability: 'view',
547
+ type: 'function',
548
+ },
549
+ {
550
+ inputs: [],
551
+ name: 'MAX_GOV_CHANGE_DELAY',
552
+ outputs: [
553
+ {
554
+ name: '',
555
+ type: 'uint256',
556
+ },
557
+ ],
558
+ stateMutability: 'view',
559
+ type: 'function',
560
+ },
561
+ {
562
+ inputs: [
563
+ {
564
+ name: '_addr',
565
+ type: 'address',
566
+ },
567
+ ],
568
+ name: 'isValidNewAddy',
569
+ outputs: [
570
+ {
571
+ name: '',
572
+ type: 'bool',
573
+ },
574
+ ],
575
+ stateMutability: 'view',
576
+ type: 'function',
577
+ },
578
+ {
579
+ inputs: [
580
+ {
581
+ name: '_addyId',
582
+ type: 'uint256',
583
+ },
584
+ {
585
+ name: '_newAddr',
586
+ type: 'address',
587
+ },
588
+ ],
589
+ name: 'isValidAddyUpdate',
590
+ outputs: [
591
+ {
592
+ name: '',
593
+ type: 'bool',
594
+ },
595
+ ],
596
+ stateMutability: 'view',
597
+ type: 'function',
598
+ },
599
+ {
600
+ inputs: [
601
+ {
602
+ name: '_addyId',
603
+ type: 'uint256',
604
+ },
605
+ ],
606
+ name: 'isValidAddyDisable',
607
+ outputs: [
608
+ {
609
+ name: '',
610
+ type: 'bool',
611
+ },
612
+ ],
613
+ stateMutability: 'view',
614
+ type: 'function',
615
+ },
616
+ {
617
+ inputs: [
618
+ {
619
+ name: '_addr',
620
+ type: 'address',
621
+ },
622
+ ],
623
+ name: 'isValidAddyAddr',
624
+ outputs: [
625
+ {
626
+ name: '',
627
+ type: 'bool',
628
+ },
629
+ ],
630
+ stateMutability: 'view',
631
+ type: 'function',
632
+ },
633
+ {
634
+ inputs: [
635
+ {
636
+ name: '_addyId',
637
+ type: 'uint256',
638
+ },
639
+ ],
640
+ name: 'isValidAddyId',
641
+ outputs: [
642
+ {
643
+ name: '',
644
+ type: 'bool',
645
+ },
646
+ ],
647
+ stateMutability: 'view',
648
+ type: 'function',
649
+ },
650
+ {
651
+ inputs: [
652
+ {
653
+ name: '_addr',
654
+ type: 'address',
655
+ },
656
+ ],
657
+ name: 'getAddyId',
658
+ outputs: [
659
+ {
660
+ name: '',
661
+ type: 'uint256',
662
+ },
663
+ ],
664
+ stateMutability: 'view',
665
+ type: 'function',
666
+ },
667
+ {
668
+ inputs: [
669
+ {
670
+ name: '_addyId',
671
+ type: 'uint256',
672
+ },
673
+ ],
674
+ name: 'getAddy',
675
+ outputs: [
676
+ {
677
+ name: '',
678
+ type: 'address',
679
+ },
680
+ ],
681
+ stateMutability: 'view',
682
+ type: 'function',
683
+ },
684
+ {
685
+ inputs: [
686
+ {
687
+ name: '_addyId',
688
+ type: 'uint256',
689
+ },
690
+ ],
691
+ name: 'getAddyInfo',
692
+ outputs: [
693
+ {
694
+ components: [
695
+ {
696
+ name: 'addr',
697
+ type: 'address',
698
+ },
699
+ {
700
+ name: 'version',
701
+ type: 'uint256',
702
+ },
703
+ {
704
+ name: 'lastModified',
705
+ type: 'uint256',
706
+ },
707
+ {
708
+ name: 'description',
709
+ type: 'string',
710
+ },
711
+ ],
712
+ name: '',
713
+ type: 'tuple',
714
+ },
715
+ ],
716
+ stateMutability: 'view',
717
+ type: 'function',
718
+ },
719
+ {
720
+ inputs: [
721
+ {
722
+ name: '_addyId',
723
+ type: 'uint256',
724
+ },
725
+ ],
726
+ name: 'getAddyDescription',
727
+ outputs: [
728
+ {
729
+ name: '',
730
+ type: 'string',
731
+ },
732
+ ],
733
+ stateMutability: 'view',
734
+ type: 'function',
735
+ },
736
+ {
737
+ inputs: [],
738
+ name: 'getNumAddys',
739
+ outputs: [
740
+ {
741
+ name: '',
742
+ type: 'uint256',
743
+ },
744
+ ],
745
+ stateMutability: 'view',
746
+ type: 'function',
747
+ },
748
+ {
749
+ inputs: [],
750
+ name: 'getLastAddyAddr',
751
+ outputs: [
752
+ {
753
+ name: '',
754
+ type: 'address',
755
+ },
756
+ ],
757
+ stateMutability: 'view',
758
+ type: 'function',
759
+ },
760
+ {
761
+ inputs: [],
762
+ name: 'getLastAddyId',
763
+ outputs: [
764
+ {
765
+ name: '',
766
+ type: 'uint256',
767
+ },
768
+ ],
769
+ stateMutability: 'view',
770
+ type: 'function',
771
+ },
772
+ {
773
+ inputs: [
774
+ {
775
+ name: 'arg0',
776
+ type: 'uint256',
777
+ },
778
+ ],
779
+ name: 'addyInfo',
780
+ outputs: [
781
+ {
782
+ components: [
783
+ {
784
+ name: 'addr',
785
+ type: 'address',
786
+ },
787
+ {
788
+ name: 'version',
789
+ type: 'uint256',
790
+ },
791
+ {
792
+ name: 'lastModified',
793
+ type: 'uint256',
794
+ },
795
+ {
796
+ name: 'description',
797
+ type: 'string',
798
+ },
799
+ ],
800
+ name: '',
801
+ type: 'tuple',
802
+ },
803
+ ],
804
+ stateMutability: 'view',
805
+ type: 'function',
806
+ },
807
+ {
808
+ inputs: [
809
+ {
810
+ name: 'arg0',
811
+ type: 'address',
812
+ },
813
+ ],
814
+ name: 'addyToId',
815
+ outputs: [
816
+ {
817
+ name: '',
818
+ type: 'uint256',
819
+ },
820
+ ],
821
+ stateMutability: 'view',
822
+ type: 'function',
823
+ },
824
+ {
825
+ inputs: [],
826
+ name: 'numAddys',
827
+ outputs: [
828
+ {
829
+ name: '',
830
+ type: 'uint256',
831
+ },
832
+ ],
833
+ stateMutability: 'view',
834
+ type: 'function',
835
+ },
836
+ {
837
+ inputs: [
838
+ {
839
+ name: 'arg0',
840
+ type: 'address',
841
+ },
842
+ ],
843
+ name: 'pendingNewAddy',
844
+ outputs: [
845
+ {
846
+ components: [
847
+ {
848
+ name: 'description',
849
+ type: 'string',
850
+ },
851
+ {
852
+ name: 'initiatedBlock',
853
+ type: 'uint256',
854
+ },
855
+ {
856
+ name: 'confirmBlock',
857
+ type: 'uint256',
858
+ },
859
+ ],
860
+ name: '',
861
+ type: 'tuple',
862
+ },
863
+ ],
864
+ stateMutability: 'view',
865
+ type: 'function',
866
+ },
867
+ {
868
+ inputs: [
869
+ {
870
+ name: 'arg0',
871
+ type: 'uint256',
872
+ },
873
+ ],
874
+ name: 'pendingAddyUpdate',
875
+ outputs: [
876
+ {
877
+ components: [
878
+ {
879
+ name: 'newAddr',
880
+ type: 'address',
881
+ },
882
+ {
883
+ name: 'initiatedBlock',
884
+ type: 'uint256',
885
+ },
886
+ {
887
+ name: 'confirmBlock',
888
+ type: 'uint256',
889
+ },
890
+ ],
891
+ name: '',
892
+ type: 'tuple',
893
+ },
894
+ ],
895
+ stateMutability: 'view',
896
+ type: 'function',
897
+ },
898
+ {
899
+ inputs: [
900
+ {
901
+ name: 'arg0',
902
+ type: 'uint256',
903
+ },
904
+ ],
905
+ name: 'pendingAddyDisable',
906
+ outputs: [
907
+ {
908
+ components: [
909
+ {
910
+ name: 'initiatedBlock',
911
+ type: 'uint256',
912
+ },
913
+ {
914
+ name: 'confirmBlock',
915
+ type: 'uint256',
916
+ },
917
+ ],
918
+ name: '',
919
+ type: 'tuple',
920
+ },
921
+ ],
922
+ stateMutability: 'view',
923
+ type: 'function',
924
+ },
925
+ {
926
+ inputs: [],
927
+ name: 'addyChangeDelay',
928
+ outputs: [
929
+ {
930
+ name: '',
931
+ type: 'uint256',
932
+ },
933
+ ],
934
+ stateMutability: 'view',
935
+ type: 'function',
936
+ },
937
+ {
938
+ inputs: [],
939
+ name: 'MIN_ADDY_CHANGE_DELAY',
940
+ outputs: [
941
+ {
942
+ name: '',
943
+ type: 'uint256',
944
+ },
945
+ ],
946
+ stateMutability: 'view',
947
+ type: 'function',
948
+ },
949
+ {
950
+ inputs: [],
951
+ name: 'MAX_ADDY_CHANGE_DELAY',
952
+ outputs: [
953
+ {
954
+ name: '',
955
+ type: 'uint256',
956
+ },
957
+ ],
958
+ stateMutability: 'view',
959
+ type: 'function',
960
+ },
961
+ {
962
+ inputs: [],
963
+ name: 'REGISTRY_STR',
964
+ outputs: [
965
+ {
966
+ name: '',
967
+ type: 'string',
968
+ },
969
+ ],
970
+ stateMutability: 'view',
971
+ type: 'function',
972
+ },
973
+ {
974
+ inputs: [
975
+ {
976
+ name: '_addr',
977
+ type: 'address',
978
+ },
979
+ {
980
+ name: '_description',
981
+ type: 'string',
982
+ },
983
+ ],
984
+ name: 'registerNewAddy',
985
+ outputs: [
986
+ {
987
+ name: '',
988
+ type: 'bool',
989
+ },
990
+ ],
991
+ stateMutability: 'nonpayable',
992
+ type: 'function',
993
+ },
994
+ {
995
+ inputs: [
996
+ {
997
+ name: '_addr',
998
+ type: 'address',
999
+ },
1000
+ ],
1001
+ name: 'confirmNewAddy',
1002
+ outputs: [
1003
+ {
1004
+ name: '',
1005
+ type: 'uint256',
1006
+ },
1007
+ ],
1008
+ stateMutability: 'nonpayable',
1009
+ type: 'function',
1010
+ },
1011
+ {
1012
+ inputs: [
1013
+ {
1014
+ name: '_addr',
1015
+ type: 'address',
1016
+ },
1017
+ ],
1018
+ name: 'cancelPendingNewAddy',
1019
+ outputs: [
1020
+ {
1021
+ name: '',
1022
+ type: 'bool',
1023
+ },
1024
+ ],
1025
+ stateMutability: 'nonpayable',
1026
+ type: 'function',
1027
+ },
1028
+ {
1029
+ inputs: [
1030
+ {
1031
+ name: '_addyId',
1032
+ type: 'uint256',
1033
+ },
1034
+ {
1035
+ name: '_newAddr',
1036
+ type: 'address',
1037
+ },
1038
+ ],
1039
+ name: 'updateAddyAddr',
1040
+ outputs: [
1041
+ {
1042
+ name: '',
1043
+ type: 'bool',
1044
+ },
1045
+ ],
1046
+ stateMutability: 'nonpayable',
1047
+ type: 'function',
1048
+ },
1049
+ {
1050
+ inputs: [
1051
+ {
1052
+ name: '_addyId',
1053
+ type: 'uint256',
1054
+ },
1055
+ ],
1056
+ name: 'confirmAddyUpdate',
1057
+ outputs: [
1058
+ {
1059
+ name: '',
1060
+ type: 'bool',
1061
+ },
1062
+ ],
1063
+ stateMutability: 'nonpayable',
1064
+ type: 'function',
1065
+ },
1066
+ {
1067
+ inputs: [
1068
+ {
1069
+ name: '_addyId',
1070
+ type: 'uint256',
1071
+ },
1072
+ ],
1073
+ name: 'cancelPendingAddyUpdate',
1074
+ outputs: [
1075
+ {
1076
+ name: '',
1077
+ type: 'bool',
1078
+ },
1079
+ ],
1080
+ stateMutability: 'nonpayable',
1081
+ type: 'function',
1082
+ },
1083
+ {
1084
+ inputs: [
1085
+ {
1086
+ name: '_addyId',
1087
+ type: 'uint256',
1088
+ },
1089
+ ],
1090
+ name: 'disableAddyAddr',
1091
+ outputs: [
1092
+ {
1093
+ name: '',
1094
+ type: 'bool',
1095
+ },
1096
+ ],
1097
+ stateMutability: 'nonpayable',
1098
+ type: 'function',
1099
+ },
1100
+ {
1101
+ inputs: [
1102
+ {
1103
+ name: '_addyId',
1104
+ type: 'uint256',
1105
+ },
1106
+ ],
1107
+ name: 'confirmAddyDisable',
1108
+ outputs: [
1109
+ {
1110
+ name: '',
1111
+ type: 'bool',
1112
+ },
1113
+ ],
1114
+ stateMutability: 'nonpayable',
1115
+ type: 'function',
1116
+ },
1117
+ {
1118
+ inputs: [
1119
+ {
1120
+ name: '_addyId',
1121
+ type: 'uint256',
1122
+ },
1123
+ ],
1124
+ name: 'cancelPendingAddyDisable',
1125
+ outputs: [
1126
+ {
1127
+ name: '',
1128
+ type: 'bool',
1129
+ },
1130
+ ],
1131
+ stateMutability: 'nonpayable',
1132
+ type: 'function',
1133
+ },
1134
+ {
1135
+ inputs: [
1136
+ {
1137
+ name: '_numBlocks',
1138
+ type: 'uint256',
1139
+ },
1140
+ ],
1141
+ name: 'setAddyChangeDelay',
1142
+ outputs: [
1143
+ {
1144
+ name: '',
1145
+ type: 'bool',
1146
+ },
1147
+ ],
1148
+ stateMutability: 'nonpayable',
1149
+ type: 'function',
1150
+ },
1151
+ {
1152
+ inputs: [
1153
+ {
1154
+ name: '_initialGov',
1155
+ type: 'address',
1156
+ },
1157
+ {
1158
+ name: '_minGovChangeDelay',
1159
+ type: 'uint256',
1160
+ },
1161
+ {
1162
+ name: '_maxGovChangeDelay',
1163
+ type: 'uint256',
1164
+ },
1165
+ {
1166
+ name: '_minRegistryChangeDelay',
1167
+ type: 'uint256',
1168
+ },
1169
+ {
1170
+ name: '_maxRegistryChangeDelay',
1171
+ type: 'uint256',
1172
+ },
1173
+ ],
1174
+ outputs: [],
1175
+ stateMutability: 'nonpayable',
1176
+ type: 'constructor',
1177
+ },
1178
+ ];
1179
+ export const deployAddress = '0xdCCaB9855D7eE558409EBdf358a3A44a8b2415B3';
1180
+ function getRequest(method, args, contractAddressOrOptions) {
1181
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1182
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1183
+ const call = {
1184
+ contractName: 'AddyRegistry_v2',
1185
+ method,
1186
+ args,
1187
+ address,
1188
+ deployAddress,
1189
+ defaultValue,
1190
+ getAbi: () => abi,
1191
+ with: (options) => {
1192
+ call.address = options.contractAddress;
1193
+ call.defaultValue = options.defaultValue;
1194
+ return call;
1195
+ },
1196
+ defaultTo: (defaultValue) => {
1197
+ call.defaultValue = defaultValue;
1198
+ return call;
1199
+ },
1200
+ at: (address) => {
1201
+ call.address = address;
1202
+ return call;
1203
+ },
1204
+ };
1205
+ return call;
1206
+ }
1207
+ export const call = {
1208
+ canGovern: (...args) => getRequest('canGovern', args),
1209
+ hasPendingGovChange: (...args) => getRequest('hasPendingGovChange', args),
1210
+ governance: (...args) => getRequest('governance', args),
1211
+ pendingGov: (...args) => getRequest('pendingGov', args),
1212
+ govChangeDelay: (...args) => getRequest('govChangeDelay', args),
1213
+ MIN_GOV_CHANGE_DELAY: (...args) => getRequest('MIN_GOV_CHANGE_DELAY', args),
1214
+ MAX_GOV_CHANGE_DELAY: (...args) => getRequest('MAX_GOV_CHANGE_DELAY', args),
1215
+ isValidNewAddy: (...args) => getRequest('isValidNewAddy', args),
1216
+ isValidAddyUpdate: (...args) => getRequest('isValidAddyUpdate', args),
1217
+ isValidAddyDisable: (...args) => getRequest('isValidAddyDisable', args),
1218
+ isValidAddyAddr: (...args) => getRequest('isValidAddyAddr', args),
1219
+ isValidAddyId: (...args) => getRequest('isValidAddyId', args),
1220
+ getAddyId: (...args) => getRequest('getAddyId', args),
1221
+ getAddy: (...args) => getRequest('getAddy', args),
1222
+ getAddyInfo: (...args) => getRequest('getAddyInfo', args),
1223
+ getAddyDescription: (...args) => getRequest('getAddyDescription', args),
1224
+ getNumAddys: (...args) => getRequest('getNumAddys', args),
1225
+ getLastAddyAddr: (...args) => getRequest('getLastAddyAddr', args),
1226
+ getLastAddyId: (...args) => getRequest('getLastAddyId', args),
1227
+ addyInfo: (...args) => getRequest('addyInfo', args),
1228
+ addyToId: (...args) => getRequest('addyToId', args),
1229
+ numAddys: (...args) => getRequest('numAddys', args),
1230
+ pendingNewAddy: (...args) => getRequest('pendingNewAddy', args),
1231
+ pendingAddyUpdate: (...args) => getRequest('pendingAddyUpdate', args),
1232
+ pendingAddyDisable: (...args) => getRequest('pendingAddyDisable', args),
1233
+ addyChangeDelay: (...args) => getRequest('addyChangeDelay', args),
1234
+ MIN_ADDY_CHANGE_DELAY: (...args) => getRequest('MIN_ADDY_CHANGE_DELAY', args),
1235
+ MAX_ADDY_CHANGE_DELAY: (...args) => getRequest('MAX_ADDY_CHANGE_DELAY', args),
1236
+ REGISTRY_STR: (...args) => getRequest('REGISTRY_STR', args),
1237
+ };
1238
+ function getMutation(functionName) {
1239
+ return {
1240
+ contractName: 'AddyRegistry_v2',
1241
+ functionName,
1242
+ deployAddress,
1243
+ argsType: undefined,
1244
+ getAbi: () => abi,
1245
+ };
1246
+ }
1247
+ export const mutation = {
1248
+ changeGovernance: getMutation('changeGovernance'),
1249
+ confirmGovernanceChange: getMutation('confirmGovernanceChange'),
1250
+ cancelGovernanceChange: getMutation('cancelGovernanceChange'),
1251
+ setGovernanceChangeDelay: getMutation('setGovernanceChangeDelay'),
1252
+ registerNewAddy: getMutation('registerNewAddy'),
1253
+ confirmNewAddy: getMutation('confirmNewAddy'),
1254
+ cancelPendingNewAddy: getMutation('cancelPendingNewAddy'),
1255
+ updateAddyAddr: getMutation('updateAddyAddr'),
1256
+ confirmAddyUpdate: getMutation('confirmAddyUpdate'),
1257
+ cancelPendingAddyUpdate: getMutation('cancelPendingAddyUpdate'),
1258
+ disableAddyAddr: getMutation('disableAddyAddr'),
1259
+ confirmAddyDisable: getMutation('confirmAddyDisable'),
1260
+ cancelPendingAddyDisable: getMutation('cancelPendingAddyDisable'),
1261
+ setAddyChangeDelay: getMutation('setAddyChangeDelay'),
1262
+ };
1263
+ export function toSdk(publicClient, walletClient) {
1264
+ return {
1265
+ // Queries
1266
+ canGovern: (...args) => singleQuery(publicClient, call.canGovern(...args)),
1267
+ hasPendingGovChange: (...args) => singleQuery(publicClient, call.hasPendingGovChange(...args)),
1268
+ governance: (...args) => singleQuery(publicClient, call.governance(...args)),
1269
+ pendingGov: (...args) => singleQuery(publicClient, call.pendingGov(...args)),
1270
+ govChangeDelay: (...args) => singleQuery(publicClient, call.govChangeDelay(...args)),
1271
+ MIN_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MIN_GOV_CHANGE_DELAY(...args)),
1272
+ MAX_GOV_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MAX_GOV_CHANGE_DELAY(...args)),
1273
+ isValidNewAddy: (...args) => singleQuery(publicClient, call.isValidNewAddy(...args)),
1274
+ isValidAddyUpdate: (...args) => singleQuery(publicClient, call.isValidAddyUpdate(...args)),
1275
+ isValidAddyDisable: (...args) => singleQuery(publicClient, call.isValidAddyDisable(...args)),
1276
+ isValidAddyAddr: (...args) => singleQuery(publicClient, call.isValidAddyAddr(...args)),
1277
+ isValidAddyId: (...args) => singleQuery(publicClient, call.isValidAddyId(...args)),
1278
+ getAddyId: (...args) => singleQuery(publicClient, call.getAddyId(...args)),
1279
+ getAddy: (...args) => singleQuery(publicClient, call.getAddy(...args)),
1280
+ getAddyInfo: (...args) => singleQuery(publicClient, call.getAddyInfo(...args)),
1281
+ getAddyDescription: (...args) => singleQuery(publicClient, call.getAddyDescription(...args)),
1282
+ getNumAddys: (...args) => singleQuery(publicClient, call.getNumAddys(...args)),
1283
+ getLastAddyAddr: (...args) => singleQuery(publicClient, call.getLastAddyAddr(...args)),
1284
+ getLastAddyId: (...args) => singleQuery(publicClient, call.getLastAddyId(...args)),
1285
+ addyInfo: (...args) => singleQuery(publicClient, call.addyInfo(...args)),
1286
+ addyToId: (...args) => singleQuery(publicClient, call.addyToId(...args)),
1287
+ numAddys: (...args) => singleQuery(publicClient, call.numAddys(...args)),
1288
+ pendingNewAddy: (...args) => singleQuery(publicClient, call.pendingNewAddy(...args)),
1289
+ pendingAddyUpdate: (...args) => singleQuery(publicClient, call.pendingAddyUpdate(...args)),
1290
+ pendingAddyDisable: (...args) => singleQuery(publicClient, call.pendingAddyDisable(...args)),
1291
+ addyChangeDelay: (...args) => singleQuery(publicClient, call.addyChangeDelay(...args)),
1292
+ MIN_ADDY_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MIN_ADDY_CHANGE_DELAY(...args)),
1293
+ MAX_ADDY_CHANGE_DELAY: (...args) => singleQuery(publicClient, call.MAX_ADDY_CHANGE_DELAY(...args)),
1294
+ REGISTRY_STR: (...args) => singleQuery(publicClient, call.REGISTRY_STR(...args)),
1295
+ // Mutations
1296
+ changeGovernance: (...args) => mutate(walletClient, mutation.changeGovernance)(...args),
1297
+ confirmGovernanceChange: (...args) => mutate(walletClient, mutation.confirmGovernanceChange)(...args),
1298
+ cancelGovernanceChange: (...args) => mutate(walletClient, mutation.cancelGovernanceChange)(...args),
1299
+ setGovernanceChangeDelay: (...args) => mutate(walletClient, mutation.setGovernanceChangeDelay)(...args),
1300
+ registerNewAddy: (...args) => mutate(walletClient, mutation.registerNewAddy)(...args),
1301
+ confirmNewAddy: (...args) => mutate(walletClient, mutation.confirmNewAddy)(...args),
1302
+ cancelPendingNewAddy: (...args) => mutate(walletClient, mutation.cancelPendingNewAddy)(...args),
1303
+ updateAddyAddr: (...args) => mutate(walletClient, mutation.updateAddyAddr)(...args),
1304
+ confirmAddyUpdate: (...args) => mutate(walletClient, mutation.confirmAddyUpdate)(...args),
1305
+ cancelPendingAddyUpdate: (...args) => mutate(walletClient, mutation.cancelPendingAddyUpdate)(...args),
1306
+ disableAddyAddr: (...args) => mutate(walletClient, mutation.disableAddyAddr)(...args),
1307
+ confirmAddyDisable: (...args) => mutate(walletClient, mutation.confirmAddyDisable)(...args),
1308
+ cancelPendingAddyDisable: (...args) => mutate(walletClient, mutation.cancelPendingAddyDisable)(...args),
1309
+ setAddyChangeDelay: (...args) => mutate(walletClient, mutation.setAddyChangeDelay)(...args),
1310
+ };
1311
+ }