@curvefi/api 2.4.3 → 2.6.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 (37) hide show
  1. package/lib/constants/abis/eursusd2/swap.json +1199 -0
  2. package/lib/constants/abis/eursusd2/zap.json +270 -0
  3. package/lib/constants/abis/factory-v2/DepositZapFantom.json +164 -0
  4. package/lib/constants/abis/factory-v2/DepositZapMetaUsd2Fantom.json +197 -0
  5. package/lib/constants/abis/factory-v2/MetaUSDGeist.json +932 -0
  6. package/lib/constants/abis/fusdt/swap.json +1221 -0
  7. package/lib/constants/abis/fusdt/zap.json +215 -0
  8. package/lib/constants/abis/gauge_child.json +0 -100
  9. package/lib/constants/abis/gauge_rewards_only.json +649 -0
  10. package/lib/constants/abis/ren-arbitrum/swap.json +1069 -0
  11. package/lib/constants/abis/ren-fantom/swap.json +868 -0
  12. package/lib/constants/abis/tricrypto/swapNoZap.json +1250 -0
  13. package/lib/constants/aliases.d.ts +2 -0
  14. package/lib/constants/aliases.js +25 -1
  15. package/lib/constants/coins/arbitrum.d.ts +7 -0
  16. package/lib/constants/coins/arbitrum.js +23 -0
  17. package/lib/constants/coins/fantom.d.ts +7 -0
  18. package/lib/constants/coins/fantom.js +36 -0
  19. package/lib/constants/pools/arbitrum.d.ts +4 -0
  20. package/lib/constants/pools/arbitrum.js +125 -0
  21. package/lib/constants/pools/fantom.d.ts +4 -0
  22. package/lib/constants/pools/fantom.js +191 -0
  23. package/lib/constants/pools/index.d.ts +3 -1
  24. package/lib/constants/pools/index.js +5 -1
  25. package/lib/constants/pools/polygon.js +30 -0
  26. package/lib/curve.js +42 -10
  27. package/lib/factory/common.js +31 -0
  28. package/lib/factory/constants.d.ts +6 -0
  29. package/lib/factory/constants.js +85 -3
  30. package/lib/factory/factory-crypto.js +4 -0
  31. package/lib/factory/factory.js +6 -0
  32. package/lib/pools/PoolTemplate.d.ts +2 -1
  33. package/lib/pools/PoolTemplate.js +30 -25
  34. package/lib/pools/poolConstructor.js +3 -3
  35. package/lib/router.js +6 -6
  36. package/lib/utils.js +6 -0
  37. package/package.json +1 -1
@@ -0,0 +1,270 @@
1
+ [
2
+ {
3
+ "inputs": [
4
+ {
5
+ "name": "_pool",
6
+ "type": "address"
7
+ },
8
+ {
9
+ "name": "_base_pool",
10
+ "type": "address"
11
+ }
12
+ ],
13
+ "outputs": [],
14
+ "stateMutability": "nonpayable",
15
+ "type": "constructor",
16
+ "name": "constructor"
17
+ },
18
+ {
19
+ "gas": 4244,
20
+ "inputs": [],
21
+ "name": "price_oracle",
22
+ "outputs": [
23
+ {
24
+ "name": "",
25
+ "type": "uint256"
26
+ }
27
+ ],
28
+ "stateMutability": "view",
29
+ "type": "function"
30
+ },
31
+ {
32
+ "gas": 4274,
33
+ "inputs": [],
34
+ "name": "price_scale",
35
+ "outputs": [
36
+ {
37
+ "name": "",
38
+ "type": "uint256"
39
+ }
40
+ ],
41
+ "stateMutability": "view",
42
+ "type": "function"
43
+ },
44
+ {
45
+ "gas": 21320,
46
+ "inputs": [
47
+ {
48
+ "name": "_amounts",
49
+ "type": "uint256[3]"
50
+ },
51
+ {
52
+ "name": "_min_mint_amount",
53
+ "type": "uint256"
54
+ }
55
+ ],
56
+ "name": "add_liquidity",
57
+ "outputs": [],
58
+ "stateMutability": "nonpayable",
59
+ "type": "function"
60
+ },
61
+ {
62
+ "gas": 23822,
63
+ "inputs": [
64
+ {
65
+ "name": "i",
66
+ "type": "uint256"
67
+ },
68
+ {
69
+ "name": "j",
70
+ "type": "uint256"
71
+ },
72
+ {
73
+ "name": "_dx",
74
+ "type": "uint256"
75
+ },
76
+ {
77
+ "name": "_min_dy",
78
+ "type": "uint256"
79
+ }
80
+ ],
81
+ "name": "exchange_underlying",
82
+ "outputs": [
83
+ {
84
+ "name": "",
85
+ "type": "uint256"
86
+ }
87
+ ],
88
+ "stateMutability": "nonpayable",
89
+ "type": "function"
90
+ },
91
+ {
92
+ "gas": 31724,
93
+ "inputs": [
94
+ {
95
+ "name": "_amount",
96
+ "type": "uint256"
97
+ },
98
+ {
99
+ "name": "_min_amounts",
100
+ "type": "uint256[3]"
101
+ }
102
+ ],
103
+ "name": "remove_liquidity",
104
+ "outputs": [],
105
+ "stateMutability": "nonpayable",
106
+ "type": "function"
107
+ },
108
+ {
109
+ "gas": 14811,
110
+ "inputs": [
111
+ {
112
+ "name": "_token_amount",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "name": "i",
117
+ "type": "uint256"
118
+ },
119
+ {
120
+ "name": "_min_amount",
121
+ "type": "uint256"
122
+ }
123
+ ],
124
+ "name": "remove_liquidity_one_coin",
125
+ "outputs": [],
126
+ "stateMutability": "nonpayable",
127
+ "type": "function"
128
+ },
129
+ {
130
+ "gas": 9456,
131
+ "inputs": [
132
+ {
133
+ "name": "i",
134
+ "type": "uint256"
135
+ },
136
+ {
137
+ "name": "j",
138
+ "type": "uint256"
139
+ },
140
+ {
141
+ "name": "_dx",
142
+ "type": "uint256"
143
+ }
144
+ ],
145
+ "name": "get_dy_underlying",
146
+ "outputs": [
147
+ {
148
+ "name": "",
149
+ "type": "uint256"
150
+ }
151
+ ],
152
+ "stateMutability": "view",
153
+ "type": "function"
154
+ },
155
+ {
156
+ "gas": 4764,
157
+ "inputs": [
158
+ {
159
+ "name": "_amounts",
160
+ "type": "uint256[3]"
161
+ }
162
+ ],
163
+ "name": "calc_token_amount",
164
+ "outputs": [
165
+ {
166
+ "name": "",
167
+ "type": "uint256"
168
+ }
169
+ ],
170
+ "stateMutability": "view",
171
+ "type": "function"
172
+ },
173
+ {
174
+ "gas": 6585,
175
+ "inputs": [
176
+ {
177
+ "name": "token_amount",
178
+ "type": "uint256"
179
+ },
180
+ {
181
+ "name": "i",
182
+ "type": "uint256"
183
+ }
184
+ ],
185
+ "name": "calc_withdraw_one_coin",
186
+ "outputs": [
187
+ {
188
+ "name": "",
189
+ "type": "uint256"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "gas": 1535,
197
+ "inputs": [
198
+ {
199
+ "name": "arg0",
200
+ "type": "uint256"
201
+ }
202
+ ],
203
+ "name": "coins",
204
+ "outputs": [
205
+ {
206
+ "name": "",
207
+ "type": "address"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "gas": 1571,
215
+ "inputs": [
216
+ {
217
+ "name": "arg0",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "underlying_coins",
222
+ "outputs": [
223
+ {
224
+ "name": "",
225
+ "type": "address"
226
+ }
227
+ ],
228
+ "stateMutability": "view",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "gas": 1556,
233
+ "inputs": [],
234
+ "name": "pool",
235
+ "outputs": [
236
+ {
237
+ "name": "",
238
+ "type": "address"
239
+ }
240
+ ],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "gas": 1586,
246
+ "inputs": [],
247
+ "name": "base_pool",
248
+ "outputs": [
249
+ {
250
+ "name": "",
251
+ "type": "address"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "gas": 1616,
259
+ "inputs": [],
260
+ "name": "token",
261
+ "outputs": [
262
+ {
263
+ "name": "",
264
+ "type": "address"
265
+ }
266
+ ],
267
+ "stateMutability": "view",
268
+ "type": "function"
269
+ }
270
+ ]
@@ -0,0 +1,164 @@
1
+ [
2
+ {
3
+ "stateMutability": "nonpayable",
4
+ "type": "constructor",
5
+ "inputs": [],
6
+ "outputs": []
7
+ },
8
+ {
9
+ "stateMutability": "nonpayable",
10
+ "type": "function",
11
+ "name": "add_liquidity",
12
+ "inputs": [
13
+ {
14
+ "name": "_pool",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "name": "_deposit_amounts",
19
+ "type": "uint256[3]"
20
+ },
21
+ {
22
+ "name": "_min_mint_amount",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "uint256"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "stateMutability": "nonpayable",
35
+ "type": "function",
36
+ "name": "remove_liquidity",
37
+ "inputs": [
38
+ {
39
+ "name": "_pool",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "name": "_burn_amount",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "name": "_min_amounts",
48
+ "type": "uint256[3]"
49
+ }
50
+ ],
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "uint256[3]"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "stateMutability": "nonpayable",
60
+ "type": "function",
61
+ "name": "remove_liquidity_one_coin",
62
+ "inputs": [
63
+ {
64
+ "name": "_pool",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "name": "_burn_amount",
69
+ "type": "uint256"
70
+ },
71
+ {
72
+ "name": "i",
73
+ "type": "int128"
74
+ },
75
+ {
76
+ "name": "_min_amount",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "outputs": [
81
+ {
82
+ "name": "",
83
+ "type": "uint256"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "stateMutability": "nonpayable",
89
+ "type": "function",
90
+ "name": "remove_liquidity_imbalance",
91
+ "inputs": [
92
+ {
93
+ "name": "_pool",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "name": "_amounts",
98
+ "type": "uint256[3]"
99
+ },
100
+ {
101
+ "name": "_max_burn_amount",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "outputs": [
106
+ {
107
+ "name": "",
108
+ "type": "uint256"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "stateMutability": "view",
114
+ "type": "function",
115
+ "name": "calc_withdraw_one_coin",
116
+ "inputs": [
117
+ {
118
+ "name": "_pool",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "name": "_token_amount",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "name": "i",
127
+ "type": "int128"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "gas": "5753"
137
+ },
138
+ {
139
+ "stateMutability": "view",
140
+ "type": "function",
141
+ "name": "calc_token_amount",
142
+ "inputs": [
143
+ {
144
+ "name": "_pool",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "name": "_amounts",
149
+ "type": "uint256[3]"
150
+ },
151
+ {
152
+ "name": "_is_deposit",
153
+ "type": "bool"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "gas": "6289"
163
+ }
164
+ ]
@@ -0,0 +1,197 @@
1
+ [
2
+ {
3
+ "stateMutability": "nonpayable",
4
+ "type": "constructor",
5
+ "inputs": [],
6
+ "outputs": []
7
+ },
8
+ {
9
+ "stateMutability": "nonpayable",
10
+ "type": "function",
11
+ "name": "add_liquidity",
12
+ "inputs": [
13
+ {
14
+ "name": "_pool",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "name": "_deposit_amounts",
19
+ "type": "uint256[4]"
20
+ },
21
+ {
22
+ "name": "_min_mint_amount",
23
+ "type": "uint256"
24
+ }
25
+ ],
26
+ "outputs": [
27
+ {
28
+ "name": "",
29
+ "type": "uint256"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "stateMutability": "nonpayable",
35
+ "type": "function",
36
+ "name": "remove_liquidity",
37
+ "inputs": [
38
+ {
39
+ "name": "_pool",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "name": "_burn_amount",
44
+ "type": "uint256"
45
+ },
46
+ {
47
+ "name": "_min_amounts",
48
+ "type": "uint256[4]"
49
+ }
50
+ ],
51
+ "outputs": [
52
+ {
53
+ "name": "",
54
+ "type": "uint256[4]"
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "stateMutability": "nonpayable",
60
+ "type": "function",
61
+ "name": "remove_liquidity_one_coin",
62
+ "inputs": [
63
+ {
64
+ "name": "_pool",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "name": "_burn_amount",
69
+ "type": "uint256"
70
+ },
71
+ {
72
+ "name": "i",
73
+ "type": "int128"
74
+ },
75
+ {
76
+ "name": "_min_amount",
77
+ "type": "uint256"
78
+ }
79
+ ],
80
+ "outputs": [
81
+ {
82
+ "name": "",
83
+ "type": "uint256"
84
+ }
85
+ ]
86
+ },
87
+ {
88
+ "stateMutability": "nonpayable",
89
+ "type": "function",
90
+ "name": "remove_liquidity_imbalance",
91
+ "inputs": [
92
+ {
93
+ "name": "_pool",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "name": "_amounts",
98
+ "type": "uint256[4]"
99
+ },
100
+ {
101
+ "name": "_max_burn_amount",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "outputs": [
106
+ {
107
+ "name": "",
108
+ "type": "uint256"
109
+ }
110
+ ]
111
+ },
112
+ {
113
+ "stateMutability": "view",
114
+ "type": "function",
115
+ "name": "calc_withdraw_one_coin",
116
+ "inputs": [
117
+ {
118
+ "name": "_pool",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "name": "_token_amount",
123
+ "type": "uint256"
124
+ },
125
+ {
126
+ "name": "i",
127
+ "type": "int128"
128
+ }
129
+ ],
130
+ "outputs": [
131
+ {
132
+ "name": "",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "gas": "5753"
137
+ },
138
+ {
139
+ "stateMutability": "view",
140
+ "type": "function",
141
+ "name": "calc_token_amount",
142
+ "inputs": [
143
+ {
144
+ "name": "_pool",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "name": "_amounts",
149
+ "type": "uint256[4]"
150
+ },
151
+ {
152
+ "name": "_is_deposit",
153
+ "type": "bool"
154
+ }
155
+ ],
156
+ "outputs": [
157
+ {
158
+ "name": "",
159
+ "type": "uint256"
160
+ }
161
+ ],
162
+ "gas": "6666"
163
+ },
164
+ {
165
+ "stateMutability": "nonpayable",
166
+ "type": "function",
167
+ "name": "exchange_underlying",
168
+ "inputs": [
169
+ {
170
+ "name": "_pool",
171
+ "type": "address"
172
+ },
173
+ {
174
+ "name": "_i",
175
+ "type": "int128"
176
+ },
177
+ {
178
+ "name": "_j",
179
+ "type": "int128"
180
+ },
181
+ {
182
+ "name": "_dx",
183
+ "type": "uint256"
184
+ },
185
+ {
186
+ "name": "_min_dy",
187
+ "type": "uint256"
188
+ }
189
+ ],
190
+ "outputs": [
191
+ {
192
+ "name": "",
193
+ "type": "uint256"
194
+ }
195
+ ]
196
+ }
197
+ ]