@curvefi/api 1.11.0 → 1.15.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 (52) hide show
  1. package/README.md +68 -0
  2. package/lib/constants/abis/abis-ethereum.js +144 -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 +4 -2
  43. package/lib/constants/coins-polygon.js +3 -2
  44. package/lib/curve.d.ts +2 -1
  45. package/lib/curve.js +73 -30
  46. package/lib/index.d.ts +1 -1
  47. package/lib/interfaces.d.ts +8 -0
  48. package/lib/pools.d.ts +36 -5
  49. package/lib/pools.js +313 -52
  50. package/lib/utils.d.ts +1 -1
  51. package/lib/utils.js +40 -29
  52. package/package.json +1 -1
@@ -0,0 +1,257 @@
1
+ [
2
+ {
3
+ "stateMutability": "nonpayable",
4
+ "type": "constructor",
5
+ "inputs": [
6
+ {
7
+ "name": "_owner",
8
+ "type": "address"
9
+ }
10
+ ],
11
+ "outputs": []
12
+ },
13
+ {
14
+ "stateMutability": "nonpayable",
15
+ "type": "function",
16
+ "name": "add_reward",
17
+ "inputs": [
18
+ {
19
+ "name": "_token",
20
+ "type": "address"
21
+ },
22
+ {
23
+ "name": "_distributor",
24
+ "type": "address"
25
+ },
26
+ {
27
+ "name": "_duration",
28
+ "type": "uint256"
29
+ }
30
+ ],
31
+ "outputs": [],
32
+ "gas": "147850"
33
+ },
34
+ {
35
+ "stateMutability": "nonpayable",
36
+ "type": "function",
37
+ "name": "remove_reward",
38
+ "inputs": [
39
+ {
40
+ "name": "_token",
41
+ "type": "address"
42
+ }
43
+ ],
44
+ "outputs": [],
45
+ "gas": "898282"
46
+ },
47
+ {
48
+ "stateMutability": "nonpayable",
49
+ "type": "function",
50
+ "name": "set_receiver",
51
+ "inputs": [
52
+ {
53
+ "name": "_receiver",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "outputs": [],
58
+ "gas": "37605"
59
+ },
60
+ {
61
+ "stateMutability": "nonpayable",
62
+ "type": "function",
63
+ "name": "get_reward",
64
+ "inputs": [],
65
+ "outputs": [],
66
+ "gas": "496490"
67
+ },
68
+ {
69
+ "stateMutability": "nonpayable",
70
+ "type": "function",
71
+ "name": "notify_reward_amount",
72
+ "inputs": [
73
+ {
74
+ "name": "_token",
75
+ "type": "address"
76
+ }
77
+ ],
78
+ "outputs": [],
79
+ "gas": "1502780"
80
+ },
81
+ {
82
+ "stateMutability": "nonpayable",
83
+ "type": "function",
84
+ "name": "set_reward_duration",
85
+ "inputs": [
86
+ {
87
+ "name": "_token",
88
+ "type": "address"
89
+ },
90
+ {
91
+ "name": "_duration",
92
+ "type": "uint256"
93
+ }
94
+ ],
95
+ "outputs": [],
96
+ "gas": "40303"
97
+ },
98
+ {
99
+ "stateMutability": "nonpayable",
100
+ "type": "function",
101
+ "name": "set_reward_distributor",
102
+ "inputs": [
103
+ {
104
+ "name": "_token",
105
+ "type": "address"
106
+ },
107
+ {
108
+ "name": "_distributor",
109
+ "type": "address"
110
+ }
111
+ ],
112
+ "outputs": [],
113
+ "gas": "38012"
114
+ },
115
+ {
116
+ "stateMutability": "nonpayable",
117
+ "type": "function",
118
+ "name": "commit_transfer_ownership",
119
+ "inputs": [
120
+ {
121
+ "name": "_owner",
122
+ "type": "address"
123
+ }
124
+ ],
125
+ "outputs": [],
126
+ "gas": "37755"
127
+ },
128
+ {
129
+ "stateMutability": "nonpayable",
130
+ "type": "function",
131
+ "name": "accept_transfer_ownership",
132
+ "inputs": [],
133
+ "outputs": [],
134
+ "gas": "37700"
135
+ },
136
+ {
137
+ "stateMutability": "view",
138
+ "type": "function",
139
+ "name": "owner",
140
+ "inputs": [],
141
+ "outputs": [
142
+ {
143
+ "name": "",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "gas": "2658"
148
+ },
149
+ {
150
+ "stateMutability": "view",
151
+ "type": "function",
152
+ "name": "future_owner",
153
+ "inputs": [],
154
+ "outputs": [
155
+ {
156
+ "name": "",
157
+ "type": "address"
158
+ }
159
+ ],
160
+ "gas": "2688"
161
+ },
162
+ {
163
+ "stateMutability": "view",
164
+ "type": "function",
165
+ "name": "reward_receiver",
166
+ "inputs": [],
167
+ "outputs": [
168
+ {
169
+ "name": "",
170
+ "type": "address"
171
+ }
172
+ ],
173
+ "gas": "2718"
174
+ },
175
+ {
176
+ "stateMutability": "view",
177
+ "type": "function",
178
+ "name": "reward_tokens",
179
+ "inputs": [
180
+ {
181
+ "name": "arg0",
182
+ "type": "uint256"
183
+ }
184
+ ],
185
+ "outputs": [
186
+ {
187
+ "name": "",
188
+ "type": "address"
189
+ }
190
+ ],
191
+ "gas": "2857"
192
+ },
193
+ {
194
+ "stateMutability": "view",
195
+ "type": "function",
196
+ "name": "reward_count",
197
+ "inputs": [],
198
+ "outputs": [
199
+ {
200
+ "name": "",
201
+ "type": "uint256"
202
+ }
203
+ ],
204
+ "gas": "2778"
205
+ },
206
+ {
207
+ "stateMutability": "view",
208
+ "type": "function",
209
+ "name": "reward_data",
210
+ "inputs": [
211
+ {
212
+ "name": "arg0",
213
+ "type": "address"
214
+ }
215
+ ],
216
+ "outputs": [
217
+ {
218
+ "name": "distributor",
219
+ "type": "address"
220
+ },
221
+ {
222
+ "name": "period_finish",
223
+ "type": "uint256"
224
+ },
225
+ {
226
+ "name": "rate",
227
+ "type": "uint256"
228
+ },
229
+ {
230
+ "name": "duration",
231
+ "type": "uint256"
232
+ },
233
+ {
234
+ "name": "received",
235
+ "type": "uint256"
236
+ },
237
+ {
238
+ "name": "paid",
239
+ "type": "uint256"
240
+ }
241
+ ],
242
+ "gas": "14685"
243
+ },
244
+ {
245
+ "stateMutability": "view",
246
+ "type": "function",
247
+ "name": "last_update_time",
248
+ "inputs": [],
249
+ "outputs": [
250
+ {
251
+ "name": "",
252
+ "type": "uint256"
253
+ }
254
+ ],
255
+ "gas": "2838"
256
+ }
257
+ ]
@@ -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
  }
@@ -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": "1570535"
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": "6103471"
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": "3489637"
346
343
  },
@@ -366,8 +363,7 @@
366
363
  "name": "dx"
367
364
  }
368
365
  ],
369
- "constant": true,
370
- "payable": false,
366
+ "stateMutability": "view",
371
367
  "type": "function",
372
368
  "gas": "3489467"
373
369
  },
@@ -572,8 +568,7 @@
572
568
  "name": "arg0"
573
569
  }
574
570
  ],
575
- "constant": true,
576
- "payable": false,
571
+ "stateMutability": "view",
577
572
  "type": "function",
578
573
  "gas": "2130"
579
574
  },
@@ -591,8 +586,7 @@
591
586
  "name": "arg0"
592
587
  }
593
588
  ],
594
- "constant": true,
595
- "payable": false,
589
+ "stateMutability": "view",
596
590
  "type": "function",
597
591
  "gas": "2160"
598
592
  },
@@ -623,8 +617,7 @@
623
617
  }
624
618
  ],
625
619
  "inputs": [],
626
- "constant": true,
627
- "payable": false,
620
+ "stateMutability": "view",
628
621
  "type": "function",
629
622
  "gas": "2021"
630
623
  },
@@ -637,8 +630,7 @@
637
630
  }
638
631
  ],
639
632
  "inputs": [],
640
- "constant": true,
641
- "payable": false,
633
+ "stateMutability": "view",
642
634
  "type": "function",
643
635
  "gas": "2051"
644
636
  },
@@ -651,8 +643,7 @@
651
643
  }
652
644
  ],
653
645
  "inputs": [],
654
- "constant": true,
655
- "payable": false,
646
+ "stateMutability": "view",
656
647
  "type": "function",
657
648
  "gas": "2081"
658
649
  },
@@ -665,8 +656,7 @@
665
656
  }
666
657
  ],
667
658
  "inputs": [],
668
- "constant": true,
669
- "payable": false,
659
+ "stateMutability": "view",
670
660
  "type": "function",
671
661
  "gas": "2111"
672
662
  },
@@ -680,8 +670,7 @@
680
670
  }
681
671
  ],
682
672
  "inputs": [],
683
- "constant": true,
684
- "payable": false,
673
+ "stateMutability": "view",
685
674
  "type": "function",
686
675
  "gas": "2141"
687
676
  },
@@ -695,8 +684,7 @@
695
684
  }
696
685
  ],
697
686
  "inputs": [],
698
- "constant": true,
699
- "payable": false,
687
+ "stateMutability": "view",
700
688
  "type": "function",
701
689
  "gas": "2171"
702
690
  },
@@ -709,8 +697,7 @@
709
697
  }
710
698
  ],
711
699
  "inputs": [],
712
- "constant": true,
713
- "payable": false,
700
+ "stateMutability": "view",
714
701
  "type": "function",
715
702
  "gas": "2201"
716
703
  },
@@ -723,8 +710,7 @@
723
710
  }
724
711
  ],
725
712
  "inputs": [],
726
- "constant": true,
727
- "payable": false,
713
+ "stateMutability": "view",
728
714
  "type": "function",
729
715
  "gas": "2231"
730
716
  },
@@ -737,8 +723,7 @@
737
723
  }
738
724
  ],
739
725
  "inputs": [],
740
- "constant": true,
741
- "payable": false,
726
+ "stateMutability": "view",
742
727
  "type": "function",
743
728
  "gas": "2261"
744
729
  },
@@ -751,8 +736,7 @@
751
736
  }
752
737
  ],
753
738
  "inputs": [],
754
- "constant": true,
755
- "payable": false,
739
+ "stateMutability": "view",
756
740
  "type": "function",
757
741
  "gas": "2291"
758
742
  }
@@ -92,7 +92,7 @@
92
92
  "type": "address"
93
93
  }
94
94
  ],
95
- "gas": 2568
95
+ "gas": "2568"
96
96
  },
97
97
  {
98
98
  "stateMutability": "view",
@@ -105,7 +105,7 @@
105
105
  "type": "address"
106
106
  }
107
107
  ],
108
- "gas": 2598
108
+ "gas": "2598"
109
109
  },
110
110
  {
111
111
  "stateMutability": "view",
@@ -123,6 +123,6 @@
123
123
  "type": "address"
124
124
  }
125
125
  ],
126
- "gas": 2737
126
+ "gas": "2737"
127
127
  }
128
128
  ]