@curvefi/api 1.4.0 → 1.5.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.
- package/lib/boosting.js +8 -8
- package/lib/constants/abis/json/busd/swap.json +1 -2
- package/lib/constants/abis/json/compound/swap.json +1 -2
- package/lib/constants/abis/json/iearn/swap.json +1 -2
- package/lib/constants/abis/json/pax/swap.json +1 -2
- package/lib/constants/abis/json/ren/swap.json +1 -2
- package/lib/constants/abis/json/sbtc/swap.json +1 -2
- package/lib/constants/abis/json/susdv2/swap.json +1 -2
- package/lib/constants/abis/json/usdt/swap.json +1 -2
- package/lib/curve.d.ts +3 -1
- package/lib/curve.js +3 -2
- package/lib/pools.d.ts +45 -1
- package/lib/pools.js +734 -282
- package/lib/utils.js +4 -4
- package/package.json +1 -1
package/lib/utils.js
CHANGED
|
@@ -290,7 +290,7 @@ var _ensureAllowance = function (coins, amounts, spender) { return __awaiter(voi
|
|
|
290
290
|
case 3:
|
|
291
291
|
_e.sent();
|
|
292
292
|
if (!allowance[i].gt(ethers_1.ethers.BigNumber.from(0))) return [3 /*break*/, 6];
|
|
293
|
-
return [4 /*yield*/, contract.estimateGas.approve(spender, ethers_1.ethers.BigNumber.from(0), curve_1.curve.
|
|
293
|
+
return [4 /*yield*/, contract.estimateGas.approve(spender, ethers_1.ethers.BigNumber.from(0), curve_1.curve.constantOptions)];
|
|
294
294
|
case 4:
|
|
295
295
|
gasLimit_1 = (_e.sent()).mul(130).div(100);
|
|
296
296
|
_b = (_a = txHashes).push;
|
|
@@ -298,7 +298,7 @@ var _ensureAllowance = function (coins, amounts, spender) { return __awaiter(voi
|
|
|
298
298
|
case 5:
|
|
299
299
|
_b.apply(_a, [(_e.sent()).hash]);
|
|
300
300
|
_e.label = 6;
|
|
301
|
-
case 6: return [4 /*yield*/, contract.estimateGas.approve(spender, exports.MAX_ALLOWANCE, curve_1.curve.
|
|
301
|
+
case 6: return [4 /*yield*/, contract.estimateGas.approve(spender, exports.MAX_ALLOWANCE, curve_1.curve.constantOptions)];
|
|
302
302
|
case 7:
|
|
303
303
|
gasLimit = (_e.sent()).mul(130).div(100);
|
|
304
304
|
_d = (_c = txHashes).push;
|
|
@@ -336,13 +336,13 @@ var ensureAllowanceEstimateGas = function (coins, amounts, spender) { return __a
|
|
|
336
336
|
contract = curve_1.curve.contracts[coinAddresses[i]].contract;
|
|
337
337
|
if (!allowance[i].gt(ethers_1.ethers.BigNumber.from(0))) return [3 /*break*/, 4];
|
|
338
338
|
_a = gas;
|
|
339
|
-
return [4 /*yield*/, contract.estimateGas.approve(spender, ethers_1.ethers.BigNumber.from(0), curve_1.curve.
|
|
339
|
+
return [4 /*yield*/, contract.estimateGas.approve(spender, ethers_1.ethers.BigNumber.from(0), curve_1.curve.constantOptions)];
|
|
340
340
|
case 3:
|
|
341
341
|
gas = _a + (_c.sent()).toNumber();
|
|
342
342
|
_c.label = 4;
|
|
343
343
|
case 4:
|
|
344
344
|
_b = gas;
|
|
345
|
-
return [4 /*yield*/, contract.estimateGas.approve(spender, exports.MAX_ALLOWANCE, curve_1.curve.
|
|
345
|
+
return [4 /*yield*/, contract.estimateGas.approve(spender, exports.MAX_ALLOWANCE, curve_1.curve.constantOptions)];
|
|
346
346
|
case 5:
|
|
347
347
|
gas = _b + (_c.sent()).toNumber();
|
|
348
348
|
_c.label = 6;
|