@curvefi/api 2.54.3 → 2.54.4
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.
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"name": "coins",
|
|
25
|
-
"type": "address[
|
|
25
|
+
"type": "address[]"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
"name": "amounts",
|
|
29
|
-
"type": "uint256[
|
|
29
|
+
"type": "uint256[]"
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"name": "min_mint_amount",
|
|
@@ -36,13 +36,16 @@
|
|
|
36
36
|
"name": "use_underlying",
|
|
37
37
|
"type": "bool"
|
|
38
38
|
},
|
|
39
|
+
{
|
|
40
|
+
"name": "is_plain_stable_ng",
|
|
41
|
+
"type": "bool"
|
|
42
|
+
},
|
|
39
43
|
{
|
|
40
44
|
"name": "pool",
|
|
41
45
|
"type": "address"
|
|
42
46
|
}
|
|
43
47
|
],
|
|
44
|
-
"outputs": []
|
|
45
|
-
"gas": "409532"
|
|
48
|
+
"outputs": []
|
|
46
49
|
},
|
|
47
50
|
{
|
|
48
51
|
"stateMutability": "payable",
|
package/lib/constants/aliases.js
CHANGED
|
@@ -8,7 +8,7 @@ export var ALIASES_ETHEREUM = lowerCaseValues({
|
|
|
8
8
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
9
9
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
10
10
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
11
|
-
"deposit_and_stake": "
|
|
11
|
+
"deposit_and_stake": "0xBFab8ebc836E1c4D81837798FC076D219C9a1855",
|
|
12
12
|
"stable_calc": "0x0DCDED3545D565bA3B19E683431381007245d983",
|
|
13
13
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
14
14
|
"factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
|
|
@@ -30,7 +30,7 @@ export var ALIASES_POLYGON = lowerCaseValues({
|
|
|
30
30
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
31
31
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
32
32
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
33
|
-
"deposit_and_stake": "
|
|
33
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
34
34
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
35
35
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
36
36
|
"factory": '0x722272d36ef0da72ff51c5a65db7b870e2e8d4ee',
|
|
@@ -49,7 +49,7 @@ export var ALIASES_FANTOM = lowerCaseValues({
|
|
|
49
49
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
50
50
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
51
51
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
52
|
-
"deposit_and_stake": "
|
|
52
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
53
53
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
54
54
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
55
55
|
"factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
|
|
@@ -68,7 +68,7 @@ export var ALIASES_AVALANCHE = lowerCaseValues({
|
|
|
68
68
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
69
69
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
70
70
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
71
|
-
"deposit_and_stake": "
|
|
71
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
72
72
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
73
73
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
74
74
|
"factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
@@ -87,7 +87,7 @@ export var ALIASES_ARBITRUM = lowerCaseValues({
|
|
|
87
87
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
88
88
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
89
89
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
90
|
-
"deposit_and_stake": "
|
|
90
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
91
91
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
92
92
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
93
93
|
"factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
|
|
@@ -106,7 +106,7 @@ export var ALIASES_OPTIMISM = lowerCaseValues({
|
|
|
106
106
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
107
107
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
108
108
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
109
|
-
"deposit_and_stake": "
|
|
109
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
110
110
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
111
111
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
112
112
|
"factory": '0x2db0E83599a91b508Ac268a6197b8B14F5e72840',
|
|
@@ -126,7 +126,7 @@ export var ALIASES_XDAI = lowerCaseValues({
|
|
|
126
126
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
127
127
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
128
128
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
129
|
-
"deposit_and_stake": "
|
|
129
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
130
130
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
131
131
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
132
132
|
"factory": '0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5',
|
|
@@ -145,7 +145,7 @@ export var ALIASES_MOONBEAM = lowerCaseValues({
|
|
|
145
145
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
146
146
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
147
147
|
"router": "0x0000000000000000000000000000000000000000",
|
|
148
|
-
"deposit_and_stake": "
|
|
148
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
149
149
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
150
150
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
151
151
|
"factory": '0x4244eB811D6e0Ef302326675207A95113dB4E1F8',
|
|
@@ -164,7 +164,7 @@ export var ALIASES_AURORA = lowerCaseValues({
|
|
|
164
164
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
165
165
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
166
166
|
"router": "0x0000000000000000000000000000000000000000",
|
|
167
|
-
"deposit_and_stake": "
|
|
167
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
168
168
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
169
169
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
170
170
|
"factory": '0xb9fc157394af804a3578134a6585c0dc9cc990d4',
|
|
@@ -183,7 +183,7 @@ export var ALIASES_KAVA = lowerCaseValues({
|
|
|
183
183
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
184
184
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
185
185
|
"router": "0xF0d4c12A5768D806021F80a262B4d39d26C58b8D",
|
|
186
|
-
"deposit_and_stake": "
|
|
186
|
+
"deposit_and_stake": "0x37c5ab57AF7100Bdc9B668d766e193CCbF6614FD",
|
|
187
187
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
188
188
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
189
189
|
"factory": '0x40bc62805471eF53DdD5C5cF99ed3d9e5aa81b48',
|
|
@@ -202,7 +202,7 @@ export var ALIASES_CELO = lowerCaseValues({
|
|
|
202
202
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
203
203
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
204
204
|
"router": "0x0000000000000000000000000000000000000000",
|
|
205
|
-
"deposit_and_stake": "
|
|
205
|
+
"deposit_and_stake": "0x0000000000000000000000000000000000000000",
|
|
206
206
|
"stable_calc": "0xCA8d0747B5573D69653C3aC22242e6341C36e4b4",
|
|
207
207
|
"crypto_calc": '0xA72C85C258A81761433B4e8da60505Fe3Dd551CC',
|
|
208
208
|
"factory": '0x5277A0226d10392295E8D383E9724D6E416d6e6C',
|
|
@@ -240,7 +240,7 @@ export var ALIASES_BASE = lowerCaseValues({
|
|
|
240
240
|
"gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
|
|
241
241
|
"address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
|
|
242
242
|
"router": "0xd6681e74eEA20d196c15038C580f721EF2aB6320",
|
|
243
|
-
"deposit_and_stake": "
|
|
243
|
+
"deposit_and_stake": "0x69522fb5337663d3B4dFB0030b881c1A750Adb4f",
|
|
244
244
|
"stable_calc": "0x5552b631e2aD801fAa129Aacf4B701071cC9D1f7",
|
|
245
245
|
"crypto_calc": '0xEfadDdE5B43917CcC738AdE6962295A0B343f7CE',
|
|
246
246
|
"factory": '0x3093f9B57A428F3EB6285a589cb35bEA6e78c336',
|
|
@@ -260,7 +260,7 @@ export var ALIASES_BSC = lowerCaseValues({
|
|
|
260
260
|
"gauge_controller": "0x0000000000000000000000000000000000000000",
|
|
261
261
|
"address_provider": "0x0000000000000000000000000000000000000000",
|
|
262
262
|
"router": "0x69522fb5337663d3B4dFB0030b881c1A750Adb4f",
|
|
263
|
-
"deposit_and_stake": "
|
|
263
|
+
"deposit_and_stake": "0x4f37A9d177470499A2dD084621020b023fcffc1F",
|
|
264
264
|
"stable_calc": "0x0fE38dCC905eC14F6099a83Ac5C93BF2601300CF",
|
|
265
265
|
"crypto_calc": '0xd6681e74eEA20d196c15038C580f721EF2aB6320',
|
|
266
266
|
"factory": '0xEfDE221f306152971D8e9f181bFe998447975810',
|
|
@@ -2260,7 +2260,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2260
2260
|
};
|
|
2261
2261
|
PoolTemplate.prototype._depositAndStake = function (amounts, slippage, isUnderlying, estimateGas) {
|
|
2262
2262
|
return __awaiter(this, void 0, void 0, function () {
|
|
2263
|
-
var coinAddresses, coins, decimals, depositAddress, balances, _c, _d, _e, _f, _g, i, allowance, _h, _amounts, contract, useUnderlying, _expectedLpTokenAmount, _j, _k, _l, _m, _o, minAmountBN, _minMintAmount, ethIndex, value,
|
|
2263
|
+
var coinAddresses, coins, decimals, depositAddress, balances, _c, _d, _e, _f, _g, i, allowance, _h, _amounts, contract, useUnderlying, _expectedLpTokenAmount, _j, _k, _l, _m, _o, minAmountBN, _minMintAmount, ethIndex, value, _gas, gasLimit;
|
|
2264
2264
|
return __generator(this, function (_q) {
|
|
2265
2265
|
switch (_q.label) {
|
|
2266
2266
|
case 0:
|
|
@@ -2336,12 +2336,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2336
2336
|
_minMintAmount = fromBN(minAmountBN);
|
|
2337
2337
|
ethIndex = getEthIndex(coinAddresses);
|
|
2338
2338
|
value = _amounts[ethIndex] || curve.parseUnits("0");
|
|
2339
|
-
|
|
2340
|
-
for (i = 0; i < maxCoins; i++) {
|
|
2341
|
-
coinAddresses[i] = coinAddresses[i] || curve.constants.ZERO_ADDRESS;
|
|
2342
|
-
_amounts[i] = _amounts[i] || curve.parseUnits("0");
|
|
2343
|
-
}
|
|
2344
|
-
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2339
|
+
return [4 /*yield*/, contract.deposit_and_stake.estimateGas(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.constantOptions), { value: value }))];
|
|
2345
2340
|
case 17:
|
|
2346
2341
|
_gas = (_q.sent());
|
|
2347
2342
|
if (estimateGas)
|
|
@@ -2350,7 +2345,7 @@ var PoolTemplate = /** @class */ (function () {
|
|
|
2350
2345
|
case 18:
|
|
2351
2346
|
_q.sent();
|
|
2352
2347
|
gasLimit = DIGas(_gas) * curve.parseUnits("200", 0) / curve.parseUnits("100", 0);
|
|
2353
|
-
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2348
|
+
return [4 /*yield*/, contract.deposit_and_stake(depositAddress, this.lpToken, this.gauge, coins.length, coinAddresses, _amounts, _minMintAmount, useUnderlying, this.isStableNg && this.isPlain, this.isMetaFactory && isUnderlying ? this.address : curve.constants.ZERO_ADDRESS, __assign(__assign({}, curve.options), { gasLimit: gasLimit, value: value }))];
|
|
2354
2349
|
case 19: return [2 /*return*/, (_q.sent()).hash];
|
|
2355
2350
|
}
|
|
2356
2351
|
});
|