@curvefi/api 2.60.3 → 2.60.5
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/curve.js
CHANGED
|
@@ -1121,12 +1121,10 @@ var Curve = /** @class */ (function () {
|
|
|
1121
1121
|
if (this.chainId === 1) {
|
|
1122
1122
|
this.setContract(this.constants.ALIASES.minter, minterMainnetABI);
|
|
1123
1123
|
this.setContract(this.constants.ALIASES.gauge_factory_fraxtal, gaugeFactoryForFraxtalABI);
|
|
1124
|
+
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
|
|
1124
1125
|
}
|
|
1125
1126
|
this.setContract(this.constants.ALIASES.voting_escrow, votingEscrowABI);
|
|
1126
1127
|
this.setContract(this.constants.ALIASES.fee_distributor, feeDistributorABI);
|
|
1127
|
-
if (this.chainId === 1) {
|
|
1128
|
-
this.setContract(this.constants.ALIASES.fee_distributor_crvusd, feeDistributorCrvUSDABI);
|
|
1129
|
-
}
|
|
1130
1128
|
this.setContract(this.constants.ALIASES.gauge_controller, gaugeControllerABI);
|
|
1131
1129
|
if (this.chainId == 137) {
|
|
1132
1130
|
this.setContract(this.constants.ALIASES.router, routerPolygonABI);
|
package/lib/factory/deploy.js
CHANGED
|
@@ -571,7 +571,7 @@ var _deployTwocryptoPool = function (name, symbol, coins, A, gamma, midFee, // %
|
|
|
571
571
|
outFee, // %
|
|
572
572
|
allowedExtraProfit, feeGamma, adjustmentStep, maHalfTime, // Seconds
|
|
573
573
|
initialPrice, estimateGas) { return __awaiter(void 0, void 0, void 0, function () {
|
|
574
|
-
var _A, _gamma, _midFee, _outFee, _allowedExtraProfit, _feeGamma, _adjustmentStep, _maHalfTime, _initialPrice, contract, gas, gasLimit;
|
|
574
|
+
var MIN_GAMMA, MAX_GAMMA, _A, _gamma, _midFee, _outFee, _allowedExtraProfit, _feeGamma, _adjustmentStep, _maHalfTime, _initialPrice, contract, gas, gasLimit;
|
|
575
575
|
return __generator(this, function (_a) {
|
|
576
576
|
switch (_a.label) {
|
|
577
577
|
case 0:
|
|
@@ -587,10 +587,12 @@ initialPrice, estimateGas) { return __awaiter(void 0, void 0, void 0, function (
|
|
|
587
587
|
throw Error("A must be >= 4000. Passed A = ".concat(A));
|
|
588
588
|
if (BN(A).gt(4 * (Math.pow(10, 9))))
|
|
589
589
|
throw Error("A must be <= 4 * 10 ** 9. Passed A = ".concat(A));
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (BN(gamma).
|
|
593
|
-
throw Error("gamma must be
|
|
590
|
+
MIN_GAMMA = BN((Math.pow(10, 10)) / (Math.pow(10, 18)));
|
|
591
|
+
MAX_GAMMA = BN(199 * (Math.pow(10, 15)) / (Math.pow(10, 18)));
|
|
592
|
+
if (BN(gamma).lt(MIN_GAMMA))
|
|
593
|
+
throw Error("gamma must be >= ".concat(MIN_GAMMA, ". Passed gamma = ").concat(gamma));
|
|
594
|
+
if (BN(gamma).gt(MAX_GAMMA))
|
|
595
|
+
throw Error("gamma must be <= ".concat(MAX_GAMMA, ". Passed gamma = ").concat(gamma));
|
|
594
596
|
if (BN(midFee).lt(0.005))
|
|
595
597
|
throw Error("midFee must be >= 0.005. Passed midFee = ".concat(midFee));
|
|
596
598
|
if (BN(midFee).gt(100))
|