@ripe-finance/sdk 1.14.2 → 1.15.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 (44) hide show
  1. package/dist/contracts/AuctionHouse.js +1 -1
  2. package/dist/contracts/BondRoom.js +1 -1
  3. package/dist/contracts/CreditEngine.d.ts +32 -0
  4. package/dist/contracts/CreditEngine.d.ts.map +1 -1
  5. package/dist/contracts/CreditEngine.js +41 -1
  6. package/dist/contracts/Deleverage.js +1 -1
  7. package/dist/contracts/Endaoment.d.ts +230 -1138
  8. package/dist/contracts/Endaoment.d.ts.map +1 -1
  9. package/dist/contracts/Endaoment.js +216 -1445
  10. package/dist/contracts/EndaomentFunds.d.ts +241 -0
  11. package/dist/contracts/EndaomentFunds.d.ts.map +1 -0
  12. package/dist/contracts/EndaomentFunds.js +278 -0
  13. package/dist/contracts/EndaomentPSM.d.ts +1229 -0
  14. package/dist/contracts/EndaomentPSM.d.ts.map +1 -0
  15. package/dist/contracts/EndaomentPSM.js +1538 -0
  16. package/dist/contracts/Lootbox.d.ts +184 -0
  17. package/dist/contracts/Lootbox.d.ts.map +1 -1
  18. package/dist/contracts/Lootbox.js +232 -1
  19. package/dist/contracts/PriceDesk.js +1 -1
  20. package/dist/contracts/PythPrices.d.ts +60 -8
  21. package/dist/contracts/PythPrices.d.ts.map +1 -1
  22. package/dist/contracts/PythPrices.js +77 -9
  23. package/dist/contracts/StorkPrices.d.ts +8 -8
  24. package/dist/contracts/StorkPrices.d.ts.map +1 -1
  25. package/dist/contracts/StorkPrices.js +9 -9
  26. package/dist/contracts/SwitchboardAlpha.d.ts +112 -0
  27. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -1
  28. package/dist/contracts/SwitchboardAlpha.js +145 -1
  29. package/dist/contracts/SwitchboardCharlie.d.ts +133 -1760
  30. package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -1
  31. package/dist/contracts/SwitchboardCharlie.js +129 -2217
  32. package/dist/contracts/SwitchboardEcho.d.ts +3296 -0
  33. package/dist/contracts/SwitchboardEcho.d.ts.map +1 -0
  34. package/dist/contracts/SwitchboardEcho.js +4184 -0
  35. package/dist/contracts/index.d.ts +3 -0
  36. package/dist/contracts/index.d.ts.map +1 -1
  37. package/dist/contracts/index.js +3 -0
  38. package/dist/contracts/sdk.d.ts +6 -0
  39. package/dist/contracts/sdk.d.ts.map +1 -1
  40. package/dist/contracts/sdk.js +6 -0
  41. package/dist/index.d.ts +89 -37
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +14 -0
  44. package/package.json +2 -2
@@ -0,0 +1,1538 @@
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
+ name: 'MintGreen',
9
+ inputs: [
10
+ {
11
+ name: 'user',
12
+ type: 'address',
13
+ indexed: true,
14
+ },
15
+ {
16
+ name: 'sender',
17
+ type: 'address',
18
+ indexed: true,
19
+ },
20
+ {
21
+ name: 'usdcIn',
22
+ type: 'uint256',
23
+ indexed: false,
24
+ },
25
+ {
26
+ name: 'greenOut',
27
+ type: 'uint256',
28
+ indexed: false,
29
+ },
30
+ {
31
+ name: 'usdcFee',
32
+ type: 'uint256',
33
+ indexed: false,
34
+ },
35
+ {
36
+ name: 'receivedSavingsGreen',
37
+ type: 'bool',
38
+ indexed: false,
39
+ },
40
+ ],
41
+ anonymous: false,
42
+ type: 'event',
43
+ },
44
+ {
45
+ name: 'RedeemGreen',
46
+ inputs: [
47
+ {
48
+ name: 'user',
49
+ type: 'address',
50
+ indexed: true,
51
+ },
52
+ {
53
+ name: 'sender',
54
+ type: 'address',
55
+ indexed: true,
56
+ },
57
+ {
58
+ name: 'greenIn',
59
+ type: 'uint256',
60
+ indexed: false,
61
+ },
62
+ {
63
+ name: 'usdcOut',
64
+ type: 'uint256',
65
+ indexed: false,
66
+ },
67
+ {
68
+ name: 'usdcFee',
69
+ type: 'uint256',
70
+ indexed: false,
71
+ },
72
+ {
73
+ name: 'paidWithSavingsGreen',
74
+ type: 'bool',
75
+ indexed: false,
76
+ },
77
+ ],
78
+ anonymous: false,
79
+ type: 'event',
80
+ },
81
+ {
82
+ name: 'EndaomentPSMYieldDeposit',
83
+ inputs: [
84
+ {
85
+ name: 'amount',
86
+ type: 'uint256',
87
+ indexed: false,
88
+ },
89
+ {
90
+ name: 'vaultToken',
91
+ type: 'address',
92
+ indexed: true,
93
+ },
94
+ {
95
+ name: 'vaultTokenReceived',
96
+ type: 'uint256',
97
+ indexed: false,
98
+ },
99
+ {
100
+ name: 'usdValue',
101
+ type: 'uint256',
102
+ indexed: false,
103
+ },
104
+ ],
105
+ anonymous: false,
106
+ type: 'event',
107
+ },
108
+ {
109
+ name: 'EndaomentPSMYieldWithdrawal',
110
+ inputs: [
111
+ {
112
+ name: 'vaultToken',
113
+ type: 'address',
114
+ indexed: true,
115
+ },
116
+ {
117
+ name: 'vaultTokenBurned',
118
+ type: 'uint256',
119
+ indexed: false,
120
+ },
121
+ {
122
+ name: 'usdcReceived',
123
+ type: 'uint256',
124
+ indexed: false,
125
+ },
126
+ {
127
+ name: 'usdValue',
128
+ type: 'uint256',
129
+ indexed: false,
130
+ },
131
+ ],
132
+ anonymous: false,
133
+ type: 'event',
134
+ },
135
+ {
136
+ name: 'CanMintUpdated',
137
+ inputs: [
138
+ {
139
+ name: 'canMint',
140
+ type: 'bool',
141
+ indexed: false,
142
+ },
143
+ ],
144
+ anonymous: false,
145
+ type: 'event',
146
+ },
147
+ {
148
+ name: 'CanRedeemUpdated',
149
+ inputs: [
150
+ {
151
+ name: 'canRedeem',
152
+ type: 'bool',
153
+ indexed: false,
154
+ },
155
+ ],
156
+ anonymous: false,
157
+ type: 'event',
158
+ },
159
+ {
160
+ name: 'MintFeeUpdated',
161
+ inputs: [
162
+ {
163
+ name: 'fee',
164
+ type: 'uint256',
165
+ indexed: false,
166
+ },
167
+ ],
168
+ anonymous: false,
169
+ type: 'event',
170
+ },
171
+ {
172
+ name: 'RedeemFeeUpdated',
173
+ inputs: [
174
+ {
175
+ name: 'fee',
176
+ type: 'uint256',
177
+ indexed: false,
178
+ },
179
+ ],
180
+ anonymous: false,
181
+ type: 'event',
182
+ },
183
+ {
184
+ name: 'MaxIntervalMintUpdated',
185
+ inputs: [
186
+ {
187
+ name: 'maxAmount',
188
+ type: 'uint256',
189
+ indexed: false,
190
+ },
191
+ ],
192
+ anonymous: false,
193
+ type: 'event',
194
+ },
195
+ {
196
+ name: 'MaxIntervalRedeemUpdated',
197
+ inputs: [
198
+ {
199
+ name: 'maxAmount',
200
+ type: 'uint256',
201
+ indexed: false,
202
+ },
203
+ ],
204
+ anonymous: false,
205
+ type: 'event',
206
+ },
207
+ {
208
+ name: 'NumBlocksPerIntervalUpdated',
209
+ inputs: [
210
+ {
211
+ name: 'blocks',
212
+ type: 'uint256',
213
+ indexed: false,
214
+ },
215
+ ],
216
+ anonymous: false,
217
+ type: 'event',
218
+ },
219
+ {
220
+ name: 'ShouldEnforceMintAllowlistUpdated',
221
+ inputs: [
222
+ {
223
+ name: 'shouldEnforce',
224
+ type: 'bool',
225
+ indexed: false,
226
+ },
227
+ ],
228
+ anonymous: false,
229
+ type: 'event',
230
+ },
231
+ {
232
+ name: 'ShouldEnforceRedeemAllowlistUpdated',
233
+ inputs: [
234
+ {
235
+ name: 'shouldEnforce',
236
+ type: 'bool',
237
+ indexed: false,
238
+ },
239
+ ],
240
+ anonymous: false,
241
+ type: 'event',
242
+ },
243
+ {
244
+ name: 'MintAllowlistUpdated',
245
+ inputs: [
246
+ {
247
+ name: 'user',
248
+ type: 'address',
249
+ indexed: true,
250
+ },
251
+ {
252
+ name: 'isAllowed',
253
+ type: 'bool',
254
+ indexed: false,
255
+ },
256
+ ],
257
+ anonymous: false,
258
+ type: 'event',
259
+ },
260
+ {
261
+ name: 'RedeemAllowlistUpdated',
262
+ inputs: [
263
+ {
264
+ name: 'user',
265
+ type: 'address',
266
+ indexed: true,
267
+ },
268
+ {
269
+ name: 'isAllowed',
270
+ type: 'bool',
271
+ indexed: false,
272
+ },
273
+ ],
274
+ anonymous: false,
275
+ type: 'event',
276
+ },
277
+ {
278
+ name: 'UsdcYieldPositionUpdated',
279
+ inputs: [
280
+ {
281
+ name: 'legoId',
282
+ type: 'uint256',
283
+ indexed: false,
284
+ },
285
+ {
286
+ name: 'vaultToken',
287
+ type: 'address',
288
+ indexed: true,
289
+ },
290
+ ],
291
+ anonymous: false,
292
+ type: 'event',
293
+ },
294
+ {
295
+ name: 'ShouldAutoDepositUpdated',
296
+ inputs: [
297
+ {
298
+ name: 'shouldAutoDeposit',
299
+ type: 'bool',
300
+ indexed: false,
301
+ },
302
+ ],
303
+ anonymous: false,
304
+ type: 'event',
305
+ },
306
+ {
307
+ name: 'DepartmentPauseModified',
308
+ inputs: [
309
+ {
310
+ name: 'isPaused',
311
+ type: 'bool',
312
+ indexed: false,
313
+ },
314
+ ],
315
+ anonymous: false,
316
+ type: 'event',
317
+ },
318
+ {
319
+ name: 'DepartmentFundsRecovered',
320
+ inputs: [
321
+ {
322
+ name: 'asset',
323
+ type: 'address',
324
+ indexed: true,
325
+ },
326
+ {
327
+ name: 'recipient',
328
+ type: 'address',
329
+ indexed: true,
330
+ },
331
+ {
332
+ name: 'balance',
333
+ type: 'uint256',
334
+ indexed: false,
335
+ },
336
+ ],
337
+ anonymous: false,
338
+ type: 'event',
339
+ },
340
+ {
341
+ stateMutability: 'view',
342
+ type: 'function',
343
+ name: 'getAddys',
344
+ inputs: [],
345
+ outputs: [
346
+ {
347
+ name: '',
348
+ type: 'tuple',
349
+ components: [
350
+ {
351
+ name: 'hq',
352
+ type: 'address',
353
+ },
354
+ {
355
+ name: 'greenToken',
356
+ type: 'address',
357
+ },
358
+ {
359
+ name: 'savingsGreen',
360
+ type: 'address',
361
+ },
362
+ {
363
+ name: 'ripeToken',
364
+ type: 'address',
365
+ },
366
+ {
367
+ name: 'ledger',
368
+ type: 'address',
369
+ },
370
+ {
371
+ name: 'missionControl',
372
+ type: 'address',
373
+ },
374
+ {
375
+ name: 'switchboard',
376
+ type: 'address',
377
+ },
378
+ {
379
+ name: 'priceDesk',
380
+ type: 'address',
381
+ },
382
+ {
383
+ name: 'vaultBook',
384
+ type: 'address',
385
+ },
386
+ {
387
+ name: 'auctionHouse',
388
+ type: 'address',
389
+ },
390
+ {
391
+ name: 'auctionHouseNft',
392
+ type: 'address',
393
+ },
394
+ {
395
+ name: 'boardroom',
396
+ type: 'address',
397
+ },
398
+ {
399
+ name: 'bondRoom',
400
+ type: 'address',
401
+ },
402
+ {
403
+ name: 'creditEngine',
404
+ type: 'address',
405
+ },
406
+ {
407
+ name: 'endaoment',
408
+ type: 'address',
409
+ },
410
+ {
411
+ name: 'humanResources',
412
+ type: 'address',
413
+ },
414
+ {
415
+ name: 'lootbox',
416
+ type: 'address',
417
+ },
418
+ {
419
+ name: 'teller',
420
+ type: 'address',
421
+ },
422
+ ],
423
+ },
424
+ ],
425
+ },
426
+ {
427
+ stateMutability: 'view',
428
+ type: 'function',
429
+ name: 'getRipeHq',
430
+ inputs: [],
431
+ outputs: [
432
+ {
433
+ name: '',
434
+ type: 'address',
435
+ },
436
+ ],
437
+ },
438
+ {
439
+ stateMutability: 'view',
440
+ type: 'function',
441
+ name: 'canMintGreen',
442
+ inputs: [],
443
+ outputs: [
444
+ {
445
+ name: '',
446
+ type: 'bool',
447
+ },
448
+ ],
449
+ },
450
+ {
451
+ stateMutability: 'view',
452
+ type: 'function',
453
+ name: 'canMintRipe',
454
+ inputs: [],
455
+ outputs: [
456
+ {
457
+ name: '',
458
+ type: 'bool',
459
+ },
460
+ ],
461
+ },
462
+ {
463
+ stateMutability: 'nonpayable',
464
+ type: 'function',
465
+ name: 'pause',
466
+ inputs: [
467
+ {
468
+ name: '_shouldPause',
469
+ type: 'bool',
470
+ },
471
+ ],
472
+ outputs: [],
473
+ },
474
+ {
475
+ stateMutability: 'nonpayable',
476
+ type: 'function',
477
+ name: 'recoverFunds',
478
+ inputs: [
479
+ {
480
+ name: '_recipient',
481
+ type: 'address',
482
+ },
483
+ {
484
+ name: '_asset',
485
+ type: 'address',
486
+ },
487
+ ],
488
+ outputs: [],
489
+ },
490
+ {
491
+ stateMutability: 'nonpayable',
492
+ type: 'function',
493
+ name: 'recoverFundsMany',
494
+ inputs: [
495
+ {
496
+ name: '_recipient',
497
+ type: 'address',
498
+ },
499
+ {
500
+ name: '_assets',
501
+ type: 'address[]',
502
+ },
503
+ ],
504
+ outputs: [],
505
+ },
506
+ {
507
+ stateMutability: 'view',
508
+ type: 'function',
509
+ name: 'isPaused',
510
+ inputs: [],
511
+ outputs: [
512
+ {
513
+ name: '',
514
+ type: 'bool',
515
+ },
516
+ ],
517
+ },
518
+ {
519
+ stateMutability: 'nonpayable',
520
+ type: 'function',
521
+ name: 'mintGreen',
522
+ inputs: [],
523
+ outputs: [
524
+ {
525
+ name: '',
526
+ type: 'uint256',
527
+ },
528
+ ],
529
+ },
530
+ {
531
+ stateMutability: 'nonpayable',
532
+ type: 'function',
533
+ name: 'mintGreen',
534
+ inputs: [
535
+ {
536
+ name: '_usdcAmount',
537
+ type: 'uint256',
538
+ },
539
+ ],
540
+ outputs: [
541
+ {
542
+ name: '',
543
+ type: 'uint256',
544
+ },
545
+ ],
546
+ },
547
+ {
548
+ stateMutability: 'nonpayable',
549
+ type: 'function',
550
+ name: 'mintGreen',
551
+ inputs: [
552
+ {
553
+ name: '_usdcAmount',
554
+ type: 'uint256',
555
+ },
556
+ {
557
+ name: '_recipient',
558
+ type: 'address',
559
+ },
560
+ ],
561
+ outputs: [
562
+ {
563
+ name: '',
564
+ type: 'uint256',
565
+ },
566
+ ],
567
+ },
568
+ {
569
+ stateMutability: 'nonpayable',
570
+ type: 'function',
571
+ name: 'mintGreen',
572
+ inputs: [
573
+ {
574
+ name: '_usdcAmount',
575
+ type: 'uint256',
576
+ },
577
+ {
578
+ name: '_recipient',
579
+ type: 'address',
580
+ },
581
+ {
582
+ name: '_wantsSavingsGreen',
583
+ type: 'bool',
584
+ },
585
+ ],
586
+ outputs: [
587
+ {
588
+ name: '',
589
+ type: 'uint256',
590
+ },
591
+ ],
592
+ },
593
+ {
594
+ stateMutability: 'view',
595
+ type: 'function',
596
+ name: 'getMaxUsdcAmountForMint',
597
+ inputs: [],
598
+ outputs: [
599
+ {
600
+ name: '',
601
+ type: 'uint256',
602
+ },
603
+ ],
604
+ },
605
+ {
606
+ stateMutability: 'view',
607
+ type: 'function',
608
+ name: 'getMaxUsdcAmountForMint',
609
+ inputs: [
610
+ {
611
+ name: '_user',
612
+ type: 'address',
613
+ },
614
+ ],
615
+ outputs: [
616
+ {
617
+ name: '',
618
+ type: 'uint256',
619
+ },
620
+ ],
621
+ },
622
+ {
623
+ stateMutability: 'view',
624
+ type: 'function',
625
+ name: 'getMaxUsdcAmountForMint',
626
+ inputs: [
627
+ {
628
+ name: '_user',
629
+ type: 'address',
630
+ },
631
+ {
632
+ name: '_isUnderscoreAddr',
633
+ type: 'bool',
634
+ },
635
+ ],
636
+ outputs: [
637
+ {
638
+ name: '',
639
+ type: 'uint256',
640
+ },
641
+ ],
642
+ },
643
+ {
644
+ stateMutability: 'view',
645
+ type: 'function',
646
+ name: 'getAvailIntervalMint',
647
+ inputs: [],
648
+ outputs: [
649
+ {
650
+ name: '',
651
+ type: 'uint256',
652
+ },
653
+ ],
654
+ },
655
+ {
656
+ stateMutability: 'nonpayable',
657
+ type: 'function',
658
+ name: 'redeemGreen',
659
+ inputs: [],
660
+ outputs: [
661
+ {
662
+ name: '',
663
+ type: 'uint256',
664
+ },
665
+ ],
666
+ },
667
+ {
668
+ stateMutability: 'nonpayable',
669
+ type: 'function',
670
+ name: 'redeemGreen',
671
+ inputs: [
672
+ {
673
+ name: '_paymentAmount',
674
+ type: 'uint256',
675
+ },
676
+ ],
677
+ outputs: [
678
+ {
679
+ name: '',
680
+ type: 'uint256',
681
+ },
682
+ ],
683
+ },
684
+ {
685
+ stateMutability: 'nonpayable',
686
+ type: 'function',
687
+ name: 'redeemGreen',
688
+ inputs: [
689
+ {
690
+ name: '_paymentAmount',
691
+ type: 'uint256',
692
+ },
693
+ {
694
+ name: '_recipient',
695
+ type: 'address',
696
+ },
697
+ ],
698
+ outputs: [
699
+ {
700
+ name: '',
701
+ type: 'uint256',
702
+ },
703
+ ],
704
+ },
705
+ {
706
+ stateMutability: 'nonpayable',
707
+ type: 'function',
708
+ name: 'redeemGreen',
709
+ inputs: [
710
+ {
711
+ name: '_paymentAmount',
712
+ type: 'uint256',
713
+ },
714
+ {
715
+ name: '_recipient',
716
+ type: 'address',
717
+ },
718
+ {
719
+ name: '_isPaymentSavingsGreen',
720
+ type: 'bool',
721
+ },
722
+ ],
723
+ outputs: [
724
+ {
725
+ name: '',
726
+ type: 'uint256',
727
+ },
728
+ ],
729
+ },
730
+ {
731
+ stateMutability: 'view',
732
+ type: 'function',
733
+ name: 'getMaxRedeemableGreenAmount',
734
+ inputs: [],
735
+ outputs: [
736
+ {
737
+ name: '',
738
+ type: 'uint256',
739
+ },
740
+ ],
741
+ },
742
+ {
743
+ stateMutability: 'view',
744
+ type: 'function',
745
+ name: 'getMaxRedeemableGreenAmount',
746
+ inputs: [
747
+ {
748
+ name: '_user',
749
+ type: 'address',
750
+ },
751
+ ],
752
+ outputs: [
753
+ {
754
+ name: '',
755
+ type: 'uint256',
756
+ },
757
+ ],
758
+ },
759
+ {
760
+ stateMutability: 'view',
761
+ type: 'function',
762
+ name: 'getMaxRedeemableGreenAmount',
763
+ inputs: [
764
+ {
765
+ name: '_user',
766
+ type: 'address',
767
+ },
768
+ {
769
+ name: '_isUnderscoreAddr',
770
+ type: 'bool',
771
+ },
772
+ ],
773
+ outputs: [
774
+ {
775
+ name: '',
776
+ type: 'uint256',
777
+ },
778
+ ],
779
+ },
780
+ {
781
+ stateMutability: 'view',
782
+ type: 'function',
783
+ name: 'getAvailIntervalRedemptions',
784
+ inputs: [],
785
+ outputs: [
786
+ {
787
+ name: '',
788
+ type: 'uint256',
789
+ },
790
+ ],
791
+ },
792
+ {
793
+ stateMutability: 'view',
794
+ type: 'function',
795
+ name: 'getUsdcYieldPositionVaultToken',
796
+ inputs: [],
797
+ outputs: [
798
+ {
799
+ name: '',
800
+ type: 'address',
801
+ },
802
+ ],
803
+ },
804
+ {
805
+ stateMutability: 'nonpayable',
806
+ type: 'function',
807
+ name: 'depositToYield',
808
+ inputs: [],
809
+ outputs: [
810
+ {
811
+ name: '',
812
+ type: 'uint256',
813
+ },
814
+ ],
815
+ },
816
+ {
817
+ stateMutability: 'nonpayable',
818
+ type: 'function',
819
+ name: 'withdrawFromYield',
820
+ inputs: [],
821
+ outputs: [
822
+ {
823
+ name: '',
824
+ type: 'uint256',
825
+ },
826
+ {
827
+ name: '',
828
+ type: 'uint256',
829
+ },
830
+ ],
831
+ },
832
+ {
833
+ stateMutability: 'nonpayable',
834
+ type: 'function',
835
+ name: 'withdrawFromYield',
836
+ inputs: [
837
+ {
838
+ name: '_amount',
839
+ type: 'uint256',
840
+ },
841
+ ],
842
+ outputs: [
843
+ {
844
+ name: '',
845
+ type: 'uint256',
846
+ },
847
+ {
848
+ name: '',
849
+ type: 'uint256',
850
+ },
851
+ ],
852
+ },
853
+ {
854
+ stateMutability: 'nonpayable',
855
+ type: 'function',
856
+ name: 'withdrawFromYield',
857
+ inputs: [
858
+ {
859
+ name: '_amount',
860
+ type: 'uint256',
861
+ },
862
+ {
863
+ name: '_shouldTransferToEndaoFunds',
864
+ type: 'bool',
865
+ },
866
+ ],
867
+ outputs: [
868
+ {
869
+ name: '',
870
+ type: 'uint256',
871
+ },
872
+ {
873
+ name: '',
874
+ type: 'uint256',
875
+ },
876
+ ],
877
+ },
878
+ {
879
+ stateMutability: 'nonpayable',
880
+ type: 'function',
881
+ name: 'withdrawFromYield',
882
+ inputs: [
883
+ {
884
+ name: '_amount',
885
+ type: 'uint256',
886
+ },
887
+ {
888
+ name: '_shouldTransferToEndaoFunds',
889
+ type: 'bool',
890
+ },
891
+ {
892
+ name: '_shouldFullSweep',
893
+ type: 'bool',
894
+ },
895
+ ],
896
+ outputs: [
897
+ {
898
+ name: '',
899
+ type: 'uint256',
900
+ },
901
+ {
902
+ name: '',
903
+ type: 'uint256',
904
+ },
905
+ ],
906
+ },
907
+ {
908
+ stateMutability: 'view',
909
+ type: 'function',
910
+ name: 'getUnderlyingYieldAmount',
911
+ inputs: [],
912
+ outputs: [
913
+ {
914
+ name: '',
915
+ type: 'uint256',
916
+ },
917
+ ],
918
+ },
919
+ {
920
+ stateMutability: 'nonpayable',
921
+ type: 'function',
922
+ name: 'transferUsdcToEndaomentFunds',
923
+ inputs: [
924
+ {
925
+ name: '_amount',
926
+ type: 'uint256',
927
+ },
928
+ ],
929
+ outputs: [
930
+ {
931
+ name: '',
932
+ type: 'uint256',
933
+ },
934
+ ],
935
+ },
936
+ {
937
+ stateMutability: 'view',
938
+ type: 'function',
939
+ name: 'getAvailableUsdc',
940
+ inputs: [],
941
+ outputs: [
942
+ {
943
+ name: '',
944
+ type: 'uint256',
945
+ },
946
+ ],
947
+ },
948
+ {
949
+ stateMutability: 'nonpayable',
950
+ type: 'function',
951
+ name: 'setCanMint',
952
+ inputs: [
953
+ {
954
+ name: '_canMint',
955
+ type: 'bool',
956
+ },
957
+ ],
958
+ outputs: [],
959
+ },
960
+ {
961
+ stateMutability: 'nonpayable',
962
+ type: 'function',
963
+ name: 'setMintFee',
964
+ inputs: [
965
+ {
966
+ name: '_fee',
967
+ type: 'uint256',
968
+ },
969
+ ],
970
+ outputs: [],
971
+ },
972
+ {
973
+ stateMutability: 'nonpayable',
974
+ type: 'function',
975
+ name: 'setMaxIntervalMint',
976
+ inputs: [
977
+ {
978
+ name: '_maxGreenAmount',
979
+ type: 'uint256',
980
+ },
981
+ ],
982
+ outputs: [],
983
+ },
984
+ {
985
+ stateMutability: 'nonpayable',
986
+ type: 'function',
987
+ name: 'setShouldEnforceMintAllowlist',
988
+ inputs: [
989
+ {
990
+ name: '_shouldEnforce',
991
+ type: 'bool',
992
+ },
993
+ ],
994
+ outputs: [],
995
+ },
996
+ {
997
+ stateMutability: 'nonpayable',
998
+ type: 'function',
999
+ name: 'updateMintAllowlist',
1000
+ inputs: [
1001
+ {
1002
+ name: '_user',
1003
+ type: 'address',
1004
+ },
1005
+ {
1006
+ name: '_isAllowed',
1007
+ type: 'bool',
1008
+ },
1009
+ ],
1010
+ outputs: [],
1011
+ },
1012
+ {
1013
+ stateMutability: 'nonpayable',
1014
+ type: 'function',
1015
+ name: 'setCanRedeem',
1016
+ inputs: [
1017
+ {
1018
+ name: '_canRedeem',
1019
+ type: 'bool',
1020
+ },
1021
+ ],
1022
+ outputs: [],
1023
+ },
1024
+ {
1025
+ stateMutability: 'nonpayable',
1026
+ type: 'function',
1027
+ name: 'setRedeemFee',
1028
+ inputs: [
1029
+ {
1030
+ name: '_fee',
1031
+ type: 'uint256',
1032
+ },
1033
+ ],
1034
+ outputs: [],
1035
+ },
1036
+ {
1037
+ stateMutability: 'nonpayable',
1038
+ type: 'function',
1039
+ name: 'setMaxIntervalRedeem',
1040
+ inputs: [
1041
+ {
1042
+ name: '_maxGreenAmount',
1043
+ type: 'uint256',
1044
+ },
1045
+ ],
1046
+ outputs: [],
1047
+ },
1048
+ {
1049
+ stateMutability: 'nonpayable',
1050
+ type: 'function',
1051
+ name: 'setShouldEnforceRedeemAllowlist',
1052
+ inputs: [
1053
+ {
1054
+ name: '_shouldEnforce',
1055
+ type: 'bool',
1056
+ },
1057
+ ],
1058
+ outputs: [],
1059
+ },
1060
+ {
1061
+ stateMutability: 'nonpayable',
1062
+ type: 'function',
1063
+ name: 'updateRedeemAllowlist',
1064
+ inputs: [
1065
+ {
1066
+ name: '_user',
1067
+ type: 'address',
1068
+ },
1069
+ {
1070
+ name: '_isAllowed',
1071
+ type: 'bool',
1072
+ },
1073
+ ],
1074
+ outputs: [],
1075
+ },
1076
+ {
1077
+ stateMutability: 'nonpayable',
1078
+ type: 'function',
1079
+ name: 'setUsdcYieldPosition',
1080
+ inputs: [
1081
+ {
1082
+ name: '_legoId',
1083
+ type: 'uint256',
1084
+ },
1085
+ {
1086
+ name: '_vaultToken',
1087
+ type: 'address',
1088
+ },
1089
+ ],
1090
+ outputs: [],
1091
+ },
1092
+ {
1093
+ stateMutability: 'nonpayable',
1094
+ type: 'function',
1095
+ name: 'setNumBlocksPerInterval',
1096
+ inputs: [
1097
+ {
1098
+ name: '_blocks',
1099
+ type: 'uint256',
1100
+ },
1101
+ ],
1102
+ outputs: [],
1103
+ },
1104
+ {
1105
+ stateMutability: 'nonpayable',
1106
+ type: 'function',
1107
+ name: 'setShouldAutoDeposit',
1108
+ inputs: [
1109
+ {
1110
+ name: '_shouldAutoDeposit',
1111
+ type: 'bool',
1112
+ },
1113
+ ],
1114
+ outputs: [],
1115
+ },
1116
+ {
1117
+ stateMutability: 'view',
1118
+ type: 'function',
1119
+ name: 'numBlocksPerInterval',
1120
+ inputs: [],
1121
+ outputs: [
1122
+ {
1123
+ name: '',
1124
+ type: 'uint256',
1125
+ },
1126
+ ],
1127
+ },
1128
+ {
1129
+ stateMutability: 'view',
1130
+ type: 'function',
1131
+ name: 'usdcYieldPosition',
1132
+ inputs: [],
1133
+ outputs: [
1134
+ {
1135
+ name: '',
1136
+ type: 'tuple',
1137
+ components: [
1138
+ {
1139
+ name: 'legoId',
1140
+ type: 'uint256',
1141
+ },
1142
+ {
1143
+ name: 'vaultToken',
1144
+ type: 'address',
1145
+ },
1146
+ ],
1147
+ },
1148
+ ],
1149
+ },
1150
+ {
1151
+ stateMutability: 'view',
1152
+ type: 'function',
1153
+ name: 'shouldAutoDeposit',
1154
+ inputs: [],
1155
+ outputs: [
1156
+ {
1157
+ name: '',
1158
+ type: 'bool',
1159
+ },
1160
+ ],
1161
+ },
1162
+ {
1163
+ stateMutability: 'view',
1164
+ type: 'function',
1165
+ name: 'canMint',
1166
+ inputs: [],
1167
+ outputs: [
1168
+ {
1169
+ name: '',
1170
+ type: 'bool',
1171
+ },
1172
+ ],
1173
+ },
1174
+ {
1175
+ stateMutability: 'view',
1176
+ type: 'function',
1177
+ name: 'mintFee',
1178
+ inputs: [],
1179
+ outputs: [
1180
+ {
1181
+ name: '',
1182
+ type: 'uint256',
1183
+ },
1184
+ ],
1185
+ },
1186
+ {
1187
+ stateMutability: 'view',
1188
+ type: 'function',
1189
+ name: 'maxIntervalMint',
1190
+ inputs: [],
1191
+ outputs: [
1192
+ {
1193
+ name: '',
1194
+ type: 'uint256',
1195
+ },
1196
+ ],
1197
+ },
1198
+ {
1199
+ stateMutability: 'view',
1200
+ type: 'function',
1201
+ name: 'mintAllowlist',
1202
+ inputs: [
1203
+ {
1204
+ name: 'arg0',
1205
+ type: 'address',
1206
+ },
1207
+ ],
1208
+ outputs: [
1209
+ {
1210
+ name: '',
1211
+ type: 'bool',
1212
+ },
1213
+ ],
1214
+ },
1215
+ {
1216
+ stateMutability: 'view',
1217
+ type: 'function',
1218
+ name: 'shouldEnforceMintAllowlist',
1219
+ inputs: [],
1220
+ outputs: [
1221
+ {
1222
+ name: '',
1223
+ type: 'bool',
1224
+ },
1225
+ ],
1226
+ },
1227
+ {
1228
+ stateMutability: 'view',
1229
+ type: 'function',
1230
+ name: 'globalMintInterval',
1231
+ inputs: [],
1232
+ outputs: [
1233
+ {
1234
+ name: '',
1235
+ type: 'tuple',
1236
+ components: [
1237
+ {
1238
+ name: 'start',
1239
+ type: 'uint256',
1240
+ },
1241
+ {
1242
+ name: 'amount',
1243
+ type: 'uint256',
1244
+ },
1245
+ ],
1246
+ },
1247
+ ],
1248
+ },
1249
+ {
1250
+ stateMutability: 'view',
1251
+ type: 'function',
1252
+ name: 'canRedeem',
1253
+ inputs: [],
1254
+ outputs: [
1255
+ {
1256
+ name: '',
1257
+ type: 'bool',
1258
+ },
1259
+ ],
1260
+ },
1261
+ {
1262
+ stateMutability: 'view',
1263
+ type: 'function',
1264
+ name: 'redeemFee',
1265
+ inputs: [],
1266
+ outputs: [
1267
+ {
1268
+ name: '',
1269
+ type: 'uint256',
1270
+ },
1271
+ ],
1272
+ },
1273
+ {
1274
+ stateMutability: 'view',
1275
+ type: 'function',
1276
+ name: 'maxIntervalRedeem',
1277
+ inputs: [],
1278
+ outputs: [
1279
+ {
1280
+ name: '',
1281
+ type: 'uint256',
1282
+ },
1283
+ ],
1284
+ },
1285
+ {
1286
+ stateMutability: 'view',
1287
+ type: 'function',
1288
+ name: 'redeemAllowlist',
1289
+ inputs: [
1290
+ {
1291
+ name: 'arg0',
1292
+ type: 'address',
1293
+ },
1294
+ ],
1295
+ outputs: [
1296
+ {
1297
+ name: '',
1298
+ type: 'bool',
1299
+ },
1300
+ ],
1301
+ },
1302
+ {
1303
+ stateMutability: 'view',
1304
+ type: 'function',
1305
+ name: 'shouldEnforceRedeemAllowlist',
1306
+ inputs: [],
1307
+ outputs: [
1308
+ {
1309
+ name: '',
1310
+ type: 'bool',
1311
+ },
1312
+ ],
1313
+ },
1314
+ {
1315
+ stateMutability: 'view',
1316
+ type: 'function',
1317
+ name: 'globalRedeemInterval',
1318
+ inputs: [],
1319
+ outputs: [
1320
+ {
1321
+ name: '',
1322
+ type: 'tuple',
1323
+ components: [
1324
+ {
1325
+ name: 'start',
1326
+ type: 'uint256',
1327
+ },
1328
+ {
1329
+ name: 'amount',
1330
+ type: 'uint256',
1331
+ },
1332
+ ],
1333
+ },
1334
+ ],
1335
+ },
1336
+ {
1337
+ stateMutability: 'view',
1338
+ type: 'function',
1339
+ name: 'USDC',
1340
+ inputs: [],
1341
+ outputs: [
1342
+ {
1343
+ name: '',
1344
+ type: 'address',
1345
+ },
1346
+ ],
1347
+ },
1348
+ {
1349
+ stateMutability: 'nonpayable',
1350
+ type: 'constructor',
1351
+ inputs: [
1352
+ {
1353
+ name: '_ripeHq',
1354
+ type: 'address',
1355
+ },
1356
+ {
1357
+ name: '_numBlocksPerInterval',
1358
+ type: 'uint256',
1359
+ },
1360
+ {
1361
+ name: '_mintFee',
1362
+ type: 'uint256',
1363
+ },
1364
+ {
1365
+ name: '_maxIntervalMint',
1366
+ type: 'uint256',
1367
+ },
1368
+ {
1369
+ name: '_redeemFee',
1370
+ type: 'uint256',
1371
+ },
1372
+ {
1373
+ name: '_maxIntervalRedeem',
1374
+ type: 'uint256',
1375
+ },
1376
+ {
1377
+ name: '_usdc',
1378
+ type: 'address',
1379
+ },
1380
+ {
1381
+ name: '_usdcYieldLegoId',
1382
+ type: 'uint256',
1383
+ },
1384
+ {
1385
+ name: '_usdcYieldVaultToken',
1386
+ type: 'address',
1387
+ },
1388
+ ],
1389
+ outputs: [],
1390
+ },
1391
+ ];
1392
+ export const deployAddress = '0x2893d0dfa54571bDc7DE60F2d8a456d3377CcAA7';
1393
+ function getRequest(method, args, contractAddressOrOptions) {
1394
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1395
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1396
+ const call = {
1397
+ contractName: 'EndaomentPSM',
1398
+ method,
1399
+ args,
1400
+ address,
1401
+ deployAddress,
1402
+ defaultValue,
1403
+ getAbi: () => abi,
1404
+ with: (options) => {
1405
+ call.address = options.contractAddress;
1406
+ call.defaultValue = options.defaultValue;
1407
+ return call;
1408
+ },
1409
+ defaultTo: (defaultValue) => {
1410
+ call.defaultValue = defaultValue;
1411
+ return call;
1412
+ },
1413
+ at: (address) => {
1414
+ call.address = address;
1415
+ return call;
1416
+ },
1417
+ };
1418
+ return call;
1419
+ }
1420
+ export const call = {
1421
+ getAddys: (...args) => getRequest('getAddys', args),
1422
+ getRipeHq: (...args) => getRequest('getRipeHq', args),
1423
+ canMintGreen: (...args) => getRequest('canMintGreen', args),
1424
+ canMintRipe: (...args) => getRequest('canMintRipe', args),
1425
+ isPaused: (...args) => getRequest('isPaused', args),
1426
+ getMaxUsdcAmountForMint: (...args) => getRequest('getMaxUsdcAmountForMint', args),
1427
+ getAvailIntervalMint: (...args) => getRequest('getAvailIntervalMint', args),
1428
+ getMaxRedeemableGreenAmount: (...args) => getRequest('getMaxRedeemableGreenAmount', args),
1429
+ getAvailIntervalRedemptions: (...args) => getRequest('getAvailIntervalRedemptions', args),
1430
+ getUsdcYieldPositionVaultToken: (...args) => getRequest('getUsdcYieldPositionVaultToken', args),
1431
+ getUnderlyingYieldAmount: (...args) => getRequest('getUnderlyingYieldAmount', args),
1432
+ getAvailableUsdc: (...args) => getRequest('getAvailableUsdc', args),
1433
+ numBlocksPerInterval: (...args) => getRequest('numBlocksPerInterval', args),
1434
+ usdcYieldPosition: (...args) => getRequest('usdcYieldPosition', args),
1435
+ shouldAutoDeposit: (...args) => getRequest('shouldAutoDeposit', args),
1436
+ canMint: (...args) => getRequest('canMint', args),
1437
+ mintFee: (...args) => getRequest('mintFee', args),
1438
+ maxIntervalMint: (...args) => getRequest('maxIntervalMint', args),
1439
+ mintAllowlist: (...args) => getRequest('mintAllowlist', args),
1440
+ shouldEnforceMintAllowlist: (...args) => getRequest('shouldEnforceMintAllowlist', args),
1441
+ globalMintInterval: (...args) => getRequest('globalMintInterval', args),
1442
+ canRedeem: (...args) => getRequest('canRedeem', args),
1443
+ redeemFee: (...args) => getRequest('redeemFee', args),
1444
+ maxIntervalRedeem: (...args) => getRequest('maxIntervalRedeem', args),
1445
+ redeemAllowlist: (...args) => getRequest('redeemAllowlist', args),
1446
+ shouldEnforceRedeemAllowlist: (...args) => getRequest('shouldEnforceRedeemAllowlist', args),
1447
+ globalRedeemInterval: (...args) => getRequest('globalRedeemInterval', args),
1448
+ USDC: (...args) => getRequest('USDC', args),
1449
+ };
1450
+ function getMutation(functionName) {
1451
+ return {
1452
+ contractName: 'EndaomentPSM',
1453
+ functionName,
1454
+ deployAddress,
1455
+ argsType: undefined,
1456
+ getAbi: () => abi,
1457
+ };
1458
+ }
1459
+ export const mutation = {
1460
+ pause: getMutation('pause'),
1461
+ recoverFunds: getMutation('recoverFunds'),
1462
+ recoverFundsMany: getMutation('recoverFundsMany'),
1463
+ mintGreen: getMutation('mintGreen'),
1464
+ redeemGreen: getMutation('redeemGreen'),
1465
+ depositToYield: getMutation('depositToYield'),
1466
+ withdrawFromYield: getMutation('withdrawFromYield'),
1467
+ transferUsdcToEndaomentFunds: getMutation('transferUsdcToEndaomentFunds'),
1468
+ setCanMint: getMutation('setCanMint'),
1469
+ setMintFee: getMutation('setMintFee'),
1470
+ setMaxIntervalMint: getMutation('setMaxIntervalMint'),
1471
+ setShouldEnforceMintAllowlist: getMutation('setShouldEnforceMintAllowlist'),
1472
+ updateMintAllowlist: getMutation('updateMintAllowlist'),
1473
+ setCanRedeem: getMutation('setCanRedeem'),
1474
+ setRedeemFee: getMutation('setRedeemFee'),
1475
+ setMaxIntervalRedeem: getMutation('setMaxIntervalRedeem'),
1476
+ setShouldEnforceRedeemAllowlist: getMutation('setShouldEnforceRedeemAllowlist'),
1477
+ updateRedeemAllowlist: getMutation('updateRedeemAllowlist'),
1478
+ setUsdcYieldPosition: getMutation('setUsdcYieldPosition'),
1479
+ setNumBlocksPerInterval: getMutation('setNumBlocksPerInterval'),
1480
+ setShouldAutoDeposit: getMutation('setShouldAutoDeposit'),
1481
+ };
1482
+ export function toSdk(publicClient, walletClient) {
1483
+ return {
1484
+ deployAddress,
1485
+ abi,
1486
+ // Queries
1487
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args)),
1488
+ getRipeHq: (...args) => singleQuery(publicClient, call.getRipeHq(...args)),
1489
+ canMintGreen: (...args) => singleQuery(publicClient, call.canMintGreen(...args)),
1490
+ canMintRipe: (...args) => singleQuery(publicClient, call.canMintRipe(...args)),
1491
+ isPaused: (...args) => singleQuery(publicClient, call.isPaused(...args)),
1492
+ getMaxUsdcAmountForMint: (...args) => singleQuery(publicClient, call.getMaxUsdcAmountForMint(...args)),
1493
+ getAvailIntervalMint: (...args) => singleQuery(publicClient, call.getAvailIntervalMint(...args)),
1494
+ getMaxRedeemableGreenAmount: (...args) => singleQuery(publicClient, call.getMaxRedeemableGreenAmount(...args)),
1495
+ getAvailIntervalRedemptions: (...args) => singleQuery(publicClient, call.getAvailIntervalRedemptions(...args)),
1496
+ getUsdcYieldPositionVaultToken: (...args) => singleQuery(publicClient, call.getUsdcYieldPositionVaultToken(...args)),
1497
+ getUnderlyingYieldAmount: (...args) => singleQuery(publicClient, call.getUnderlyingYieldAmount(...args)),
1498
+ getAvailableUsdc: (...args) => singleQuery(publicClient, call.getAvailableUsdc(...args)),
1499
+ numBlocksPerInterval: (...args) => singleQuery(publicClient, call.numBlocksPerInterval(...args)),
1500
+ usdcYieldPosition: (...args) => singleQuery(publicClient, call.usdcYieldPosition(...args)),
1501
+ shouldAutoDeposit: (...args) => singleQuery(publicClient, call.shouldAutoDeposit(...args)),
1502
+ canMint: (...args) => singleQuery(publicClient, call.canMint(...args)),
1503
+ mintFee: (...args) => singleQuery(publicClient, call.mintFee(...args)),
1504
+ maxIntervalMint: (...args) => singleQuery(publicClient, call.maxIntervalMint(...args)),
1505
+ mintAllowlist: (...args) => singleQuery(publicClient, call.mintAllowlist(...args)),
1506
+ shouldEnforceMintAllowlist: (...args) => singleQuery(publicClient, call.shouldEnforceMintAllowlist(...args)),
1507
+ globalMintInterval: (...args) => singleQuery(publicClient, call.globalMintInterval(...args)),
1508
+ canRedeem: (...args) => singleQuery(publicClient, call.canRedeem(...args)),
1509
+ redeemFee: (...args) => singleQuery(publicClient, call.redeemFee(...args)),
1510
+ maxIntervalRedeem: (...args) => singleQuery(publicClient, call.maxIntervalRedeem(...args)),
1511
+ redeemAllowlist: (...args) => singleQuery(publicClient, call.redeemAllowlist(...args)),
1512
+ shouldEnforceRedeemAllowlist: (...args) => singleQuery(publicClient, call.shouldEnforceRedeemAllowlist(...args)),
1513
+ globalRedeemInterval: (...args) => singleQuery(publicClient, call.globalRedeemInterval(...args)),
1514
+ USDC: (...args) => singleQuery(publicClient, call.USDC(...args)),
1515
+ // Mutations
1516
+ pause: (...args) => mutate(walletClient, mutation.pause)(...args),
1517
+ recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
1518
+ recoverFundsMany: (...args) => mutate(walletClient, mutation.recoverFundsMany)(...args),
1519
+ mintGreen: (...args) => mutate(walletClient, mutation.mintGreen)(...args),
1520
+ redeemGreen: (...args) => mutate(walletClient, mutation.redeemGreen)(...args),
1521
+ depositToYield: (...args) => mutate(walletClient, mutation.depositToYield)(...args),
1522
+ withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield)(...args),
1523
+ transferUsdcToEndaomentFunds: (...args) => mutate(walletClient, mutation.transferUsdcToEndaomentFunds)(...args),
1524
+ setCanMint: (...args) => mutate(walletClient, mutation.setCanMint)(...args),
1525
+ setMintFee: (...args) => mutate(walletClient, mutation.setMintFee)(...args),
1526
+ setMaxIntervalMint: (...args) => mutate(walletClient, mutation.setMaxIntervalMint)(...args),
1527
+ setShouldEnforceMintAllowlist: (...args) => mutate(walletClient, mutation.setShouldEnforceMintAllowlist)(...args),
1528
+ updateMintAllowlist: (...args) => mutate(walletClient, mutation.updateMintAllowlist)(...args),
1529
+ setCanRedeem: (...args) => mutate(walletClient, mutation.setCanRedeem)(...args),
1530
+ setRedeemFee: (...args) => mutate(walletClient, mutation.setRedeemFee)(...args),
1531
+ setMaxIntervalRedeem: (...args) => mutate(walletClient, mutation.setMaxIntervalRedeem)(...args),
1532
+ setShouldEnforceRedeemAllowlist: (...args) => mutate(walletClient, mutation.setShouldEnforceRedeemAllowlist)(...args),
1533
+ updateRedeemAllowlist: (...args) => mutate(walletClient, mutation.updateRedeemAllowlist)(...args),
1534
+ setUsdcYieldPosition: (...args) => mutate(walletClient, mutation.setUsdcYieldPosition)(...args),
1535
+ setNumBlocksPerInterval: (...args) => mutate(walletClient, mutation.setNumBlocksPerInterval)(...args),
1536
+ setShouldAutoDeposit: (...args) => mutate(walletClient, mutation.setShouldAutoDeposit)(...args),
1537
+ };
1538
+ }