@curvefi/api 1.13.0 → 1.16.0

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 (53) hide show
  1. package/README.md +98 -1
  2. package/lib/constants/abis/abis-ethereum.js +216 -16
  3. package/lib/constants/abis/abis-polygon.js +17 -1
  4. package/lib/constants/abis/json/aave/rewards.json +107 -0
  5. package/lib/constants/abis/json/atricrypto3/swap.json +63 -63
  6. package/lib/constants/abis/json/atricrypto3/zap.json +8 -8
  7. package/lib/constants/abis/json/busd/deposit.json +5 -10
  8. package/lib/constants/abis/json/busd/swap.json +18 -36
  9. package/lib/constants/abis/json/compound/deposit.json +5 -10
  10. package/lib/constants/abis/json/compound/migration.json +1 -2
  11. package/lib/constants/abis/json/compound/oldSwap.json +16 -32
  12. package/lib/constants/abis/json/compound/swap.json +18 -36
  13. package/lib/constants/abis/json/crveth/swap.json +61 -61
  14. package/lib/constants/abis/json/eurt/swap.json +29 -29
  15. package/lib/constants/abis/json/eurtusd/deposit.json +13 -13
  16. package/lib/constants/abis/json/eurtusd/swap.json +59 -59
  17. package/lib/constants/abis/json/gauge.json +1 -1
  18. package/lib/constants/abis/json/gauge_factory.json +879 -0
  19. package/lib/constants/abis/json/gauge_rewards_only.json +649 -0
  20. package/lib/constants/abis/json/gauge_synthetix.json +590 -0
  21. package/lib/constants/abis/json/gauge_v2.json +942 -0
  22. package/lib/constants/abis/json/gauge_v3.json +954 -0
  23. package/lib/constants/abis/json/gauge_v4.json +913 -0
  24. package/lib/constants/abis/json/iearn/deposit.json +5 -10
  25. package/lib/constants/abis/json/iearn/swap.json +18 -36
  26. package/lib/constants/abis/json/minter.json +165 -0
  27. package/lib/constants/abis/json/pax/deposit.json +5 -10
  28. package/lib/constants/abis/json/pax/swap.json +19 -38
  29. package/lib/constants/abis/json/ren/swap.json +19 -38
  30. package/lib/constants/abis/json/ren-polygon/swap.json +46 -46
  31. package/lib/constants/abis/json/reth/swap.json +38 -38
  32. package/lib/constants/abis/json/sbtc/swap.json +19 -38
  33. package/lib/constants/abis/json/streamer.json +257 -0
  34. package/lib/constants/abis/json/susdv2/deposit.json +5 -10
  35. package/lib/constants/abis/json/susdv2/swap.json +16 -32
  36. package/lib/constants/abis/json/tricrypto2/deposit.json +3 -3
  37. package/lib/constants/abis/json/tricrypto2/swap.json +60 -60
  38. package/lib/constants/abis/json/usdt/deposit.json +5 -10
  39. package/lib/constants/abis/json/usdt/swap.json +19 -37
  40. package/lib/constants/aliases.d.ts +2 -0
  41. package/lib/constants/aliases.js +3 -1
  42. package/lib/constants/coins-ethereum.js +7 -3
  43. package/lib/constants/coins-polygon.js +3 -2
  44. package/lib/curve.d.ts +1 -0
  45. package/lib/curve.js +47 -16
  46. package/lib/index.d.ts +1 -0
  47. package/lib/index.js +1 -0
  48. package/lib/interfaces.d.ts +8 -0
  49. package/lib/pools.d.ts +41 -5
  50. package/lib/pools.js +357 -69
  51. package/lib/utils.d.ts +2 -1
  52. package/lib/utils.js +42 -29
  53. package/package.json +1 -1
@@ -95,8 +95,7 @@
95
95
  "name": "i"
96
96
  }
97
97
  ],
98
- "constant": true,
99
- "payable": false,
98
+ "stateMutability": "view",
100
99
  "type": "function",
101
100
  "gas": "3881601"
102
101
  },
@@ -144,8 +143,7 @@
144
143
  "name": "arg0"
145
144
  }
146
145
  ],
147
- "constant": true,
148
- "payable": false,
146
+ "stateMutability": "view",
149
147
  "type": "function",
150
148
  "gas": "1680"
151
149
  },
@@ -163,8 +161,7 @@
163
161
  "name": "arg0"
164
162
  }
165
163
  ],
166
- "constant": true,
167
- "payable": false,
164
+ "stateMutability": "view",
168
165
  "type": "function",
169
166
  "gas": "1710"
170
167
  },
@@ -177,8 +174,7 @@
177
174
  }
178
175
  ],
179
176
  "inputs": [],
180
- "constant": true,
181
- "payable": false,
177
+ "stateMutability": "view",
182
178
  "type": "function",
183
179
  "gas": "1541"
184
180
  },
@@ -191,8 +187,7 @@
191
187
  }
192
188
  ],
193
189
  "inputs": [],
194
- "constant": true,
195
- "payable": false,
190
+ "stateMutability": "view",
196
191
  "type": "function",
197
192
  "gas": "1571"
198
193
  }
@@ -271,8 +271,7 @@
271
271
  }
272
272
  ],
273
273
  "inputs": [],
274
- "constant": true,
275
- "payable": false,
274
+ "stateMutability": "view",
276
275
  "type": "function",
277
276
  "gas": "1535185"
278
277
  },
@@ -294,8 +293,7 @@
294
293
  "name": "deposit"
295
294
  }
296
295
  ],
297
- "constant": true,
298
- "payable": false,
296
+ "stateMutability": "view",
299
297
  "type": "function",
300
298
  "gas": "6067881"
301
299
  },
@@ -339,8 +337,7 @@
339
337
  "name": "dx"
340
338
  }
341
339
  ],
342
- "constant": true,
343
- "payable": false,
340
+ "stateMutability": "view",
344
341
  "type": "function",
345
342
  "gas": "3454227"
346
343
  },
@@ -366,8 +363,7 @@
366
363
  "name": "dy"
367
364
  }
368
365
  ],
369
- "constant": true,
370
- "payable": false,
366
+ "stateMutability": "view",
371
367
  "type": "function",
372
368
  "gas": "3454232"
373
369
  },
@@ -393,8 +389,7 @@
393
389
  "name": "dx"
394
390
  }
395
391
  ],
396
- "constant": true,
397
- "payable": false,
392
+ "stateMutability": "view",
398
393
  "type": "function",
399
394
  "gas": "3454087"
400
395
  },
@@ -420,8 +415,7 @@
420
415
  "name": "dy"
421
416
  }
422
417
  ],
423
- "constant": true,
424
- "payable": false,
418
+ "stateMutability": "view",
425
419
  "type": "function",
426
420
  "gas": "3454093"
427
421
  },
@@ -626,8 +620,7 @@
626
620
  "name": "arg0"
627
621
  }
628
622
  ],
629
- "constant": true,
630
- "payable": false,
623
+ "stateMutability": "view",
631
624
  "type": "function",
632
625
  "gas": "2160"
633
626
  },
@@ -645,8 +638,7 @@
645
638
  "name": "arg0"
646
639
  }
647
640
  ],
648
- "constant": true,
649
- "payable": false,
641
+ "stateMutability": "view",
650
642
  "type": "function",
651
643
  "gas": "2190"
652
644
  },
@@ -677,8 +669,7 @@
677
669
  }
678
670
  ],
679
671
  "inputs": [],
680
- "constant": true,
681
- "payable": false,
672
+ "stateMutability": "view",
682
673
  "type": "function",
683
674
  "gas": "2051"
684
675
  },
@@ -691,8 +682,7 @@
691
682
  }
692
683
  ],
693
684
  "inputs": [],
694
- "constant": true,
695
- "payable": false,
685
+ "stateMutability": "view",
696
686
  "type": "function",
697
687
  "gas": "2081"
698
688
  },
@@ -705,8 +695,7 @@
705
695
  }
706
696
  ],
707
697
  "inputs": [],
708
- "constant": true,
709
- "payable": false,
698
+ "stateMutability": "view",
710
699
  "type": "function",
711
700
  "gas": "2111"
712
701
  },
@@ -719,8 +708,7 @@
719
708
  }
720
709
  ],
721
710
  "inputs": [],
722
- "constant": true,
723
- "payable": false,
711
+ "stateMutability": "view",
724
712
  "type": "function",
725
713
  "gas": "2141"
726
714
  },
@@ -734,8 +722,7 @@
734
722
  }
735
723
  ],
736
724
  "inputs": [],
737
- "constant": true,
738
- "payable": false,
725
+ "stateMutability": "view",
739
726
  "type": "function",
740
727
  "gas": "2171"
741
728
  },
@@ -749,8 +736,7 @@
749
736
  }
750
737
  ],
751
738
  "inputs": [],
752
- "constant": true,
753
- "payable": false,
739
+ "stateMutability": "view",
754
740
  "type": "function",
755
741
  "gas": "2201"
756
742
  },
@@ -763,8 +749,7 @@
763
749
  }
764
750
  ],
765
751
  "inputs": [],
766
- "constant": true,
767
- "payable": false,
752
+ "stateMutability": "view",
768
753
  "type": "function",
769
754
  "gas": "2231"
770
755
  },
@@ -777,8 +762,7 @@
777
762
  }
778
763
  ],
779
764
  "inputs": [],
780
- "constant": true,
781
- "payable": false,
765
+ "stateMutability": "view",
782
766
  "type": "function",
783
767
  "gas": "2261"
784
768
  },
@@ -791,8 +775,7 @@
791
775
  }
792
776
  ],
793
777
  "inputs": [],
794
- "constant": true,
795
- "payable": false,
778
+ "stateMutability": "view",
796
779
  "type": "function",
797
780
  "gas": "2291"
798
781
  },
@@ -805,8 +788,7 @@
805
788
  }
806
789
  ],
807
790
  "inputs": [],
808
- "constant": true,
809
- "payable": false,
791
+ "stateMutability": "view",
810
792
  "type": "function",
811
793
  "gas": "2321"
812
794
  }
@@ -0,0 +1,165 @@
1
+ [
2
+ {
3
+ "name": "Minted",
4
+ "inputs": [
5
+ {
6
+ "type": "address",
7
+ "name": "recipient",
8
+ "indexed": true
9
+ },
10
+ {
11
+ "type": "address",
12
+ "name": "gauge",
13
+ "indexed": false
14
+ },
15
+ {
16
+ "type": "uint256",
17
+ "name": "minted",
18
+ "indexed": false
19
+ }
20
+ ],
21
+ "anonymous": false,
22
+ "type": "event"
23
+ },
24
+ {
25
+ "outputs": [],
26
+ "inputs": [
27
+ {
28
+ "type": "address",
29
+ "name": "_token"
30
+ },
31
+ {
32
+ "type": "address",
33
+ "name": "_controller"
34
+ }
35
+ ],
36
+ "stateMutability": "nonpayable",
37
+ "type": "constructor"
38
+ },
39
+ {
40
+ "name": "mint",
41
+ "outputs": [],
42
+ "inputs": [
43
+ {
44
+ "type": "address",
45
+ "name": "gauge_addr"
46
+ }
47
+ ],
48
+ "stateMutability": "nonpayable",
49
+ "type": "function",
50
+ "gas": "2006304"
51
+ },
52
+ {
53
+ "name": "mint_many",
54
+ "outputs": [],
55
+ "inputs": [
56
+ {
57
+ "type": "address[8]",
58
+ "name": "gauge_addrs"
59
+ }
60
+ ],
61
+ "stateMutability": "nonpayable",
62
+ "type": "function",
63
+ "gas": "408502"
64
+ },
65
+ {
66
+ "name": "mint_for",
67
+ "outputs": [],
68
+ "inputs": [
69
+ {
70
+ "type": "address",
71
+ "name": "gauge_addr"
72
+ },
73
+ {
74
+ "type": "address",
75
+ "name": "_for"
76
+ }
77
+ ],
78
+ "stateMutability": "nonpayable",
79
+ "type": "function",
80
+ "gas": "101219"
81
+ },
82
+ {
83
+ "name": "toggle_approve_mint",
84
+ "outputs": [],
85
+ "inputs": [
86
+ {
87
+ "type": "address",
88
+ "name": "minting_user"
89
+ }
90
+ ],
91
+ "stateMutability": "nonpayable",
92
+ "type": "function",
93
+ "gas": "36726"
94
+ },
95
+ {
96
+ "name": "token",
97
+ "outputs": [
98
+ {
99
+ "type": "address",
100
+ "name": ""
101
+ }
102
+ ],
103
+ "inputs": [],
104
+ "stateMutability": "view",
105
+ "type": "function",
106
+ "gas": "1301"
107
+ },
108
+ {
109
+ "name": "controller",
110
+ "outputs": [
111
+ {
112
+ "type": "address",
113
+ "name": ""
114
+ }
115
+ ],
116
+ "inputs": [],
117
+ "stateMutability": "view",
118
+ "type": "function",
119
+ "gas": "1331"
120
+ },
121
+ {
122
+ "name": "minted",
123
+ "outputs": [
124
+ {
125
+ "type": "uint256",
126
+ "name": ""
127
+ }
128
+ ],
129
+ "inputs": [
130
+ {
131
+ "type": "address",
132
+ "name": "arg0"
133
+ },
134
+ {
135
+ "type": "address",
136
+ "name": "arg1"
137
+ }
138
+ ],
139
+ "stateMutability": "view",
140
+ "type": "function",
141
+ "gas": "1669"
142
+ },
143
+ {
144
+ "name": "allowed_to_mint_for",
145
+ "outputs": [
146
+ {
147
+ "type": "bool",
148
+ "name": ""
149
+ }
150
+ ],
151
+ "inputs": [
152
+ {
153
+ "type": "address",
154
+ "name": "arg0"
155
+ },
156
+ {
157
+ "type": "address",
158
+ "name": "arg1"
159
+ }
160
+ ],
161
+ "stateMutability": "view",
162
+ "type": "function",
163
+ "gas": "1699"
164
+ }
165
+ ]
@@ -95,8 +95,7 @@
95
95
  "name": "i"
96
96
  }
97
97
  ],
98
- "constant": true,
99
- "payable": false,
98
+ "stateMutability": "view",
100
99
  "type": "function",
101
100
  "gas": "3881771"
102
101
  },
@@ -144,8 +143,7 @@
144
143
  "name": "arg0"
145
144
  }
146
145
  ],
147
- "constant": true,
148
- "payable": false,
146
+ "stateMutability": "view",
149
147
  "type": "function",
150
148
  "gas": "1680"
151
149
  },
@@ -163,8 +161,7 @@
163
161
  "name": "arg0"
164
162
  }
165
163
  ],
166
- "constant": true,
167
- "payable": false,
164
+ "stateMutability": "view",
168
165
  "type": "function",
169
166
  "gas": "1710"
170
167
  },
@@ -177,8 +174,7 @@
177
174
  }
178
175
  ],
179
176
  "inputs": [],
180
- "constant": true,
181
- "payable": false,
177
+ "stateMutability": "view",
182
178
  "type": "function",
183
179
  "gas": "1541"
184
180
  },
@@ -191,8 +187,7 @@
191
187
  }
192
188
  ],
193
189
  "inputs": [],
194
- "constant": true,
195
- "payable": false,
190
+ "stateMutability": "view",
196
191
  "type": "function",
197
192
  "gas": "1571"
198
193
  }
@@ -308,8 +308,7 @@
308
308
  }
309
309
  ],
310
310
  "inputs": [],
311
- "constant": true,
312
- "payable": false,
311
+ "stateMutability": "view",
313
312
  "type": "function",
314
313
  "gas": "5227"
315
314
  },
@@ -322,8 +321,7 @@
322
321
  }
323
322
  ],
324
323
  "inputs": [],
325
- "constant": true,
326
- "payable": false,
324
+ "stateMutability": "view",
327
325
  "type": "function",
328
326
  "gas": "1333259"
329
327
  },
@@ -345,8 +343,7 @@
345
343
  "name": "deposit"
346
344
  }
347
345
  ],
348
- "constant": true,
349
- "payable": false,
346
+ "stateMutability": "view",
350
347
  "type": "function",
351
348
  "gas": "5242977"
352
349
  },
@@ -390,8 +387,7 @@
390
387
  "name": "dx"
391
388
  }
392
389
  ],
393
- "constant": true,
394
- "payable": false,
390
+ "stateMutability": "view",
395
391
  "type": "function",
396
392
  "gas": "3048740"
397
393
  },
@@ -417,8 +413,7 @@
417
413
  "name": "dx"
418
414
  }
419
415
  ],
420
- "constant": true,
421
- "payable": false,
416
+ "stateMutability": "view",
422
417
  "type": "function",
423
418
  "gas": "3048570"
424
419
  },
@@ -647,8 +642,7 @@
647
642
  "name": "arg0"
648
643
  }
649
644
  ],
650
- "constant": true,
651
- "payable": false,
645
+ "stateMutability": "view",
652
646
  "type": "function",
653
647
  "gas": "2220"
654
648
  },
@@ -666,8 +660,7 @@
666
660
  "name": "arg0"
667
661
  }
668
662
  ],
669
- "constant": true,
670
- "payable": false,
663
+ "stateMutability": "view",
671
664
  "type": "function",
672
665
  "gas": "2250"
673
666
  },
@@ -698,8 +691,7 @@
698
691
  }
699
692
  ],
700
693
  "inputs": [],
701
- "constant": true,
702
- "payable": false,
694
+ "stateMutability": "view",
703
695
  "type": "function",
704
696
  "gas": "2111"
705
697
  },
@@ -712,8 +704,7 @@
712
704
  }
713
705
  ],
714
706
  "inputs": [],
715
- "constant": true,
716
- "payable": false,
707
+ "stateMutability": "view",
717
708
  "type": "function",
718
709
  "gas": "2141"
719
710
  },
@@ -726,8 +717,7 @@
726
717
  }
727
718
  ],
728
719
  "inputs": [],
729
- "constant": true,
730
- "payable": false,
720
+ "stateMutability": "view",
731
721
  "type": "function",
732
722
  "gas": "2171"
733
723
  },
@@ -740,8 +730,7 @@
740
730
  }
741
731
  ],
742
732
  "inputs": [],
743
- "constant": true,
744
- "payable": false,
733
+ "stateMutability": "view",
745
734
  "type": "function",
746
735
  "gas": "2201"
747
736
  },
@@ -754,8 +743,7 @@
754
743
  }
755
744
  ],
756
745
  "inputs": [],
757
- "constant": true,
758
- "payable": false,
746
+ "stateMutability": "view",
759
747
  "type": "function",
760
748
  "gas": "2231"
761
749
  },
@@ -769,8 +757,7 @@
769
757
  }
770
758
  ],
771
759
  "inputs": [],
772
- "constant": true,
773
- "payable": false,
760
+ "stateMutability": "view",
774
761
  "type": "function",
775
762
  "gas": "2261"
776
763
  },
@@ -784,8 +771,7 @@
784
771
  }
785
772
  ],
786
773
  "inputs": [],
787
- "constant": true,
788
- "payable": false,
774
+ "stateMutability": "view",
789
775
  "type": "function",
790
776
  "gas": "2291"
791
777
  },
@@ -799,8 +785,7 @@
799
785
  }
800
786
  ],
801
787
  "inputs": [],
802
- "constant": true,
803
- "payable": false,
788
+ "stateMutability": "view",
804
789
  "type": "function",
805
790
  "gas": "2321"
806
791
  },
@@ -814,8 +799,7 @@
814
799
  }
815
800
  ],
816
801
  "inputs": [],
817
- "constant": true,
818
- "payable": false,
802
+ "stateMutability": "view",
819
803
  "type": "function",
820
804
  "gas": "2351"
821
805
  },
@@ -828,8 +812,7 @@
828
812
  }
829
813
  ],
830
814
  "inputs": [],
831
- "constant": true,
832
- "payable": false,
815
+ "stateMutability": "view",
833
816
  "type": "function",
834
817
  "gas": "2381"
835
818
  },
@@ -842,8 +825,7 @@
842
825
  }
843
826
  ],
844
827
  "inputs": [],
845
- "constant": true,
846
- "payable": false,
828
+ "stateMutability": "view",
847
829
  "type": "function",
848
830
  "gas": "2411"
849
831
  },
@@ -856,8 +838,7 @@
856
838
  }
857
839
  ],
858
840
  "inputs": [],
859
- "constant": true,
860
- "payable": false,
841
+ "stateMutability": "view",
861
842
  "type": "function",
862
843
  "gas": "2441"
863
844
  }