@dhedge/v2-sdk 1.10.2 → 1.10.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.
@@ -4216,6 +4216,7 @@ var Dapp;
4216
4216
  Dapp["ZEROEX"] = "0x";
4217
4217
  Dapp["RAMSES"] = "ramses";
4218
4218
  Dapp["AERODROME"] = "aerodrome";
4219
+ Dapp["AERODROMECL"] = "aerodromeCL";
4219
4220
  })(Dapp || (Dapp = {}));
4220
4221
 
4221
4222
  var Transaction;
@@ -4251,7 +4252,7 @@ var routerAddress = (_routerAddress = {}, _routerAddress[Network.POLYGON] = (_Ne
4251
4252
  var dappFactoryAddress = (_dappFactoryAddress = {}, _dappFactoryAddress[Network.POLYGON] = (_Network$POLYGON2 = {}, _Network$POLYGON2[Dapp.SUSHISWAP] = "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", _Network$POLYGON2[Dapp.QUICKSWAP] = "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", _Network$POLYGON2), _dappFactoryAddress[Network.OPTIMISM] = {}, _dappFactoryAddress[Network.ARBITRUM] = {}, _dappFactoryAddress[Network.BASE] = {}, _dappFactoryAddress);
4252
4253
  var stakingAddress = (_stakingAddress = {}, _stakingAddress[Network.POLYGON] = (_Network$POLYGON3 = {}, _Network$POLYGON3[Dapp.SUSHISWAP] = "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F", _Network$POLYGON3[Dapp.BALANCER] = "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e", _Network$POLYGON3[Dapp.AAVE] = "0x357D51124f59836DeD84c8a1730D72B749d8BC23", _Network$POLYGON3[Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$POLYGON3), _stakingAddress[Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$OPTIMISM2), _stakingAddress[Network.ARBITRUM] = {}, _stakingAddress[Network.BASE] = {}, _stakingAddress);
4253
4254
  var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[Network.OPTIMISM] = (_Network$OPTIMISM3 = {}, _Network$OPTIMISM3[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM3), _aaveAddressProvider[Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE2), _aaveAddressProvider);
4254
- var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[Dapp.VELODROMECL] = "0x416b433906b1B72FA758e166e239c43d68dC6F29", _Network$OPTIMISM4), _nonfungiblePositionM[Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3), _nonfungiblePositionM);
4255
+ var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[Dapp.VELODROMECL] = "0x416b433906b1B72FA758e166e239c43d68dC6F29", _Network$OPTIMISM4), _nonfungiblePositionM[Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3[Dapp.AERODROMECL] = "0x827922686190790b37229fd06084350e74485b72", _Network$BASE3), _nonfungiblePositionM);
4255
4256
  var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap);
4256
4257
  var balancerSubgraph = (_balancerSubgraph = {}, _balancerSubgraph[Network.POLYGON] = "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2", _balancerSubgraph[Network.OPTIMISM] = "", _balancerSubgraph[Network.ARBITRUM] = "", _balancerSubgraph[Network.BASE] = "", _balancerSubgraph);
4257
4258
  var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress);
@@ -8864,7 +8865,7 @@ function _getUniswapV3MintTxData() {
8864
8865
  mintParams = [_context.t0, _context.t1, _context.t2, _context.t3, _context.t4, _context.t5, _context.t6, "0", "0", _context.t7, _context.t8];
8865
8866
  iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
8866
8867
 
8867
- if (dapp === Dapp.VELODROMECL) {
8868
+ if (dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL) {
8868
8869
  iNonfungiblePositionManager = new ethers.utils.Interface(IVeldodromePositionManager.abi);
8869
8870
  mintParams.push(0);
8870
8871
  }
@@ -8923,7 +8924,7 @@ function _getIncreaseLiquidityTxData() {
8923
8924
  while (1) {
8924
8925
  switch (_context3.prev = _context3.next) {
8925
8926
  case 0:
8926
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL)) {
8927
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL)) {
8927
8928
  _context3.next = 15;
8928
8929
  break;
8929
8930
  }
@@ -8988,7 +8989,7 @@ function _getDecreaseLiquidityTxData() {
8988
8989
  amount = 100;
8989
8990
  }
8990
8991
 
8991
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL)) {
8992
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL)) {
8992
8993
  _context4.next = 22;
8993
8994
  break;
8994
8995
  }
@@ -14777,19 +14778,19 @@ function _getVelodromeRemoveLiquidityTxData() {
14777
14778
  return _getVelodromeRemoveLiquidityTxData.apply(this, arguments);
14778
14779
  }
14779
14780
 
14780
- function getVelodromeClOwner(_x12, _x13) {
14781
+ function getVelodromeClOwner(_x12, _x13, _x14) {
14781
14782
  return _getVelodromeClOwner.apply(this, arguments);
14782
14783
  }
14783
14784
 
14784
14785
  function _getVelodromeClOwner() {
14785
- _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, tokenId) {
14786
+ _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, dapp, tokenId) {
14786
14787
  var iNonfungiblePositionManager;
14787
14788
  return runtime_1.wrap(function _callee3$(_context3) {
14788
14789
  while (1) {
14789
14790
  switch (_context3.prev = _context3.next) {
14790
14791
  case 0:
14791
14792
  iNonfungiblePositionManager = new ethers.Contract( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
14792
- nonfungiblePositionManagerAddress[pool.network][Dapp.VELODROMECL], INonfungiblePositionManager.abi, pool.signer);
14793
+ nonfungiblePositionManagerAddress[pool.network][dapp], INonfungiblePositionManager.abi, pool.signer);
14793
14794
  _context3.next = 3;
14794
14795
  return iNonfungiblePositionManager.ownerOf(tokenId);
14795
14796
 
@@ -23965,6 +23966,68 @@ function _cancelOrderViaFlatMoney() {
23965
23966
  return _cancelOrderViaFlatMoney.apply(this, arguments);
23966
23967
  }
23967
23968
 
23969
+ var ICompoundV3Comet = [
23970
+ {
23971
+ inputs: [
23972
+ ],
23973
+ name: "baseToken",
23974
+ outputs: [
23975
+ {
23976
+ internalType: "address",
23977
+ name: "",
23978
+ type: "address"
23979
+ }
23980
+ ],
23981
+ stateMutability: "view",
23982
+ type: "function"
23983
+ },
23984
+ {
23985
+ inputs: [
23986
+ {
23987
+ internalType: "address",
23988
+ name: "asset",
23989
+ type: "address"
23990
+ },
23991
+ {
23992
+ internalType: "uint256",
23993
+ name: "amount",
23994
+ type: "uint256"
23995
+ }
23996
+ ],
23997
+ name: "supply",
23998
+ outputs: [
23999
+ ],
24000
+ stateMutability: "nonpayable",
24001
+ type: "function"
24002
+ },
24003
+ {
24004
+ inputs: [
24005
+ {
24006
+ internalType: "address",
24007
+ name: "asset",
24008
+ type: "address"
24009
+ },
24010
+ {
24011
+ internalType: "uint256",
24012
+ name: "amount",
24013
+ type: "uint256"
24014
+ }
24015
+ ],
24016
+ name: "withdraw",
24017
+ outputs: [
24018
+ ],
24019
+ stateMutability: "nonpayable",
24020
+ type: "function"
24021
+ }
24022
+ ];
24023
+
24024
+ function getCompoundV3LendTxData(asset, amount) {
24025
+ return new ethers.utils.Interface(ICompoundV3Comet).encodeFunctionData("supply", [asset, amount]);
24026
+ }
24027
+ function getCompoundV3WithdrawTxData(asset, amount) {
24028
+ return new ethers.utils.Interface(ICompoundV3Comet).encodeFunctionData("withdraw", [asset, amount]);
24029
+ }
24030
+
23968
24031
  var Pool = /*#__PURE__*/function () {
23969
24032
  function Pool(network, signer, poolLogic, mangerLogic, utils, factory) {
23970
24033
  this.network = network;
@@ -24802,7 +24865,7 @@ var Pool = /*#__PURE__*/function () {
24802
24865
  }
24803
24866
 
24804
24867
  _context14.t0 = dapp;
24805
- _context14.next = _context14.t0 === Dapp.BALANCER ? 5 : _context14.t0 === Dapp.VELODROME ? 8 : _context14.t0 === Dapp.RAMSES ? 8 : _context14.t0 === Dapp.VELODROMEV2 ? 10 : _context14.t0 === Dapp.AERODROME ? 10 : _context14.t0 === Dapp.VELODROMECL ? 10 : 12;
24868
+ _context14.next = _context14.t0 === Dapp.BALANCER ? 5 : _context14.t0 === Dapp.VELODROME ? 8 : _context14.t0 === Dapp.RAMSES ? 8 : _context14.t0 === Dapp.VELODROMEV2 ? 10 : _context14.t0 === Dapp.AERODROME ? 10 : _context14.t0 === Dapp.VELODROMECL ? 10 : _context14.t0 === Dapp.AERODROMECL ? 10 : 12;
24806
24869
  break;
24807
24870
 
24808
24871
  case 5:
@@ -25005,6 +25068,56 @@ var Pool = /*#__PURE__*/function () {
25005
25068
 
25006
25069
  return lend;
25007
25070
  }()
25071
+ /**
25072
+ * Lend asset to a Compound V3 style lending pool
25073
+ * @param {string} market Address of market e.g cUSDCv3 address
25074
+ * @param {string} asset Asset
25075
+ * @param {BigNumber | string} amount Amount of asset to lend
25076
+ * @param {any} options Transaction options
25077
+ * @param {boolean} estimateGas Simulate/estimate gas
25078
+ * @returns {Promise<any>} Transaction
25079
+ */
25080
+ ;
25081
+
25082
+ _proto.lendCompoundV3 =
25083
+ /*#__PURE__*/
25084
+ function () {
25085
+ var _lendCompoundV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(market, asset, amount, options, estimateGas) {
25086
+ var supplyTxData, tx;
25087
+ return runtime_1.wrap(function _callee18$(_context18) {
25088
+ while (1) {
25089
+ switch (_context18.prev = _context18.next) {
25090
+ case 0:
25091
+ if (options === void 0) {
25092
+ options = null;
25093
+ }
25094
+
25095
+ if (estimateGas === void 0) {
25096
+ estimateGas = false;
25097
+ }
25098
+
25099
+ supplyTxData = getCompoundV3LendTxData(asset, amount);
25100
+ _context18.next = 5;
25101
+ return getPoolTxOrGasEstimate(this, [market, supplyTxData, options], estimateGas);
25102
+
25103
+ case 5:
25104
+ tx = _context18.sent;
25105
+ return _context18.abrupt("return", tx);
25106
+
25107
+ case 7:
25108
+ case "end":
25109
+ return _context18.stop();
25110
+ }
25111
+ }
25112
+ }, _callee18, this);
25113
+ }));
25114
+
25115
+ function lendCompoundV3(_x81, _x82, _x83, _x84, _x85) {
25116
+ return _lendCompoundV.apply(this, arguments);
25117
+ }
25118
+
25119
+ return lendCompoundV3;
25120
+ }()
25008
25121
  /**
25009
25122
  * Witdraw asset from a lending pool
25010
25123
  * @param {Dapp} dapp Platform like Aave
@@ -25019,11 +25132,11 @@ var Pool = /*#__PURE__*/function () {
25019
25132
  _proto.withdrawDeposit =
25020
25133
  /*#__PURE__*/
25021
25134
  function () {
25022
- var _withdrawDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(dapp, asset, amount, options, estimateGas) {
25135
+ var _withdrawDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(dapp, asset, amount, options, estimateGas) {
25023
25136
  var iLendingPool, withdrawTxData, tx;
25024
- return runtime_1.wrap(function _callee18$(_context18) {
25137
+ return runtime_1.wrap(function _callee19$(_context19) {
25025
25138
  while (1) {
25026
- switch (_context18.prev = _context18.next) {
25139
+ switch (_context19.prev = _context19.next) {
25027
25140
  case 0:
25028
25141
  if (options === void 0) {
25029
25142
  options = null;
@@ -25035,27 +25148,77 @@ var Pool = /*#__PURE__*/function () {
25035
25148
 
25036
25149
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25037
25150
  withdrawTxData = iLendingPool.encodeFunctionData(Transaction.WITHDRAW, [asset, amount, this.address]);
25038
- _context18.next = 6;
25151
+ _context19.next = 6;
25039
25152
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], withdrawTxData, options], estimateGas);
25040
25153
 
25041
25154
  case 6:
25042
- tx = _context18.sent;
25043
- return _context18.abrupt("return", tx);
25155
+ tx = _context19.sent;
25156
+ return _context19.abrupt("return", tx);
25044
25157
 
25045
25158
  case 8:
25046
25159
  case "end":
25047
- return _context18.stop();
25160
+ return _context19.stop();
25048
25161
  }
25049
25162
  }
25050
- }, _callee18, this);
25163
+ }, _callee19, this);
25051
25164
  }));
25052
25165
 
25053
- function withdrawDeposit(_x81, _x82, _x83, _x84, _x85) {
25166
+ function withdrawDeposit(_x86, _x87, _x88, _x89, _x90) {
25054
25167
  return _withdrawDeposit.apply(this, arguments);
25055
25168
  }
25056
25169
 
25057
25170
  return withdrawDeposit;
25058
25171
  }()
25172
+ /**
25173
+ * Witdraw asset from a COmpound V3 style lending pool
25174
+ * @param {string} market Address of market e.g cUSDCv3 address
25175
+ * @param {string} asset Asset
25176
+ * @param {BigNumber | string} amount Amount of asset to withdraw
25177
+ * @param {any} options Transaction options
25178
+ * @param {boolean} estimateGas Simulate/estimate gas
25179
+ * @returns {Promise<any>} Transaction
25180
+ */
25181
+ ;
25182
+
25183
+ _proto.withdrawCompoundV3 =
25184
+ /*#__PURE__*/
25185
+ function () {
25186
+ var _withdrawCompoundV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(market, asset, amount, options, estimateGas) {
25187
+ var withdrawTxData, tx;
25188
+ return runtime_1.wrap(function _callee20$(_context20) {
25189
+ while (1) {
25190
+ switch (_context20.prev = _context20.next) {
25191
+ case 0:
25192
+ if (options === void 0) {
25193
+ options = null;
25194
+ }
25195
+
25196
+ if (estimateGas === void 0) {
25197
+ estimateGas = false;
25198
+ }
25199
+
25200
+ withdrawTxData = getCompoundV3WithdrawTxData(asset, amount);
25201
+ _context20.next = 5;
25202
+ return getPoolTxOrGasEstimate(this, [market, withdrawTxData, options], estimateGas);
25203
+
25204
+ case 5:
25205
+ tx = _context20.sent;
25206
+ return _context20.abrupt("return", tx);
25207
+
25208
+ case 7:
25209
+ case "end":
25210
+ return _context20.stop();
25211
+ }
25212
+ }
25213
+ }, _callee20, this);
25214
+ }));
25215
+
25216
+ function withdrawCompoundV3(_x91, _x92, _x93, _x94, _x95) {
25217
+ return _withdrawCompoundV.apply(this, arguments);
25218
+ }
25219
+
25220
+ return withdrawCompoundV3;
25221
+ }()
25059
25222
  /**
25060
25223
  * Borrow asset from a lending pool
25061
25224
  * @param {Dapp} dapp Platform like Aave
@@ -25071,11 +25234,11 @@ var Pool = /*#__PURE__*/function () {
25071
25234
  _proto.borrow =
25072
25235
  /*#__PURE__*/
25073
25236
  function () {
25074
- var _borrow = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(dapp, asset, amount, referralCode, options, estimateGas) {
25237
+ var _borrow = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(dapp, asset, amount, referralCode, options, estimateGas) {
25075
25238
  var iLendingPool, borrowTxData, tx;
25076
- return runtime_1.wrap(function _callee19$(_context19) {
25239
+ return runtime_1.wrap(function _callee21$(_context21) {
25077
25240
  while (1) {
25078
- switch (_context19.prev = _context19.next) {
25241
+ switch (_context21.prev = _context21.next) {
25079
25242
  case 0:
25080
25243
  if (referralCode === void 0) {
25081
25244
  referralCode = 0;
@@ -25091,22 +25254,22 @@ var Pool = /*#__PURE__*/function () {
25091
25254
 
25092
25255
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25093
25256
  borrowTxData = iLendingPool.encodeFunctionData(Transaction.BORROW, [asset, amount, 2, referralCode, this.address]);
25094
- _context19.next = 7;
25257
+ _context21.next = 7;
25095
25258
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], borrowTxData, options], estimateGas);
25096
25259
 
25097
25260
  case 7:
25098
- tx = _context19.sent;
25099
- return _context19.abrupt("return", tx);
25261
+ tx = _context21.sent;
25262
+ return _context21.abrupt("return", tx);
25100
25263
 
25101
25264
  case 9:
25102
25265
  case "end":
25103
- return _context19.stop();
25266
+ return _context21.stop();
25104
25267
  }
25105
25268
  }
25106
- }, _callee19, this);
25269
+ }, _callee21, this);
25107
25270
  }));
25108
25271
 
25109
- function borrow(_x86, _x87, _x88, _x89, _x90, _x91) {
25272
+ function borrow(_x96, _x97, _x98, _x99, _x100, _x101) {
25110
25273
  return _borrow.apply(this, arguments);
25111
25274
  }
25112
25275
 
@@ -25126,11 +25289,11 @@ var Pool = /*#__PURE__*/function () {
25126
25289
  _proto.repay =
25127
25290
  /*#__PURE__*/
25128
25291
  function () {
25129
- var _repay = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(dapp, asset, amount, options, estimateGas) {
25292
+ var _repay = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(dapp, asset, amount, options, estimateGas) {
25130
25293
  var iLendingPool, repayTxData, tx;
25131
- return runtime_1.wrap(function _callee20$(_context20) {
25294
+ return runtime_1.wrap(function _callee22$(_context22) {
25132
25295
  while (1) {
25133
- switch (_context20.prev = _context20.next) {
25296
+ switch (_context22.prev = _context22.next) {
25134
25297
  case 0:
25135
25298
  if (options === void 0) {
25136
25299
  options = null;
@@ -25142,22 +25305,22 @@ var Pool = /*#__PURE__*/function () {
25142
25305
 
25143
25306
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25144
25307
  repayTxData = iLendingPool.encodeFunctionData(Transaction.REPAY, [asset, amount, 2, this.address]);
25145
- _context20.next = 6;
25308
+ _context22.next = 6;
25146
25309
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], repayTxData, options], estimateGas);
25147
25310
 
25148
25311
  case 6:
25149
- tx = _context20.sent;
25150
- return _context20.abrupt("return", tx);
25312
+ tx = _context22.sent;
25313
+ return _context22.abrupt("return", tx);
25151
25314
 
25152
25315
  case 8:
25153
25316
  case "end":
25154
- return _context20.stop();
25317
+ return _context22.stop();
25155
25318
  }
25156
25319
  }
25157
- }, _callee20, this);
25320
+ }, _callee22, this);
25158
25321
  }));
25159
25322
 
25160
- function repay(_x92, _x93, _x94, _x95, _x96) {
25323
+ function repay(_x102, _x103, _x104, _x105, _x106) {
25161
25324
  return _repay.apply(this, arguments);
25162
25325
  }
25163
25326
 
@@ -25176,11 +25339,11 @@ var Pool = /*#__PURE__*/function () {
25176
25339
  _proto.harvestRewards =
25177
25340
  /*#__PURE__*/
25178
25341
  function () {
25179
- var _harvestRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(dapp, asset, options, estimateGas) {
25342
+ var _harvestRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(dapp, asset, options, estimateGas) {
25180
25343
  var iMiniChefV2, poolId, harvestTxData, tx;
25181
- return runtime_1.wrap(function _callee21$(_context21) {
25344
+ return runtime_1.wrap(function _callee23$(_context23) {
25182
25345
  while (1) {
25183
- switch (_context21.prev = _context21.next) {
25346
+ switch (_context23.prev = _context23.next) {
25184
25347
  case 0:
25185
25348
  if (options === void 0) {
25186
25349
  options = null;
@@ -25191,28 +25354,28 @@ var Pool = /*#__PURE__*/function () {
25191
25354
  }
25192
25355
 
25193
25356
  iMiniChefV2 = new ethers.utils.Interface(IMiniChefV2.abi);
25194
- _context21.next = 5;
25357
+ _context23.next = 5;
25195
25358
  return this.utils.getLpPoolId(dapp, asset);
25196
25359
 
25197
25360
  case 5:
25198
- poolId = _context21.sent;
25361
+ poolId = _context23.sent;
25199
25362
  harvestTxData = iMiniChefV2.encodeFunctionData(Transaction.HARVEST, [poolId, this.address]);
25200
- _context21.next = 9;
25363
+ _context23.next = 9;
25201
25364
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][dapp], harvestTxData, options], estimateGas);
25202
25365
 
25203
25366
  case 9:
25204
- tx = _context21.sent;
25205
- return _context21.abrupt("return", tx);
25367
+ tx = _context23.sent;
25368
+ return _context23.abrupt("return", tx);
25206
25369
 
25207
25370
  case 11:
25208
25371
  case "end":
25209
- return _context21.stop();
25372
+ return _context23.stop();
25210
25373
  }
25211
25374
  }
25212
- }, _callee21, this);
25375
+ }, _callee23, this);
25213
25376
  }));
25214
25377
 
25215
- function harvestRewards(_x97, _x98, _x99, _x100) {
25378
+ function harvestRewards(_x107, _x108, _x109, _x110) {
25216
25379
  return _harvestRewards.apply(this, arguments);
25217
25380
  }
25218
25381
 
@@ -25230,11 +25393,11 @@ var Pool = /*#__PURE__*/function () {
25230
25393
  _proto.changeAssets =
25231
25394
  /*#__PURE__*/
25232
25395
  function () {
25233
- var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(assets, options, estimateGas) {
25396
+ var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(assets, options, estimateGas) {
25234
25397
  var currentAssetsEnabled, currentAssets, newAssets, removedAssets, changedAssets, tx;
25235
- return runtime_1.wrap(function _callee22$(_context22) {
25398
+ return runtime_1.wrap(function _callee24$(_context24) {
25236
25399
  while (1) {
25237
- switch (_context22.prev = _context22.next) {
25400
+ switch (_context24.prev = _context24.next) {
25238
25401
  case 0:
25239
25402
  if (options === void 0) {
25240
25403
  options = null;
@@ -25244,11 +25407,11 @@ var Pool = /*#__PURE__*/function () {
25244
25407
  estimateGas = false;
25245
25408
  }
25246
25409
 
25247
- _context22.next = 4;
25410
+ _context24.next = 4;
25248
25411
  return this.getComposition();
25249
25412
 
25250
25413
  case 4:
25251
- currentAssetsEnabled = _context22.sent;
25414
+ currentAssetsEnabled = _context24.sent;
25252
25415
  currentAssets = currentAssetsEnabled.map(function (e) {
25253
25416
  return e.asset.toLocaleLowerCase();
25254
25417
  });
@@ -25263,33 +25426,33 @@ var Pool = /*#__PURE__*/function () {
25263
25426
  });
25264
25427
 
25265
25428
  if (!estimateGas) {
25266
- _context22.next = 13;
25429
+ _context24.next = 13;
25267
25430
  break;
25268
25431
  }
25269
25432
 
25270
- _context22.next = 12;
25433
+ _context24.next = 12;
25271
25434
  return this.managerLogic.estimateGas.changeAssets(changedAssets, removedAssets, options);
25272
25435
 
25273
25436
  case 12:
25274
- return _context22.abrupt("return", _context22.sent);
25437
+ return _context24.abrupt("return", _context24.sent);
25275
25438
 
25276
25439
  case 13:
25277
- _context22.next = 15;
25440
+ _context24.next = 15;
25278
25441
  return this.managerLogic.changeAssets(changedAssets, removedAssets, options);
25279
25442
 
25280
25443
  case 15:
25281
- tx = _context22.sent;
25282
- return _context22.abrupt("return", tx);
25444
+ tx = _context24.sent;
25445
+ return _context24.abrupt("return", tx);
25283
25446
 
25284
25447
  case 17:
25285
25448
  case "end":
25286
- return _context22.stop();
25449
+ return _context24.stop();
25287
25450
  }
25288
25451
  }
25289
- }, _callee22, this);
25452
+ }, _callee24, this);
25290
25453
  }));
25291
25454
 
25292
- function changeAssets(_x101, _x102, _x103) {
25455
+ function changeAssets(_x111, _x112, _x113) {
25293
25456
  return _changeAssets.apply(this, arguments);
25294
25457
  }
25295
25458
 
@@ -25307,11 +25470,11 @@ var Pool = /*#__PURE__*/function () {
25307
25470
  _proto.setTrader =
25308
25471
  /*#__PURE__*/
25309
25472
  function () {
25310
- var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(trader, options, estimateGas) {
25473
+ var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(trader, options, estimateGas) {
25311
25474
  var tx;
25312
- return runtime_1.wrap(function _callee23$(_context23) {
25475
+ return runtime_1.wrap(function _callee25$(_context25) {
25313
25476
  while (1) {
25314
- switch (_context23.prev = _context23.next) {
25477
+ switch (_context25.prev = _context25.next) {
25315
25478
  case 0:
25316
25479
  if (options === void 0) {
25317
25480
  options = null;
@@ -25322,33 +25485,33 @@ var Pool = /*#__PURE__*/function () {
25322
25485
  }
25323
25486
 
25324
25487
  if (!estimateGas) {
25325
- _context23.next = 6;
25488
+ _context25.next = 6;
25326
25489
  break;
25327
25490
  }
25328
25491
 
25329
- _context23.next = 5;
25492
+ _context25.next = 5;
25330
25493
  return this.managerLogic.estimateGas.setTrader(trader, options);
25331
25494
 
25332
25495
  case 5:
25333
- return _context23.abrupt("return", _context23.sent);
25496
+ return _context25.abrupt("return", _context25.sent);
25334
25497
 
25335
25498
  case 6:
25336
- _context23.next = 8;
25499
+ _context25.next = 8;
25337
25500
  return this.managerLogic.setTrader(trader, options);
25338
25501
 
25339
25502
  case 8:
25340
- tx = _context23.sent;
25341
- return _context23.abrupt("return", tx);
25503
+ tx = _context25.sent;
25504
+ return _context25.abrupt("return", tx);
25342
25505
 
25343
25506
  case 10:
25344
25507
  case "end":
25345
- return _context23.stop();
25508
+ return _context25.stop();
25346
25509
  }
25347
25510
  }
25348
- }, _callee23, this);
25511
+ }, _callee25, this);
25349
25512
  }));
25350
25513
 
25351
- function setTrader(_x104, _x105, _x106) {
25514
+ function setTrader(_x114, _x115, _x116) {
25352
25515
  return _setTrader.apply(this, arguments);
25353
25516
  }
25354
25517
 
@@ -25368,11 +25531,11 @@ var Pool = /*#__PURE__*/function () {
25368
25531
  _proto.joinBalancerPool =
25369
25532
  /*#__PURE__*/
25370
25533
  function () {
25371
- var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(poolId, assets, amountsIn, options, estimateGas) {
25534
+ var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(poolId, assets, amountsIn, options, estimateGas) {
25372
25535
  var joinPoolTxData, tx;
25373
- return runtime_1.wrap(function _callee24$(_context24) {
25536
+ return runtime_1.wrap(function _callee26$(_context26) {
25374
25537
  while (1) {
25375
- switch (_context24.prev = _context24.next) {
25538
+ switch (_context26.prev = _context26.next) {
25376
25539
  case 0:
25377
25540
  if (options === void 0) {
25378
25541
  options = null;
@@ -25383,22 +25546,22 @@ var Pool = /*#__PURE__*/function () {
25383
25546
  }
25384
25547
 
25385
25548
  joinPoolTxData = this.utils.getBalancerJoinPoolTx(this, poolId, assets, amountsIn);
25386
- _context24.next = 5;
25549
+ _context26.next = 5;
25387
25550
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.BALANCER], joinPoolTxData, options], estimateGas);
25388
25551
 
25389
25552
  case 5:
25390
- tx = _context24.sent;
25391
- return _context24.abrupt("return", tx);
25553
+ tx = _context26.sent;
25554
+ return _context26.abrupt("return", tx);
25392
25555
 
25393
25556
  case 7:
25394
25557
  case "end":
25395
- return _context24.stop();
25558
+ return _context26.stop();
25396
25559
  }
25397
25560
  }
25398
- }, _callee24, this);
25561
+ }, _callee26, this);
25399
25562
  }));
25400
25563
 
25401
- function joinBalancerPool(_x107, _x108, _x109, _x110, _x111) {
25564
+ function joinBalancerPool(_x117, _x118, _x119, _x120, _x121) {
25402
25565
  return _joinBalancerPool.apply(this, arguments);
25403
25566
  }
25404
25567
 
@@ -25419,11 +25582,11 @@ var Pool = /*#__PURE__*/function () {
25419
25582
  _proto.exitBalancerPool =
25420
25583
  /*#__PURE__*/
25421
25584
  function () {
25422
- var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(poolId, assets, amount, singleExitAssetIndex, options, estimateGas) {
25585
+ var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(poolId, assets, amount, singleExitAssetIndex, options, estimateGas) {
25423
25586
  var exitPoolTxData, tx;
25424
- return runtime_1.wrap(function _callee25$(_context25) {
25587
+ return runtime_1.wrap(function _callee27$(_context27) {
25425
25588
  while (1) {
25426
- switch (_context25.prev = _context25.next) {
25589
+ switch (_context27.prev = _context27.next) {
25427
25590
  case 0:
25428
25591
  if (singleExitAssetIndex === void 0) {
25429
25592
  singleExitAssetIndex = null;
@@ -25438,22 +25601,22 @@ var Pool = /*#__PURE__*/function () {
25438
25601
  }
25439
25602
 
25440
25603
  exitPoolTxData = this.utils.getBalancerExitPoolTx(this, poolId, assets, singleExitAssetIndex, amount);
25441
- _context25.next = 6;
25604
+ _context27.next = 6;
25442
25605
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.BALANCER], exitPoolTxData, options], estimateGas);
25443
25606
 
25444
25607
  case 6:
25445
- tx = _context25.sent;
25446
- return _context25.abrupt("return", tx);
25608
+ tx = _context27.sent;
25609
+ return _context27.abrupt("return", tx);
25447
25610
 
25448
25611
  case 8:
25449
25612
  case "end":
25450
- return _context25.stop();
25613
+ return _context27.stop();
25451
25614
  }
25452
25615
  }
25453
- }, _callee25, this);
25616
+ }, _callee27, this);
25454
25617
  }));
25455
25618
 
25456
- function exitBalancerPool(_x112, _x113, _x114, _x115, _x116, _x117) {
25619
+ function exitBalancerPool(_x122, _x123, _x124, _x125, _x126, _x127) {
25457
25620
  return _exitBalancerPool.apply(this, arguments);
25458
25621
  }
25459
25622
 
@@ -25471,11 +25634,11 @@ var Pool = /*#__PURE__*/function () {
25471
25634
  _proto.harvestAaveRewards =
25472
25635
  /*#__PURE__*/
25473
25636
  function () {
25474
- var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(assets, options, estimateGas) {
25637
+ var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(assets, options, estimateGas) {
25475
25638
  var aaveIncentivesAddress, iAaveIncentivesController, aaveIncentivesController, amount, claimTxData, tx;
25476
- return runtime_1.wrap(function _callee26$(_context26) {
25639
+ return runtime_1.wrap(function _callee28$(_context28) {
25477
25640
  while (1) {
25478
- switch (_context26.prev = _context26.next) {
25641
+ switch (_context28.prev = _context28.next) {
25479
25642
  case 0:
25480
25643
  if (options === void 0) {
25481
25644
  options = null;
@@ -25488,28 +25651,28 @@ var Pool = /*#__PURE__*/function () {
25488
25651
  aaveIncentivesAddress = stakingAddress[this.network][Dapp.AAVE];
25489
25652
  iAaveIncentivesController = new ethers.utils.Interface(IAaveIncentivesController.abi);
25490
25653
  aaveIncentivesController = new ethers.Contract(aaveIncentivesAddress, iAaveIncentivesController, this.signer);
25491
- _context26.next = 7;
25654
+ _context28.next = 7;
25492
25655
  return aaveIncentivesController.getUserUnclaimedRewards(this.address);
25493
25656
 
25494
25657
  case 7:
25495
- amount = _context26.sent;
25658
+ amount = _context28.sent;
25496
25659
  claimTxData = iAaveIncentivesController.encodeFunctionData(Transaction.CLAIM_REWARDS, [assets, amount, this.address]);
25497
- _context26.next = 11;
25660
+ _context28.next = 11;
25498
25661
  return getPoolTxOrGasEstimate(this, [aaveIncentivesAddress, claimTxData, options], estimateGas);
25499
25662
 
25500
25663
  case 11:
25501
- tx = _context26.sent;
25502
- return _context26.abrupt("return", tx);
25664
+ tx = _context28.sent;
25665
+ return _context28.abrupt("return", tx);
25503
25666
 
25504
25667
  case 13:
25505
25668
  case "end":
25506
- return _context26.stop();
25669
+ return _context28.stop();
25507
25670
  }
25508
25671
  }
25509
- }, _callee26, this);
25672
+ }, _callee28, this);
25510
25673
  }));
25511
25674
 
25512
- function harvestAaveRewards(_x118, _x119, _x120) {
25675
+ function harvestAaveRewards(_x128, _x129, _x130) {
25513
25676
  return _harvestAaveRewards.apply(this, arguments);
25514
25677
  }
25515
25678
 
@@ -25528,11 +25691,11 @@ var Pool = /*#__PURE__*/function () {
25528
25691
  _proto.harvestAaveV3Rewards =
25529
25692
  /*#__PURE__*/
25530
25693
  function () {
25531
- var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(assets, rewardAsset, options, estimateGas) {
25694
+ var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(assets, rewardAsset, options, estimateGas) {
25532
25695
  var claimTxData, tx;
25533
- return runtime_1.wrap(function _callee27$(_context27) {
25696
+ return runtime_1.wrap(function _callee29$(_context29) {
25534
25697
  while (1) {
25535
- switch (_context27.prev = _context27.next) {
25698
+ switch (_context29.prev = _context29.next) {
25536
25699
  case 0:
25537
25700
  if (options === void 0) {
25538
25701
  options = null;
@@ -25542,27 +25705,27 @@ var Pool = /*#__PURE__*/function () {
25542
25705
  estimateGas = false;
25543
25706
  }
25544
25707
 
25545
- _context27.next = 4;
25708
+ _context29.next = 4;
25546
25709
  return getAaveV3ClaimTxData(this, assets, rewardAsset);
25547
25710
 
25548
25711
  case 4:
25549
- claimTxData = _context27.sent;
25550
- _context27.next = 7;
25712
+ claimTxData = _context29.sent;
25713
+ _context29.next = 7;
25551
25714
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][Dapp.AAVEV3], claimTxData, options], estimateGas);
25552
25715
 
25553
25716
  case 7:
25554
- tx = _context27.sent;
25555
- return _context27.abrupt("return", tx);
25717
+ tx = _context29.sent;
25718
+ return _context29.abrupt("return", tx);
25556
25719
 
25557
25720
  case 9:
25558
25721
  case "end":
25559
- return _context27.stop();
25722
+ return _context29.stop();
25560
25723
  }
25561
25724
  }
25562
- }, _callee27, this);
25725
+ }, _callee29, this);
25563
25726
  }));
25564
25727
 
25565
- function harvestAaveV3Rewards(_x121, _x122, _x123, _x124) {
25728
+ function harvestAaveV3Rewards(_x131, _x132, _x133, _x134) {
25566
25729
  return _harvestAaveV3Rewards.apply(this, arguments);
25567
25730
  }
25568
25731
 
@@ -25570,7 +25733,7 @@ var Pool = /*#__PURE__*/function () {
25570
25733
  }()
25571
25734
  /**
25572
25735
  * Create UniswapV3 liquidity pool
25573
- * @param {dapp} Platform either UniswapV3 or VelodromeCL
25736
+ * @param {dapp} Platform UniswapV3, VelodromeCL or AerodromeCL
25574
25737
  * @param {string} assetA First asset
25575
25738
  * @param {string} assetB Second asset
25576
25739
  * @param {BigNumber | string} amountA Amount first asset
@@ -25589,11 +25752,11 @@ var Pool = /*#__PURE__*/function () {
25589
25752
  _proto.addLiquidityUniswapV3 =
25590
25753
  /*#__PURE__*/
25591
25754
  function () {
25592
- var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
25755
+ var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
25593
25756
  var mintTxData, tx;
25594
- return runtime_1.wrap(function _callee28$(_context28) {
25757
+ return runtime_1.wrap(function _callee30$(_context30) {
25595
25758
  while (1) {
25596
- switch (_context28.prev = _context28.next) {
25759
+ switch (_context30.prev = _context30.next) {
25597
25760
  case 0:
25598
25761
  if (options === void 0) {
25599
25762
  options = null;
@@ -25604,42 +25767,42 @@ var Pool = /*#__PURE__*/function () {
25604
25767
  }
25605
25768
 
25606
25769
  if (!((minPrice === null || maxPrice === null) && (minTick === null || maxTick === null))) {
25607
- _context28.next = 4;
25770
+ _context30.next = 4;
25608
25771
  break;
25609
25772
  }
25610
25773
 
25611
25774
  throw new Error("Need to provide price or tick range");
25612
25775
 
25613
25776
  case 4:
25614
- if (!((minPrice || maxPrice) && dapp === Dapp.VELODROMECL)) {
25615
- _context28.next = 6;
25777
+ if (!((minPrice || maxPrice) && dapp !== Dapp.UNISWAPV3)) {
25778
+ _context30.next = 6;
25616
25779
  break;
25617
25780
  }
25618
25781
 
25619
- throw new Error("no price conversion for Velodrome CL");
25782
+ throw new Error("no price conversion for Aerodrome/Velodrome CL");
25620
25783
 
25621
25784
  case 6:
25622
- _context28.next = 8;
25785
+ _context30.next = 8;
25623
25786
  return getUniswapV3MintTxData(dapp, this, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing);
25624
25787
 
25625
25788
  case 8:
25626
- mintTxData = _context28.sent;
25627
- _context28.next = 11;
25789
+ mintTxData = _context30.sent;
25790
+ _context30.next = 11;
25628
25791
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], mintTxData, options], estimateGas);
25629
25792
 
25630
25793
  case 11:
25631
- tx = _context28.sent;
25632
- return _context28.abrupt("return", tx);
25794
+ tx = _context30.sent;
25795
+ return _context30.abrupt("return", tx);
25633
25796
 
25634
25797
  case 13:
25635
25798
  case "end":
25636
- return _context28.stop();
25799
+ return _context30.stop();
25637
25800
  }
25638
25801
  }
25639
- }, _callee28, this);
25802
+ }, _callee30, this);
25640
25803
  }));
25641
25804
 
25642
- function addLiquidityUniswapV3(_x125, _x126, _x127, _x128, _x129, _x130, _x131, _x132, _x133, _x134, _x135, _x136) {
25805
+ function addLiquidityUniswapV3(_x135, _x136, _x137, _x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145, _x146) {
25643
25806
  return _addLiquidityUniswapV.apply(this, arguments);
25644
25807
  }
25645
25808
 
@@ -25659,11 +25822,11 @@ var Pool = /*#__PURE__*/function () {
25659
25822
  _proto.decreaseLiquidity =
25660
25823
  /*#__PURE__*/
25661
25824
  function () {
25662
- var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(dapp, tokenId, amount, options, estimateGas) {
25825
+ var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, tokenId, amount, options, estimateGas) {
25663
25826
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25664
- return runtime_1.wrap(function _callee29$(_context29) {
25827
+ return runtime_1.wrap(function _callee31$(_context31) {
25665
25828
  while (1) {
25666
- switch (_context29.prev = _context29.next) {
25829
+ switch (_context31.prev = _context31.next) {
25667
25830
  case 0:
25668
25831
  if (amount === void 0) {
25669
25832
  amount = 100;
@@ -25678,20 +25841,20 @@ var Pool = /*#__PURE__*/function () {
25678
25841
  }
25679
25842
 
25680
25843
  isStaked = false;
25681
- _context29.t0 = dapp;
25682
- _context29.next = _context29.t0 === Dapp.UNISWAPV3 ? 7 : _context29.t0 === Dapp.VELODROMECL ? 9 : _context29.t0 === Dapp.ARRAKIS ? 14 : 16;
25844
+ _context31.t0 = dapp;
25845
+ _context31.next = _context31.t0 === Dapp.UNISWAPV3 ? 7 : _context31.t0 === Dapp.VELODROMECL ? 9 : _context31.t0 === Dapp.AERODROMECL ? 9 : _context31.t0 === Dapp.ARRAKIS ? 14 : 16;
25683
25846
  break;
25684
25847
 
25685
25848
  case 7:
25686
25849
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25687
- return _context29.abrupt("break", 17);
25850
+ return _context31.abrupt("break", 17);
25688
25851
 
25689
25852
  case 9:
25690
- _context29.next = 11;
25691
- return getVelodromeClOwner(this, tokenId);
25853
+ _context31.next = 11;
25854
+ return getVelodromeClOwner(this, dapp, tokenId);
25692
25855
 
25693
25856
  case 11:
25694
- tokenIdOwner = _context29.sent;
25857
+ tokenIdOwner = _context31.sent;
25695
25858
 
25696
25859
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25697
25860
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25701,49 +25864,49 @@ var Pool = /*#__PURE__*/function () {
25701
25864
  isStaked = true;
25702
25865
  }
25703
25866
 
25704
- return _context29.abrupt("break", 17);
25867
+ return _context31.abrupt("break", 17);
25705
25868
 
25706
25869
  case 14:
25707
25870
  dappAddress = routerAddress[this.network][dapp];
25708
- return _context29.abrupt("break", 17);
25871
+ return _context31.abrupt("break", 17);
25709
25872
 
25710
25873
  case 16:
25711
25874
  throw new Error("dapp not supported");
25712
25875
 
25713
25876
  case 17:
25714
25877
  if (isStaked) {
25715
- _context29.next = 23;
25878
+ _context31.next = 23;
25716
25879
  break;
25717
25880
  }
25718
25881
 
25719
- _context29.next = 20;
25882
+ _context31.next = 20;
25720
25883
  return getDecreaseLiquidityTxData(this, dapp, tokenId, amount);
25721
25884
 
25722
25885
  case 20:
25723
- txData = _context29.sent;
25724
- _context29.next = 24;
25886
+ txData = _context31.sent;
25887
+ _context31.next = 24;
25725
25888
  break;
25726
25889
 
25727
25890
  case 23:
25728
25891
  throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
25729
25892
 
25730
25893
  case 24:
25731
- _context29.next = 26;
25894
+ _context31.next = 26;
25732
25895
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25733
25896
 
25734
25897
  case 26:
25735
- tx = _context29.sent;
25736
- return _context29.abrupt("return", tx);
25898
+ tx = _context31.sent;
25899
+ return _context31.abrupt("return", tx);
25737
25900
 
25738
25901
  case 28:
25739
25902
  case "end":
25740
- return _context29.stop();
25903
+ return _context31.stop();
25741
25904
  }
25742
25905
  }
25743
- }, _callee29, this);
25906
+ }, _callee31, this);
25744
25907
  }));
25745
25908
 
25746
- function decreaseLiquidity(_x137, _x138, _x139, _x140, _x141) {
25909
+ function decreaseLiquidity(_x147, _x148, _x149, _x150, _x151) {
25747
25910
  return _decreaseLiquidity.apply(this, arguments);
25748
25911
  }
25749
25912
 
@@ -25764,11 +25927,11 @@ var Pool = /*#__PURE__*/function () {
25764
25927
  _proto.increaseLiquidity =
25765
25928
  /*#__PURE__*/
25766
25929
  function () {
25767
- var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(dapp, tokenId, amountA, amountB, options, estimateGas) {
25930
+ var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, tokenId, amountA, amountB, options, estimateGas) {
25768
25931
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25769
- return runtime_1.wrap(function _callee30$(_context30) {
25932
+ return runtime_1.wrap(function _callee32$(_context32) {
25770
25933
  while (1) {
25771
- switch (_context30.prev = _context30.next) {
25934
+ switch (_context32.prev = _context32.next) {
25772
25935
  case 0:
25773
25936
  if (options === void 0) {
25774
25937
  options = null;
@@ -25779,20 +25942,20 @@ var Pool = /*#__PURE__*/function () {
25779
25942
  }
25780
25943
 
25781
25944
  isStaked = false;
25782
- _context30.t0 = dapp;
25783
- _context30.next = _context30.t0 === Dapp.UNISWAPV3 ? 6 : _context30.t0 === Dapp.VELODROMECL ? 8 : _context30.t0 === Dapp.ARRAKIS ? 13 : 15;
25945
+ _context32.t0 = dapp;
25946
+ _context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 6 : _context32.t0 === Dapp.VELODROMECL ? 8 : _context32.t0 === Dapp.AERODROMECL ? 8 : _context32.t0 === Dapp.ARRAKIS ? 13 : 15;
25784
25947
  break;
25785
25948
 
25786
25949
  case 6:
25787
25950
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25788
- return _context30.abrupt("break", 16);
25951
+ return _context32.abrupt("break", 16);
25789
25952
 
25790
25953
  case 8:
25791
- _context30.next = 10;
25792
- return getVelodromeClOwner(this, tokenId);
25954
+ _context32.next = 10;
25955
+ return getVelodromeClOwner(this, dapp, tokenId);
25793
25956
 
25794
25957
  case 10:
25795
- tokenIdOwner = _context30.sent;
25958
+ tokenIdOwner = _context32.sent;
25796
25959
 
25797
25960
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25798
25961
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25802,49 +25965,49 @@ var Pool = /*#__PURE__*/function () {
25802
25965
  isStaked = true;
25803
25966
  }
25804
25967
 
25805
- return _context30.abrupt("break", 16);
25968
+ return _context32.abrupt("break", 16);
25806
25969
 
25807
25970
  case 13:
25808
25971
  dappAddress = routerAddress[this.network][dapp];
25809
- return _context30.abrupt("break", 16);
25972
+ return _context32.abrupt("break", 16);
25810
25973
 
25811
25974
  case 15:
25812
25975
  throw new Error("dapp not supported");
25813
25976
 
25814
25977
  case 16:
25815
25978
  if (isStaked) {
25816
- _context30.next = 22;
25979
+ _context32.next = 22;
25817
25980
  break;
25818
25981
  }
25819
25982
 
25820
- _context30.next = 19;
25983
+ _context32.next = 19;
25821
25984
  return getIncreaseLiquidityTxData(this, dapp, tokenId, amountA, amountB);
25822
25985
 
25823
25986
  case 19:
25824
- txData = _context30.sent;
25825
- _context30.next = 23;
25987
+ txData = _context32.sent;
25988
+ _context32.next = 23;
25826
25989
  break;
25827
25990
 
25828
25991
  case 22:
25829
25992
  throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
25830
25993
 
25831
25994
  case 23:
25832
- _context30.next = 25;
25995
+ _context32.next = 25;
25833
25996
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25834
25997
 
25835
25998
  case 25:
25836
- tx = _context30.sent;
25837
- return _context30.abrupt("return", tx);
25999
+ tx = _context32.sent;
26000
+ return _context32.abrupt("return", tx);
25838
26001
 
25839
26002
  case 27:
25840
26003
  case "end":
25841
- return _context30.stop();
26004
+ return _context32.stop();
25842
26005
  }
25843
26006
  }
25844
- }, _callee30, this);
26007
+ }, _callee32, this);
25845
26008
  }));
25846
26009
 
25847
- function increaseLiquidity(_x142, _x143, _x144, _x145, _x146, _x147) {
26010
+ function increaseLiquidity(_x152, _x153, _x154, _x155, _x156, _x157) {
25848
26011
  return _increaseLiquidity.apply(this, arguments);
25849
26012
  }
25850
26013
 
@@ -25863,11 +26026,11 @@ var Pool = /*#__PURE__*/function () {
25863
26026
  _proto.claimFees =
25864
26027
  /*#__PURE__*/
25865
26028
  function () {
25866
- var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, tokenId, options, estimateGas) {
26029
+ var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, options, estimateGas) {
25867
26030
  var txData, contractAddress, iNonfungiblePositionManager, abi, tokenIdOwner, tx;
25868
- return runtime_1.wrap(function _callee31$(_context31) {
26031
+ return runtime_1.wrap(function _callee33$(_context33) {
25869
26032
  while (1) {
25870
- switch (_context31.prev = _context31.next) {
26033
+ switch (_context33.prev = _context33.next) {
25871
26034
  case 0:
25872
26035
  if (options === void 0) {
25873
26036
  options = null;
@@ -25878,37 +26041,37 @@ var Pool = /*#__PURE__*/function () {
25878
26041
  }
25879
26042
 
25880
26043
  iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
25881
- _context31.t0 = dapp;
25882
- _context31.next = _context31.t0 === Dapp.UNISWAPV3 ? 6 : _context31.t0 === Dapp.ARRAKIS ? 9 : _context31.t0 === Dapp.BALANCER ? 9 : _context31.t0 === Dapp.VELODROME ? 13 : _context31.t0 === Dapp.RAMSES ? 13 : _context31.t0 === Dapp.VELODROMEV2 ? 16 : _context31.t0 === Dapp.AERODROME ? 16 : _context31.t0 === Dapp.VELODROMECL ? 19 : 24;
26044
+ _context33.t0 = dapp;
26045
+ _context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.ARRAKIS ? 9 : _context33.t0 === Dapp.BALANCER ? 9 : _context33.t0 === Dapp.VELODROME ? 13 : _context33.t0 === Dapp.RAMSES ? 13 : _context33.t0 === Dapp.VELODROMEV2 ? 16 : _context33.t0 === Dapp.AERODROME ? 16 : _context33.t0 === Dapp.VELODROMECL ? 19 : _context33.t0 === Dapp.AERODROMECL ? 19 : 24;
25883
26046
  break;
25884
26047
 
25885
26048
  case 6:
25886
26049
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25887
26050
  txData = iNonfungiblePositionManager.encodeFunctionData(Transaction.COLLECT, [[tokenId, this.address, MaxUint128, MaxUint128]]);
25888
- return _context31.abrupt("break", 25);
26051
+ return _context33.abrupt("break", 25);
25889
26052
 
25890
26053
  case 9:
25891
26054
  contractAddress = tokenId;
25892
26055
  abi = new ethers.utils.Interface(ILiquidityGaugeV4.abi);
25893
26056
  txData = abi.encodeFunctionData("claim_rewards()", []);
25894
- return _context31.abrupt("break", 25);
26057
+ return _context33.abrupt("break", 25);
25895
26058
 
25896
26059
  case 13:
25897
26060
  contractAddress = tokenId;
25898
26061
  txData = getVelodromeClaimTxData(this, tokenId, false);
25899
- return _context31.abrupt("break", 25);
26062
+ return _context33.abrupt("break", 25);
25900
26063
 
25901
26064
  case 16:
25902
26065
  contractAddress = tokenId;
25903
26066
  txData = getVelodromeClaimTxData(this, tokenId, true);
25904
- return _context31.abrupt("break", 25);
26067
+ return _context33.abrupt("break", 25);
25905
26068
 
25906
26069
  case 19:
25907
- _context31.next = 21;
25908
- return getVelodromeClOwner(this, tokenId);
26070
+ _context33.next = 21;
26071
+ return getVelodromeClOwner(this, dapp, tokenId);
25909
26072
 
25910
26073
  case 21:
25911
- tokenIdOwner = _context31.sent;
26074
+ tokenIdOwner = _context33.sent;
25912
26075
 
25913
26076
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25914
26077
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25919,28 +26082,28 @@ var Pool = /*#__PURE__*/function () {
25919
26082
  txData = getVelodromeCLClaimTxData(tokenId);
25920
26083
  }
25921
26084
 
25922
- return _context31.abrupt("break", 25);
26085
+ return _context33.abrupt("break", 25);
25923
26086
 
25924
26087
  case 24:
25925
26088
  throw new Error("dapp not supported");
25926
26089
 
25927
26090
  case 25:
25928
- _context31.next = 27;
26091
+ _context33.next = 27;
25929
26092
  return getPoolTxOrGasEstimate(this, [contractAddress, txData, options], estimateGas);
25930
26093
 
25931
26094
  case 27:
25932
- tx = _context31.sent;
25933
- return _context31.abrupt("return", tx);
26095
+ tx = _context33.sent;
26096
+ return _context33.abrupt("return", tx);
25934
26097
 
25935
26098
  case 29:
25936
26099
  case "end":
25937
- return _context31.stop();
26100
+ return _context33.stop();
25938
26101
  }
25939
26102
  }
25940
- }, _callee31, this);
26103
+ }, _callee33, this);
25941
26104
  }));
25942
26105
 
25943
- function claimFees(_x148, _x149, _x150, _x151) {
26106
+ function claimFees(_x158, _x159, _x160, _x161) {
25944
26107
  return _claimFees.apply(this, arguments);
25945
26108
  }
25946
26109
 
@@ -25963,11 +26126,11 @@ var Pool = /*#__PURE__*/function () {
25963
26126
  _proto.tradeUniswapV3 =
25964
26127
  /*#__PURE__*/
25965
26128
  function () {
25966
- var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
26129
+ var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
25967
26130
  var swapxData, tx;
25968
- return runtime_1.wrap(function _callee32$(_context32) {
26131
+ return runtime_1.wrap(function _callee34$(_context34) {
25969
26132
  while (1) {
25970
- switch (_context32.prev = _context32.next) {
26133
+ switch (_context34.prev = _context34.next) {
25971
26134
  case 0:
25972
26135
  if (slippage === void 0) {
25973
26136
  slippage = 0.5;
@@ -25981,27 +26144,27 @@ var Pool = /*#__PURE__*/function () {
25981
26144
  estimateGas = false;
25982
26145
  }
25983
26146
 
25984
- _context32.next = 5;
26147
+ _context34.next = 5;
25985
26148
  return getUniswapV3SwapTxData(this, assetFrom, assetTo, amountIn, slippage, feeAmount);
25986
26149
 
25987
26150
  case 5:
25988
- swapxData = _context32.sent;
25989
- _context32.next = 8;
26151
+ swapxData = _context34.sent;
26152
+ _context34.next = 8;
25990
26153
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.UNISWAPV3], swapxData, options], estimateGas);
25991
26154
 
25992
26155
  case 8:
25993
- tx = _context32.sent;
25994
- return _context32.abrupt("return", tx);
26156
+ tx = _context34.sent;
26157
+ return _context34.abrupt("return", tx);
25995
26158
 
25996
26159
  case 10:
25997
26160
  case "end":
25998
- return _context32.stop();
26161
+ return _context34.stop();
25999
26162
  }
26000
26163
  }
26001
- }, _callee32, this);
26164
+ }, _callee34, this);
26002
26165
  }));
26003
26166
 
26004
- function tradeUniswapV3(_x152, _x153, _x154, _x155, _x156, _x157, _x158) {
26167
+ function tradeUniswapV3(_x162, _x163, _x164, _x165, _x166, _x167, _x168) {
26005
26168
  return _tradeUniswapV.apply(this, arguments);
26006
26169
  }
26007
26170
 
@@ -26023,11 +26186,11 @@ var Pool = /*#__PURE__*/function () {
26023
26186
  _proto.addLiquidityVelodrome =
26024
26187
  /*#__PURE__*/
26025
26188
  function () {
26026
- var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26189
+ var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26027
26190
  var tx;
26028
- return runtime_1.wrap(function _callee33$(_context33) {
26191
+ return runtime_1.wrap(function _callee35$(_context35) {
26029
26192
  while (1) {
26030
- switch (_context33.prev = _context33.next) {
26193
+ switch (_context35.prev = _context35.next) {
26031
26194
  case 0:
26032
26195
  if (options === void 0) {
26033
26196
  options = null;
@@ -26037,33 +26200,33 @@ var Pool = /*#__PURE__*/function () {
26037
26200
  estimateGas = false;
26038
26201
  }
26039
26202
 
26040
- _context33.t0 = getPoolTxOrGasEstimate;
26041
- _context33.t1 = this;
26042
- _context33.t2 = routerAddress[this.network][Dapp.VELODROME];
26043
- _context33.next = 7;
26203
+ _context35.t0 = getPoolTxOrGasEstimate;
26204
+ _context35.t1 = this;
26205
+ _context35.t2 = routerAddress[this.network][Dapp.VELODROME];
26206
+ _context35.next = 7;
26044
26207
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26045
26208
 
26046
26209
  case 7:
26047
- _context33.t3 = _context33.sent;
26048
- _context33.t4 = options;
26049
- _context33.t5 = [_context33.t2, _context33.t3, _context33.t4];
26050
- _context33.t6 = estimateGas;
26051
- _context33.next = 13;
26052
- return (0, _context33.t0)(_context33.t1, _context33.t5, _context33.t6);
26210
+ _context35.t3 = _context35.sent;
26211
+ _context35.t4 = options;
26212
+ _context35.t5 = [_context35.t2, _context35.t3, _context35.t4];
26213
+ _context35.t6 = estimateGas;
26214
+ _context35.next = 13;
26215
+ return (0, _context35.t0)(_context35.t1, _context35.t5, _context35.t6);
26053
26216
 
26054
26217
  case 13:
26055
- tx = _context33.sent;
26056
- return _context33.abrupt("return", tx);
26218
+ tx = _context35.sent;
26219
+ return _context35.abrupt("return", tx);
26057
26220
 
26058
26221
  case 15:
26059
26222
  case "end":
26060
- return _context33.stop();
26223
+ return _context35.stop();
26061
26224
  }
26062
26225
  }
26063
- }, _callee33, this);
26226
+ }, _callee35, this);
26064
26227
  }));
26065
26228
 
26066
- function addLiquidityVelodrome(_x159, _x160, _x161, _x162, _x163, _x164, _x165) {
26229
+ function addLiquidityVelodrome(_x169, _x170, _x171, _x172, _x173, _x174, _x175) {
26067
26230
  return _addLiquidityVelodrome.apply(this, arguments);
26068
26231
  }
26069
26232
 
@@ -26084,11 +26247,11 @@ var Pool = /*#__PURE__*/function () {
26084
26247
  _proto.removeLiquidityVelodrome =
26085
26248
  /*#__PURE__*/
26086
26249
  function () {
26087
- var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(assetA, assetB, amount, isStable, options, estimateGas) {
26250
+ var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetA, assetB, amount, isStable, options, estimateGas) {
26088
26251
  var tx;
26089
- return runtime_1.wrap(function _callee34$(_context34) {
26252
+ return runtime_1.wrap(function _callee36$(_context36) {
26090
26253
  while (1) {
26091
- switch (_context34.prev = _context34.next) {
26254
+ switch (_context36.prev = _context36.next) {
26092
26255
  case 0:
26093
26256
  if (options === void 0) {
26094
26257
  options = null;
@@ -26098,33 +26261,33 @@ var Pool = /*#__PURE__*/function () {
26098
26261
  estimateGas = false;
26099
26262
  }
26100
26263
 
26101
- _context34.t0 = getPoolTxOrGasEstimate;
26102
- _context34.t1 = this;
26103
- _context34.t2 = routerAddress[this.network][Dapp.VELODROME];
26104
- _context34.next = 7;
26264
+ _context36.t0 = getPoolTxOrGasEstimate;
26265
+ _context36.t1 = this;
26266
+ _context36.t2 = routerAddress[this.network][Dapp.VELODROME];
26267
+ _context36.next = 7;
26105
26268
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26106
26269
 
26107
26270
  case 7:
26108
- _context34.t3 = _context34.sent;
26109
- _context34.t4 = options;
26110
- _context34.t5 = [_context34.t2, _context34.t3, _context34.t4];
26111
- _context34.t6 = estimateGas;
26112
- _context34.next = 13;
26113
- return (0, _context34.t0)(_context34.t1, _context34.t5, _context34.t6);
26271
+ _context36.t3 = _context36.sent;
26272
+ _context36.t4 = options;
26273
+ _context36.t5 = [_context36.t2, _context36.t3, _context36.t4];
26274
+ _context36.t6 = estimateGas;
26275
+ _context36.next = 13;
26276
+ return (0, _context36.t0)(_context36.t1, _context36.t5, _context36.t6);
26114
26277
 
26115
26278
  case 13:
26116
- tx = _context34.sent;
26117
- return _context34.abrupt("return", tx);
26279
+ tx = _context36.sent;
26280
+ return _context36.abrupt("return", tx);
26118
26281
 
26119
26282
  case 15:
26120
26283
  case "end":
26121
- return _context34.stop();
26284
+ return _context36.stop();
26122
26285
  }
26123
26286
  }
26124
- }, _callee34, this);
26287
+ }, _callee36, this);
26125
26288
  }));
26126
26289
 
26127
- function removeLiquidityVelodrome(_x166, _x167, _x168, _x169, _x170, _x171) {
26290
+ function removeLiquidityVelodrome(_x176, _x177, _x178, _x179, _x180, _x181) {
26128
26291
  return _removeLiquidityVelodrome.apply(this, arguments);
26129
26292
  }
26130
26293
 
@@ -26146,11 +26309,11 @@ var Pool = /*#__PURE__*/function () {
26146
26309
  _proto.addLiquidityVelodromeV2 =
26147
26310
  /*#__PURE__*/
26148
26311
  function () {
26149
- var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26312
+ var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26150
26313
  var tx;
26151
- return runtime_1.wrap(function _callee35$(_context35) {
26314
+ return runtime_1.wrap(function _callee37$(_context37) {
26152
26315
  while (1) {
26153
- switch (_context35.prev = _context35.next) {
26316
+ switch (_context37.prev = _context37.next) {
26154
26317
  case 0:
26155
26318
  if (options === void 0) {
26156
26319
  options = null;
@@ -26160,33 +26323,33 @@ var Pool = /*#__PURE__*/function () {
26160
26323
  estimateGas = false;
26161
26324
  }
26162
26325
 
26163
- _context35.t0 = getPoolTxOrGasEstimate;
26164
- _context35.t1 = this;
26165
- _context35.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26166
- _context35.next = 7;
26326
+ _context37.t0 = getPoolTxOrGasEstimate;
26327
+ _context37.t1 = this;
26328
+ _context37.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26329
+ _context37.next = 7;
26167
26330
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26168
26331
 
26169
26332
  case 7:
26170
- _context35.t3 = _context35.sent;
26171
- _context35.t4 = options;
26172
- _context35.t5 = [_context35.t2, _context35.t3, _context35.t4];
26173
- _context35.t6 = estimateGas;
26174
- _context35.next = 13;
26175
- return (0, _context35.t0)(_context35.t1, _context35.t5, _context35.t6);
26333
+ _context37.t3 = _context37.sent;
26334
+ _context37.t4 = options;
26335
+ _context37.t5 = [_context37.t2, _context37.t3, _context37.t4];
26336
+ _context37.t6 = estimateGas;
26337
+ _context37.next = 13;
26338
+ return (0, _context37.t0)(_context37.t1, _context37.t5, _context37.t6);
26176
26339
 
26177
26340
  case 13:
26178
- tx = _context35.sent;
26179
- return _context35.abrupt("return", tx);
26341
+ tx = _context37.sent;
26342
+ return _context37.abrupt("return", tx);
26180
26343
 
26181
26344
  case 15:
26182
26345
  case "end":
26183
- return _context35.stop();
26346
+ return _context37.stop();
26184
26347
  }
26185
26348
  }
26186
- }, _callee35, this);
26349
+ }, _callee37, this);
26187
26350
  }));
26188
26351
 
26189
- function addLiquidityVelodromeV2(_x172, _x173, _x174, _x175, _x176, _x177, _x178) {
26352
+ function addLiquidityVelodromeV2(_x182, _x183, _x184, _x185, _x186, _x187, _x188) {
26190
26353
  return _addLiquidityVelodromeV.apply(this, arguments);
26191
26354
  }
26192
26355
 
@@ -26207,11 +26370,11 @@ var Pool = /*#__PURE__*/function () {
26207
26370
  _proto.removeLiquidityVelodromeV2 =
26208
26371
  /*#__PURE__*/
26209
26372
  function () {
26210
- var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetA, assetB, amount, isStable, options, estimateGas) {
26373
+ var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amount, isStable, options, estimateGas) {
26211
26374
  var tx;
26212
- return runtime_1.wrap(function _callee36$(_context36) {
26375
+ return runtime_1.wrap(function _callee38$(_context38) {
26213
26376
  while (1) {
26214
- switch (_context36.prev = _context36.next) {
26377
+ switch (_context38.prev = _context38.next) {
26215
26378
  case 0:
26216
26379
  if (options === void 0) {
26217
26380
  options = null;
@@ -26221,33 +26384,33 @@ var Pool = /*#__PURE__*/function () {
26221
26384
  estimateGas = false;
26222
26385
  }
26223
26386
 
26224
- _context36.t0 = getPoolTxOrGasEstimate;
26225
- _context36.t1 = this;
26226
- _context36.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26227
- _context36.next = 7;
26387
+ _context38.t0 = getPoolTxOrGasEstimate;
26388
+ _context38.t1 = this;
26389
+ _context38.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26390
+ _context38.next = 7;
26228
26391
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26229
26392
 
26230
26393
  case 7:
26231
- _context36.t3 = _context36.sent;
26232
- _context36.t4 = options;
26233
- _context36.t5 = [_context36.t2, _context36.t3, _context36.t4];
26234
- _context36.t6 = estimateGas;
26235
- _context36.next = 13;
26236
- return (0, _context36.t0)(_context36.t1, _context36.t5, _context36.t6);
26394
+ _context38.t3 = _context38.sent;
26395
+ _context38.t4 = options;
26396
+ _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
26397
+ _context38.t6 = estimateGas;
26398
+ _context38.next = 13;
26399
+ return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
26237
26400
 
26238
26401
  case 13:
26239
- tx = _context36.sent;
26240
- return _context36.abrupt("return", tx);
26402
+ tx = _context38.sent;
26403
+ return _context38.abrupt("return", tx);
26241
26404
 
26242
26405
  case 15:
26243
26406
  case "end":
26244
- return _context36.stop();
26407
+ return _context38.stop();
26245
26408
  }
26246
26409
  }
26247
- }, _callee36, this);
26410
+ }, _callee38, this);
26248
26411
  }));
26249
26412
 
26250
- function removeLiquidityVelodromeV2(_x179, _x180, _x181, _x182, _x183, _x184) {
26413
+ function removeLiquidityVelodromeV2(_x189, _x190, _x191, _x192, _x193, _x194) {
26251
26414
  return _removeLiquidityVelodromeV.apply(this, arguments);
26252
26415
  }
26253
26416
 
@@ -26270,11 +26433,11 @@ var Pool = /*#__PURE__*/function () {
26270
26433
  _proto.addLiquidityV2 =
26271
26434
  /*#__PURE__*/
26272
26435
  function () {
26273
- var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26436
+ var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26274
26437
  var tx;
26275
- return runtime_1.wrap(function _callee37$(_context37) {
26438
+ return runtime_1.wrap(function _callee39$(_context39) {
26276
26439
  while (1) {
26277
- switch (_context37.prev = _context37.next) {
26440
+ switch (_context39.prev = _context39.next) {
26278
26441
  case 0:
26279
26442
  if (options === void 0) {
26280
26443
  options = null;
@@ -26284,33 +26447,33 @@ var Pool = /*#__PURE__*/function () {
26284
26447
  estimateGas = false;
26285
26448
  }
26286
26449
 
26287
- _context37.t0 = getPoolTxOrGasEstimate;
26288
- _context37.t1 = this;
26289
- _context37.t2 = routerAddress[this.network][dapp];
26290
- _context37.next = 7;
26450
+ _context39.t0 = getPoolTxOrGasEstimate;
26451
+ _context39.t1 = this;
26452
+ _context39.t2 = routerAddress[this.network][dapp];
26453
+ _context39.next = 7;
26291
26454
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26292
26455
 
26293
26456
  case 7:
26294
- _context37.t3 = _context37.sent;
26295
- _context37.t4 = options;
26296
- _context37.t5 = [_context37.t2, _context37.t3, _context37.t4];
26297
- _context37.t6 = estimateGas;
26298
- _context37.next = 13;
26299
- return (0, _context37.t0)(_context37.t1, _context37.t5, _context37.t6);
26457
+ _context39.t3 = _context39.sent;
26458
+ _context39.t4 = options;
26459
+ _context39.t5 = [_context39.t2, _context39.t3, _context39.t4];
26460
+ _context39.t6 = estimateGas;
26461
+ _context39.next = 13;
26462
+ return (0, _context39.t0)(_context39.t1, _context39.t5, _context39.t6);
26300
26463
 
26301
26464
  case 13:
26302
- tx = _context37.sent;
26303
- return _context37.abrupt("return", tx);
26465
+ tx = _context39.sent;
26466
+ return _context39.abrupt("return", tx);
26304
26467
 
26305
26468
  case 15:
26306
26469
  case "end":
26307
- return _context37.stop();
26470
+ return _context39.stop();
26308
26471
  }
26309
26472
  }
26310
- }, _callee37, this);
26473
+ }, _callee39, this);
26311
26474
  }));
26312
26475
 
26313
- function addLiquidityV2(_x185, _x186, _x187, _x188, _x189, _x190, _x191, _x192) {
26476
+ function addLiquidityV2(_x195, _x196, _x197, _x198, _x199, _x200, _x201, _x202) {
26314
26477
  return _addLiquidityV.apply(this, arguments);
26315
26478
  }
26316
26479
 
@@ -26332,11 +26495,11 @@ var Pool = /*#__PURE__*/function () {
26332
26495
  _proto.removeLiquidityV2 =
26333
26496
  /*#__PURE__*/
26334
26497
  function () {
26335
- var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26498
+ var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26336
26499
  var tx;
26337
- return runtime_1.wrap(function _callee38$(_context38) {
26500
+ return runtime_1.wrap(function _callee40$(_context40) {
26338
26501
  while (1) {
26339
- switch (_context38.prev = _context38.next) {
26502
+ switch (_context40.prev = _context40.next) {
26340
26503
  case 0:
26341
26504
  if (options === void 0) {
26342
26505
  options = null;
@@ -26346,33 +26509,33 @@ var Pool = /*#__PURE__*/function () {
26346
26509
  estimateGas = false;
26347
26510
  }
26348
26511
 
26349
- _context38.t0 = getPoolTxOrGasEstimate;
26350
- _context38.t1 = this;
26351
- _context38.t2 = routerAddress[this.network][dapp];
26352
- _context38.next = 7;
26512
+ _context40.t0 = getPoolTxOrGasEstimate;
26513
+ _context40.t1 = this;
26514
+ _context40.t2 = routerAddress[this.network][dapp];
26515
+ _context40.next = 7;
26353
26516
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26354
26517
 
26355
26518
  case 7:
26356
- _context38.t3 = _context38.sent;
26357
- _context38.t4 = options;
26358
- _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
26359
- _context38.t6 = estimateGas;
26360
- _context38.next = 13;
26361
- return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
26519
+ _context40.t3 = _context40.sent;
26520
+ _context40.t4 = options;
26521
+ _context40.t5 = [_context40.t2, _context40.t3, _context40.t4];
26522
+ _context40.t6 = estimateGas;
26523
+ _context40.next = 13;
26524
+ return (0, _context40.t0)(_context40.t1, _context40.t5, _context40.t6);
26362
26525
 
26363
26526
  case 13:
26364
- tx = _context38.sent;
26365
- return _context38.abrupt("return", tx);
26527
+ tx = _context40.sent;
26528
+ return _context40.abrupt("return", tx);
26366
26529
 
26367
26530
  case 15:
26368
26531
  case "end":
26369
- return _context38.stop();
26532
+ return _context40.stop();
26370
26533
  }
26371
26534
  }
26372
- }, _callee38, this);
26535
+ }, _callee40, this);
26373
26536
  }));
26374
26537
 
26375
- function removeLiquidityV2(_x193, _x194, _x195, _x196, _x197, _x198, _x199) {
26538
+ function removeLiquidityV2(_x203, _x204, _x205, _x206, _x207, _x208, _x209) {
26376
26539
  return _removeLiquidityV.apply(this, arguments);
26377
26540
  }
26378
26541
 
@@ -26398,11 +26561,11 @@ var Pool = /*#__PURE__*/function () {
26398
26561
  _proto.tradeLyraOption =
26399
26562
  /*#__PURE__*/
26400
26563
  function () {
26401
- var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26564
+ var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26402
26565
  var swapxData, tx;
26403
- return runtime_1.wrap(function _callee39$(_context39) {
26566
+ return runtime_1.wrap(function _callee41$(_context41) {
26404
26567
  while (1) {
26405
- switch (_context39.prev = _context39.next) {
26568
+ switch (_context41.prev = _context41.next) {
26406
26569
  case 0:
26407
26570
  if (collateralChangeAmount === void 0) {
26408
26571
  collateralChangeAmount = "0";
@@ -26420,27 +26583,27 @@ var Pool = /*#__PURE__*/function () {
26420
26583
  estimateGas = false;
26421
26584
  }
26422
26585
 
26423
- _context39.next = 6;
26586
+ _context41.next = 6;
26424
26587
  return getLyraOptionTxData(this, market, optionType, expiry, strike, tradeType, optionAmount, assetIn, BigNumber$1.from(collateralChangeAmount), isCoveredCall);
26425
26588
 
26426
26589
  case 6:
26427
- swapxData = _context39.sent;
26428
- _context39.next = 9;
26590
+ swapxData = _context41.sent;
26591
+ _context41.next = 9;
26429
26592
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.LYRA], swapxData, options], estimateGas);
26430
26593
 
26431
26594
  case 9:
26432
- tx = _context39.sent;
26433
- return _context39.abrupt("return", tx);
26595
+ tx = _context41.sent;
26596
+ return _context41.abrupt("return", tx);
26434
26597
 
26435
26598
  case 11:
26436
26599
  case "end":
26437
- return _context39.stop();
26600
+ return _context41.stop();
26438
26601
  }
26439
26602
  }
26440
- }, _callee39, this);
26603
+ }, _callee41, this);
26441
26604
  }));
26442
26605
 
26443
- function tradeLyraOption(_x200, _x201, _x202, _x203, _x204, _x205, _x206, _x207, _x208, _x209, _x210) {
26606
+ function tradeLyraOption(_x210, _x211, _x212, _x213, _x214, _x215, _x216, _x217, _x218, _x219, _x220) {
26444
26607
  return _tradeLyraOption.apply(this, arguments);
26445
26608
  }
26446
26609
 
@@ -26455,26 +26618,26 @@ var Pool = /*#__PURE__*/function () {
26455
26618
  _proto.getLyraPositions =
26456
26619
  /*#__PURE__*/
26457
26620
  function () {
26458
- var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(market) {
26459
- return runtime_1.wrap(function _callee40$(_context40) {
26621
+ var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market) {
26622
+ return runtime_1.wrap(function _callee42$(_context42) {
26460
26623
  while (1) {
26461
- switch (_context40.prev = _context40.next) {
26624
+ switch (_context42.prev = _context42.next) {
26462
26625
  case 0:
26463
- _context40.next = 2;
26626
+ _context42.next = 2;
26464
26627
  return getOptionPositions(this, market);
26465
26628
 
26466
26629
  case 2:
26467
- return _context40.abrupt("return", _context40.sent);
26630
+ return _context42.abrupt("return", _context42.sent);
26468
26631
 
26469
26632
  case 3:
26470
26633
  case "end":
26471
- return _context40.stop();
26634
+ return _context42.stop();
26472
26635
  }
26473
26636
  }
26474
- }, _callee40, this);
26637
+ }, _callee42, this);
26475
26638
  }));
26476
26639
 
26477
- function getLyraPositions(_x211) {
26640
+ function getLyraPositions(_x221) {
26478
26641
  return _getLyraPositions.apply(this, arguments);
26479
26642
  }
26480
26643
 
@@ -26493,11 +26656,11 @@ var Pool = /*#__PURE__*/function () {
26493
26656
  _proto.changeFuturesMargin =
26494
26657
  /*#__PURE__*/
26495
26658
  function () {
26496
- var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(market, changeAmount, options, estimateGas) {
26659
+ var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, changeAmount, options, estimateGas) {
26497
26660
  var tx;
26498
- return runtime_1.wrap(function _callee41$(_context41) {
26661
+ return runtime_1.wrap(function _callee43$(_context43) {
26499
26662
  while (1) {
26500
- switch (_context41.prev = _context41.next) {
26663
+ switch (_context43.prev = _context43.next) {
26501
26664
  case 0:
26502
26665
  if (options === void 0) {
26503
26666
  options = null;
@@ -26507,22 +26670,22 @@ var Pool = /*#__PURE__*/function () {
26507
26670
  estimateGas = false;
26508
26671
  }
26509
26672
 
26510
- _context41.next = 4;
26673
+ _context43.next = 4;
26511
26674
  return getPoolTxOrGasEstimate(this, [market, getFuturesChangeMarginTxData(changeAmount), options], estimateGas);
26512
26675
 
26513
26676
  case 4:
26514
- tx = _context41.sent;
26515
- return _context41.abrupt("return", tx);
26677
+ tx = _context43.sent;
26678
+ return _context43.abrupt("return", tx);
26516
26679
 
26517
26680
  case 6:
26518
26681
  case "end":
26519
- return _context41.stop();
26682
+ return _context43.stop();
26520
26683
  }
26521
26684
  }
26522
- }, _callee41, this);
26685
+ }, _callee43, this);
26523
26686
  }));
26524
26687
 
26525
- function changeFuturesMargin(_x212, _x213, _x214, _x215) {
26688
+ function changeFuturesMargin(_x222, _x223, _x224, _x225) {
26526
26689
  return _changeFuturesMargin.apply(this, arguments);
26527
26690
  }
26528
26691
 
@@ -26541,11 +26704,11 @@ var Pool = /*#__PURE__*/function () {
26541
26704
  _proto.changeFuturesPosition =
26542
26705
  /*#__PURE__*/
26543
26706
  function () {
26544
- var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market, changeAmount, options, estimateGas) {
26707
+ var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market, changeAmount, options, estimateGas) {
26545
26708
  var txData, tx;
26546
- return runtime_1.wrap(function _callee42$(_context42) {
26709
+ return runtime_1.wrap(function _callee44$(_context44) {
26547
26710
  while (1) {
26548
- switch (_context42.prev = _context42.next) {
26711
+ switch (_context44.prev = _context44.next) {
26549
26712
  case 0:
26550
26713
  if (options === void 0) {
26551
26714
  options = null;
@@ -26555,27 +26718,27 @@ var Pool = /*#__PURE__*/function () {
26555
26718
  estimateGas = false;
26556
26719
  }
26557
26720
 
26558
- _context42.next = 4;
26721
+ _context44.next = 4;
26559
26722
  return getFuturesChangePositionTxData(changeAmount, market, this);
26560
26723
 
26561
26724
  case 4:
26562
- txData = _context42.sent;
26563
- _context42.next = 7;
26725
+ txData = _context44.sent;
26726
+ _context44.next = 7;
26564
26727
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26565
26728
 
26566
26729
  case 7:
26567
- tx = _context42.sent;
26568
- return _context42.abrupt("return", tx);
26730
+ tx = _context44.sent;
26731
+ return _context44.abrupt("return", tx);
26569
26732
 
26570
26733
  case 9:
26571
26734
  case "end":
26572
- return _context42.stop();
26735
+ return _context44.stop();
26573
26736
  }
26574
26737
  }
26575
- }, _callee42, this);
26738
+ }, _callee44, this);
26576
26739
  }));
26577
26740
 
26578
- function changeFuturesPosition(_x216, _x217, _x218, _x219) {
26741
+ function changeFuturesPosition(_x226, _x227, _x228, _x229) {
26579
26742
  return _changeFuturesPosition.apply(this, arguments);
26580
26743
  }
26581
26744
 
@@ -26593,11 +26756,11 @@ var Pool = /*#__PURE__*/function () {
26593
26756
  _proto.cancelFuturesOrder =
26594
26757
  /*#__PURE__*/
26595
26758
  function () {
26596
- var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, options, estimateGas) {
26759
+ var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market, options, estimateGas) {
26597
26760
  var txData, tx;
26598
- return runtime_1.wrap(function _callee43$(_context43) {
26761
+ return runtime_1.wrap(function _callee45$(_context45) {
26599
26762
  while (1) {
26600
- switch (_context43.prev = _context43.next) {
26763
+ switch (_context45.prev = _context45.next) {
26601
26764
  case 0:
26602
26765
  if (options === void 0) {
26603
26766
  options = null;
@@ -26607,27 +26770,27 @@ var Pool = /*#__PURE__*/function () {
26607
26770
  estimateGas = false;
26608
26771
  }
26609
26772
 
26610
- _context43.next = 4;
26773
+ _context45.next = 4;
26611
26774
  return getFuturesCancelOrderTxData(this);
26612
26775
 
26613
26776
  case 4:
26614
- txData = _context43.sent;
26615
- _context43.next = 7;
26777
+ txData = _context45.sent;
26778
+ _context45.next = 7;
26616
26779
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26617
26780
 
26618
26781
  case 7:
26619
- tx = _context43.sent;
26620
- return _context43.abrupt("return", tx);
26782
+ tx = _context45.sent;
26783
+ return _context45.abrupt("return", tx);
26621
26784
 
26622
26785
  case 9:
26623
26786
  case "end":
26624
- return _context43.stop();
26787
+ return _context45.stop();
26625
26788
  }
26626
26789
  }
26627
- }, _callee43, this);
26790
+ }, _callee45, this);
26628
26791
  }));
26629
26792
 
26630
- function cancelFuturesOrder(_x220, _x221, _x222) {
26793
+ function cancelFuturesOrder(_x230, _x231, _x232) {
26631
26794
  return _cancelFuturesOrder.apply(this, arguments);
26632
26795
  }
26633
26796
 
@@ -26644,11 +26807,11 @@ var Pool = /*#__PURE__*/function () {
26644
26807
  _proto.mintManagerFee =
26645
26808
  /*#__PURE__*/
26646
26809
  function () {
26647
- var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(options, estimateGas) {
26810
+ var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(options, estimateGas) {
26648
26811
  var tx;
26649
- return runtime_1.wrap(function _callee44$(_context44) {
26812
+ return runtime_1.wrap(function _callee46$(_context46) {
26650
26813
  while (1) {
26651
- switch (_context44.prev = _context44.next) {
26814
+ switch (_context46.prev = _context46.next) {
26652
26815
  case 0:
26653
26816
  if (options === void 0) {
26654
26817
  options = null;
@@ -26659,33 +26822,33 @@ var Pool = /*#__PURE__*/function () {
26659
26822
  }
26660
26823
 
26661
26824
  if (!estimateGas) {
26662
- _context44.next = 6;
26825
+ _context46.next = 6;
26663
26826
  break;
26664
26827
  }
26665
26828
 
26666
- _context44.next = 5;
26829
+ _context46.next = 5;
26667
26830
  return this.poolLogic.estimateGas.mintManagerFee(options);
26668
26831
 
26669
26832
  case 5:
26670
- return _context44.abrupt("return", _context44.sent);
26833
+ return _context46.abrupt("return", _context46.sent);
26671
26834
 
26672
26835
  case 6:
26673
- _context44.next = 8;
26836
+ _context46.next = 8;
26674
26837
  return this.poolLogic.mintManagerFee(options);
26675
26838
 
26676
26839
  case 8:
26677
- tx = _context44.sent;
26678
- return _context44.abrupt("return", tx);
26840
+ tx = _context46.sent;
26841
+ return _context46.abrupt("return", tx);
26679
26842
 
26680
26843
  case 10:
26681
26844
  case "end":
26682
- return _context44.stop();
26845
+ return _context46.stop();
26683
26846
  }
26684
26847
  }
26685
- }, _callee44, this);
26848
+ }, _callee46, this);
26686
26849
  }));
26687
26850
 
26688
- function mintManagerFee(_x223, _x224) {
26851
+ function mintManagerFee(_x233, _x234) {
26689
26852
  return _mintManagerFee.apply(this, arguments);
26690
26853
  }
26691
26854
 
@@ -26700,25 +26863,25 @@ var Pool = /*#__PURE__*/function () {
26700
26863
  _proto.getAvailableManagerFee =
26701
26864
  /*#__PURE__*/
26702
26865
  function () {
26703
- var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45() {
26866
+ var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47() {
26704
26867
  var fee;
26705
- return runtime_1.wrap(function _callee45$(_context45) {
26868
+ return runtime_1.wrap(function _callee47$(_context47) {
26706
26869
  while (1) {
26707
- switch (_context45.prev = _context45.next) {
26870
+ switch (_context47.prev = _context47.next) {
26708
26871
  case 0:
26709
- _context45.next = 2;
26872
+ _context47.next = 2;
26710
26873
  return this.poolLogic.availableManagerFee();
26711
26874
 
26712
26875
  case 2:
26713
- fee = _context45.sent;
26714
- return _context45.abrupt("return", BigNumber$1.from(fee));
26876
+ fee = _context47.sent;
26877
+ return _context47.abrupt("return", BigNumber$1.from(fee));
26715
26878
 
26716
26879
  case 4:
26717
26880
  case "end":
26718
- return _context45.stop();
26881
+ return _context47.stop();
26719
26882
  }
26720
26883
  }
26721
- }, _callee45, this);
26884
+ }, _callee47, this);
26722
26885
  }));
26723
26886
 
26724
26887
  function getAvailableManagerFee() {
@@ -26740,11 +26903,11 @@ var Pool = /*#__PURE__*/function () {
26740
26903
  _proto.vestTokens =
26741
26904
  /*#__PURE__*/
26742
26905
  function () {
26743
- var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(tokenAddress, amount, options, estimateGas) {
26906
+ var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(tokenAddress, amount, options, estimateGas) {
26744
26907
  var txData, tx;
26745
- return runtime_1.wrap(function _callee46$(_context46) {
26908
+ return runtime_1.wrap(function _callee48$(_context48) {
26746
26909
  while (1) {
26747
- switch (_context46.prev = _context46.next) {
26910
+ switch (_context48.prev = _context48.next) {
26748
26911
  case 0:
26749
26912
  if (options === void 0) {
26750
26913
  options = null;
@@ -26754,27 +26917,27 @@ var Pool = /*#__PURE__*/function () {
26754
26917
  estimateGas = false;
26755
26918
  }
26756
26919
 
26757
- _context46.next = 4;
26920
+ _context48.next = 4;
26758
26921
  return getCreateVestTxData(amount);
26759
26922
 
26760
26923
  case 4:
26761
- txData = _context46.sent;
26762
- _context46.next = 7;
26924
+ txData = _context48.sent;
26925
+ _context48.next = 7;
26763
26926
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26764
26927
 
26765
26928
  case 7:
26766
- tx = _context46.sent;
26767
- return _context46.abrupt("return", tx);
26929
+ tx = _context48.sent;
26930
+ return _context48.abrupt("return", tx);
26768
26931
 
26769
26932
  case 9:
26770
26933
  case "end":
26771
- return _context46.stop();
26934
+ return _context48.stop();
26772
26935
  }
26773
26936
  }
26774
- }, _callee46, this);
26937
+ }, _callee48, this);
26775
26938
  }));
26776
26939
 
26777
- function vestTokens(_x225, _x226, _x227, _x228) {
26940
+ function vestTokens(_x235, _x236, _x237, _x238) {
26778
26941
  return _vestTokens.apply(this, arguments);
26779
26942
  }
26780
26943
 
@@ -26793,11 +26956,11 @@ var Pool = /*#__PURE__*/function () {
26793
26956
  _proto.exitVestedToken =
26794
26957
  /*#__PURE__*/
26795
26958
  function () {
26796
- var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(tokenAddress, id, options, estimateGas) {
26959
+ var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(tokenAddress, id, options, estimateGas) {
26797
26960
  var txData, tx;
26798
- return runtime_1.wrap(function _callee47$(_context47) {
26961
+ return runtime_1.wrap(function _callee49$(_context49) {
26799
26962
  while (1) {
26800
- switch (_context47.prev = _context47.next) {
26963
+ switch (_context49.prev = _context49.next) {
26801
26964
  case 0:
26802
26965
  if (options === void 0) {
26803
26966
  options = null;
@@ -26807,27 +26970,27 @@ var Pool = /*#__PURE__*/function () {
26807
26970
  estimateGas = false;
26808
26971
  }
26809
26972
 
26810
- _context47.next = 4;
26973
+ _context49.next = 4;
26811
26974
  return getExitVestTxData(id);
26812
26975
 
26813
26976
  case 4:
26814
- txData = _context47.sent;
26815
- _context47.next = 7;
26977
+ txData = _context49.sent;
26978
+ _context49.next = 7;
26816
26979
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26817
26980
 
26818
26981
  case 7:
26819
- tx = _context47.sent;
26820
- return _context47.abrupt("return", tx);
26982
+ tx = _context49.sent;
26983
+ return _context49.abrupt("return", tx);
26821
26984
 
26822
26985
  case 9:
26823
26986
  case "end":
26824
- return _context47.stop();
26987
+ return _context49.stop();
26825
26988
  }
26826
26989
  }
26827
- }, _callee47, this);
26990
+ }, _callee49, this);
26828
26991
  }));
26829
26992
 
26830
- function exitVestedToken(_x229, _x230, _x231, _x232) {
26993
+ function exitVestedToken(_x239, _x240, _x241, _x242) {
26831
26994
  return _exitVestedToken.apply(this, arguments);
26832
26995
  }
26833
26996
 
@@ -26847,11 +27010,11 @@ var Pool = /*#__PURE__*/function () {
26847
27010
  _proto.mintUnitViaFlatMoney =
26848
27011
  /*#__PURE__*/
26849
27012
  function () {
26850
- var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27013
+ var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26851
27014
  var tx;
26852
- return runtime_1.wrap(function _callee48$(_context48) {
27015
+ return runtime_1.wrap(function _callee50$(_context50) {
26853
27016
  while (1) {
26854
- switch (_context48.prev = _context48.next) {
27017
+ switch (_context50.prev = _context50.next) {
26855
27018
  case 0:
26856
27019
  if (slippage === void 0) {
26857
27020
  slippage = 0.5;
@@ -26865,22 +27028,22 @@ var Pool = /*#__PURE__*/function () {
26865
27028
  estimateGas = false;
26866
27029
  }
26867
27030
 
26868
- _context48.next = 5;
27031
+ _context50.next = 5;
26869
27032
  return mintUnitViaFlatMoney(this, depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26870
27033
 
26871
27034
  case 5:
26872
- tx = _context48.sent;
26873
- return _context48.abrupt("return", tx);
27035
+ tx = _context50.sent;
27036
+ return _context50.abrupt("return", tx);
26874
27037
 
26875
27038
  case 7:
26876
27039
  case "end":
26877
- return _context48.stop();
27040
+ return _context50.stop();
26878
27041
  }
26879
27042
  }
26880
- }, _callee48, this);
27043
+ }, _callee50, this);
26881
27044
  }));
26882
27045
 
26883
- function mintUnitViaFlatMoney$1(_x233, _x234, _x235, _x236, _x237) {
27046
+ function mintUnitViaFlatMoney$1(_x243, _x244, _x245, _x246, _x247) {
26884
27047
  return _mintUnitViaFlatMoney2.apply(this, arguments);
26885
27048
  }
26886
27049
 
@@ -26900,11 +27063,11 @@ var Pool = /*#__PURE__*/function () {
26900
27063
  _proto.redeemUnitViaFlatMoney =
26901
27064
  /*#__PURE__*/
26902
27065
  function () {
26903
- var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27066
+ var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26904
27067
  var tx;
26905
- return runtime_1.wrap(function _callee49$(_context49) {
27068
+ return runtime_1.wrap(function _callee51$(_context51) {
26906
27069
  while (1) {
26907
- switch (_context49.prev = _context49.next) {
27070
+ switch (_context51.prev = _context51.next) {
26908
27071
  case 0:
26909
27072
  if (slippage === void 0) {
26910
27073
  slippage = 0.5;
@@ -26918,22 +27081,22 @@ var Pool = /*#__PURE__*/function () {
26918
27081
  estimateGas = false;
26919
27082
  }
26920
27083
 
26921
- _context49.next = 5;
27084
+ _context51.next = 5;
26922
27085
  return redeemUnitViaFlatMoney(this, withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26923
27086
 
26924
27087
  case 5:
26925
- tx = _context49.sent;
26926
- return _context49.abrupt("return", tx);
27088
+ tx = _context51.sent;
27089
+ return _context51.abrupt("return", tx);
26927
27090
 
26928
27091
  case 7:
26929
27092
  case "end":
26930
- return _context49.stop();
27093
+ return _context51.stop();
26931
27094
  }
26932
27095
  }
26933
- }, _callee49, this);
27096
+ }, _callee51, this);
26934
27097
  }));
26935
27098
 
26936
- function redeemUnitViaFlatMoney$1(_x238, _x239, _x240, _x241, _x242) {
27099
+ function redeemUnitViaFlatMoney$1(_x248, _x249, _x250, _x251, _x252) {
26937
27100
  return _redeemUnitViaFlatMoney2.apply(this, arguments);
26938
27101
  }
26939
27102
 
@@ -26941,11 +27104,11 @@ var Pool = /*#__PURE__*/function () {
26941
27104
  }();
26942
27105
 
26943
27106
  _proto.cancelOrderViaFlatMoney = /*#__PURE__*/function () {
26944
- var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(options, estimateGas) {
27107
+ var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(options, estimateGas) {
26945
27108
  var tx;
26946
- return runtime_1.wrap(function _callee50$(_context50) {
27109
+ return runtime_1.wrap(function _callee52$(_context52) {
26947
27110
  while (1) {
26948
- switch (_context50.prev = _context50.next) {
27111
+ switch (_context52.prev = _context52.next) {
26949
27112
  case 0:
26950
27113
  if (options === void 0) {
26951
27114
  options = null;
@@ -26955,22 +27118,22 @@ var Pool = /*#__PURE__*/function () {
26955
27118
  estimateGas = false;
26956
27119
  }
26957
27120
 
26958
- _context50.next = 4;
27121
+ _context52.next = 4;
26959
27122
  return cancelOrderViaFlatMoney(this, options, estimateGas);
26960
27123
 
26961
27124
  case 4:
26962
- tx = _context50.sent;
26963
- return _context50.abrupt("return", tx);
27125
+ tx = _context52.sent;
27126
+ return _context52.abrupt("return", tx);
26964
27127
 
26965
27128
  case 6:
26966
27129
  case "end":
26967
- return _context50.stop();
27130
+ return _context52.stop();
26968
27131
  }
26969
27132
  }
26970
- }, _callee50, this);
27133
+ }, _callee52, this);
26971
27134
  }));
26972
27135
 
26973
- function cancelOrderViaFlatMoney$1(_x243, _x244) {
27136
+ function cancelOrderViaFlatMoney$1(_x253, _x254) {
26974
27137
  return _cancelOrderViaFlatMoney2.apply(this, arguments);
26975
27138
  }
26976
27139