@curvefi/api 2.60.4 → 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.
@@ -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
- if (BN(gamma).lt(1e-8))
591
- throw Error("gamma must be >= 1e-8. Passed gamma = ".concat(gamma));
592
- if (BN(gamma).gt(0.02))
593
- throw Error("gamma must be <= 0.02. Passed gamma = ".concat(gamma));
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))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.60.4",
3
+ "version": "2.60.5",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",