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