@underscore-finance/sdk 1.2.20-next.0 → 1.2.20-next.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 (93) hide show
  1. package/AGENTS.md +28 -18
  2. package/abis.json +23476 -12295
  3. package/dist/contracts/Addys.d.ts +124 -0
  4. package/dist/contracts/Addys.d.ts.map +1 -0
  5. package/dist/contracts/Addys.js +134 -0
  6. package/dist/contracts/AgentSenderGeneric.d.ts +795 -153
  7. package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -1
  8. package/dist/contracts/AgentSenderGeneric.js +892 -97
  9. package/dist/contracts/AgentSenderSpecial.d.ts +127 -0
  10. package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -1
  11. package/dist/contracts/AgentSenderSpecial.js +139 -0
  12. package/dist/contracts/AgentSenderSpecialAdmin.d.ts +984 -0
  13. package/dist/contracts/AgentSenderSpecialAdmin.d.ts.map +1 -0
  14. package/dist/contracts/AgentSenderSpecialAdmin.js +1185 -0
  15. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts +1010 -75
  16. package/dist/contracts/AgentSenderSpecialSigHelper.d.ts.map +1 -1
  17. package/dist/contracts/AgentSenderSpecialSigHelper.js +1240 -0
  18. package/dist/contracts/AgentWrapper.d.ts +164 -6
  19. package/dist/contracts/AgentWrapper.d.ts.map +1 -1
  20. package/dist/contracts/AgentWrapper.js +219 -6
  21. package/dist/contracts/ChequeBook.d.ts +360 -204
  22. package/dist/contracts/ChequeBook.d.ts.map +1 -1
  23. package/dist/contracts/ChequeBook.js +507 -298
  24. package/dist/contracts/DefaultsLocal.d.ts +320 -0
  25. package/dist/contracts/DefaultsLocal.d.ts.map +1 -0
  26. package/dist/contracts/DefaultsLocal.js +350 -0
  27. package/dist/contracts/ERC20.d.ts +552 -27
  28. package/dist/contracts/ERC20.d.ts.map +1 -1
  29. package/dist/contracts/ERC20.js +713 -66
  30. package/dist/contracts/EarnVault.d.ts +284 -255
  31. package/dist/contracts/EarnVault.d.ts.map +1 -1
  32. package/dist/contracts/EarnVault.js +488 -456
  33. package/dist/contracts/EarnVaultAgent.d.ts +127 -0
  34. package/dist/contracts/EarnVaultAgent.d.ts.map +1 -1
  35. package/dist/contracts/EarnVaultAgent.js +139 -0
  36. package/dist/contracts/EarnVaultWallet.d.ts +777 -0
  37. package/dist/contracts/EarnVaultWallet.d.ts.map +1 -0
  38. package/dist/contracts/EarnVaultWallet.js +987 -0
  39. package/dist/contracts/Erc20Token.d.ts +813 -0
  40. package/dist/contracts/Erc20Token.d.ts.map +1 -0
  41. package/dist/contracts/Erc20Token.js +1006 -0
  42. package/dist/contracts/HighCommand.d.ts +40 -0
  43. package/dist/contracts/HighCommand.d.ts.map +1 -1
  44. package/dist/contracts/HighCommand.js +45 -0
  45. package/dist/contracts/Kernel.d.ts +4 -0
  46. package/dist/contracts/Kernel.d.ts.map +1 -1
  47. package/dist/contracts/Kernel.js +4 -0
  48. package/dist/contracts/Ledger.d.ts +4 -75
  49. package/dist/contracts/Ledger.d.ts.map +1 -1
  50. package/dist/contracts/Ledger.js +4 -99
  51. package/dist/contracts/LevgVault.d.ts +299 -299
  52. package/dist/contracts/LevgVault.d.ts.map +1 -1
  53. package/dist/contracts/LevgVault.js +530 -530
  54. package/dist/contracts/LevgVaultAgent.d.ts +127 -69
  55. package/dist/contracts/LevgVaultAgent.d.ts.map +1 -1
  56. package/dist/contracts/LevgVaultAgent.js +134 -79
  57. package/dist/contracts/LevgVaultWallet.d.ts +1119 -0
  58. package/dist/contracts/LevgVaultWallet.d.ts.map +1 -0
  59. package/dist/contracts/LevgVaultWallet.js +1439 -0
  60. package/dist/contracts/LocalGov.d.ts +427 -0
  61. package/dist/contracts/LocalGov.d.ts.map +1 -0
  62. package/dist/contracts/LocalGov.js +507 -0
  63. package/dist/contracts/Migrator.d.ts +160 -0
  64. package/dist/contracts/Migrator.d.ts.map +1 -1
  65. package/dist/contracts/Migrator.js +187 -0
  66. package/dist/contracts/Ownership.d.ts +414 -0
  67. package/dist/contracts/Ownership.d.ts.map +1 -0
  68. package/dist/contracts/Ownership.js +472 -0
  69. package/dist/contracts/Paymaster.d.ts +119 -322
  70. package/dist/contracts/Paymaster.d.ts.map +1 -1
  71. package/dist/contracts/Paymaster.js +118 -404
  72. package/dist/contracts/Sentinel.d.ts +9 -6
  73. package/dist/contracts/Sentinel.d.ts.map +1 -1
  74. package/dist/contracts/Sentinel.js +8 -4
  75. package/dist/contracts/UndyToken.d.ts +821 -0
  76. package/dist/contracts/UndyToken.d.ts.map +1 -0
  77. package/dist/contracts/UndyToken.js +1017 -0
  78. package/dist/contracts/UserWalletConfig.d.ts +334 -317
  79. package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
  80. package/dist/contracts/UserWalletConfig.js +391 -371
  81. package/dist/contracts/UserWalletSignatureHelper.d.ts +1520 -514
  82. package/dist/contracts/UserWalletSignatureHelper.d.ts.map +1 -1
  83. package/dist/contracts/UserWalletSignatureHelper.js +1906 -549
  84. package/dist/contracts/VaultErc20Token.d.ts +522 -0
  85. package/dist/contracts/VaultErc20Token.d.ts.map +1 -0
  86. package/dist/contracts/VaultErc20Token.js +658 -0
  87. package/dist/contracts/index.d.ts +10 -0
  88. package/dist/contracts/index.d.ts.map +1 -1
  89. package/dist/contracts/index.js +10 -0
  90. package/dist/contracts/sdk.d.ts +20 -0
  91. package/dist/contracts/sdk.d.ts.map +1 -1
  92. package/dist/contracts/sdk.js +20 -0
  93. package/package.json +1 -1
@@ -0,0 +1,1006 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ import { encodeEventTopics, parseEventLogs } from 'viem';
7
+ export const abi = [
8
+ {
9
+ "name": "Transfer",
10
+ "inputs": [
11
+ {
12
+ "name": "sender",
13
+ "type": "address",
14
+ "indexed": true
15
+ },
16
+ {
17
+ "name": "recipient",
18
+ "type": "address",
19
+ "indexed": true
20
+ },
21
+ {
22
+ "name": "amount",
23
+ "type": "uint256",
24
+ "indexed": false
25
+ }
26
+ ],
27
+ "anonymous": false,
28
+ "type": "event"
29
+ },
30
+ {
31
+ "name": "Approval",
32
+ "inputs": [
33
+ {
34
+ "name": "owner",
35
+ "type": "address",
36
+ "indexed": true
37
+ },
38
+ {
39
+ "name": "spender",
40
+ "type": "address",
41
+ "indexed": true
42
+ },
43
+ {
44
+ "name": "amount",
45
+ "type": "uint256",
46
+ "indexed": false
47
+ }
48
+ ],
49
+ "anonymous": false,
50
+ "type": "event"
51
+ },
52
+ {
53
+ "name": "BlacklistModified",
54
+ "inputs": [
55
+ {
56
+ "name": "addr",
57
+ "type": "address",
58
+ "indexed": true
59
+ },
60
+ {
61
+ "name": "isBlacklisted",
62
+ "type": "bool",
63
+ "indexed": false
64
+ }
65
+ ],
66
+ "anonymous": false,
67
+ "type": "event"
68
+ },
69
+ {
70
+ "name": "HqChangeInitiated",
71
+ "inputs": [
72
+ {
73
+ "name": "prevHq",
74
+ "type": "address",
75
+ "indexed": true
76
+ },
77
+ {
78
+ "name": "newHq",
79
+ "type": "address",
80
+ "indexed": true
81
+ },
82
+ {
83
+ "name": "confirmBlock",
84
+ "type": "uint256",
85
+ "indexed": false
86
+ }
87
+ ],
88
+ "anonymous": false,
89
+ "type": "event"
90
+ },
91
+ {
92
+ "name": "HqChangeConfirmed",
93
+ "inputs": [
94
+ {
95
+ "name": "prevHq",
96
+ "type": "address",
97
+ "indexed": true
98
+ },
99
+ {
100
+ "name": "newHq",
101
+ "type": "address",
102
+ "indexed": true
103
+ },
104
+ {
105
+ "name": "initiatedBlock",
106
+ "type": "uint256",
107
+ "indexed": false
108
+ },
109
+ {
110
+ "name": "confirmBlock",
111
+ "type": "uint256",
112
+ "indexed": false
113
+ }
114
+ ],
115
+ "anonymous": false,
116
+ "type": "event"
117
+ },
118
+ {
119
+ "name": "HqChangeCancelled",
120
+ "inputs": [
121
+ {
122
+ "name": "cancelledHq",
123
+ "type": "address",
124
+ "indexed": true
125
+ },
126
+ {
127
+ "name": "initiatedBlock",
128
+ "type": "uint256",
129
+ "indexed": false
130
+ },
131
+ {
132
+ "name": "confirmBlock",
133
+ "type": "uint256",
134
+ "indexed": false
135
+ }
136
+ ],
137
+ "anonymous": false,
138
+ "type": "event"
139
+ },
140
+ {
141
+ "name": "TokenPauseModified",
142
+ "inputs": [
143
+ {
144
+ "name": "isPaused",
145
+ "type": "bool",
146
+ "indexed": false
147
+ }
148
+ ],
149
+ "anonymous": false,
150
+ "type": "event"
151
+ },
152
+ {
153
+ "name": "InitialUndyHqSet",
154
+ "inputs": [
155
+ {
156
+ "name": "hq",
157
+ "type": "address",
158
+ "indexed": true
159
+ },
160
+ {
161
+ "name": "timeLock",
162
+ "type": "uint256",
163
+ "indexed": false
164
+ }
165
+ ],
166
+ "anonymous": false,
167
+ "type": "event"
168
+ },
169
+ {
170
+ "name": "HqChangeTimeLockModified",
171
+ "inputs": [
172
+ {
173
+ "name": "prevTimeLock",
174
+ "type": "uint256",
175
+ "indexed": false
176
+ },
177
+ {
178
+ "name": "newTimeLock",
179
+ "type": "uint256",
180
+ "indexed": false
181
+ }
182
+ ],
183
+ "anonymous": false,
184
+ "type": "event"
185
+ },
186
+ {
187
+ "stateMutability": "view",
188
+ "type": "function",
189
+ "name": "name",
190
+ "inputs": [],
191
+ "outputs": [
192
+ {
193
+ "name": "",
194
+ "type": "string"
195
+ }
196
+ ]
197
+ },
198
+ {
199
+ "stateMutability": "view",
200
+ "type": "function",
201
+ "name": "symbol",
202
+ "inputs": [],
203
+ "outputs": [
204
+ {
205
+ "name": "",
206
+ "type": "string"
207
+ }
208
+ ]
209
+ },
210
+ {
211
+ "stateMutability": "view",
212
+ "type": "function",
213
+ "name": "decimals",
214
+ "inputs": [],
215
+ "outputs": [
216
+ {
217
+ "name": "",
218
+ "type": "uint8"
219
+ }
220
+ ]
221
+ },
222
+ {
223
+ "stateMutability": "nonpayable",
224
+ "type": "function",
225
+ "name": "transfer",
226
+ "inputs": [
227
+ {
228
+ "name": "_recipient",
229
+ "type": "address"
230
+ },
231
+ {
232
+ "name": "_amount",
233
+ "type": "uint256"
234
+ }
235
+ ],
236
+ "outputs": [
237
+ {
238
+ "name": "",
239
+ "type": "bool"
240
+ }
241
+ ]
242
+ },
243
+ {
244
+ "stateMutability": "nonpayable",
245
+ "type": "function",
246
+ "name": "transferFrom",
247
+ "inputs": [
248
+ {
249
+ "name": "_sender",
250
+ "type": "address"
251
+ },
252
+ {
253
+ "name": "_recipient",
254
+ "type": "address"
255
+ },
256
+ {
257
+ "name": "_amount",
258
+ "type": "uint256"
259
+ }
260
+ ],
261
+ "outputs": [
262
+ {
263
+ "name": "",
264
+ "type": "bool"
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ "stateMutability": "nonpayable",
270
+ "type": "function",
271
+ "name": "approve",
272
+ "inputs": [
273
+ {
274
+ "name": "_spender",
275
+ "type": "address"
276
+ },
277
+ {
278
+ "name": "_amount",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "outputs": [
283
+ {
284
+ "name": "",
285
+ "type": "bool"
286
+ }
287
+ ]
288
+ },
289
+ {
290
+ "stateMutability": "nonpayable",
291
+ "type": "function",
292
+ "name": "increaseAllowance",
293
+ "inputs": [
294
+ {
295
+ "name": "_spender",
296
+ "type": "address"
297
+ },
298
+ {
299
+ "name": "_amount",
300
+ "type": "uint256"
301
+ }
302
+ ],
303
+ "outputs": [
304
+ {
305
+ "name": "",
306
+ "type": "bool"
307
+ }
308
+ ]
309
+ },
310
+ {
311
+ "stateMutability": "nonpayable",
312
+ "type": "function",
313
+ "name": "decreaseAllowance",
314
+ "inputs": [
315
+ {
316
+ "name": "_spender",
317
+ "type": "address"
318
+ },
319
+ {
320
+ "name": "_amount",
321
+ "type": "uint256"
322
+ }
323
+ ],
324
+ "outputs": [
325
+ {
326
+ "name": "",
327
+ "type": "bool"
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "stateMutability": "nonpayable",
333
+ "type": "function",
334
+ "name": "burn",
335
+ "inputs": [
336
+ {
337
+ "name": "_amount",
338
+ "type": "uint256"
339
+ }
340
+ ],
341
+ "outputs": [
342
+ {
343
+ "name": "",
344
+ "type": "bool"
345
+ }
346
+ ]
347
+ },
348
+ {
349
+ "stateMutability": "view",
350
+ "type": "function",
351
+ "name": "DOMAIN_SEPARATOR",
352
+ "inputs": [],
353
+ "outputs": [
354
+ {
355
+ "name": "",
356
+ "type": "bytes32"
357
+ }
358
+ ]
359
+ },
360
+ {
361
+ "stateMutability": "nonpayable",
362
+ "type": "function",
363
+ "name": "permit",
364
+ "inputs": [
365
+ {
366
+ "name": "_owner",
367
+ "type": "address"
368
+ },
369
+ {
370
+ "name": "_spender",
371
+ "type": "address"
372
+ },
373
+ {
374
+ "name": "_value",
375
+ "type": "uint256"
376
+ },
377
+ {
378
+ "name": "_deadline",
379
+ "type": "uint256"
380
+ },
381
+ {
382
+ "name": "_signature",
383
+ "type": "bytes"
384
+ }
385
+ ],
386
+ "outputs": [
387
+ {
388
+ "name": "",
389
+ "type": "bool"
390
+ }
391
+ ]
392
+ },
393
+ {
394
+ "stateMutability": "nonpayable",
395
+ "type": "function",
396
+ "name": "setBlacklist",
397
+ "inputs": [
398
+ {
399
+ "name": "_addr",
400
+ "type": "address"
401
+ },
402
+ {
403
+ "name": "_shouldBlacklist",
404
+ "type": "bool"
405
+ }
406
+ ],
407
+ "outputs": [
408
+ {
409
+ "name": "",
410
+ "type": "bool"
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "stateMutability": "nonpayable",
416
+ "type": "function",
417
+ "name": "burnBlacklistTokens",
418
+ "inputs": [
419
+ {
420
+ "name": "_addr",
421
+ "type": "address"
422
+ }
423
+ ],
424
+ "outputs": [
425
+ {
426
+ "name": "",
427
+ "type": "bool"
428
+ }
429
+ ]
430
+ },
431
+ {
432
+ "stateMutability": "nonpayable",
433
+ "type": "function",
434
+ "name": "burnBlacklistTokens",
435
+ "inputs": [
436
+ {
437
+ "name": "_addr",
438
+ "type": "address"
439
+ },
440
+ {
441
+ "name": "_amount",
442
+ "type": "uint256"
443
+ }
444
+ ],
445
+ "outputs": [
446
+ {
447
+ "name": "",
448
+ "type": "bool"
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ "stateMutability": "view",
454
+ "type": "function",
455
+ "name": "hasPendingHqChange",
456
+ "inputs": [],
457
+ "outputs": [
458
+ {
459
+ "name": "",
460
+ "type": "bool"
461
+ }
462
+ ]
463
+ },
464
+ {
465
+ "stateMutability": "nonpayable",
466
+ "type": "function",
467
+ "name": "initiateHqChange",
468
+ "inputs": [
469
+ {
470
+ "name": "_newHq",
471
+ "type": "address"
472
+ }
473
+ ],
474
+ "outputs": []
475
+ },
476
+ {
477
+ "stateMutability": "nonpayable",
478
+ "type": "function",
479
+ "name": "confirmHqChange",
480
+ "inputs": [],
481
+ "outputs": [
482
+ {
483
+ "name": "",
484
+ "type": "bool"
485
+ }
486
+ ]
487
+ },
488
+ {
489
+ "stateMutability": "nonpayable",
490
+ "type": "function",
491
+ "name": "cancelHqChange",
492
+ "inputs": [],
493
+ "outputs": []
494
+ },
495
+ {
496
+ "stateMutability": "view",
497
+ "type": "function",
498
+ "name": "isValidNewUndyHq",
499
+ "inputs": [
500
+ {
501
+ "name": "_newHq",
502
+ "type": "address"
503
+ }
504
+ ],
505
+ "outputs": [
506
+ {
507
+ "name": "",
508
+ "type": "bool"
509
+ }
510
+ ]
511
+ },
512
+ {
513
+ "stateMutability": "nonpayable",
514
+ "type": "function",
515
+ "name": "setHqChangeTimeLock",
516
+ "inputs": [
517
+ {
518
+ "name": "_newTimeLock",
519
+ "type": "uint256"
520
+ }
521
+ ],
522
+ "outputs": [
523
+ {
524
+ "name": "",
525
+ "type": "bool"
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "stateMutability": "view",
531
+ "type": "function",
532
+ "name": "isValidHqChangeTimeLock",
533
+ "inputs": [
534
+ {
535
+ "name": "_newTimeLock",
536
+ "type": "uint256"
537
+ }
538
+ ],
539
+ "outputs": [
540
+ {
541
+ "name": "",
542
+ "type": "bool"
543
+ }
544
+ ]
545
+ },
546
+ {
547
+ "stateMutability": "view",
548
+ "type": "function",
549
+ "name": "minHqTimeLock",
550
+ "inputs": [],
551
+ "outputs": [
552
+ {
553
+ "name": "",
554
+ "type": "uint256"
555
+ }
556
+ ]
557
+ },
558
+ {
559
+ "stateMutability": "view",
560
+ "type": "function",
561
+ "name": "maxHqTimeLock",
562
+ "inputs": [],
563
+ "outputs": [
564
+ {
565
+ "name": "",
566
+ "type": "uint256"
567
+ }
568
+ ]
569
+ },
570
+ {
571
+ "stateMutability": "nonpayable",
572
+ "type": "function",
573
+ "name": "pause",
574
+ "inputs": [
575
+ {
576
+ "name": "_shouldPause",
577
+ "type": "bool"
578
+ }
579
+ ],
580
+ "outputs": []
581
+ },
582
+ {
583
+ "stateMutability": "nonpayable",
584
+ "type": "function",
585
+ "name": "finishTokenSetup",
586
+ "inputs": [
587
+ {
588
+ "name": "_newHq",
589
+ "type": "address"
590
+ }
591
+ ],
592
+ "outputs": [
593
+ {
594
+ "name": "",
595
+ "type": "bool"
596
+ }
597
+ ]
598
+ },
599
+ {
600
+ "stateMutability": "nonpayable",
601
+ "type": "function",
602
+ "name": "finishTokenSetup",
603
+ "inputs": [
604
+ {
605
+ "name": "_newHq",
606
+ "type": "address"
607
+ },
608
+ {
609
+ "name": "_timeLock",
610
+ "type": "uint256"
611
+ }
612
+ ],
613
+ "outputs": [
614
+ {
615
+ "name": "",
616
+ "type": "bool"
617
+ }
618
+ ]
619
+ },
620
+ {
621
+ "stateMutability": "view",
622
+ "type": "function",
623
+ "name": "undyHq",
624
+ "inputs": [],
625
+ "outputs": [
626
+ {
627
+ "name": "",
628
+ "type": "address"
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "stateMutability": "view",
634
+ "type": "function",
635
+ "name": "blacklisted",
636
+ "inputs": [
637
+ {
638
+ "name": "arg0",
639
+ "type": "address"
640
+ }
641
+ ],
642
+ "outputs": [
643
+ {
644
+ "name": "",
645
+ "type": "bool"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "stateMutability": "view",
651
+ "type": "function",
652
+ "name": "isPaused",
653
+ "inputs": [],
654
+ "outputs": [
655
+ {
656
+ "name": "",
657
+ "type": "bool"
658
+ }
659
+ ]
660
+ },
661
+ {
662
+ "stateMutability": "view",
663
+ "type": "function",
664
+ "name": "pendingHq",
665
+ "inputs": [],
666
+ "outputs": [
667
+ {
668
+ "name": "",
669
+ "type": "tuple",
670
+ "components": [
671
+ {
672
+ "name": "newHq",
673
+ "type": "address"
674
+ },
675
+ {
676
+ "name": "initiatedBlock",
677
+ "type": "uint256"
678
+ },
679
+ {
680
+ "name": "confirmBlock",
681
+ "type": "uint256"
682
+ }
683
+ ]
684
+ }
685
+ ]
686
+ },
687
+ {
688
+ "stateMutability": "view",
689
+ "type": "function",
690
+ "name": "hqChangeTimeLock",
691
+ "inputs": [],
692
+ "outputs": [
693
+ {
694
+ "name": "",
695
+ "type": "uint256"
696
+ }
697
+ ]
698
+ },
699
+ {
700
+ "stateMutability": "view",
701
+ "type": "function",
702
+ "name": "balanceOf",
703
+ "inputs": [
704
+ {
705
+ "name": "arg0",
706
+ "type": "address"
707
+ }
708
+ ],
709
+ "outputs": [
710
+ {
711
+ "name": "",
712
+ "type": "uint256"
713
+ }
714
+ ]
715
+ },
716
+ {
717
+ "stateMutability": "view",
718
+ "type": "function",
719
+ "name": "allowance",
720
+ "inputs": [
721
+ {
722
+ "name": "arg0",
723
+ "type": "address"
724
+ },
725
+ {
726
+ "name": "arg1",
727
+ "type": "address"
728
+ }
729
+ ],
730
+ "outputs": [
731
+ {
732
+ "name": "",
733
+ "type": "uint256"
734
+ }
735
+ ]
736
+ },
737
+ {
738
+ "stateMutability": "view",
739
+ "type": "function",
740
+ "name": "totalSupply",
741
+ "inputs": [],
742
+ "outputs": [
743
+ {
744
+ "name": "",
745
+ "type": "uint256"
746
+ }
747
+ ]
748
+ },
749
+ {
750
+ "stateMutability": "view",
751
+ "type": "function",
752
+ "name": "TOKEN_NAME",
753
+ "inputs": [],
754
+ "outputs": [
755
+ {
756
+ "name": "",
757
+ "type": "string"
758
+ }
759
+ ]
760
+ },
761
+ {
762
+ "stateMutability": "view",
763
+ "type": "function",
764
+ "name": "TOKEN_SYMBOL",
765
+ "inputs": [],
766
+ "outputs": [
767
+ {
768
+ "name": "",
769
+ "type": "string"
770
+ }
771
+ ]
772
+ },
773
+ {
774
+ "stateMutability": "view",
775
+ "type": "function",
776
+ "name": "TOKEN_DECIMALS",
777
+ "inputs": [],
778
+ "outputs": [
779
+ {
780
+ "name": "",
781
+ "type": "uint8"
782
+ }
783
+ ]
784
+ },
785
+ {
786
+ "stateMutability": "view",
787
+ "type": "function",
788
+ "name": "VERSION",
789
+ "inputs": [],
790
+ "outputs": [
791
+ {
792
+ "name": "",
793
+ "type": "string"
794
+ }
795
+ ]
796
+ },
797
+ {
798
+ "stateMutability": "view",
799
+ "type": "function",
800
+ "name": "nonces",
801
+ "inputs": [
802
+ {
803
+ "name": "arg0",
804
+ "type": "address"
805
+ }
806
+ ],
807
+ "outputs": [
808
+ {
809
+ "name": "",
810
+ "type": "uint256"
811
+ }
812
+ ]
813
+ },
814
+ {
815
+ "stateMutability": "nonpayable",
816
+ "type": "constructor",
817
+ "inputs": [
818
+ {
819
+ "name": "_tokenName",
820
+ "type": "string"
821
+ },
822
+ {
823
+ "name": "_tokenSymbol",
824
+ "type": "string"
825
+ },
826
+ {
827
+ "name": "_tokenDecimals",
828
+ "type": "uint8"
829
+ },
830
+ {
831
+ "name": "_undyHq",
832
+ "type": "address"
833
+ },
834
+ {
835
+ "name": "_initialGov",
836
+ "type": "address"
837
+ },
838
+ {
839
+ "name": "_minHqTimeLock",
840
+ "type": "uint256"
841
+ },
842
+ {
843
+ "name": "_maxHqTimeLock",
844
+ "type": "uint256"
845
+ },
846
+ {
847
+ "name": "_initialSupply",
848
+ "type": "uint256"
849
+ },
850
+ {
851
+ "name": "_initialSupplyRecipient",
852
+ "type": "address"
853
+ }
854
+ ],
855
+ "outputs": []
856
+ }
857
+ ];
858
+ export const deployAddress = undefined;
859
+ function getRequest(method, args, contractAddressOrOptions) {
860
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
861
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
862
+ const call = {
863
+ contractName: 'Erc20Token',
864
+ method,
865
+ args,
866
+ address,
867
+ deployAddress,
868
+ defaultValue,
869
+ getAbi: () => abi,
870
+ with: (options) => {
871
+ call.address = options.contractAddress;
872
+ call.defaultValue = options.defaultValue;
873
+ return call;
874
+ },
875
+ defaultTo: (defaultValue) => {
876
+ call.defaultValue = defaultValue;
877
+ return call;
878
+ },
879
+ at: (address) => {
880
+ call.address = address;
881
+ return call;
882
+ },
883
+ };
884
+ return call;
885
+ }
886
+ export const call = {
887
+ name: (...args) => getRequest('name', args),
888
+ symbol: (...args) => getRequest('symbol', args),
889
+ decimals: (...args) => getRequest('decimals', args),
890
+ DOMAIN_SEPARATOR: (...args) => getRequest('DOMAIN_SEPARATOR', args),
891
+ hasPendingHqChange: (...args) => getRequest('hasPendingHqChange', args),
892
+ isValidNewUndyHq: (...args) => getRequest('isValidNewUndyHq', args),
893
+ isValidHqChangeTimeLock: (...args) => getRequest('isValidHqChangeTimeLock', args),
894
+ minHqTimeLock: (...args) => getRequest('minHqTimeLock', args),
895
+ maxHqTimeLock: (...args) => getRequest('maxHqTimeLock', args),
896
+ undyHq: (...args) => getRequest('undyHq', args),
897
+ blacklisted: (...args) => getRequest('blacklisted', args),
898
+ isPaused: (...args) => getRequest('isPaused', args),
899
+ pendingHq: (...args) => getRequest('pendingHq', args),
900
+ hqChangeTimeLock: (...args) => getRequest('hqChangeTimeLock', args),
901
+ balanceOf: (...args) => getRequest('balanceOf', args),
902
+ allowance: (...args) => getRequest('allowance', args),
903
+ totalSupply: (...args) => getRequest('totalSupply', args),
904
+ TOKEN_NAME: (...args) => getRequest('TOKEN_NAME', args),
905
+ TOKEN_SYMBOL: (...args) => getRequest('TOKEN_SYMBOL', args),
906
+ TOKEN_DECIMALS: (...args) => getRequest('TOKEN_DECIMALS', args),
907
+ VERSION: (...args) => getRequest('VERSION', args),
908
+ nonces: (...args) => getRequest('nonces', args),
909
+ };
910
+ function getMutation(functionName) {
911
+ return {
912
+ contractName: 'Erc20Token',
913
+ functionName,
914
+ deployAddress,
915
+ argsType: undefined,
916
+ getAbi: () => abi,
917
+ };
918
+ }
919
+ export const mutation = {
920
+ transfer: getMutation('transfer'),
921
+ transferFrom: getMutation('transferFrom'),
922
+ approve: getMutation('approve'),
923
+ increaseAllowance: getMutation('increaseAllowance'),
924
+ decreaseAllowance: getMutation('decreaseAllowance'),
925
+ burn: getMutation('burn'),
926
+ permit: getMutation('permit'),
927
+ setBlacklist: getMutation('setBlacklist'),
928
+ burnBlacklistTokens: getMutation('burnBlacklistTokens'),
929
+ initiateHqChange: getMutation('initiateHqChange'),
930
+ confirmHqChange: getMutation('confirmHqChange'),
931
+ cancelHqChange: getMutation('cancelHqChange'),
932
+ setHqChangeTimeLock: getMutation('setHqChangeTimeLock'),
933
+ pause: getMutation('pause'),
934
+ finishTokenSetup: getMutation('finishTokenSetup'),
935
+ };
936
+ export function parseEvents(eventName, events) {
937
+ return events.map((event) => {
938
+ return {
939
+ event,
940
+ parsed: parseEventLogs({
941
+ abi,
942
+ eventName,
943
+ logs: [event],
944
+ }),
945
+ };
946
+ });
947
+ }
948
+ export function getEventTopic(eventName) {
949
+ return encodeEventTopics({ abi, eventName })[0];
950
+ }
951
+ export function toSdk(deployAddress, publicClient, walletClient, addressResolver) {
952
+ return {
953
+ deployAddress,
954
+ abi,
955
+ events: {
956
+ Transfer: { topic: getEventTopic('Transfer'), parse: (events) => parseEvents('Transfer', events) },
957
+ Approval: { topic: getEventTopic('Approval'), parse: (events) => parseEvents('Approval', events) },
958
+ BlacklistModified: { topic: getEventTopic('BlacklistModified'), parse: (events) => parseEvents('BlacklistModified', events) },
959
+ HqChangeInitiated: { topic: getEventTopic('HqChangeInitiated'), parse: (events) => parseEvents('HqChangeInitiated', events) },
960
+ HqChangeConfirmed: { topic: getEventTopic('HqChangeConfirmed'), parse: (events) => parseEvents('HqChangeConfirmed', events) },
961
+ HqChangeCancelled: { topic: getEventTopic('HqChangeCancelled'), parse: (events) => parseEvents('HqChangeCancelled', events) },
962
+ TokenPauseModified: { topic: getEventTopic('TokenPauseModified'), parse: (events) => parseEvents('TokenPauseModified', events) },
963
+ InitialUndyHqSet: { topic: getEventTopic('InitialUndyHqSet'), parse: (events) => parseEvents('InitialUndyHqSet', events) },
964
+ HqChangeTimeLockModified: { topic: getEventTopic('HqChangeTimeLockModified'), parse: (events) => parseEvents('HqChangeTimeLockModified', events) },
965
+ },
966
+ // Queries
967
+ name: (...args) => singleQuery(publicClient, call.name(...args).at(deployAddress), {}, addressResolver),
968
+ symbol: (...args) => singleQuery(publicClient, call.symbol(...args).at(deployAddress), {}, addressResolver),
969
+ decimals: (...args) => singleQuery(publicClient, call.decimals(...args).at(deployAddress), {}, addressResolver),
970
+ DOMAIN_SEPARATOR: (...args) => singleQuery(publicClient, call.DOMAIN_SEPARATOR(...args).at(deployAddress), {}, addressResolver),
971
+ hasPendingHqChange: (...args) => singleQuery(publicClient, call.hasPendingHqChange(...args).at(deployAddress), {}, addressResolver),
972
+ isValidNewUndyHq: (...args) => singleQuery(publicClient, call.isValidNewUndyHq(...args).at(deployAddress), {}, addressResolver),
973
+ isValidHqChangeTimeLock: (...args) => singleQuery(publicClient, call.isValidHqChangeTimeLock(...args).at(deployAddress), {}, addressResolver),
974
+ minHqTimeLock: (...args) => singleQuery(publicClient, call.minHqTimeLock(...args).at(deployAddress), {}, addressResolver),
975
+ maxHqTimeLock: (...args) => singleQuery(publicClient, call.maxHqTimeLock(...args).at(deployAddress), {}, addressResolver),
976
+ undyHq: (...args) => singleQuery(publicClient, call.undyHq(...args).at(deployAddress), {}, addressResolver),
977
+ blacklisted: (...args) => singleQuery(publicClient, call.blacklisted(...args).at(deployAddress), {}, addressResolver),
978
+ isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args).at(deployAddress), {}, addressResolver),
979
+ pendingHq: (...args) => singleQuery(publicClient, call.pendingHq(...args).at(deployAddress), {}, addressResolver),
980
+ hqChangeTimeLock: (...args) => singleQuery(publicClient, call.hqChangeTimeLock(...args).at(deployAddress), {}, addressResolver),
981
+ balanceOf: (...args) => singleQuery(publicClient, call.balanceOf(...args).at(deployAddress), {}, addressResolver),
982
+ allowance: (...args) => singleQuery(publicClient, call.allowance(...args).at(deployAddress), {}, addressResolver),
983
+ totalSupply: (...args) => singleQuery(publicClient, call.totalSupply(...args).at(deployAddress), {}, addressResolver),
984
+ TOKEN_NAME: (...args) => singleQuery(publicClient, call.TOKEN_NAME(...args).at(deployAddress), {}, addressResolver),
985
+ TOKEN_SYMBOL: (...args) => singleQuery(publicClient, call.TOKEN_SYMBOL(...args).at(deployAddress), {}, addressResolver),
986
+ TOKEN_DECIMALS: (...args) => singleQuery(publicClient, call.TOKEN_DECIMALS(...args).at(deployAddress), {}, addressResolver),
987
+ VERSION: (...args) => singleQuery(publicClient, call.VERSION(...args).at(deployAddress), {}, addressResolver),
988
+ nonces: (...args) => singleQuery(publicClient, call.nonces(...args).at(deployAddress), {}, addressResolver),
989
+ // Mutations
990
+ transfer: (...args) => mutate(walletClient, mutation.transfer, { address: deployAddress, addressResolver })(...args),
991
+ transferFrom: (...args) => mutate(walletClient, mutation.transferFrom, { address: deployAddress, addressResolver })(...args),
992
+ approve: (...args) => mutate(walletClient, mutation.approve, { address: deployAddress, addressResolver })(...args),
993
+ increaseAllowance: (...args) => mutate(walletClient, mutation.increaseAllowance, { address: deployAddress, addressResolver })(...args),
994
+ decreaseAllowance: (...args) => mutate(walletClient, mutation.decreaseAllowance, { address: deployAddress, addressResolver })(...args),
995
+ burn: (...args) => mutate(walletClient, mutation.burn, { address: deployAddress, addressResolver })(...args),
996
+ permit: (...args) => mutate(walletClient, mutation.permit, { address: deployAddress, addressResolver })(...args),
997
+ setBlacklist: (...args) => mutate(walletClient, mutation.setBlacklist, { address: deployAddress, addressResolver })(...args),
998
+ burnBlacklistTokens: (...args) => mutate(walletClient, mutation.burnBlacklistTokens, { address: deployAddress, addressResolver })(...args),
999
+ initiateHqChange: (...args) => mutate(walletClient, mutation.initiateHqChange, { address: deployAddress, addressResolver })(...args),
1000
+ confirmHqChange: (...args) => mutate(walletClient, mutation.confirmHqChange, { address: deployAddress, addressResolver })(...args),
1001
+ cancelHqChange: (...args) => mutate(walletClient, mutation.cancelHqChange, { address: deployAddress, addressResolver })(...args),
1002
+ setHqChangeTimeLock: (...args) => mutate(walletClient, mutation.setHqChangeTimeLock, { address: deployAddress, addressResolver })(...args),
1003
+ pause: (...args) => mutate(walletClient, mutation.pause, { address: deployAddress, addressResolver })(...args),
1004
+ finishTokenSetup: (...args) => mutate(walletClient, mutation.finishTokenSetup, { address: deployAddress, addressResolver })(...args),
1005
+ };
1006
+ }