@underscore-finance/sdk 0.0.1

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