@dhedge/v2-sdk 2.0.1 → 2.0.2

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.
@@ -4243,6 +4243,20 @@ var abi$2 = [
4243
4243
  ],
4244
4244
  stateMutability: "view",
4245
4245
  type: "function"
4246
+ },
4247
+ {
4248
+ inputs: [
4249
+ {
4250
+ internalType: "bool",
4251
+ name: "_privatePool",
4252
+ type: "bool"
4253
+ }
4254
+ ],
4255
+ name: "setPoolPrivate",
4256
+ outputs: [
4257
+ ],
4258
+ stateMutability: "nonpayable",
4259
+ type: "function"
4246
4260
  }
4247
4261
  ];
4248
4262
  var ManagerLogic = {
@@ -29403,6 +29417,65 @@ var Pool = /*#__PURE__*/function () {
29403
29417
 
29404
29418
  return setTrader;
29405
29419
  }()
29420
+ /**
29421
+ * Sets a pool private or public
29422
+ * @param {boolean} _private True for private, false for public
29423
+ * @param {any} options Transaction options
29424
+ * @param {boolean} estimateGas Simulate/estimate gas
29425
+ * @returns {Promise<any>} Transaction
29426
+ */
29427
+ ;
29428
+
29429
+ _proto.setPrivate =
29430
+ /*#__PURE__*/
29431
+ function () {
29432
+ var _setPrivate = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(_private, options, estimateGas) {
29433
+ var tx;
29434
+ return runtime_1.wrap(function _callee26$(_context26) {
29435
+ while (1) {
29436
+ switch (_context26.prev = _context26.next) {
29437
+ case 0:
29438
+ if (options === void 0) {
29439
+ options = null;
29440
+ }
29441
+
29442
+ if (estimateGas === void 0) {
29443
+ estimateGas = false;
29444
+ }
29445
+
29446
+ if (!estimateGas) {
29447
+ _context26.next = 6;
29448
+ break;
29449
+ }
29450
+
29451
+ _context26.next = 5;
29452
+ return this.managerLogic.estimateGas.setPoolPrivate(_private, options);
29453
+
29454
+ case 5:
29455
+ return _context26.abrupt("return", _context26.sent);
29456
+
29457
+ case 6:
29458
+ _context26.next = 8;
29459
+ return this.managerLogic.setPoolPrivate(_private, options);
29460
+
29461
+ case 8:
29462
+ tx = _context26.sent;
29463
+ return _context26.abrupt("return", tx);
29464
+
29465
+ case 10:
29466
+ case "end":
29467
+ return _context26.stop();
29468
+ }
29469
+ }
29470
+ }, _callee26, this);
29471
+ }));
29472
+
29473
+ function setPrivate(_x117, _x118, _x119) {
29474
+ return _setPrivate.apply(this, arguments);
29475
+ }
29476
+
29477
+ return setPrivate;
29478
+ }()
29406
29479
  /**
29407
29480
  * Invest into a Balancer pool
29408
29481
  * @param {string} poolId Balancer pool id
@@ -29417,11 +29490,11 @@ var Pool = /*#__PURE__*/function () {
29417
29490
  _proto.joinBalancerPool =
29418
29491
  /*#__PURE__*/
29419
29492
  function () {
29420
- var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(poolId, assets, amountsIn, options, sdkOptions) {
29493
+ var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(poolId, assets, amountsIn, options, sdkOptions) {
29421
29494
  var joinPoolTxData, tx;
29422
- return runtime_1.wrap(function _callee26$(_context26) {
29495
+ return runtime_1.wrap(function _callee27$(_context27) {
29423
29496
  while (1) {
29424
- switch (_context26.prev = _context26.next) {
29497
+ switch (_context27.prev = _context27.next) {
29425
29498
  case 0:
29426
29499
  if (options === void 0) {
29427
29500
  options = null;
@@ -29434,22 +29507,22 @@ var Pool = /*#__PURE__*/function () {
29434
29507
  }
29435
29508
 
29436
29509
  joinPoolTxData = this.utils.getBalancerJoinPoolTx(this, poolId, assets, amountsIn);
29437
- _context26.next = 5;
29510
+ _context27.next = 5;
29438
29511
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][exports.Dapp.BALANCER], joinPoolTxData, options], sdkOptions);
29439
29512
 
29440
29513
  case 5:
29441
- tx = _context26.sent;
29442
- return _context26.abrupt("return", tx);
29514
+ tx = _context27.sent;
29515
+ return _context27.abrupt("return", tx);
29443
29516
 
29444
29517
  case 7:
29445
29518
  case "end":
29446
- return _context26.stop();
29519
+ return _context27.stop();
29447
29520
  }
29448
29521
  }
29449
- }, _callee26, this);
29522
+ }, _callee27, this);
29450
29523
  }));
29451
29524
 
29452
- function joinBalancerPool(_x117, _x118, _x119, _x120, _x121) {
29525
+ function joinBalancerPool(_x120, _x121, _x122, _x123, _x124) {
29453
29526
  return _joinBalancerPool.apply(this, arguments);
29454
29527
  }
29455
29528
 
@@ -29470,11 +29543,11 @@ var Pool = /*#__PURE__*/function () {
29470
29543
  _proto.exitBalancerPool =
29471
29544
  /*#__PURE__*/
29472
29545
  function () {
29473
- var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(poolId, assets, amount, singleExitAssetIndex, options, sdkOptions) {
29546
+ var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(poolId, assets, amount, singleExitAssetIndex, options, sdkOptions) {
29474
29547
  var exitPoolTxData, tx;
29475
- return runtime_1.wrap(function _callee27$(_context27) {
29548
+ return runtime_1.wrap(function _callee28$(_context28) {
29476
29549
  while (1) {
29477
- switch (_context27.prev = _context27.next) {
29550
+ switch (_context28.prev = _context28.next) {
29478
29551
  case 0:
29479
29552
  if (singleExitAssetIndex === void 0) {
29480
29553
  singleExitAssetIndex = null;
@@ -29491,22 +29564,22 @@ var Pool = /*#__PURE__*/function () {
29491
29564
  }
29492
29565
 
29493
29566
  exitPoolTxData = this.utils.getBalancerExitPoolTx(this, poolId, assets, singleExitAssetIndex, amount);
29494
- _context27.next = 6;
29567
+ _context28.next = 6;
29495
29568
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][exports.Dapp.BALANCER], exitPoolTxData, options], sdkOptions);
29496
29569
 
29497
29570
  case 6:
29498
- tx = _context27.sent;
29499
- return _context27.abrupt("return", tx);
29571
+ tx = _context28.sent;
29572
+ return _context28.abrupt("return", tx);
29500
29573
 
29501
29574
  case 8:
29502
29575
  case "end":
29503
- return _context27.stop();
29576
+ return _context28.stop();
29504
29577
  }
29505
29578
  }
29506
- }, _callee27, this);
29579
+ }, _callee28, this);
29507
29580
  }));
29508
29581
 
29509
- function exitBalancerPool(_x122, _x123, _x124, _x125, _x126, _x127) {
29582
+ function exitBalancerPool(_x125, _x126, _x127, _x128, _x129, _x130) {
29510
29583
  return _exitBalancerPool.apply(this, arguments);
29511
29584
  }
29512
29585
 
@@ -29524,11 +29597,11 @@ var Pool = /*#__PURE__*/function () {
29524
29597
  _proto.harvestAaveRewards =
29525
29598
  /*#__PURE__*/
29526
29599
  function () {
29527
- var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(assets, options, sdkOptions) {
29600
+ var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(assets, options, sdkOptions) {
29528
29601
  var aaveIncentivesAddress, iAaveIncentivesController, aaveIncentivesController, amount, claimTxData, tx;
29529
- return runtime_1.wrap(function _callee28$(_context28) {
29602
+ return runtime_1.wrap(function _callee29$(_context29) {
29530
29603
  while (1) {
29531
- switch (_context28.prev = _context28.next) {
29604
+ switch (_context29.prev = _context29.next) {
29532
29605
  case 0:
29533
29606
  if (options === void 0) {
29534
29607
  options = null;
@@ -29543,28 +29616,28 @@ var Pool = /*#__PURE__*/function () {
29543
29616
  aaveIncentivesAddress = stakingAddress[this.network][exports.Dapp.AAVE];
29544
29617
  iAaveIncentivesController = new ethers.ethers.utils.Interface(IAaveIncentivesController.abi);
29545
29618
  aaveIncentivesController = new ethers.ethers.Contract(aaveIncentivesAddress, iAaveIncentivesController, this.signer);
29546
- _context28.next = 7;
29619
+ _context29.next = 7;
29547
29620
  return aaveIncentivesController.getUserUnclaimedRewards(this.address);
29548
29621
 
29549
29622
  case 7:
29550
- amount = _context28.sent;
29623
+ amount = _context29.sent;
29551
29624
  claimTxData = iAaveIncentivesController.encodeFunctionData(exports.Transaction.CLAIM_REWARDS, [assets, amount, this.address]);
29552
- _context28.next = 11;
29625
+ _context29.next = 11;
29553
29626
  return getPoolTxOrGasEstimate(this, [aaveIncentivesAddress, claimTxData, options], sdkOptions);
29554
29627
 
29555
29628
  case 11:
29556
- tx = _context28.sent;
29557
- return _context28.abrupt("return", tx);
29629
+ tx = _context29.sent;
29630
+ return _context29.abrupt("return", tx);
29558
29631
 
29559
29632
  case 13:
29560
29633
  case "end":
29561
- return _context28.stop();
29634
+ return _context29.stop();
29562
29635
  }
29563
29636
  }
29564
- }, _callee28, this);
29637
+ }, _callee29, this);
29565
29638
  }));
29566
29639
 
29567
- function harvestAaveRewards(_x128, _x129, _x130) {
29640
+ function harvestAaveRewards(_x131, _x132, _x133) {
29568
29641
  return _harvestAaveRewards.apply(this, arguments);
29569
29642
  }
29570
29643
 
@@ -29583,11 +29656,11 @@ var Pool = /*#__PURE__*/function () {
29583
29656
  _proto.harvestAaveV3Rewards =
29584
29657
  /*#__PURE__*/
29585
29658
  function () {
29586
- var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(assets, rewardAsset, options, sdkOptions) {
29659
+ var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(assets, rewardAsset, options, sdkOptions) {
29587
29660
  var claimTxData, tx;
29588
- return runtime_1.wrap(function _callee29$(_context29) {
29661
+ return runtime_1.wrap(function _callee30$(_context30) {
29589
29662
  while (1) {
29590
- switch (_context29.prev = _context29.next) {
29663
+ switch (_context30.prev = _context30.next) {
29591
29664
  case 0:
29592
29665
  if (options === void 0) {
29593
29666
  options = null;
@@ -29599,27 +29672,27 @@ var Pool = /*#__PURE__*/function () {
29599
29672
  };
29600
29673
  }
29601
29674
 
29602
- _context29.next = 4;
29675
+ _context30.next = 4;
29603
29676
  return getAaveV3ClaimTxData(this, assets, rewardAsset);
29604
29677
 
29605
29678
  case 4:
29606
- claimTxData = _context29.sent;
29607
- _context29.next = 7;
29679
+ claimTxData = _context30.sent;
29680
+ _context30.next = 7;
29608
29681
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][exports.Dapp.AAVEV3], claimTxData, options], sdkOptions);
29609
29682
 
29610
29683
  case 7:
29611
- tx = _context29.sent;
29612
- return _context29.abrupt("return", tx);
29684
+ tx = _context30.sent;
29685
+ return _context30.abrupt("return", tx);
29613
29686
 
29614
29687
  case 9:
29615
29688
  case "end":
29616
- return _context29.stop();
29689
+ return _context30.stop();
29617
29690
  }
29618
29691
  }
29619
- }, _callee29, this);
29692
+ }, _callee30, this);
29620
29693
  }));
29621
29694
 
29622
- function harvestAaveV3Rewards(_x131, _x132, _x133, _x134) {
29695
+ function harvestAaveV3Rewards(_x134, _x135, _x136, _x137) {
29623
29696
  return _harvestAaveV3Rewards.apply(this, arguments);
29624
29697
  }
29625
29698
 
@@ -29637,11 +29710,11 @@ var Pool = /*#__PURE__*/function () {
29637
29710
  _proto.harvestCompoundV3Rewards =
29638
29711
  /*#__PURE__*/
29639
29712
  function () {
29640
- var _harvestCompoundV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(asset, options, sdkOptions) {
29713
+ var _harvestCompoundV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(asset, options, sdkOptions) {
29641
29714
  var claimTxData, tx;
29642
- return runtime_1.wrap(function _callee30$(_context30) {
29715
+ return runtime_1.wrap(function _callee31$(_context31) {
29643
29716
  while (1) {
29644
- switch (_context30.prev = _context30.next) {
29717
+ switch (_context31.prev = _context31.next) {
29645
29718
  case 0:
29646
29719
  if (options === void 0) {
29647
29720
  options = null;
@@ -29653,27 +29726,27 @@ var Pool = /*#__PURE__*/function () {
29653
29726
  };
29654
29727
  }
29655
29728
 
29656
- _context30.next = 4;
29729
+ _context31.next = 4;
29657
29730
  return getCompoundV3ClaimTxData(this, asset);
29658
29731
 
29659
29732
  case 4:
29660
- claimTxData = _context30.sent;
29661
- _context30.next = 7;
29733
+ claimTxData = _context31.sent;
29734
+ _context31.next = 7;
29662
29735
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][exports.Dapp.COMPOUNDV3], claimTxData, options], sdkOptions);
29663
29736
 
29664
29737
  case 7:
29665
- tx = _context30.sent;
29666
- return _context30.abrupt("return", tx);
29738
+ tx = _context31.sent;
29739
+ return _context31.abrupt("return", tx);
29667
29740
 
29668
29741
  case 9:
29669
29742
  case "end":
29670
- return _context30.stop();
29743
+ return _context31.stop();
29671
29744
  }
29672
29745
  }
29673
- }, _callee30, this);
29746
+ }, _callee31, this);
29674
29747
  }));
29675
29748
 
29676
- function harvestCompoundV3Rewards(_x135, _x136, _x137) {
29749
+ function harvestCompoundV3Rewards(_x138, _x139, _x140) {
29677
29750
  return _harvestCompoundV3Rewards.apply(this, arguments);
29678
29751
  }
29679
29752
 
@@ -29700,11 +29773,11 @@ var Pool = /*#__PURE__*/function () {
29700
29773
  _proto.addLiquidityUniswapV3 =
29701
29774
  /*#__PURE__*/
29702
29775
  function () {
29703
- var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, sdkOptions) {
29776
+ var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, sdkOptions) {
29704
29777
  var mintTxData, tx;
29705
- return runtime_1.wrap(function _callee31$(_context31) {
29778
+ return runtime_1.wrap(function _callee32$(_context32) {
29706
29779
  while (1) {
29707
- switch (_context31.prev = _context31.next) {
29780
+ switch (_context32.prev = _context32.next) {
29708
29781
  case 0:
29709
29782
  if (options === void 0) {
29710
29783
  options = null;
@@ -29717,7 +29790,7 @@ var Pool = /*#__PURE__*/function () {
29717
29790
  }
29718
29791
 
29719
29792
  if (!((minPrice === null || maxPrice === null) && (minTick === null || maxTick === null))) {
29720
- _context31.next = 4;
29793
+ _context32.next = 4;
29721
29794
  break;
29722
29795
  }
29723
29796
 
@@ -29725,34 +29798,34 @@ var Pool = /*#__PURE__*/function () {
29725
29798
 
29726
29799
  case 4:
29727
29800
  if (!((minPrice || maxPrice) && dapp !== exports.Dapp.UNISWAPV3)) {
29728
- _context31.next = 6;
29801
+ _context32.next = 6;
29729
29802
  break;
29730
29803
  }
29731
29804
 
29732
29805
  throw new Error("no price conversion for Aerodrome/Velodrome CL");
29733
29806
 
29734
29807
  case 6:
29735
- _context31.next = 8;
29808
+ _context32.next = 8;
29736
29809
  return getUniswapV3MintTxData(dapp, this, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing);
29737
29810
 
29738
29811
  case 8:
29739
- mintTxData = _context31.sent;
29740
- _context31.next = 11;
29812
+ mintTxData = _context32.sent;
29813
+ _context32.next = 11;
29741
29814
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], mintTxData, options], sdkOptions);
29742
29815
 
29743
29816
  case 11:
29744
- tx = _context31.sent;
29745
- return _context31.abrupt("return", tx);
29817
+ tx = _context32.sent;
29818
+ return _context32.abrupt("return", tx);
29746
29819
 
29747
29820
  case 13:
29748
29821
  case "end":
29749
- return _context31.stop();
29822
+ return _context32.stop();
29750
29823
  }
29751
29824
  }
29752
- }, _callee31, this);
29825
+ }, _callee32, this);
29753
29826
  }));
29754
29827
 
29755
- function addLiquidityUniswapV3(_x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145, _x146, _x147, _x148, _x149) {
29828
+ function addLiquidityUniswapV3(_x141, _x142, _x143, _x144, _x145, _x146, _x147, _x148, _x149, _x150, _x151, _x152) {
29756
29829
  return _addLiquidityUniswapV.apply(this, arguments);
29757
29830
  }
29758
29831
 
@@ -29772,11 +29845,11 @@ var Pool = /*#__PURE__*/function () {
29772
29845
  _proto.decreaseLiquidity =
29773
29846
  /*#__PURE__*/
29774
29847
  function () {
29775
- var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, tokenId, amount, options, sdkOptions) {
29848
+ var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, amount, options, sdkOptions) {
29776
29849
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
29777
- return runtime_1.wrap(function _callee32$(_context32) {
29850
+ return runtime_1.wrap(function _callee33$(_context33) {
29778
29851
  while (1) {
29779
- switch (_context32.prev = _context32.next) {
29852
+ switch (_context33.prev = _context33.next) {
29780
29853
  case 0:
29781
29854
  if (amount === void 0) {
29782
29855
  amount = 100;
@@ -29793,20 +29866,20 @@ var Pool = /*#__PURE__*/function () {
29793
29866
  }
29794
29867
 
29795
29868
  isStaked = false;
29796
- _context32.t0 = dapp;
29797
- _context32.next = _context32.t0 === exports.Dapp.UNISWAPV3 ? 7 : _context32.t0 === exports.Dapp.RAMSESCL ? 7 : _context32.t0 === exports.Dapp.VELODROMECL ? 9 : _context32.t0 === exports.Dapp.AERODROMECL ? 9 : _context32.t0 === exports.Dapp.PANCAKECL ? 9 : _context32.t0 === exports.Dapp.ARRAKIS ? 14 : 16;
29869
+ _context33.t0 = dapp;
29870
+ _context33.next = _context33.t0 === exports.Dapp.UNISWAPV3 ? 7 : _context33.t0 === exports.Dapp.RAMSESCL ? 7 : _context33.t0 === exports.Dapp.VELODROMECL ? 9 : _context33.t0 === exports.Dapp.AERODROMECL ? 9 : _context33.t0 === exports.Dapp.PANCAKECL ? 9 : _context33.t0 === exports.Dapp.ARRAKIS ? 14 : 16;
29798
29871
  break;
29799
29872
 
29800
29873
  case 7:
29801
29874
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
29802
- return _context32.abrupt("break", 17);
29875
+ return _context33.abrupt("break", 17);
29803
29876
 
29804
29877
  case 9:
29805
- _context32.next = 11;
29878
+ _context33.next = 11;
29806
29879
  return getClOwner(this, dapp, tokenId);
29807
29880
 
29808
29881
  case 11:
29809
- tokenIdOwner = _context32.sent;
29882
+ tokenIdOwner = _context33.sent;
29810
29883
 
29811
29884
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
29812
29885
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -29816,49 +29889,49 @@ var Pool = /*#__PURE__*/function () {
29816
29889
  isStaked = true;
29817
29890
  }
29818
29891
 
29819
- return _context32.abrupt("break", 17);
29892
+ return _context33.abrupt("break", 17);
29820
29893
 
29821
29894
  case 14:
29822
29895
  dappAddress = routerAddress[this.network][dapp];
29823
- return _context32.abrupt("break", 17);
29896
+ return _context33.abrupt("break", 17);
29824
29897
 
29825
29898
  case 16:
29826
29899
  throw new Error("dapp not supported");
29827
29900
 
29828
29901
  case 17:
29829
29902
  if (!(!isStaked || dapp === exports.Dapp.PANCAKECL)) {
29830
- _context32.next = 23;
29903
+ _context33.next = 23;
29831
29904
  break;
29832
29905
  }
29833
29906
 
29834
- _context32.next = 20;
29907
+ _context33.next = 20;
29835
29908
  return getDecreaseLiquidityTxData(this, dapp, tokenId, amount, isStaked);
29836
29909
 
29837
29910
  case 20:
29838
- txData = _context32.sent;
29839
- _context32.next = 24;
29911
+ txData = _context33.sent;
29912
+ _context33.next = 24;
29840
29913
  break;
29841
29914
 
29842
29915
  case 23:
29843
29916
  throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
29844
29917
 
29845
29918
  case 24:
29846
- _context32.next = 26;
29919
+ _context33.next = 26;
29847
29920
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], sdkOptions);
29848
29921
 
29849
29922
  case 26:
29850
- tx = _context32.sent;
29851
- return _context32.abrupt("return", tx);
29923
+ tx = _context33.sent;
29924
+ return _context33.abrupt("return", tx);
29852
29925
 
29853
29926
  case 28:
29854
29927
  case "end":
29855
- return _context32.stop();
29928
+ return _context33.stop();
29856
29929
  }
29857
29930
  }
29858
- }, _callee32, this);
29931
+ }, _callee33, this);
29859
29932
  }));
29860
29933
 
29861
- function decreaseLiquidity(_x150, _x151, _x152, _x153, _x154) {
29934
+ function decreaseLiquidity(_x153, _x154, _x155, _x156, _x157) {
29862
29935
  return _decreaseLiquidity.apply(this, arguments);
29863
29936
  }
29864
29937
 
@@ -29879,11 +29952,11 @@ var Pool = /*#__PURE__*/function () {
29879
29952
  _proto.increaseLiquidity =
29880
29953
  /*#__PURE__*/
29881
29954
  function () {
29882
- var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, amountA, amountB, options, sdkOptions) {
29955
+ var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(dapp, tokenId, amountA, amountB, options, sdkOptions) {
29883
29956
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
29884
- return runtime_1.wrap(function _callee33$(_context33) {
29957
+ return runtime_1.wrap(function _callee34$(_context34) {
29885
29958
  while (1) {
29886
- switch (_context33.prev = _context33.next) {
29959
+ switch (_context34.prev = _context34.next) {
29887
29960
  case 0:
29888
29961
  if (options === void 0) {
29889
29962
  options = null;
@@ -29896,20 +29969,20 @@ var Pool = /*#__PURE__*/function () {
29896
29969
  }
29897
29970
 
29898
29971
  isStaked = false;
29899
- _context33.t0 = dapp;
29900
- _context33.next = _context33.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context33.t0 === exports.Dapp.RAMSESCL ? 6 : _context33.t0 === exports.Dapp.VELODROMECL ? 8 : _context33.t0 === exports.Dapp.AERODROMECL ? 8 : _context33.t0 === exports.Dapp.PANCAKECL ? 8 : _context33.t0 === exports.Dapp.ARRAKIS ? 13 : 15;
29972
+ _context34.t0 = dapp;
29973
+ _context34.next = _context34.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context34.t0 === exports.Dapp.RAMSESCL ? 6 : _context34.t0 === exports.Dapp.VELODROMECL ? 8 : _context34.t0 === exports.Dapp.AERODROMECL ? 8 : _context34.t0 === exports.Dapp.PANCAKECL ? 8 : _context34.t0 === exports.Dapp.ARRAKIS ? 13 : 15;
29901
29974
  break;
29902
29975
 
29903
29976
  case 6:
29904
29977
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
29905
- return _context33.abrupt("break", 16);
29978
+ return _context34.abrupt("break", 16);
29906
29979
 
29907
29980
  case 8:
29908
- _context33.next = 10;
29981
+ _context34.next = 10;
29909
29982
  return getClOwner(this, dapp, tokenId);
29910
29983
 
29911
29984
  case 10:
29912
- tokenIdOwner = _context33.sent;
29985
+ tokenIdOwner = _context34.sent;
29913
29986
 
29914
29987
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
29915
29988
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -29919,49 +29992,49 @@ var Pool = /*#__PURE__*/function () {
29919
29992
  isStaked = true;
29920
29993
  }
29921
29994
 
29922
- return _context33.abrupt("break", 16);
29995
+ return _context34.abrupt("break", 16);
29923
29996
 
29924
29997
  case 13:
29925
29998
  dappAddress = routerAddress[this.network][dapp];
29926
- return _context33.abrupt("break", 16);
29999
+ return _context34.abrupt("break", 16);
29927
30000
 
29928
30001
  case 15:
29929
30002
  throw new Error("dapp not supported");
29930
30003
 
29931
30004
  case 16:
29932
30005
  if (!(!isStaked || dapp === exports.Dapp.PANCAKECL)) {
29933
- _context33.next = 22;
30006
+ _context34.next = 22;
29934
30007
  break;
29935
30008
  }
29936
30009
 
29937
- _context33.next = 19;
30010
+ _context34.next = 19;
29938
30011
  return getIncreaseLiquidityTxData(this, dapp, tokenId, amountA, amountB);
29939
30012
 
29940
30013
  case 19:
29941
- txData = _context33.sent;
29942
- _context33.next = 23;
30014
+ txData = _context34.sent;
30015
+ _context34.next = 23;
29943
30016
  break;
29944
30017
 
29945
30018
  case 22:
29946
30019
  throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
29947
30020
 
29948
30021
  case 23:
29949
- _context33.next = 25;
30022
+ _context34.next = 25;
29950
30023
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], sdkOptions);
29951
30024
 
29952
30025
  case 25:
29953
- tx = _context33.sent;
29954
- return _context33.abrupt("return", tx);
30026
+ tx = _context34.sent;
30027
+ return _context34.abrupt("return", tx);
29955
30028
 
29956
30029
  case 27:
29957
30030
  case "end":
29958
- return _context33.stop();
30031
+ return _context34.stop();
29959
30032
  }
29960
30033
  }
29961
- }, _callee33, this);
30034
+ }, _callee34, this);
29962
30035
  }));
29963
30036
 
29964
- function increaseLiquidity(_x155, _x156, _x157, _x158, _x159, _x160) {
30037
+ function increaseLiquidity(_x158, _x159, _x160, _x161, _x162, _x163) {
29965
30038
  return _increaseLiquidity.apply(this, arguments);
29966
30039
  }
29967
30040
 
@@ -29980,11 +30053,11 @@ var Pool = /*#__PURE__*/function () {
29980
30053
  _proto.claimFees =
29981
30054
  /*#__PURE__*/
29982
30055
  function () {
29983
- var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(dapp, tokenId, options, sdkOptions) {
30056
+ var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(dapp, tokenId, options, sdkOptions) {
29984
30057
  var txData, contractAddress, iNonfungiblePositionManager, abi, tokenIdOwner, tx;
29985
- return runtime_1.wrap(function _callee34$(_context34) {
30058
+ return runtime_1.wrap(function _callee35$(_context35) {
29986
30059
  while (1) {
29987
- switch (_context34.prev = _context34.next) {
30060
+ switch (_context35.prev = _context35.next) {
29988
30061
  case 0:
29989
30062
  if (options === void 0) {
29990
30063
  options = null;
@@ -29997,37 +30070,37 @@ var Pool = /*#__PURE__*/function () {
29997
30070
  }
29998
30071
 
29999
30072
  iNonfungiblePositionManager = new ethers.ethers.utils.Interface(INonfungiblePositionManager.abi);
30000
- _context34.t0 = dapp;
30001
- _context34.next = _context34.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context34.t0 === exports.Dapp.RAMSESCL ? 6 : _context34.t0 === exports.Dapp.ARRAKIS ? 9 : _context34.t0 === exports.Dapp.BALANCER ? 9 : _context34.t0 === exports.Dapp.VELODROME ? 13 : _context34.t0 === exports.Dapp.RAMSES ? 13 : _context34.t0 === exports.Dapp.VELODROMEV2 ? 16 : _context34.t0 === exports.Dapp.AERODROME ? 16 : _context34.t0 === exports.Dapp.VELODROMECL ? 19 : _context34.t0 === exports.Dapp.AERODROMECL ? 19 : _context34.t0 === exports.Dapp.PANCAKECL ? 19 : 24;
30073
+ _context35.t0 = dapp;
30074
+ _context35.next = _context35.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context35.t0 === exports.Dapp.RAMSESCL ? 6 : _context35.t0 === exports.Dapp.ARRAKIS ? 9 : _context35.t0 === exports.Dapp.BALANCER ? 9 : _context35.t0 === exports.Dapp.VELODROME ? 13 : _context35.t0 === exports.Dapp.RAMSES ? 13 : _context35.t0 === exports.Dapp.VELODROMEV2 ? 16 : _context35.t0 === exports.Dapp.AERODROME ? 16 : _context35.t0 === exports.Dapp.VELODROMECL ? 19 : _context35.t0 === exports.Dapp.AERODROMECL ? 19 : _context35.t0 === exports.Dapp.PANCAKECL ? 19 : 24;
30002
30075
  break;
30003
30076
 
30004
30077
  case 6:
30005
30078
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
30006
30079
  txData = iNonfungiblePositionManager.encodeFunctionData(exports.Transaction.COLLECT, [[tokenId, this.address, MaxUint128, MaxUint128]]);
30007
- return _context34.abrupt("break", 25);
30080
+ return _context35.abrupt("break", 25);
30008
30081
 
30009
30082
  case 9:
30010
30083
  contractAddress = tokenId;
30011
30084
  abi = new ethers.ethers.utils.Interface(ILiquidityGaugeV4.abi);
30012
30085
  txData = abi.encodeFunctionData("claim_rewards()", []);
30013
- return _context34.abrupt("break", 25);
30086
+ return _context35.abrupt("break", 25);
30014
30087
 
30015
30088
  case 13:
30016
30089
  contractAddress = tokenId;
30017
30090
  txData = getVelodromeClaimTxData(this, tokenId, false);
30018
- return _context34.abrupt("break", 25);
30091
+ return _context35.abrupt("break", 25);
30019
30092
 
30020
30093
  case 16:
30021
30094
  contractAddress = tokenId;
30022
30095
  txData = getVelodromeClaimTxData(this, tokenId, true);
30023
- return _context34.abrupt("break", 25);
30096
+ return _context35.abrupt("break", 25);
30024
30097
 
30025
30098
  case 19:
30026
- _context34.next = 21;
30099
+ _context35.next = 21;
30027
30100
  return getClOwner(this, dapp, tokenId);
30028
30101
 
30029
30102
  case 21:
30030
- tokenIdOwner = _context34.sent;
30103
+ tokenIdOwner = _context35.sent;
30031
30104
 
30032
30105
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
30033
30106
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -30043,28 +30116,28 @@ var Pool = /*#__PURE__*/function () {
30043
30116
  }
30044
30117
  }
30045
30118
 
30046
- return _context34.abrupt("break", 25);
30119
+ return _context35.abrupt("break", 25);
30047
30120
 
30048
30121
  case 24:
30049
30122
  throw new Error("dapp not supported");
30050
30123
 
30051
30124
  case 25:
30052
- _context34.next = 27;
30125
+ _context35.next = 27;
30053
30126
  return getPoolTxOrGasEstimate(this, [contractAddress, txData, options], sdkOptions);
30054
30127
 
30055
30128
  case 27:
30056
- tx = _context34.sent;
30057
- return _context34.abrupt("return", tx);
30129
+ tx = _context35.sent;
30130
+ return _context35.abrupt("return", tx);
30058
30131
 
30059
30132
  case 29:
30060
30133
  case "end":
30061
- return _context34.stop();
30134
+ return _context35.stop();
30062
30135
  }
30063
30136
  }
30064
- }, _callee34, this);
30137
+ }, _callee35, this);
30065
30138
  }));
30066
30139
 
30067
- function claimFees(_x161, _x162, _x163, _x164) {
30140
+ function claimFees(_x164, _x165, _x166, _x167) {
30068
30141
  return _claimFees.apply(this, arguments);
30069
30142
  }
30070
30143
 
@@ -30084,11 +30157,11 @@ var Pool = /*#__PURE__*/function () {
30084
30157
  _proto.getRewards =
30085
30158
  /*#__PURE__*/
30086
30159
  function () {
30087
- var _getRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(dapp, tokenId, rewards, options, sdkOptions) {
30160
+ var _getRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(dapp, tokenId, rewards, options, sdkOptions) {
30088
30161
  var tx;
30089
- return runtime_1.wrap(function _callee35$(_context35) {
30162
+ return runtime_1.wrap(function _callee36$(_context36) {
30090
30163
  while (1) {
30091
- switch (_context35.prev = _context35.next) {
30164
+ switch (_context36.prev = _context36.next) {
30092
30165
  case 0:
30093
30166
  if (options === void 0) {
30094
30167
  options = null;
@@ -30100,22 +30173,22 @@ var Pool = /*#__PURE__*/function () {
30100
30173
  };
30101
30174
  }
30102
30175
 
30103
- _context35.next = 4;
30176
+ _context36.next = 4;
30104
30177
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], getRewardsTxDta(tokenId, rewards), options], sdkOptions);
30105
30178
 
30106
30179
  case 4:
30107
- tx = _context35.sent;
30108
- return _context35.abrupt("return", tx);
30180
+ tx = _context36.sent;
30181
+ return _context36.abrupt("return", tx);
30109
30182
 
30110
30183
  case 6:
30111
30184
  case "end":
30112
- return _context35.stop();
30185
+ return _context36.stop();
30113
30186
  }
30114
30187
  }
30115
- }, _callee35, this);
30188
+ }, _callee36, this);
30116
30189
  }));
30117
30190
 
30118
- function getRewards(_x165, _x166, _x167, _x168, _x169) {
30191
+ function getRewards(_x168, _x169, _x170, _x171, _x172) {
30119
30192
  return _getRewards.apply(this, arguments);
30120
30193
  }
30121
30194
 
@@ -30138,11 +30211,11 @@ var Pool = /*#__PURE__*/function () {
30138
30211
  _proto.tradeUniswapV3 =
30139
30212
  /*#__PURE__*/
30140
30213
  function () {
30141
- var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetFrom, assetTo, amountIn, feeAmount, slippage, options, sdkOptions) {
30214
+ var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetFrom, assetTo, amountIn, feeAmount, slippage, options, sdkOptions) {
30142
30215
  var swapxData, tx;
30143
- return runtime_1.wrap(function _callee36$(_context36) {
30216
+ return runtime_1.wrap(function _callee37$(_context37) {
30144
30217
  while (1) {
30145
- switch (_context36.prev = _context36.next) {
30218
+ switch (_context37.prev = _context37.next) {
30146
30219
  case 0:
30147
30220
  if (slippage === void 0) {
30148
30221
  slippage = 0.5;
@@ -30158,27 +30231,27 @@ var Pool = /*#__PURE__*/function () {
30158
30231
  };
30159
30232
  }
30160
30233
 
30161
- _context36.next = 5;
30234
+ _context37.next = 5;
30162
30235
  return getUniswapV3SwapTxData(this, assetFrom, assetTo, amountIn, slippage, feeAmount);
30163
30236
 
30164
30237
  case 5:
30165
- swapxData = _context36.sent;
30166
- _context36.next = 8;
30238
+ swapxData = _context37.sent;
30239
+ _context37.next = 8;
30167
30240
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][exports.Dapp.UNISWAPV3], swapxData, options], sdkOptions);
30168
30241
 
30169
30242
  case 8:
30170
- tx = _context36.sent;
30171
- return _context36.abrupt("return", tx);
30243
+ tx = _context37.sent;
30244
+ return _context37.abrupt("return", tx);
30172
30245
 
30173
30246
  case 10:
30174
30247
  case "end":
30175
- return _context36.stop();
30248
+ return _context37.stop();
30176
30249
  }
30177
30250
  }
30178
- }, _callee36, this);
30251
+ }, _callee37, this);
30179
30252
  }));
30180
30253
 
30181
- function tradeUniswapV3(_x170, _x171, _x172, _x173, _x174, _x175, _x176) {
30254
+ function tradeUniswapV3(_x173, _x174, _x175, _x176, _x177, _x178, _x179) {
30182
30255
  return _tradeUniswapV.apply(this, arguments);
30183
30256
  }
30184
30257
 
@@ -30200,11 +30273,11 @@ var Pool = /*#__PURE__*/function () {
30200
30273
  _proto.addLiquidityVelodrome =
30201
30274
  /*#__PURE__*/
30202
30275
  function () {
30203
- var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30276
+ var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30204
30277
  var tx;
30205
- return runtime_1.wrap(function _callee37$(_context37) {
30278
+ return runtime_1.wrap(function _callee38$(_context38) {
30206
30279
  while (1) {
30207
- switch (_context37.prev = _context37.next) {
30280
+ switch (_context38.prev = _context38.next) {
30208
30281
  case 0:
30209
30282
  if (options === void 0) {
30210
30283
  options = null;
@@ -30216,33 +30289,33 @@ var Pool = /*#__PURE__*/function () {
30216
30289
  };
30217
30290
  }
30218
30291
 
30219
- _context37.t0 = getPoolTxOrGasEstimate;
30220
- _context37.t1 = this;
30221
- _context37.t2 = routerAddress[this.network][exports.Dapp.VELODROME];
30222
- _context37.next = 7;
30292
+ _context38.t0 = getPoolTxOrGasEstimate;
30293
+ _context38.t1 = this;
30294
+ _context38.t2 = routerAddress[this.network][exports.Dapp.VELODROME];
30295
+ _context38.next = 7;
30223
30296
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
30224
30297
 
30225
30298
  case 7:
30226
- _context37.t3 = _context37.sent;
30227
- _context37.t4 = options;
30228
- _context37.t5 = [_context37.t2, _context37.t3, _context37.t4];
30229
- _context37.t6 = sdkOptions;
30230
- _context37.next = 13;
30231
- return (0, _context37.t0)(_context37.t1, _context37.t5, _context37.t6);
30299
+ _context38.t3 = _context38.sent;
30300
+ _context38.t4 = options;
30301
+ _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
30302
+ _context38.t6 = sdkOptions;
30303
+ _context38.next = 13;
30304
+ return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
30232
30305
 
30233
30306
  case 13:
30234
- tx = _context37.sent;
30235
- return _context37.abrupt("return", tx);
30307
+ tx = _context38.sent;
30308
+ return _context38.abrupt("return", tx);
30236
30309
 
30237
30310
  case 15:
30238
30311
  case "end":
30239
- return _context37.stop();
30312
+ return _context38.stop();
30240
30313
  }
30241
30314
  }
30242
- }, _callee37, this);
30315
+ }, _callee38, this);
30243
30316
  }));
30244
30317
 
30245
- function addLiquidityVelodrome(_x177, _x178, _x179, _x180, _x181, _x182, _x183) {
30318
+ function addLiquidityVelodrome(_x180, _x181, _x182, _x183, _x184, _x185, _x186) {
30246
30319
  return _addLiquidityVelodrome.apply(this, arguments);
30247
30320
  }
30248
30321
 
@@ -30263,11 +30336,11 @@ var Pool = /*#__PURE__*/function () {
30263
30336
  _proto.removeLiquidityVelodrome =
30264
30337
  /*#__PURE__*/
30265
30338
  function () {
30266
- var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amount, isStable, options, sdkOptions) {
30339
+ var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(assetA, assetB, amount, isStable, options, sdkOptions) {
30267
30340
  var tx;
30268
- return runtime_1.wrap(function _callee38$(_context38) {
30341
+ return runtime_1.wrap(function _callee39$(_context39) {
30269
30342
  while (1) {
30270
- switch (_context38.prev = _context38.next) {
30343
+ switch (_context39.prev = _context39.next) {
30271
30344
  case 0:
30272
30345
  if (options === void 0) {
30273
30346
  options = null;
@@ -30279,33 +30352,33 @@ var Pool = /*#__PURE__*/function () {
30279
30352
  };
30280
30353
  }
30281
30354
 
30282
- _context38.t0 = getPoolTxOrGasEstimate;
30283
- _context38.t1 = this;
30284
- _context38.t2 = routerAddress[this.network][exports.Dapp.VELODROME];
30285
- _context38.next = 7;
30355
+ _context39.t0 = getPoolTxOrGasEstimate;
30356
+ _context39.t1 = this;
30357
+ _context39.t2 = routerAddress[this.network][exports.Dapp.VELODROME];
30358
+ _context39.next = 7;
30286
30359
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
30287
30360
 
30288
30361
  case 7:
30289
- _context38.t3 = _context38.sent;
30290
- _context38.t4 = options;
30291
- _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
30292
- _context38.t6 = sdkOptions;
30293
- _context38.next = 13;
30294
- return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
30295
-
30296
- case 13:
30297
- tx = _context38.sent;
30298
- return _context38.abrupt("return", tx);
30362
+ _context39.t3 = _context39.sent;
30363
+ _context39.t4 = options;
30364
+ _context39.t5 = [_context39.t2, _context39.t3, _context39.t4];
30365
+ _context39.t6 = sdkOptions;
30366
+ _context39.next = 13;
30367
+ return (0, _context39.t0)(_context39.t1, _context39.t5, _context39.t6);
30368
+
30369
+ case 13:
30370
+ tx = _context39.sent;
30371
+ return _context39.abrupt("return", tx);
30299
30372
 
30300
30373
  case 15:
30301
30374
  case "end":
30302
- return _context38.stop();
30375
+ return _context39.stop();
30303
30376
  }
30304
30377
  }
30305
- }, _callee38, this);
30378
+ }, _callee39, this);
30306
30379
  }));
30307
30380
 
30308
- function removeLiquidityVelodrome(_x184, _x185, _x186, _x187, _x188, _x189) {
30381
+ function removeLiquidityVelodrome(_x187, _x188, _x189, _x190, _x191, _x192) {
30309
30382
  return _removeLiquidityVelodrome.apply(this, arguments);
30310
30383
  }
30311
30384
 
@@ -30327,11 +30400,11 @@ var Pool = /*#__PURE__*/function () {
30327
30400
  _proto.addLiquidityVelodromeV2 =
30328
30401
  /*#__PURE__*/
30329
30402
  function () {
30330
- var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30403
+ var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30331
30404
  var tx;
30332
- return runtime_1.wrap(function _callee39$(_context39) {
30405
+ return runtime_1.wrap(function _callee40$(_context40) {
30333
30406
  while (1) {
30334
- switch (_context39.prev = _context39.next) {
30407
+ switch (_context40.prev = _context40.next) {
30335
30408
  case 0:
30336
30409
  if (options === void 0) {
30337
30410
  options = null;
@@ -30343,33 +30416,33 @@ var Pool = /*#__PURE__*/function () {
30343
30416
  };
30344
30417
  }
30345
30418
 
30346
- _context39.t0 = getPoolTxOrGasEstimate;
30347
- _context39.t1 = this;
30348
- _context39.t2 = routerAddress[this.network][exports.Dapp.VELODROMEV2];
30349
- _context39.next = 7;
30419
+ _context40.t0 = getPoolTxOrGasEstimate;
30420
+ _context40.t1 = this;
30421
+ _context40.t2 = routerAddress[this.network][exports.Dapp.VELODROMEV2];
30422
+ _context40.next = 7;
30350
30423
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
30351
30424
 
30352
30425
  case 7:
30353
- _context39.t3 = _context39.sent;
30354
- _context39.t4 = options;
30355
- _context39.t5 = [_context39.t2, _context39.t3, _context39.t4];
30356
- _context39.t6 = sdkOptions;
30357
- _context39.next = 13;
30358
- return (0, _context39.t0)(_context39.t1, _context39.t5, _context39.t6);
30426
+ _context40.t3 = _context40.sent;
30427
+ _context40.t4 = options;
30428
+ _context40.t5 = [_context40.t2, _context40.t3, _context40.t4];
30429
+ _context40.t6 = sdkOptions;
30430
+ _context40.next = 13;
30431
+ return (0, _context40.t0)(_context40.t1, _context40.t5, _context40.t6);
30359
30432
 
30360
30433
  case 13:
30361
- tx = _context39.sent;
30362
- return _context39.abrupt("return", tx);
30434
+ tx = _context40.sent;
30435
+ return _context40.abrupt("return", tx);
30363
30436
 
30364
30437
  case 15:
30365
30438
  case "end":
30366
- return _context39.stop();
30439
+ return _context40.stop();
30367
30440
  }
30368
30441
  }
30369
- }, _callee39, this);
30442
+ }, _callee40, this);
30370
30443
  }));
30371
30444
 
30372
- function addLiquidityVelodromeV2(_x190, _x191, _x192, _x193, _x194, _x195, _x196) {
30445
+ function addLiquidityVelodromeV2(_x193, _x194, _x195, _x196, _x197, _x198, _x199) {
30373
30446
  return _addLiquidityVelodromeV.apply(this, arguments);
30374
30447
  }
30375
30448
 
@@ -30390,11 +30463,11 @@ var Pool = /*#__PURE__*/function () {
30390
30463
  _proto.removeLiquidityVelodromeV2 =
30391
30464
  /*#__PURE__*/
30392
30465
  function () {
30393
- var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(assetA, assetB, amount, isStable, options, sdkOptions) {
30466
+ var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(assetA, assetB, amount, isStable, options, sdkOptions) {
30394
30467
  var tx;
30395
- return runtime_1.wrap(function _callee40$(_context40) {
30468
+ return runtime_1.wrap(function _callee41$(_context41) {
30396
30469
  while (1) {
30397
- switch (_context40.prev = _context40.next) {
30470
+ switch (_context41.prev = _context41.next) {
30398
30471
  case 0:
30399
30472
  if (options === void 0) {
30400
30473
  options = null;
@@ -30406,33 +30479,33 @@ var Pool = /*#__PURE__*/function () {
30406
30479
  };
30407
30480
  }
30408
30481
 
30409
- _context40.t0 = getPoolTxOrGasEstimate;
30410
- _context40.t1 = this;
30411
- _context40.t2 = routerAddress[this.network][exports.Dapp.VELODROMEV2];
30412
- _context40.next = 7;
30482
+ _context41.t0 = getPoolTxOrGasEstimate;
30483
+ _context41.t1 = this;
30484
+ _context41.t2 = routerAddress[this.network][exports.Dapp.VELODROMEV2];
30485
+ _context41.next = 7;
30413
30486
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
30414
30487
 
30415
30488
  case 7:
30416
- _context40.t3 = _context40.sent;
30417
- _context40.t4 = options;
30418
- _context40.t5 = [_context40.t2, _context40.t3, _context40.t4];
30419
- _context40.t6 = sdkOptions;
30420
- _context40.next = 13;
30421
- return (0, _context40.t0)(_context40.t1, _context40.t5, _context40.t6);
30489
+ _context41.t3 = _context41.sent;
30490
+ _context41.t4 = options;
30491
+ _context41.t5 = [_context41.t2, _context41.t3, _context41.t4];
30492
+ _context41.t6 = sdkOptions;
30493
+ _context41.next = 13;
30494
+ return (0, _context41.t0)(_context41.t1, _context41.t5, _context41.t6);
30422
30495
 
30423
30496
  case 13:
30424
- tx = _context40.sent;
30425
- return _context40.abrupt("return", tx);
30497
+ tx = _context41.sent;
30498
+ return _context41.abrupt("return", tx);
30426
30499
 
30427
30500
  case 15:
30428
30501
  case "end":
30429
- return _context40.stop();
30502
+ return _context41.stop();
30430
30503
  }
30431
30504
  }
30432
- }, _callee40, this);
30505
+ }, _callee41, this);
30433
30506
  }));
30434
30507
 
30435
- function removeLiquidityVelodromeV2(_x197, _x198, _x199, _x200, _x201, _x202) {
30508
+ function removeLiquidityVelodromeV2(_x200, _x201, _x202, _x203, _x204, _x205) {
30436
30509
  return _removeLiquidityVelodromeV.apply(this, arguments);
30437
30510
  }
30438
30511
 
@@ -30455,11 +30528,11 @@ var Pool = /*#__PURE__*/function () {
30455
30528
  _proto.addLiquidityV2 =
30456
30529
  /*#__PURE__*/
30457
30530
  function () {
30458
- var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(dapp, assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30531
+ var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(dapp, assetA, assetB, amountA, amountB, isStable, options, sdkOptions) {
30459
30532
  var tx;
30460
- return runtime_1.wrap(function _callee41$(_context41) {
30533
+ return runtime_1.wrap(function _callee42$(_context42) {
30461
30534
  while (1) {
30462
- switch (_context41.prev = _context41.next) {
30535
+ switch (_context42.prev = _context42.next) {
30463
30536
  case 0:
30464
30537
  if (options === void 0) {
30465
30538
  options = null;
@@ -30471,33 +30544,33 @@ var Pool = /*#__PURE__*/function () {
30471
30544
  };
30472
30545
  }
30473
30546
 
30474
- _context41.t0 = getPoolTxOrGasEstimate;
30475
- _context41.t1 = this;
30476
- _context41.t2 = routerAddress[this.network][dapp];
30477
- _context41.next = 7;
30547
+ _context42.t0 = getPoolTxOrGasEstimate;
30548
+ _context42.t1 = this;
30549
+ _context42.t2 = routerAddress[this.network][dapp];
30550
+ _context42.next = 7;
30478
30551
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
30479
30552
 
30480
30553
  case 7:
30481
- _context41.t3 = _context41.sent;
30482
- _context41.t4 = options;
30483
- _context41.t5 = [_context41.t2, _context41.t3, _context41.t4];
30484
- _context41.t6 = sdkOptions;
30485
- _context41.next = 13;
30486
- return (0, _context41.t0)(_context41.t1, _context41.t5, _context41.t6);
30554
+ _context42.t3 = _context42.sent;
30555
+ _context42.t4 = options;
30556
+ _context42.t5 = [_context42.t2, _context42.t3, _context42.t4];
30557
+ _context42.t6 = sdkOptions;
30558
+ _context42.next = 13;
30559
+ return (0, _context42.t0)(_context42.t1, _context42.t5, _context42.t6);
30487
30560
 
30488
30561
  case 13:
30489
- tx = _context41.sent;
30490
- return _context41.abrupt("return", tx);
30562
+ tx = _context42.sent;
30563
+ return _context42.abrupt("return", tx);
30491
30564
 
30492
30565
  case 15:
30493
30566
  case "end":
30494
- return _context41.stop();
30567
+ return _context42.stop();
30495
30568
  }
30496
30569
  }
30497
- }, _callee41, this);
30570
+ }, _callee42, this);
30498
30571
  }));
30499
30572
 
30500
- function addLiquidityV2(_x203, _x204, _x205, _x206, _x207, _x208, _x209, _x210) {
30573
+ function addLiquidityV2(_x206, _x207, _x208, _x209, _x210, _x211, _x212, _x213) {
30501
30574
  return _addLiquidityV.apply(this, arguments);
30502
30575
  }
30503
30576
 
@@ -30519,11 +30592,11 @@ var Pool = /*#__PURE__*/function () {
30519
30592
  _proto.removeLiquidityV2 =
30520
30593
  /*#__PURE__*/
30521
30594
  function () {
30522
- var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(dapp, assetA, assetB, amount, isStable, options, sdkOptions) {
30595
+ var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(dapp, assetA, assetB, amount, isStable, options, sdkOptions) {
30523
30596
  var tx;
30524
- return runtime_1.wrap(function _callee42$(_context42) {
30597
+ return runtime_1.wrap(function _callee43$(_context43) {
30525
30598
  while (1) {
30526
- switch (_context42.prev = _context42.next) {
30599
+ switch (_context43.prev = _context43.next) {
30527
30600
  case 0:
30528
30601
  if (options === void 0) {
30529
30602
  options = null;
@@ -30535,33 +30608,33 @@ var Pool = /*#__PURE__*/function () {
30535
30608
  };
30536
30609
  }
30537
30610
 
30538
- _context42.t0 = getPoolTxOrGasEstimate;
30539
- _context42.t1 = this;
30540
- _context42.t2 = routerAddress[this.network][dapp];
30541
- _context42.next = 7;
30611
+ _context43.t0 = getPoolTxOrGasEstimate;
30612
+ _context43.t1 = this;
30613
+ _context43.t2 = routerAddress[this.network][dapp];
30614
+ _context43.next = 7;
30542
30615
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
30543
30616
 
30544
30617
  case 7:
30545
- _context42.t3 = _context42.sent;
30546
- _context42.t4 = options;
30547
- _context42.t5 = [_context42.t2, _context42.t3, _context42.t4];
30548
- _context42.t6 = sdkOptions;
30549
- _context42.next = 13;
30550
- return (0, _context42.t0)(_context42.t1, _context42.t5, _context42.t6);
30618
+ _context43.t3 = _context43.sent;
30619
+ _context43.t4 = options;
30620
+ _context43.t5 = [_context43.t2, _context43.t3, _context43.t4];
30621
+ _context43.t6 = sdkOptions;
30622
+ _context43.next = 13;
30623
+ return (0, _context43.t0)(_context43.t1, _context43.t5, _context43.t6);
30551
30624
 
30552
30625
  case 13:
30553
- tx = _context42.sent;
30554
- return _context42.abrupt("return", tx);
30626
+ tx = _context43.sent;
30627
+ return _context43.abrupt("return", tx);
30555
30628
 
30556
30629
  case 15:
30557
30630
  case "end":
30558
- return _context42.stop();
30631
+ return _context43.stop();
30559
30632
  }
30560
30633
  }
30561
- }, _callee42, this);
30634
+ }, _callee43, this);
30562
30635
  }));
30563
30636
 
30564
- function removeLiquidityV2(_x211, _x212, _x213, _x214, _x215, _x216, _x217) {
30637
+ function removeLiquidityV2(_x214, _x215, _x216, _x217, _x218, _x219, _x220) {
30565
30638
  return _removeLiquidityV.apply(this, arguments);
30566
30639
  }
30567
30640
 
@@ -30587,11 +30660,11 @@ var Pool = /*#__PURE__*/function () {
30587
30660
  _proto.tradeLyraOption =
30588
30661
  /*#__PURE__*/
30589
30662
  function () {
30590
- var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, sdkOptions) {
30663
+ var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, sdkOptions) {
30591
30664
  var swapxData, tx;
30592
- return runtime_1.wrap(function _callee43$(_context43) {
30665
+ return runtime_1.wrap(function _callee44$(_context44) {
30593
30666
  while (1) {
30594
- switch (_context43.prev = _context43.next) {
30667
+ switch (_context44.prev = _context44.next) {
30595
30668
  case 0:
30596
30669
  if (collateralChangeAmount === void 0) {
30597
30670
  collateralChangeAmount = "0";
@@ -30611,27 +30684,27 @@ var Pool = /*#__PURE__*/function () {
30611
30684
  };
30612
30685
  }
30613
30686
 
30614
- _context43.next = 6;
30687
+ _context44.next = 6;
30615
30688
  return getLyraOptionTxData(this, market, optionType, expiry, strike, tradeType, optionAmount, assetIn, ethers.BigNumber.from(collateralChangeAmount), isCoveredCall);
30616
30689
 
30617
30690
  case 6:
30618
- swapxData = _context43.sent;
30619
- _context43.next = 9;
30691
+ swapxData = _context44.sent;
30692
+ _context44.next = 9;
30620
30693
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][exports.Dapp.LYRA], swapxData, options], sdkOptions);
30621
30694
 
30622
30695
  case 9:
30623
- tx = _context43.sent;
30624
- return _context43.abrupt("return", tx);
30696
+ tx = _context44.sent;
30697
+ return _context44.abrupt("return", tx);
30625
30698
 
30626
30699
  case 11:
30627
30700
  case "end":
30628
- return _context43.stop();
30701
+ return _context44.stop();
30629
30702
  }
30630
30703
  }
30631
- }, _callee43, this);
30704
+ }, _callee44, this);
30632
30705
  }));
30633
30706
 
30634
- function tradeLyraOption(_x218, _x219, _x220, _x221, _x222, _x223, _x224, _x225, _x226, _x227, _x228) {
30707
+ function tradeLyraOption(_x221, _x222, _x223, _x224, _x225, _x226, _x227, _x228, _x229, _x230, _x231) {
30635
30708
  return _tradeLyraOption.apply(this, arguments);
30636
30709
  }
30637
30710
 
@@ -30646,26 +30719,26 @@ var Pool = /*#__PURE__*/function () {
30646
30719
  _proto.getLyraPositions =
30647
30720
  /*#__PURE__*/
30648
30721
  function () {
30649
- var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market) {
30650
- return runtime_1.wrap(function _callee44$(_context44) {
30722
+ var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market) {
30723
+ return runtime_1.wrap(function _callee45$(_context45) {
30651
30724
  while (1) {
30652
- switch (_context44.prev = _context44.next) {
30725
+ switch (_context45.prev = _context45.next) {
30653
30726
  case 0:
30654
- _context44.next = 2;
30727
+ _context45.next = 2;
30655
30728
  return getOptionPositions(this, market);
30656
30729
 
30657
30730
  case 2:
30658
- return _context44.abrupt("return", _context44.sent);
30731
+ return _context45.abrupt("return", _context45.sent);
30659
30732
 
30660
30733
  case 3:
30661
30734
  case "end":
30662
- return _context44.stop();
30735
+ return _context45.stop();
30663
30736
  }
30664
30737
  }
30665
- }, _callee44, this);
30738
+ }, _callee45, this);
30666
30739
  }));
30667
30740
 
30668
- function getLyraPositions(_x229) {
30741
+ function getLyraPositions(_x232) {
30669
30742
  return _getLyraPositions.apply(this, arguments);
30670
30743
  }
30671
30744
 
@@ -30684,11 +30757,11 @@ var Pool = /*#__PURE__*/function () {
30684
30757
  _proto.changeFuturesMargin =
30685
30758
  /*#__PURE__*/
30686
30759
  function () {
30687
- var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market, changeAmount, options, sdkOptions) {
30760
+ var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(market, changeAmount, options, sdkOptions) {
30688
30761
  var tx;
30689
- return runtime_1.wrap(function _callee45$(_context45) {
30762
+ return runtime_1.wrap(function _callee46$(_context46) {
30690
30763
  while (1) {
30691
- switch (_context45.prev = _context45.next) {
30764
+ switch (_context46.prev = _context46.next) {
30692
30765
  case 0:
30693
30766
  if (options === void 0) {
30694
30767
  options = null;
@@ -30700,22 +30773,22 @@ var Pool = /*#__PURE__*/function () {
30700
30773
  };
30701
30774
  }
30702
30775
 
30703
- _context45.next = 4;
30776
+ _context46.next = 4;
30704
30777
  return getPoolTxOrGasEstimate(this, [market, getFuturesChangeMarginTxData(changeAmount), options], sdkOptions);
30705
30778
 
30706
30779
  case 4:
30707
- tx = _context45.sent;
30708
- return _context45.abrupt("return", tx);
30780
+ tx = _context46.sent;
30781
+ return _context46.abrupt("return", tx);
30709
30782
 
30710
30783
  case 6:
30711
30784
  case "end":
30712
- return _context45.stop();
30785
+ return _context46.stop();
30713
30786
  }
30714
30787
  }
30715
- }, _callee45, this);
30788
+ }, _callee46, this);
30716
30789
  }));
30717
30790
 
30718
- function changeFuturesMargin(_x230, _x231, _x232, _x233) {
30791
+ function changeFuturesMargin(_x233, _x234, _x235, _x236) {
30719
30792
  return _changeFuturesMargin.apply(this, arguments);
30720
30793
  }
30721
30794
 
@@ -30734,11 +30807,11 @@ var Pool = /*#__PURE__*/function () {
30734
30807
  _proto.changeFuturesPosition =
30735
30808
  /*#__PURE__*/
30736
30809
  function () {
30737
- var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(market, changeAmount, options, sdkOptions) {
30810
+ var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(market, changeAmount, options, sdkOptions) {
30738
30811
  var txData, tx;
30739
- return runtime_1.wrap(function _callee46$(_context46) {
30812
+ return runtime_1.wrap(function _callee47$(_context47) {
30740
30813
  while (1) {
30741
- switch (_context46.prev = _context46.next) {
30814
+ switch (_context47.prev = _context47.next) {
30742
30815
  case 0:
30743
30816
  if (options === void 0) {
30744
30817
  options = null;
@@ -30750,27 +30823,27 @@ var Pool = /*#__PURE__*/function () {
30750
30823
  };
30751
30824
  }
30752
30825
 
30753
- _context46.next = 4;
30826
+ _context47.next = 4;
30754
30827
  return getFuturesChangePositionTxData(changeAmount, market, this);
30755
30828
 
30756
30829
  case 4:
30757
- txData = _context46.sent;
30758
- _context46.next = 7;
30830
+ txData = _context47.sent;
30831
+ _context47.next = 7;
30759
30832
  return getPoolTxOrGasEstimate(this, [market, txData, options], sdkOptions);
30760
30833
 
30761
30834
  case 7:
30762
- tx = _context46.sent;
30763
- return _context46.abrupt("return", tx);
30835
+ tx = _context47.sent;
30836
+ return _context47.abrupt("return", tx);
30764
30837
 
30765
30838
  case 9:
30766
30839
  case "end":
30767
- return _context46.stop();
30840
+ return _context47.stop();
30768
30841
  }
30769
30842
  }
30770
- }, _callee46, this);
30843
+ }, _callee47, this);
30771
30844
  }));
30772
30845
 
30773
- function changeFuturesPosition(_x234, _x235, _x236, _x237) {
30846
+ function changeFuturesPosition(_x237, _x238, _x239, _x240) {
30774
30847
  return _changeFuturesPosition.apply(this, arguments);
30775
30848
  }
30776
30849
 
@@ -30788,11 +30861,11 @@ var Pool = /*#__PURE__*/function () {
30788
30861
  _proto.cancelFuturesOrder =
30789
30862
  /*#__PURE__*/
30790
30863
  function () {
30791
- var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(market, options, sdkOptions) {
30864
+ var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(market, options, sdkOptions) {
30792
30865
  var txData, tx;
30793
- return runtime_1.wrap(function _callee47$(_context47) {
30866
+ return runtime_1.wrap(function _callee48$(_context48) {
30794
30867
  while (1) {
30795
- switch (_context47.prev = _context47.next) {
30868
+ switch (_context48.prev = _context48.next) {
30796
30869
  case 0:
30797
30870
  if (options === void 0) {
30798
30871
  options = null;
@@ -30804,27 +30877,27 @@ var Pool = /*#__PURE__*/function () {
30804
30877
  };
30805
30878
  }
30806
30879
 
30807
- _context47.next = 4;
30880
+ _context48.next = 4;
30808
30881
  return getFuturesCancelOrderTxData(this);
30809
30882
 
30810
30883
  case 4:
30811
- txData = _context47.sent;
30812
- _context47.next = 7;
30884
+ txData = _context48.sent;
30885
+ _context48.next = 7;
30813
30886
  return getPoolTxOrGasEstimate(this, [market, txData, options], sdkOptions);
30814
30887
 
30815
30888
  case 7:
30816
- tx = _context47.sent;
30817
- return _context47.abrupt("return", tx);
30889
+ tx = _context48.sent;
30890
+ return _context48.abrupt("return", tx);
30818
30891
 
30819
30892
  case 9:
30820
30893
  case "end":
30821
- return _context47.stop();
30894
+ return _context48.stop();
30822
30895
  }
30823
30896
  }
30824
- }, _callee47, this);
30897
+ }, _callee48, this);
30825
30898
  }));
30826
30899
 
30827
- function cancelFuturesOrder(_x238, _x239, _x240) {
30900
+ function cancelFuturesOrder(_x241, _x242, _x243) {
30828
30901
  return _cancelFuturesOrder.apply(this, arguments);
30829
30902
  }
30830
30903
 
@@ -30841,11 +30914,11 @@ var Pool = /*#__PURE__*/function () {
30841
30914
  _proto.mintManagerFee =
30842
30915
  /*#__PURE__*/
30843
30916
  function () {
30844
- var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(options, estimateGas) {
30917
+ var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(options, estimateGas) {
30845
30918
  var tx;
30846
- return runtime_1.wrap(function _callee48$(_context48) {
30919
+ return runtime_1.wrap(function _callee49$(_context49) {
30847
30920
  while (1) {
30848
- switch (_context48.prev = _context48.next) {
30921
+ switch (_context49.prev = _context49.next) {
30849
30922
  case 0:
30850
30923
  if (options === void 0) {
30851
30924
  options = null;
@@ -30856,33 +30929,33 @@ var Pool = /*#__PURE__*/function () {
30856
30929
  }
30857
30930
 
30858
30931
  if (!estimateGas) {
30859
- _context48.next = 6;
30932
+ _context49.next = 6;
30860
30933
  break;
30861
30934
  }
30862
30935
 
30863
- _context48.next = 5;
30936
+ _context49.next = 5;
30864
30937
  return this.poolLogic.estimateGas.mintManagerFee(options);
30865
30938
 
30866
30939
  case 5:
30867
- return _context48.abrupt("return", _context48.sent);
30940
+ return _context49.abrupt("return", _context49.sent);
30868
30941
 
30869
30942
  case 6:
30870
- _context48.next = 8;
30943
+ _context49.next = 8;
30871
30944
  return this.poolLogic.mintManagerFee(options);
30872
30945
 
30873
30946
  case 8:
30874
- tx = _context48.sent;
30875
- return _context48.abrupt("return", tx);
30947
+ tx = _context49.sent;
30948
+ return _context49.abrupt("return", tx);
30876
30949
 
30877
30950
  case 10:
30878
30951
  case "end":
30879
- return _context48.stop();
30952
+ return _context49.stop();
30880
30953
  }
30881
30954
  }
30882
- }, _callee48, this);
30955
+ }, _callee49, this);
30883
30956
  }));
30884
30957
 
30885
- function mintManagerFee(_x241, _x242) {
30958
+ function mintManagerFee(_x244, _x245) {
30886
30959
  return _mintManagerFee.apply(this, arguments);
30887
30960
  }
30888
30961
 
@@ -30897,25 +30970,25 @@ var Pool = /*#__PURE__*/function () {
30897
30970
  _proto.getAvailableManagerFee =
30898
30971
  /*#__PURE__*/
30899
30972
  function () {
30900
- var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49() {
30973
+ var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50() {
30901
30974
  var fee;
30902
- return runtime_1.wrap(function _callee49$(_context49) {
30975
+ return runtime_1.wrap(function _callee50$(_context50) {
30903
30976
  while (1) {
30904
- switch (_context49.prev = _context49.next) {
30977
+ switch (_context50.prev = _context50.next) {
30905
30978
  case 0:
30906
- _context49.next = 2;
30979
+ _context50.next = 2;
30907
30980
  return this.poolLogic.availableManagerFee();
30908
30981
 
30909
30982
  case 2:
30910
- fee = _context49.sent;
30911
- return _context49.abrupt("return", ethers.BigNumber.from(fee));
30983
+ fee = _context50.sent;
30984
+ return _context50.abrupt("return", ethers.BigNumber.from(fee));
30912
30985
 
30913
30986
  case 4:
30914
30987
  case "end":
30915
- return _context49.stop();
30988
+ return _context50.stop();
30916
30989
  }
30917
30990
  }
30918
- }, _callee49, this);
30991
+ }, _callee50, this);
30919
30992
  }));
30920
30993
 
30921
30994
  function getAvailableManagerFee() {
@@ -30937,11 +31010,11 @@ var Pool = /*#__PURE__*/function () {
30937
31010
  _proto.vestTokens =
30938
31011
  /*#__PURE__*/
30939
31012
  function () {
30940
- var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(tokenAddress, amount, options, sdkOptions) {
31013
+ var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(tokenAddress, amount, options, sdkOptions) {
30941
31014
  var txData, tx;
30942
- return runtime_1.wrap(function _callee50$(_context50) {
31015
+ return runtime_1.wrap(function _callee51$(_context51) {
30943
31016
  while (1) {
30944
- switch (_context50.prev = _context50.next) {
31017
+ switch (_context51.prev = _context51.next) {
30945
31018
  case 0:
30946
31019
  if (options === void 0) {
30947
31020
  options = null;
@@ -30953,27 +31026,27 @@ var Pool = /*#__PURE__*/function () {
30953
31026
  };
30954
31027
  }
30955
31028
 
30956
- _context50.next = 4;
31029
+ _context51.next = 4;
30957
31030
  return getCreateVestTxData(amount);
30958
31031
 
30959
31032
  case 4:
30960
- txData = _context50.sent;
30961
- _context50.next = 7;
31033
+ txData = _context51.sent;
31034
+ _context51.next = 7;
30962
31035
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], sdkOptions);
30963
31036
 
30964
31037
  case 7:
30965
- tx = _context50.sent;
30966
- return _context50.abrupt("return", tx);
31038
+ tx = _context51.sent;
31039
+ return _context51.abrupt("return", tx);
30967
31040
 
30968
31041
  case 9:
30969
31042
  case "end":
30970
- return _context50.stop();
31043
+ return _context51.stop();
30971
31044
  }
30972
31045
  }
30973
- }, _callee50, this);
31046
+ }, _callee51, this);
30974
31047
  }));
30975
31048
 
30976
- function vestTokens(_x243, _x244, _x245, _x246) {
31049
+ function vestTokens(_x246, _x247, _x248, _x249) {
30977
31050
  return _vestTokens.apply(this, arguments);
30978
31051
  }
30979
31052
 
@@ -30992,11 +31065,11 @@ var Pool = /*#__PURE__*/function () {
30992
31065
  _proto.exitVestedToken =
30993
31066
  /*#__PURE__*/
30994
31067
  function () {
30995
- var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(tokenAddress, id, options, sdkOptions) {
31068
+ var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(tokenAddress, id, options, sdkOptions) {
30996
31069
  var txData, tx;
30997
- return runtime_1.wrap(function _callee51$(_context51) {
31070
+ return runtime_1.wrap(function _callee52$(_context52) {
30998
31071
  while (1) {
30999
- switch (_context51.prev = _context51.next) {
31072
+ switch (_context52.prev = _context52.next) {
31000
31073
  case 0:
31001
31074
  if (options === void 0) {
31002
31075
  options = null;
@@ -31008,27 +31081,27 @@ var Pool = /*#__PURE__*/function () {
31008
31081
  };
31009
31082
  }
31010
31083
 
31011
- _context51.next = 4;
31084
+ _context52.next = 4;
31012
31085
  return getExitVestTxData(id);
31013
31086
 
31014
31087
  case 4:
31015
- txData = _context51.sent;
31016
- _context51.next = 7;
31088
+ txData = _context52.sent;
31089
+ _context52.next = 7;
31017
31090
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], sdkOptions);
31018
31091
 
31019
31092
  case 7:
31020
- tx = _context51.sent;
31021
- return _context51.abrupt("return", tx);
31093
+ tx = _context52.sent;
31094
+ return _context52.abrupt("return", tx);
31022
31095
 
31023
31096
  case 9:
31024
31097
  case "end":
31025
- return _context51.stop();
31098
+ return _context52.stop();
31026
31099
  }
31027
31100
  }
31028
- }, _callee51, this);
31101
+ }, _callee52, this);
31029
31102
  }));
31030
31103
 
31031
- function exitVestedToken(_x247, _x248, _x249, _x250) {
31104
+ function exitVestedToken(_x250, _x251, _x252, _x253) {
31032
31105
  return _exitVestedToken.apply(this, arguments);
31033
31106
  }
31034
31107
 
@@ -31048,11 +31121,11 @@ var Pool = /*#__PURE__*/function () {
31048
31121
  _proto.mintUnitViaFlatMoney =
31049
31122
  /*#__PURE__*/
31050
31123
  function () {
31051
- var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(depositAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions) {
31124
+ var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(depositAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions) {
31052
31125
  var tx;
31053
- return runtime_1.wrap(function _callee52$(_context52) {
31126
+ return runtime_1.wrap(function _callee53$(_context53) {
31054
31127
  while (1) {
31055
- switch (_context52.prev = _context52.next) {
31128
+ switch (_context53.prev = _context53.next) {
31056
31129
  case 0:
31057
31130
  if (slippage === void 0) {
31058
31131
  slippage = 0.5;
@@ -31068,22 +31141,22 @@ var Pool = /*#__PURE__*/function () {
31068
31141
  };
31069
31142
  }
31070
31143
 
31071
- _context52.next = 5;
31144
+ _context53.next = 5;
31072
31145
  return mintUnitViaFlatMoney(this, depositAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions);
31073
31146
 
31074
31147
  case 5:
31075
- tx = _context52.sent;
31076
- return _context52.abrupt("return", tx);
31148
+ tx = _context53.sent;
31149
+ return _context53.abrupt("return", tx);
31077
31150
 
31078
31151
  case 7:
31079
31152
  case "end":
31080
- return _context52.stop();
31153
+ return _context53.stop();
31081
31154
  }
31082
31155
  }
31083
- }, _callee52, this);
31156
+ }, _callee53, this);
31084
31157
  }));
31085
31158
 
31086
- function mintUnitViaFlatMoney$1(_x251, _x252, _x253, _x254, _x255) {
31159
+ function mintUnitViaFlatMoney$1(_x254, _x255, _x256, _x257, _x258) {
31087
31160
  return _mintUnitViaFlatMoney2.apply(this, arguments);
31088
31161
  }
31089
31162
 
@@ -31103,11 +31176,11 @@ var Pool = /*#__PURE__*/function () {
31103
31176
  _proto.redeemUnitViaFlatMoney =
31104
31177
  /*#__PURE__*/
31105
31178
  function () {
31106
- var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(withdrawAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions) {
31179
+ var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(withdrawAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions) {
31107
31180
  var tx;
31108
- return runtime_1.wrap(function _callee53$(_context53) {
31181
+ return runtime_1.wrap(function _callee54$(_context54) {
31109
31182
  while (1) {
31110
- switch (_context53.prev = _context53.next) {
31183
+ switch (_context54.prev = _context54.next) {
31111
31184
  case 0:
31112
31185
  if (slippage === void 0) {
31113
31186
  slippage = 0.5;
@@ -31123,22 +31196,22 @@ var Pool = /*#__PURE__*/function () {
31123
31196
  };
31124
31197
  }
31125
31198
 
31126
- _context53.next = 5;
31199
+ _context54.next = 5;
31127
31200
  return redeemUnitViaFlatMoney(this, withdrawAmount, slippage, maxKeeperFeeInUsd, options, sdkOptions);
31128
31201
 
31129
31202
  case 5:
31130
- tx = _context53.sent;
31131
- return _context53.abrupt("return", tx);
31203
+ tx = _context54.sent;
31204
+ return _context54.abrupt("return", tx);
31132
31205
 
31133
31206
  case 7:
31134
31207
  case "end":
31135
- return _context53.stop();
31208
+ return _context54.stop();
31136
31209
  }
31137
31210
  }
31138
- }, _callee53, this);
31211
+ }, _callee54, this);
31139
31212
  }));
31140
31213
 
31141
- function redeemUnitViaFlatMoney$1(_x256, _x257, _x258, _x259, _x260) {
31214
+ function redeemUnitViaFlatMoney$1(_x259, _x260, _x261, _x262, _x263) {
31142
31215
  return _redeemUnitViaFlatMoney2.apply(this, arguments);
31143
31216
  }
31144
31217
 
@@ -31146,11 +31219,11 @@ var Pool = /*#__PURE__*/function () {
31146
31219
  }();
31147
31220
 
31148
31221
  _proto.cancelOrderViaFlatMoney = /*#__PURE__*/function () {
31149
- var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(options, estimateGas) {
31222
+ var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(options, estimateGas) {
31150
31223
  var tx;
31151
- return runtime_1.wrap(function _callee54$(_context54) {
31224
+ return runtime_1.wrap(function _callee55$(_context55) {
31152
31225
  while (1) {
31153
- switch (_context54.prev = _context54.next) {
31226
+ switch (_context55.prev = _context55.next) {
31154
31227
  case 0:
31155
31228
  if (options === void 0) {
31156
31229
  options = null;
@@ -31160,22 +31233,22 @@ var Pool = /*#__PURE__*/function () {
31160
31233
  estimateGas = false;
31161
31234
  }
31162
31235
 
31163
- _context54.next = 4;
31236
+ _context55.next = 4;
31164
31237
  return cancelOrderViaFlatMoney(this, options, estimateGas);
31165
31238
 
31166
31239
  case 4:
31167
- tx = _context54.sent;
31168
- return _context54.abrupt("return", tx);
31240
+ tx = _context55.sent;
31241
+ return _context55.abrupt("return", tx);
31169
31242
 
31170
31243
  case 6:
31171
31244
  case "end":
31172
- return _context54.stop();
31245
+ return _context55.stop();
31173
31246
  }
31174
31247
  }
31175
- }, _callee54, this);
31248
+ }, _callee55, this);
31176
31249
  }));
31177
31250
 
31178
- function cancelOrderViaFlatMoney$1(_x261, _x262) {
31251
+ function cancelOrderViaFlatMoney$1(_x264, _x265) {
31179
31252
  return _cancelOrderViaFlatMoney2.apply(this, arguments);
31180
31253
  }
31181
31254
 
@@ -31194,11 +31267,11 @@ var Pool = /*#__PURE__*/function () {
31194
31267
  _proto.completeTorosWithdrawal =
31195
31268
  /*#__PURE__*/
31196
31269
  function () {
31197
- var _completeTorosWithdrawal = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(destinationToken, slippage, options, sdkOptions) {
31270
+ var _completeTorosWithdrawal = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(destinationToken, slippage, options, sdkOptions) {
31198
31271
  var txData, tx;
31199
- return runtime_1.wrap(function _callee55$(_context55) {
31272
+ return runtime_1.wrap(function _callee56$(_context56) {
31200
31273
  while (1) {
31201
- switch (_context55.prev = _context55.next) {
31274
+ switch (_context56.prev = _context56.next) {
31202
31275
  case 0:
31203
31276
  if (slippage === void 0) {
31204
31277
  slippage = 0.5;
@@ -31214,27 +31287,27 @@ var Pool = /*#__PURE__*/function () {
31214
31287
  };
31215
31288
  }
31216
31289
 
31217
- _context55.next = 5;
31290
+ _context56.next = 5;
31218
31291
  return getCompleteWithdrawalTxData(this, destinationToken, slippage * 100, false);
31219
31292
 
31220
31293
  case 5:
31221
- txData = _context55.sent;
31222
- _context55.next = 8;
31294
+ txData = _context56.sent;
31295
+ _context56.next = 8;
31223
31296
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network].toros, txData, options], sdkOptions);
31224
31297
 
31225
31298
  case 8:
31226
- tx = _context55.sent;
31227
- return _context55.abrupt("return", tx);
31299
+ tx = _context56.sent;
31300
+ return _context56.abrupt("return", tx);
31228
31301
 
31229
31302
  case 10:
31230
31303
  case "end":
31231
- return _context55.stop();
31304
+ return _context56.stop();
31232
31305
  }
31233
31306
  }
31234
- }, _callee55, this);
31307
+ }, _callee56, this);
31235
31308
  }));
31236
31309
 
31237
- function completeTorosWithdrawal(_x263, _x264, _x265, _x266) {
31310
+ function completeTorosWithdrawal(_x266, _x267, _x268, _x269) {
31238
31311
  return _completeTorosWithdrawal.apply(this, arguments);
31239
31312
  }
31240
31313