@dhedge/v2-sdk 1.10.6 → 1.10.8

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.
@@ -4256,6 +4256,8 @@ var Dapp;
4256
4256
  Dapp["AERODROME"] = "aerodrome";
4257
4257
  Dapp["AERODROMECL"] = "aerodromeCL";
4258
4258
  Dapp["RAMSESCL"] = "ramsesCL";
4259
+ Dapp["PANCAKECL"] = "pancakeCL";
4260
+ Dapp["COMPOUNDV3"] = "compoundV3";
4259
4261
  })(Dapp || (Dapp = {}));
4260
4262
 
4261
4263
  var Transaction;
@@ -4282,16 +4284,16 @@ var Transaction;
4282
4284
  Transaction["REMOVE_LIQUIDITY_UNSTAKE"] = "removeLiquidityAndUnstake";
4283
4285
  })(Transaction || (Transaction = {}));
4284
4286
 
4285
- var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _Network$OPTIMISM2, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM3, _Network$ARBITRUM2, _Network$BASE2, _aaveAddressProvider, _Network$POLYGON5, _Network$OPTIMISM4, _Network$ARBITRUM3, _Network$BASE3, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap, _flatMoneyContractAdd;
4287
+ var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _Network$OPTIMISM2, _Network$ARBITRUM2, _Network$BASE2, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM3, _Network$ARBITRUM3, _Network$BASE3, _aaveAddressProvider, _Network$POLYGON5, _Network$OPTIMISM4, _Network$ARBITRUM4, _Network$BASE4, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap, _flatMoneyContractAdd;
4286
4288
 
4287
4289
  require("dotenv").config();
4288
4290
 
4289
4291
  var factoryAddress = (_factoryAddress = {}, _factoryAddress[Network.POLYGON] = process.env.STAGING_CONTRACTS ? "0xDd87eCdB10cFF7004276AAbAbd30e7a08F69bb53" : "0xfdc7b8bFe0DD3513Cc669bB8d601Cb83e2F69cB0", _factoryAddress[Network.OPTIMISM] = "0x5e61a079A178f0E5784107a4963baAe0c5a680c6", _factoryAddress[Network.ARBITRUM] = "0xfffb5fb14606eb3a548c113026355020ddf27535", _factoryAddress[Network.BASE] = "0x49Afe3abCf66CF09Fab86cb1139D8811C8afe56F", _factoryAddress);
4290
4292
  var routerAddress = (_routerAddress = {}, _routerAddress[Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$POLYGON[Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[Dapp.TOROS] = "0x45b90480D6F643dE2f128db091A357C3c90399f2", _Network$POLYGON[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$OPTIMISM[Dapp.TOROS] = "0x2Ed1bd7f66e47113672f3870308b5E867C5bb743", _Network$OPTIMISM[Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$ARBITRUM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$ARBITRUM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$ARBITRUM[Dapp.TOROS] = "0xA5679C4272A056Bb83f039961fae7D99C48529F5", _Network$ARBITRUM), _routerAddress[Network.BASE] = (_Network$BASE = {}, _Network$BASE[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$BASE[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE[Dapp.AERODROME] = "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43", _Network$BASE[Dapp.AAVEV3] = "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", _Network$BASE[Dapp.TOROS] = "0xf067575Eb60c7587C11e867907AA7284833704d1", _Network$BASE), _routerAddress);
4291
4293
  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);
4292
- 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);
4293
- 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);
4294
- 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[Dapp.RAMSESCL] = "0xAA277CB7914b7e5514946Da92cb9De332Ce610EF", _Network$ARBITRUM3), _nonfungiblePositionM[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3[Dapp.AERODROMECL] = "0x827922686190790b37229fd06084350e74485b72", _Network$BASE3), _nonfungiblePositionM);
4294
+ 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[Dapp.COMPOUNDV3] = "0x443ea0340cb75a160f31a440722dec7b5bc3c2e9", _Network$OPTIMISM2), _stakingAddress[Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[Dapp.COMPOUNDV3] = "0x88730d254a2f7e6ac8388c3198afd694ba9f7fae", _Network$ARBITRUM2), _stakingAddress[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.PANCAKECL] = "0xC6A2Db661D5a5690172d8eB0a7DEA2d3008665A3", _Network$BASE2), _stakingAddress);
4295
+ 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$ARBITRUM3 = {}, _Network$ARBITRUM3[Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM3), _aaveAddressProvider[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE3), _aaveAddressProvider);
4296
+ 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$ARBITRUM4 = {}, _Network$ARBITRUM4[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM4[Dapp.RAMSESCL] = "0xAA277CB7914b7e5514946Da92cb9De332Ce610EF", _Network$ARBITRUM4), _nonfungiblePositionM[Network.BASE] = (_Network$BASE4 = {}, _Network$BASE4[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE4[Dapp.AERODROMECL] = "0x827922686190790b37229fd06084350e74485b72", _Network$BASE4[Dapp.PANCAKECL] = "0x46A15B0b27311cedF172AB29E4f4766fbE7F4364", _Network$BASE4), _nonfungiblePositionM);
4295
4297
  var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap);
4296
4298
  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);
4297
4299
  var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress);
@@ -7378,35 +7380,6 @@ var abi$9 = [
7378
7380
  stateMutability: "nonpayable",
7379
7381
  type: "function"
7380
7382
  },
7381
- {
7382
- inputs: [
7383
- {
7384
- internalType: "address",
7385
- name: "from",
7386
- type: "address"
7387
- },
7388
- {
7389
- internalType: "address",
7390
- name: "to",
7391
- type: "address"
7392
- },
7393
- {
7394
- internalType: "uint256",
7395
- name: "tokenId",
7396
- type: "uint256"
7397
- },
7398
- {
7399
- internalType: "bytes",
7400
- name: "_data",
7401
- type: "bytes"
7402
- }
7403
- ],
7404
- name: "safeTransferFrom",
7405
- outputs: [
7406
- ],
7407
- stateMutability: "nonpayable",
7408
- type: "function"
7409
- },
7410
7383
  {
7411
7384
  inputs: [
7412
7385
  {
@@ -9287,6 +9260,122 @@ var IArrakisV1RouterStaking = {
9287
9260
  abi: abi$e
9288
9261
  };
9289
9262
 
9263
+ var IPanncakeMasterChef = [
9264
+ {
9265
+ inputs: [
9266
+ {
9267
+ internalType: "uint256",
9268
+ name: "tokenId",
9269
+ type: "uint256"
9270
+ },
9271
+ {
9272
+ internalType: "address",
9273
+ name: "to",
9274
+ type: "address"
9275
+ }
9276
+ ],
9277
+ name: "harvest",
9278
+ outputs: [
9279
+ {
9280
+ internalType: "uint256",
9281
+ name: "reward",
9282
+ type: "uint256"
9283
+ }
9284
+ ],
9285
+ stateMutability: "nonpayable",
9286
+ type: "function"
9287
+ },
9288
+ {
9289
+ inputs: [
9290
+ {
9291
+ internalType: "uint256",
9292
+ name: "_tokenId",
9293
+ type: "uint256"
9294
+ },
9295
+ {
9296
+ internalType: "address",
9297
+ name: "_to",
9298
+ type: "address"
9299
+ }
9300
+ ],
9301
+ name: "withdraw",
9302
+ outputs: [
9303
+ {
9304
+ internalType: "uint256",
9305
+ name: "reward",
9306
+ type: "uint256"
9307
+ }
9308
+ ],
9309
+ stateMutability: "nonpayable",
9310
+ type: "function"
9311
+ },
9312
+ {
9313
+ inputs: [
9314
+ {
9315
+ internalType: "bytes[]",
9316
+ name: "data",
9317
+ type: "bytes[]"
9318
+ }
9319
+ ],
9320
+ name: "multicall",
9321
+ outputs: [
9322
+ {
9323
+ internalType: "bytes[]",
9324
+ name: "results",
9325
+ type: "bytes[]"
9326
+ }
9327
+ ],
9328
+ stateMutability: "payable",
9329
+ type: "function"
9330
+ },
9331
+ {
9332
+ inputs: [
9333
+ {
9334
+ components: [
9335
+ {
9336
+ internalType: "uint256",
9337
+ name: "tokenId",
9338
+ type: "uint256"
9339
+ },
9340
+ {
9341
+ internalType: "address",
9342
+ name: "recipient",
9343
+ type: "address"
9344
+ },
9345
+ {
9346
+ internalType: "uint128",
9347
+ name: "amount0Max",
9348
+ type: "uint128"
9349
+ },
9350
+ {
9351
+ internalType: "uint128",
9352
+ name: "amount1Max",
9353
+ type: "uint128"
9354
+ }
9355
+ ],
9356
+ internalType: "struct INonfungiblePositionManager.CollectParams",
9357
+ name: "params",
9358
+ type: "tuple"
9359
+ }
9360
+ ],
9361
+ name: "collect",
9362
+ outputs: [
9363
+ {
9364
+ internalType: "uint256",
9365
+ name: "amount0",
9366
+ type: "uint256"
9367
+ },
9368
+ {
9369
+ internalType: "uint256",
9370
+ name: "amount1",
9371
+ type: "uint256"
9372
+ }
9373
+ ],
9374
+ stateMutability: "payable",
9375
+ type: "function"
9376
+ }
9377
+ ];
9378
+
9290
9379
  var getDeadline = /*#__PURE__*/function () {
9291
9380
  var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool) {
9292
9381
  var timestamp;
@@ -9458,7 +9547,7 @@ function _getIncreaseLiquidityTxData() {
9458
9547
  while (1) {
9459
9548
  switch (_context3.prev = _context3.next) {
9460
9549
  case 0:
9461
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL)) {
9550
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
9462
9551
  _context3.next = 15;
9463
9552
  break;
9464
9553
  }
@@ -9507,13 +9596,13 @@ function _getIncreaseLiquidityTxData() {
9507
9596
  return _getIncreaseLiquidityTxData.apply(this, arguments);
9508
9597
  }
9509
9598
 
9510
- function getDecreaseLiquidityTxData(_x20, _x21, _x22, _x23) {
9599
+ function getDecreaseLiquidityTxData(_x20, _x21, _x22, _x23, _x24) {
9511
9600
  return _getDecreaseLiquidityTxData.apply(this, arguments);
9512
9601
  }
9513
9602
 
9514
9603
  function _getDecreaseLiquidityTxData() {
9515
- _getDecreaseLiquidityTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(pool, dapp, tokenId, amount) {
9516
- var txData, abi, liquidity, decreaseLiquidityTxData, collectTxData, multicallParams, burnTxData, _abi2, _liquidity;
9604
+ _getDecreaseLiquidityTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(pool, dapp, tokenId, amount, isStaked) {
9605
+ var txData, abi, liquidity, decreaseLiquidityTxData, collectTxData, multicallParams, _abi2, harvestTxData, burnTxData, _abi3, _liquidity;
9517
9606
 
9518
9607
  return runtime_1.wrap(function _callee4$(_context4) {
9519
9608
  while (1) {
@@ -9523,8 +9612,8 @@ function _getDecreaseLiquidityTxData() {
9523
9612
  amount = 100;
9524
9613
  }
9525
9614
 
9526
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL)) {
9527
- _context4.next = 22;
9615
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
9616
+ _context4.next = 23;
9528
9617
  break;
9529
9618
  }
9530
9619
 
@@ -9549,40 +9638,46 @@ function _getDecreaseLiquidityTxData() {
9549
9638
  collectTxData = abi.encodeFunctionData(Transaction.COLLECT, [[tokenId, pool.address, MaxUint128, MaxUint128]]);
9550
9639
  multicallParams = [decreaseLiquidityTxData, collectTxData];
9551
9640
 
9641
+ if (isStaked && dapp === Dapp.PANCAKECL) {
9642
+ _abi2 = new ethers.utils.Interface(IPanncakeMasterChef);
9643
+ harvestTxData = _abi2.encodeFunctionData(Transaction.HARVEST, [tokenId, pool.address]);
9644
+ multicallParams.unshift(harvestTxData);
9645
+ }
9646
+
9552
9647
  if (amount === 100) {
9553
9648
  burnTxData = abi.encodeFunctionData(Transaction.BURN, [tokenId]);
9554
9649
  multicallParams.push(burnTxData);
9555
9650
  }
9556
9651
 
9557
9652
  txData = abi.encodeFunctionData(Transaction.MULTI_CALL, [multicallParams]);
9558
- _context4.next = 33;
9653
+ _context4.next = 34;
9559
9654
  break;
9560
9655
 
9561
- case 22:
9656
+ case 23:
9562
9657
  if (!(dapp === Dapp.ARRAKIS)) {
9563
- _context4.next = 32;
9658
+ _context4.next = 33;
9564
9659
  break;
9565
9660
  }
9566
9661
 
9567
- _abi2 = new ethers.utils.Interface(IArrakisV1RouterStaking.abi);
9662
+ _abi3 = new ethers.utils.Interface(IArrakisV1RouterStaking.abi);
9568
9663
  _context4.t7 = BigNumber;
9569
- _context4.next = 27;
9664
+ _context4.next = 28;
9570
9665
  return pool.utils.getBalance(tokenId, pool.address);
9571
9666
 
9572
- case 27:
9667
+ case 28:
9573
9668
  _context4.t8 = _context4.sent.toString();
9574
9669
  _liquidity = new _context4.t7(_context4.t8).times(amount).div(100);
9575
- txData = _abi2.encodeFunctionData(Transaction.REMOVE_LIQUIDITY_UNSTAKE, [tokenId, _liquidity, 0, 0, pool.address]);
9576
- _context4.next = 33;
9670
+ txData = _abi3.encodeFunctionData(Transaction.REMOVE_LIQUIDITY_UNSTAKE, [tokenId, _liquidity, 0, 0, pool.address]);
9671
+ _context4.next = 34;
9577
9672
  break;
9578
9673
 
9579
- case 32:
9674
+ case 33:
9580
9675
  throw new Error("dapp not supported");
9581
9676
 
9582
- case 33:
9677
+ case 34:
9583
9678
  return _context4.abrupt("return", txData);
9584
9679
 
9585
- case 34:
9680
+ case 35:
9586
9681
  case "end":
9587
9682
  return _context4.stop();
9588
9683
  }
@@ -14486,12 +14581,12 @@ function _getVelodromeRemoveLiquidityTxData() {
14486
14581
  return _getVelodromeRemoveLiquidityTxData.apply(this, arguments);
14487
14582
  }
14488
14583
 
14489
- function getVelodromeClOwner(_x12, _x13, _x14) {
14490
- return _getVelodromeClOwner.apply(this, arguments);
14584
+ function getClOwner(_x12, _x13, _x14) {
14585
+ return _getClOwner.apply(this, arguments);
14491
14586
  }
14492
14587
 
14493
- function _getVelodromeClOwner() {
14494
- _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, dapp, tokenId) {
14588
+ function _getClOwner() {
14589
+ _getClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, dapp, tokenId) {
14495
14590
  var iNonfungiblePositionManager;
14496
14591
  return runtime_1.wrap(function _callee3$(_context3) {
14497
14592
  while (1) {
@@ -14512,7 +14607,7 @@ function _getVelodromeClOwner() {
14512
14607
  }
14513
14608
  }, _callee3);
14514
14609
  }));
14515
- return _getVelodromeClOwner.apply(this, arguments);
14610
+ return _getClOwner.apply(this, arguments);
14516
14611
  }
14517
14612
 
14518
14613
  var abi$k = [
@@ -23680,111 +23775,553 @@ function getCompoundV3WithdrawTxData(asset, amount) {
23680
23775
  return new ethers.utils.Interface(ICompoundV3Comet).encodeFunctionData("withdraw", [asset, amount]);
23681
23776
  }
23682
23777
 
23683
- var Pool = /*#__PURE__*/function () {
23684
- function Pool(network, signer, poolLogic, mangerLogic, utils, factory) {
23685
- this.network = network;
23686
- this.poolLogic = poolLogic;
23687
- this.address = poolLogic.address;
23688
- this.managerLogic = mangerLogic;
23689
- this.signer = signer;
23690
- this.utils = utils;
23691
- this.factory = factory;
23692
- }
23693
- /**
23694
- * Return the assets with balances and deposit info of a pool
23695
- * @returns {Promise<FundComposition[]>} Composition of assets with balance, deposit info
23696
- */
23697
-
23698
-
23699
- var _proto = Pool.prototype;
23700
-
23701
- _proto.getComposition =
23702
- /*#__PURE__*/
23703
- function () {
23704
- var _getComposition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
23705
- var result, fundComposition;
23706
- return runtime_1.wrap(function _callee$(_context) {
23707
- while (1) {
23708
- switch (_context.prev = _context.next) {
23709
- case 0:
23710
- _context.next = 2;
23711
- return this.managerLogic.getFundComposition();
23712
-
23713
- case 2:
23714
- result = _context.sent;
23715
- fundComposition = result[0].map(function (item, index) {
23716
- var asset = item.asset,
23717
- isDeposit = item.isDeposit;
23718
- return {
23719
- asset: asset,
23720
- isDeposit: isDeposit,
23721
- balance: result[1][index],
23722
- rate: result[2][index]
23723
- };
23724
- });
23725
- return _context.abrupt("return", fundComposition);
23726
-
23727
- case 5:
23728
- case "end":
23729
- return _context.stop();
23730
- }
23731
- }
23732
- }, _callee, this);
23733
- }));
23734
-
23735
- function getComposition() {
23736
- return _getComposition.apply(this, arguments);
23737
- }
23738
-
23739
- return getComposition;
23740
- }() //Invest functions
23741
-
23742
- /**
23743
- * Approve the asset that can be deposited into a pool
23744
- * @param {string} nasset Address of deposit asset
23745
- * @param {BigNumber | string} amount Amount to be approved
23746
- * @param {any} options Transaction options
23747
- * @param {boolean} estimateGas Simulate/estimate gas
23748
- * @returns {Promise<any>} Transaction
23749
- */
23750
- ;
23751
-
23752
- _proto.approveDeposit =
23753
- /*#__PURE__*/
23754
- function () {
23755
- var _approveDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(asset, amount, options, estimateGas) {
23756
- var iERC20, tx;
23757
- return runtime_1.wrap(function _callee2$(_context2) {
23758
- while (1) {
23759
- switch (_context2.prev = _context2.next) {
23760
- case 0:
23761
- if (options === void 0) {
23762
- options = null;
23763
- }
23764
-
23765
- if (estimateGas === void 0) {
23766
- estimateGas = false;
23767
- }
23768
-
23769
- iERC20 = new ethers.Contract(asset, IERC20.abi, this.signer);
23770
-
23771
- if (!estimateGas) {
23772
- _context2.next = 7;
23773
- break;
23774
- }
23775
-
23776
- _context2.next = 6;
23777
- return iERC20.estimateGas.approve(this.address, amount, options);
23778
-
23779
- case 6:
23780
- return _context2.abrupt("return", _context2.sent);
23781
-
23782
- case 7:
23783
- _context2.next = 9;
23784
- return iERC20.approve(this.address, amount, options);
23785
-
23786
- case 9:
23787
- tx = _context2.sent;
23778
+ var ICometRewards = [
23779
+ {
23780
+ inputs: [
23781
+ {
23782
+ internalType: "address",
23783
+ name: "governor_",
23784
+ type: "address"
23785
+ }
23786
+ ],
23787
+ stateMutability: "nonpayable",
23788
+ type: "constructor"
23789
+ },
23790
+ {
23791
+ inputs: [
23792
+ {
23793
+ internalType: "address",
23794
+ name: "",
23795
+ type: "address"
23796
+ }
23797
+ ],
23798
+ name: "AlreadyConfigured",
23799
+ type: "error"
23800
+ },
23801
+ {
23802
+ inputs: [
23803
+ ],
23804
+ name: "BadData",
23805
+ type: "error"
23806
+ },
23807
+ {
23808
+ inputs: [
23809
+ {
23810
+ internalType: "uint256",
23811
+ name: "",
23812
+ type: "uint256"
23813
+ }
23814
+ ],
23815
+ name: "InvalidUInt64",
23816
+ type: "error"
23817
+ },
23818
+ {
23819
+ inputs: [
23820
+ {
23821
+ internalType: "address",
23822
+ name: "",
23823
+ type: "address"
23824
+ }
23825
+ ],
23826
+ name: "NotPermitted",
23827
+ type: "error"
23828
+ },
23829
+ {
23830
+ inputs: [
23831
+ {
23832
+ internalType: "address",
23833
+ name: "",
23834
+ type: "address"
23835
+ }
23836
+ ],
23837
+ name: "NotSupported",
23838
+ type: "error"
23839
+ },
23840
+ {
23841
+ inputs: [
23842
+ {
23843
+ internalType: "address",
23844
+ name: "",
23845
+ type: "address"
23846
+ },
23847
+ {
23848
+ internalType: "uint256",
23849
+ name: "",
23850
+ type: "uint256"
23851
+ }
23852
+ ],
23853
+ name: "TransferOutFailed",
23854
+ type: "error"
23855
+ },
23856
+ {
23857
+ anonymous: false,
23858
+ inputs: [
23859
+ {
23860
+ indexed: true,
23861
+ internalType: "address",
23862
+ name: "oldGovernor",
23863
+ type: "address"
23864
+ },
23865
+ {
23866
+ indexed: true,
23867
+ internalType: "address",
23868
+ name: "newGovernor",
23869
+ type: "address"
23870
+ }
23871
+ ],
23872
+ name: "GovernorTransferred",
23873
+ type: "event"
23874
+ },
23875
+ {
23876
+ anonymous: false,
23877
+ inputs: [
23878
+ {
23879
+ indexed: true,
23880
+ internalType: "address",
23881
+ name: "src",
23882
+ type: "address"
23883
+ },
23884
+ {
23885
+ indexed: true,
23886
+ internalType: "address",
23887
+ name: "recipient",
23888
+ type: "address"
23889
+ },
23890
+ {
23891
+ indexed: true,
23892
+ internalType: "address",
23893
+ name: "token",
23894
+ type: "address"
23895
+ },
23896
+ {
23897
+ indexed: false,
23898
+ internalType: "uint256",
23899
+ name: "amount",
23900
+ type: "uint256"
23901
+ }
23902
+ ],
23903
+ name: "RewardClaimed",
23904
+ type: "event"
23905
+ },
23906
+ {
23907
+ anonymous: false,
23908
+ inputs: [
23909
+ {
23910
+ indexed: true,
23911
+ internalType: "address",
23912
+ name: "user",
23913
+ type: "address"
23914
+ },
23915
+ {
23916
+ indexed: true,
23917
+ internalType: "address",
23918
+ name: "comet",
23919
+ type: "address"
23920
+ },
23921
+ {
23922
+ indexed: false,
23923
+ internalType: "uint256",
23924
+ name: "amount",
23925
+ type: "uint256"
23926
+ }
23927
+ ],
23928
+ name: "RewardsClaimedSet",
23929
+ type: "event"
23930
+ },
23931
+ {
23932
+ inputs: [
23933
+ {
23934
+ internalType: "address",
23935
+ name: "comet",
23936
+ type: "address"
23937
+ },
23938
+ {
23939
+ internalType: "address",
23940
+ name: "src",
23941
+ type: "address"
23942
+ },
23943
+ {
23944
+ internalType: "bool",
23945
+ name: "shouldAccrue",
23946
+ type: "bool"
23947
+ }
23948
+ ],
23949
+ name: "claim",
23950
+ outputs: [
23951
+ ],
23952
+ stateMutability: "nonpayable",
23953
+ type: "function"
23954
+ },
23955
+ {
23956
+ inputs: [
23957
+ {
23958
+ internalType: "address",
23959
+ name: "comet",
23960
+ type: "address"
23961
+ },
23962
+ {
23963
+ internalType: "address",
23964
+ name: "src",
23965
+ type: "address"
23966
+ },
23967
+ {
23968
+ internalType: "address",
23969
+ name: "to",
23970
+ type: "address"
23971
+ },
23972
+ {
23973
+ internalType: "bool",
23974
+ name: "shouldAccrue",
23975
+ type: "bool"
23976
+ }
23977
+ ],
23978
+ name: "claimTo",
23979
+ outputs: [
23980
+ ],
23981
+ stateMutability: "nonpayable",
23982
+ type: "function"
23983
+ },
23984
+ {
23985
+ inputs: [
23986
+ {
23987
+ internalType: "address",
23988
+ name: "comet",
23989
+ type: "address"
23990
+ },
23991
+ {
23992
+ internalType: "address",
23993
+ name: "account",
23994
+ type: "address"
23995
+ }
23996
+ ],
23997
+ name: "getRewardOwed",
23998
+ outputs: [
23999
+ {
24000
+ components: [
24001
+ {
24002
+ internalType: "address",
24003
+ name: "token",
24004
+ type: "address"
24005
+ },
24006
+ {
24007
+ internalType: "uint256",
24008
+ name: "owed",
24009
+ type: "uint256"
24010
+ }
24011
+ ],
24012
+ internalType: "struct CometRewards.RewardOwed",
24013
+ name: "",
24014
+ type: "tuple"
24015
+ }
24016
+ ],
24017
+ stateMutability: "nonpayable",
24018
+ type: "function"
24019
+ },
24020
+ {
24021
+ inputs: [
24022
+ ],
24023
+ name: "governor",
24024
+ outputs: [
24025
+ {
24026
+ internalType: "address",
24027
+ name: "",
24028
+ type: "address"
24029
+ }
24030
+ ],
24031
+ stateMutability: "view",
24032
+ type: "function"
24033
+ },
24034
+ {
24035
+ inputs: [
24036
+ {
24037
+ internalType: "address",
24038
+ name: "",
24039
+ type: "address"
24040
+ }
24041
+ ],
24042
+ name: "rewardConfig",
24043
+ outputs: [
24044
+ {
24045
+ internalType: "address",
24046
+ name: "token",
24047
+ type: "address"
24048
+ },
24049
+ {
24050
+ internalType: "uint64",
24051
+ name: "rescaleFactor",
24052
+ type: "uint64"
24053
+ },
24054
+ {
24055
+ internalType: "bool",
24056
+ name: "shouldUpscale",
24057
+ type: "bool"
24058
+ },
24059
+ {
24060
+ internalType: "uint256",
24061
+ name: "multiplier",
24062
+ type: "uint256"
24063
+ }
24064
+ ],
24065
+ stateMutability: "view",
24066
+ type: "function"
24067
+ },
24068
+ {
24069
+ inputs: [
24070
+ {
24071
+ internalType: "address",
24072
+ name: "",
24073
+ type: "address"
24074
+ },
24075
+ {
24076
+ internalType: "address",
24077
+ name: "",
24078
+ type: "address"
24079
+ }
24080
+ ],
24081
+ name: "rewardsClaimed",
24082
+ outputs: [
24083
+ {
24084
+ internalType: "uint256",
24085
+ name: "",
24086
+ type: "uint256"
24087
+ }
24088
+ ],
24089
+ stateMutability: "view",
24090
+ type: "function"
24091
+ },
24092
+ {
24093
+ inputs: [
24094
+ {
24095
+ internalType: "address",
24096
+ name: "comet",
24097
+ type: "address"
24098
+ },
24099
+ {
24100
+ internalType: "address",
24101
+ name: "token",
24102
+ type: "address"
24103
+ }
24104
+ ],
24105
+ name: "setRewardConfig",
24106
+ outputs: [
24107
+ ],
24108
+ stateMutability: "nonpayable",
24109
+ type: "function"
24110
+ },
24111
+ {
24112
+ inputs: [
24113
+ {
24114
+ internalType: "address",
24115
+ name: "comet",
24116
+ type: "address"
24117
+ },
24118
+ {
24119
+ internalType: "address",
24120
+ name: "token",
24121
+ type: "address"
24122
+ },
24123
+ {
24124
+ internalType: "uint256",
24125
+ name: "multiplier",
24126
+ type: "uint256"
24127
+ }
24128
+ ],
24129
+ name: "setRewardConfigWithMultiplier",
24130
+ outputs: [
24131
+ ],
24132
+ stateMutability: "nonpayable",
24133
+ type: "function"
24134
+ },
24135
+ {
24136
+ inputs: [
24137
+ {
24138
+ internalType: "address",
24139
+ name: "comet",
24140
+ type: "address"
24141
+ },
24142
+ {
24143
+ internalType: "address[]",
24144
+ name: "users",
24145
+ type: "address[]"
24146
+ },
24147
+ {
24148
+ internalType: "uint256[]",
24149
+ name: "claimedAmounts",
24150
+ type: "uint256[]"
24151
+ }
24152
+ ],
24153
+ name: "setRewardsClaimed",
24154
+ outputs: [
24155
+ ],
24156
+ stateMutability: "nonpayable",
24157
+ type: "function"
24158
+ },
24159
+ {
24160
+ inputs: [
24161
+ {
24162
+ internalType: "address",
24163
+ name: "newGovernor",
24164
+ type: "address"
24165
+ }
24166
+ ],
24167
+ name: "transferGovernor",
24168
+ outputs: [
24169
+ ],
24170
+ stateMutability: "nonpayable",
24171
+ type: "function"
24172
+ },
24173
+ {
24174
+ inputs: [
24175
+ {
24176
+ internalType: "address",
24177
+ name: "token",
24178
+ type: "address"
24179
+ },
24180
+ {
24181
+ internalType: "address",
24182
+ name: "to",
24183
+ type: "address"
24184
+ },
24185
+ {
24186
+ internalType: "uint256",
24187
+ name: "amount",
24188
+ type: "uint256"
24189
+ }
24190
+ ],
24191
+ name: "withdrawToken",
24192
+ outputs: [
24193
+ ],
24194
+ stateMutability: "nonpayable",
24195
+ type: "function"
24196
+ }
24197
+ ];
24198
+
24199
+ function getCompoundV3ClaimTxData(pool, asset) {
24200
+ var iCometRewards = new ethers.utils.Interface(ICometRewards);
24201
+ return iCometRewards.encodeFunctionData("claim", [asset, pool.address, true]);
24202
+ }
24203
+
24204
+ /* eslint-disable @typescript-eslint/no-explicit-any */
24205
+ var iNonfungiblePositionManager = /*#__PURE__*/new ethers.utils.Interface(INonfungiblePositionManager.abi);
24206
+ var iMasterChef = /*#__PURE__*/new ethers.utils.Interface(IPanncakeMasterChef);
24207
+ function getPancakeStakeTxData(pool, tokenId, stakingAddress) {
24208
+ return iNonfungiblePositionManager.encodeFunctionData("safeTransferFrom", [pool.address, stakingAddress, tokenId]);
24209
+ }
24210
+ function getPancakeUnStakeTxData(pool, tokenId) {
24211
+ return iMasterChef.encodeFunctionData("withdraw", [tokenId, pool.address]);
24212
+ }
24213
+ function getPancakeHarvestClaimTxData(pool, tokenId) {
24214
+ var harvestTxData = iMasterChef.encodeFunctionData(Transaction.HARVEST, [tokenId, pool.address]);
24215
+ var collectTxData = iMasterChef.encodeFunctionData(Transaction.COLLECT, [[tokenId, pool.address, MaxUint128, MaxUint128]]);
24216
+ var multicallParams = [harvestTxData, collectTxData];
24217
+ return iMasterChef.encodeFunctionData(Transaction.MULTI_CALL, [multicallParams]);
24218
+ }
24219
+
24220
+ var Pool = /*#__PURE__*/function () {
24221
+ function Pool(network, signer, poolLogic, mangerLogic, utils, factory) {
24222
+ this.network = network;
24223
+ this.poolLogic = poolLogic;
24224
+ this.address = poolLogic.address;
24225
+ this.managerLogic = mangerLogic;
24226
+ this.signer = signer;
24227
+ this.utils = utils;
24228
+ this.factory = factory;
24229
+ }
24230
+ /**
24231
+ * Return the assets with balances and deposit info of a pool
24232
+ * @returns {Promise<FundComposition[]>} Composition of assets with balance, deposit info
24233
+ */
24234
+
24235
+
24236
+ var _proto = Pool.prototype;
24237
+
24238
+ _proto.getComposition =
24239
+ /*#__PURE__*/
24240
+ function () {
24241
+ var _getComposition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
24242
+ var result, fundComposition;
24243
+ return runtime_1.wrap(function _callee$(_context) {
24244
+ while (1) {
24245
+ switch (_context.prev = _context.next) {
24246
+ case 0:
24247
+ _context.next = 2;
24248
+ return this.managerLogic.getFundComposition();
24249
+
24250
+ case 2:
24251
+ result = _context.sent;
24252
+ fundComposition = result[0].map(function (item, index) {
24253
+ var asset = item.asset,
24254
+ isDeposit = item.isDeposit;
24255
+ return {
24256
+ asset: asset,
24257
+ isDeposit: isDeposit,
24258
+ balance: result[1][index],
24259
+ rate: result[2][index]
24260
+ };
24261
+ });
24262
+ return _context.abrupt("return", fundComposition);
24263
+
24264
+ case 5:
24265
+ case "end":
24266
+ return _context.stop();
24267
+ }
24268
+ }
24269
+ }, _callee, this);
24270
+ }));
24271
+
24272
+ function getComposition() {
24273
+ return _getComposition.apply(this, arguments);
24274
+ }
24275
+
24276
+ return getComposition;
24277
+ }() //Invest functions
24278
+
24279
+ /**
24280
+ * Approve the asset that can be deposited into a pool
24281
+ * @param {string} nasset Address of deposit asset
24282
+ * @param {BigNumber | string} amount Amount to be approved
24283
+ * @param {any} options Transaction options
24284
+ * @param {boolean} estimateGas Simulate/estimate gas
24285
+ * @returns {Promise<any>} Transaction
24286
+ */
24287
+ ;
24288
+
24289
+ _proto.approveDeposit =
24290
+ /*#__PURE__*/
24291
+ function () {
24292
+ var _approveDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(asset, amount, options, estimateGas) {
24293
+ var iERC20, tx;
24294
+ return runtime_1.wrap(function _callee2$(_context2) {
24295
+ while (1) {
24296
+ switch (_context2.prev = _context2.next) {
24297
+ case 0:
24298
+ if (options === void 0) {
24299
+ options = null;
24300
+ }
24301
+
24302
+ if (estimateGas === void 0) {
24303
+ estimateGas = false;
24304
+ }
24305
+
24306
+ iERC20 = new ethers.Contract(asset, IERC20.abi, this.signer);
24307
+
24308
+ if (!estimateGas) {
24309
+ _context2.next = 7;
24310
+ break;
24311
+ }
24312
+
24313
+ _context2.next = 6;
24314
+ return iERC20.estimateGas.approve(this.address, amount, options);
24315
+
24316
+ case 6:
24317
+ return _context2.abrupt("return", _context2.sent);
24318
+
24319
+ case 7:
24320
+ _context2.next = 9;
24321
+ return iERC20.approve(this.address, amount, options);
24322
+
24323
+ case 9:
24324
+ tx = _context2.sent;
23788
24325
  return _context2.abrupt("return", tx);
23789
24326
 
23790
24327
  case 11:
@@ -24505,7 +25042,7 @@ var Pool = /*#__PURE__*/function () {
24505
25042
  /*#__PURE__*/
24506
25043
  function () {
24507
25044
  var _stakeInGauge = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(dapp, gauge, amount, options, estimateGas) {
24508
- var stakeTxData, rewardsGauge, tx;
25045
+ var stakeTxData, rewardsGauge, txTo, tx;
24509
25046
  return runtime_1.wrap(function _callee14$(_context14) {
24510
25047
  while (1) {
24511
25048
  switch (_context14.prev = _context14.next) {
@@ -24519,34 +25056,39 @@ var Pool = /*#__PURE__*/function () {
24519
25056
  }
24520
25057
 
24521
25058
  _context14.t0 = dapp;
24522
- _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;
25059
+ _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 : _context14.t0 === Dapp.PANCAKECL ? 12 : 14;
24523
25060
  break;
24524
25061
 
24525
25062
  case 5:
24526
25063
  rewardsGauge = new ethers.utils.Interface(IBalancerRewardsGauge.abi);
24527
25064
  stakeTxData = rewardsGauge.encodeFunctionData("deposit(uint256)", [amount]);
24528
- return _context14.abrupt("break", 13);
25065
+ return _context14.abrupt("break", 15);
24529
25066
 
24530
25067
  case 8:
24531
25068
  stakeTxData = getVelodromeStakeTxData(amount, false);
24532
- return _context14.abrupt("break", 13);
25069
+ return _context14.abrupt("break", 15);
24533
25070
 
24534
25071
  case 10:
24535
25072
  stakeTxData = getVelodromeStakeTxData(amount, true);
24536
- return _context14.abrupt("break", 13);
25073
+ return _context14.abrupt("break", 15);
24537
25074
 
24538
25075
  case 12:
24539
- throw new Error("dapp not supported");
25076
+ stakeTxData = getPancakeStakeTxData(this, amount.toString(), gauge);
25077
+ return _context14.abrupt("break", 15);
24540
25078
 
24541
- case 13:
24542
- _context14.next = 15;
24543
- return getPoolTxOrGasEstimate(this, [gauge, stakeTxData, options], estimateGas);
25079
+ case 14:
25080
+ throw new Error("dapp not supported");
24544
25081
 
24545
25082
  case 15:
25083
+ txTo = dapp !== Dapp.PANCAKECL ? gauge : nonfungiblePositionManagerAddress[this.network][dapp];
25084
+ _context14.next = 18;
25085
+ return getPoolTxOrGasEstimate(this, [txTo, stakeTxData, options], estimateGas);
25086
+
25087
+ case 18:
24546
25088
  tx = _context14.sent;
24547
25089
  return _context14.abrupt("return", tx);
24548
25090
 
24549
- case 17:
25091
+ case 20:
24550
25092
  case "end":
24551
25093
  return _context14.stop();
24552
25094
  }
@@ -24630,7 +25172,9 @@ var Pool = /*#__PURE__*/function () {
24630
25172
  /*#__PURE__*/
24631
25173
  function () {
24632
25174
  var _unstakeFromGauge = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(gauge, amount, options, estimateGas) {
24633
- var rewardsGauge, unstakeTxData, tx;
25175
+ var _stakingAddress$this$;
25176
+
25177
+ var unstakeTxData, rewardsGauge, tx;
24634
25178
  return runtime_1.wrap(function _callee16$(_context16) {
24635
25179
  while (1) {
24636
25180
  switch (_context16.prev = _context16.next) {
@@ -24644,7 +25188,13 @@ var Pool = /*#__PURE__*/function () {
24644
25188
  }
24645
25189
 
24646
25190
  rewardsGauge = new ethers.utils.Interface(IBalancerRewardsGauge.abi);
24647
- unstakeTxData = rewardsGauge.encodeFunctionData("withdraw(uint256)", [amount]);
25191
+
25192
+ if (gauge.toLowerCase() === ((_stakingAddress$this$ = stakingAddress[this.network][Dapp.PANCAKECL]) == null ? void 0 : _stakingAddress$this$.toLowerCase())) {
25193
+ unstakeTxData = getPancakeUnStakeTxData(this, amount.toString());
25194
+ } else {
25195
+ unstakeTxData = rewardsGauge.encodeFunctionData("withdraw(uint256)", [amount]);
25196
+ }
25197
+
24648
25198
  _context16.next = 6;
24649
25199
  return getPoolTxOrGasEstimate(this, [gauge, unstakeTxData, options], estimateGas);
24650
25200
 
@@ -25385,6 +25935,58 @@ var Pool = /*#__PURE__*/function () {
25385
25935
 
25386
25936
  return harvestAaveV3Rewards;
25387
25937
  }()
25938
+ /**
25939
+ * Claim rewards from CompoundV3
25940
+ * @param {string} asset Compound lending asset
25941
+ * @param {any} options Transaction options
25942
+ * @param {boolean} estimateGas Simulate/estimate gas
25943
+ * @returns {Promise<any>} Transaction
25944
+ */
25945
+ ;
25946
+
25947
+ _proto.harvestCompoundV3Rewards =
25948
+ /*#__PURE__*/
25949
+ function () {
25950
+ var _harvestCompoundV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(asset, options, estimateGas) {
25951
+ var claimTxData, tx;
25952
+ return runtime_1.wrap(function _callee30$(_context30) {
25953
+ while (1) {
25954
+ switch (_context30.prev = _context30.next) {
25955
+ case 0:
25956
+ if (options === void 0) {
25957
+ options = null;
25958
+ }
25959
+
25960
+ if (estimateGas === void 0) {
25961
+ estimateGas = false;
25962
+ }
25963
+
25964
+ _context30.next = 4;
25965
+ return getCompoundV3ClaimTxData(this, asset);
25966
+
25967
+ case 4:
25968
+ claimTxData = _context30.sent;
25969
+ _context30.next = 7;
25970
+ return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][Dapp.COMPOUNDV3], claimTxData, options], estimateGas);
25971
+
25972
+ case 7:
25973
+ tx = _context30.sent;
25974
+ return _context30.abrupt("return", tx);
25975
+
25976
+ case 9:
25977
+ case "end":
25978
+ return _context30.stop();
25979
+ }
25980
+ }
25981
+ }, _callee30, this);
25982
+ }));
25983
+
25984
+ function harvestCompoundV3Rewards(_x135, _x136, _x137) {
25985
+ return _harvestCompoundV3Rewards.apply(this, arguments);
25986
+ }
25987
+
25988
+ return harvestCompoundV3Rewards;
25989
+ }()
25388
25990
  /**
25389
25991
  * Create UniswapV3 liquidity pool
25390
25992
  * @param {dapp} Platform UniswapV3, VelodromeCL, AerodromeCL or RamesesCL
@@ -25406,11 +26008,11 @@ var Pool = /*#__PURE__*/function () {
25406
26008
  _proto.addLiquidityUniswapV3 =
25407
26009
  /*#__PURE__*/
25408
26010
  function () {
25409
- var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
26011
+ var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
25410
26012
  var mintTxData, tx;
25411
- return runtime_1.wrap(function _callee30$(_context30) {
26013
+ return runtime_1.wrap(function _callee31$(_context31) {
25412
26014
  while (1) {
25413
- switch (_context30.prev = _context30.next) {
26015
+ switch (_context31.prev = _context31.next) {
25414
26016
  case 0:
25415
26017
  if (options === void 0) {
25416
26018
  options = null;
@@ -25421,7 +26023,7 @@ var Pool = /*#__PURE__*/function () {
25421
26023
  }
25422
26024
 
25423
26025
  if (!((minPrice === null || maxPrice === null) && (minTick === null || maxTick === null))) {
25424
- _context30.next = 4;
26026
+ _context31.next = 4;
25425
26027
  break;
25426
26028
  }
25427
26029
 
@@ -25429,34 +26031,34 @@ var Pool = /*#__PURE__*/function () {
25429
26031
 
25430
26032
  case 4:
25431
26033
  if (!((minPrice || maxPrice) && dapp !== Dapp.UNISWAPV3)) {
25432
- _context30.next = 6;
26034
+ _context31.next = 6;
25433
26035
  break;
25434
26036
  }
25435
26037
 
25436
26038
  throw new Error("no price conversion for Aerodrome/Velodrome CL");
25437
26039
 
25438
26040
  case 6:
25439
- _context30.next = 8;
26041
+ _context31.next = 8;
25440
26042
  return getUniswapV3MintTxData(dapp, this, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing);
25441
26043
 
25442
26044
  case 8:
25443
- mintTxData = _context30.sent;
25444
- _context30.next = 11;
26045
+ mintTxData = _context31.sent;
26046
+ _context31.next = 11;
25445
26047
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], mintTxData, options], estimateGas);
25446
26048
 
25447
26049
  case 11:
25448
- tx = _context30.sent;
25449
- return _context30.abrupt("return", tx);
26050
+ tx = _context31.sent;
26051
+ return _context31.abrupt("return", tx);
25450
26052
 
25451
26053
  case 13:
25452
26054
  case "end":
25453
- return _context30.stop();
26055
+ return _context31.stop();
25454
26056
  }
25455
26057
  }
25456
- }, _callee30, this);
26058
+ }, _callee31, this);
25457
26059
  }));
25458
26060
 
25459
- function addLiquidityUniswapV3(_x135, _x136, _x137, _x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145, _x146) {
26061
+ function addLiquidityUniswapV3(_x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145, _x146, _x147, _x148, _x149) {
25460
26062
  return _addLiquidityUniswapV.apply(this, arguments);
25461
26063
  }
25462
26064
 
@@ -25476,11 +26078,11 @@ var Pool = /*#__PURE__*/function () {
25476
26078
  _proto.decreaseLiquidity =
25477
26079
  /*#__PURE__*/
25478
26080
  function () {
25479
- var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, tokenId, amount, options, estimateGas) {
26081
+ var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, tokenId, amount, options, estimateGas) {
25480
26082
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25481
- return runtime_1.wrap(function _callee31$(_context31) {
26083
+ return runtime_1.wrap(function _callee32$(_context32) {
25482
26084
  while (1) {
25483
- switch (_context31.prev = _context31.next) {
26085
+ switch (_context32.prev = _context32.next) {
25484
26086
  case 0:
25485
26087
  if (amount === void 0) {
25486
26088
  amount = 100;
@@ -25495,20 +26097,20 @@ var Pool = /*#__PURE__*/function () {
25495
26097
  }
25496
26098
 
25497
26099
  isStaked = false;
25498
- _context31.t0 = dapp;
25499
- _context31.next = _context31.t0 === Dapp.UNISWAPV3 ? 7 : _context31.t0 === Dapp.RAMSESCL ? 7 : _context31.t0 === Dapp.VELODROMECL ? 9 : _context31.t0 === Dapp.AERODROMECL ? 9 : _context31.t0 === Dapp.ARRAKIS ? 14 : 16;
26100
+ _context32.t0 = dapp;
26101
+ _context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 7 : _context32.t0 === Dapp.RAMSESCL ? 7 : _context32.t0 === Dapp.VELODROMECL ? 9 : _context32.t0 === Dapp.AERODROMECL ? 9 : _context32.t0 === Dapp.PANCAKECL ? 9 : _context32.t0 === Dapp.ARRAKIS ? 14 : 16;
25500
26102
  break;
25501
26103
 
25502
26104
  case 7:
25503
26105
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25504
- return _context31.abrupt("break", 17);
26106
+ return _context32.abrupt("break", 17);
25505
26107
 
25506
26108
  case 9:
25507
- _context31.next = 11;
25508
- return getVelodromeClOwner(this, dapp, tokenId);
26109
+ _context32.next = 11;
26110
+ return getClOwner(this, dapp, tokenId);
25509
26111
 
25510
26112
  case 11:
25511
- tokenIdOwner = _context31.sent;
26113
+ tokenIdOwner = _context32.sent;
25512
26114
 
25513
26115
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25514
26116
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25518,49 +26120,49 @@ var Pool = /*#__PURE__*/function () {
25518
26120
  isStaked = true;
25519
26121
  }
25520
26122
 
25521
- return _context31.abrupt("break", 17);
26123
+ return _context32.abrupt("break", 17);
25522
26124
 
25523
26125
  case 14:
25524
26126
  dappAddress = routerAddress[this.network][dapp];
25525
- return _context31.abrupt("break", 17);
26127
+ return _context32.abrupt("break", 17);
25526
26128
 
25527
26129
  case 16:
25528
26130
  throw new Error("dapp not supported");
25529
26131
 
25530
26132
  case 17:
25531
- if (isStaked) {
25532
- _context31.next = 23;
26133
+ if (!(!isStaked || dapp === Dapp.PANCAKECL)) {
26134
+ _context32.next = 23;
25533
26135
  break;
25534
26136
  }
25535
26137
 
25536
- _context31.next = 20;
25537
- return getDecreaseLiquidityTxData(this, dapp, tokenId, amount);
26138
+ _context32.next = 20;
26139
+ return getDecreaseLiquidityTxData(this, dapp, tokenId, amount, isStaked);
25538
26140
 
25539
26141
  case 20:
25540
- txData = _context31.sent;
25541
- _context31.next = 24;
26142
+ txData = _context32.sent;
26143
+ _context32.next = 24;
25542
26144
  break;
25543
26145
 
25544
26146
  case 23:
25545
26147
  throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
25546
26148
 
25547
26149
  case 24:
25548
- _context31.next = 26;
26150
+ _context32.next = 26;
25549
26151
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25550
26152
 
25551
26153
  case 26:
25552
- tx = _context31.sent;
25553
- return _context31.abrupt("return", tx);
26154
+ tx = _context32.sent;
26155
+ return _context32.abrupt("return", tx);
25554
26156
 
25555
26157
  case 28:
25556
26158
  case "end":
25557
- return _context31.stop();
26159
+ return _context32.stop();
25558
26160
  }
25559
26161
  }
25560
- }, _callee31, this);
26162
+ }, _callee32, this);
25561
26163
  }));
25562
26164
 
25563
- function decreaseLiquidity(_x147, _x148, _x149, _x150, _x151) {
26165
+ function decreaseLiquidity(_x150, _x151, _x152, _x153, _x154) {
25564
26166
  return _decreaseLiquidity.apply(this, arguments);
25565
26167
  }
25566
26168
 
@@ -25581,11 +26183,11 @@ var Pool = /*#__PURE__*/function () {
25581
26183
  _proto.increaseLiquidity =
25582
26184
  /*#__PURE__*/
25583
26185
  function () {
25584
- var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, tokenId, amountA, amountB, options, estimateGas) {
26186
+ var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, amountA, amountB, options, estimateGas) {
25585
26187
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25586
- return runtime_1.wrap(function _callee32$(_context32) {
26188
+ return runtime_1.wrap(function _callee33$(_context33) {
25587
26189
  while (1) {
25588
- switch (_context32.prev = _context32.next) {
26190
+ switch (_context33.prev = _context33.next) {
25589
26191
  case 0:
25590
26192
  if (options === void 0) {
25591
26193
  options = null;
@@ -25596,20 +26198,20 @@ var Pool = /*#__PURE__*/function () {
25596
26198
  }
25597
26199
 
25598
26200
  isStaked = false;
25599
- _context32.t0 = dapp;
25600
- _context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 6 : _context32.t0 === Dapp.RAMSESCL ? 6 : _context32.t0 === Dapp.VELODROMECL ? 8 : _context32.t0 === Dapp.AERODROMECL ? 8 : _context32.t0 === Dapp.ARRAKIS ? 13 : 15;
26201
+ _context33.t0 = dapp;
26202
+ _context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.RAMSESCL ? 6 : _context33.t0 === Dapp.VELODROMECL ? 8 : _context33.t0 === Dapp.AERODROMECL ? 8 : _context33.t0 === Dapp.PANCAKECL ? 8 : _context33.t0 === Dapp.ARRAKIS ? 13 : 15;
25601
26203
  break;
25602
26204
 
25603
26205
  case 6:
25604
26206
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25605
- return _context32.abrupt("break", 16);
26207
+ return _context33.abrupt("break", 16);
25606
26208
 
25607
26209
  case 8:
25608
- _context32.next = 10;
25609
- return getVelodromeClOwner(this, dapp, tokenId);
26210
+ _context33.next = 10;
26211
+ return getClOwner(this, dapp, tokenId);
25610
26212
 
25611
26213
  case 10:
25612
- tokenIdOwner = _context32.sent;
26214
+ tokenIdOwner = _context33.sent;
25613
26215
 
25614
26216
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25615
26217
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25619,49 +26221,49 @@ var Pool = /*#__PURE__*/function () {
25619
26221
  isStaked = true;
25620
26222
  }
25621
26223
 
25622
- return _context32.abrupt("break", 16);
26224
+ return _context33.abrupt("break", 16);
25623
26225
 
25624
26226
  case 13:
25625
26227
  dappAddress = routerAddress[this.network][dapp];
25626
- return _context32.abrupt("break", 16);
26228
+ return _context33.abrupt("break", 16);
25627
26229
 
25628
26230
  case 15:
25629
26231
  throw new Error("dapp not supported");
25630
26232
 
25631
26233
  case 16:
25632
- if (isStaked) {
25633
- _context32.next = 22;
26234
+ if (!(!isStaked || dapp === Dapp.PANCAKECL)) {
26235
+ _context33.next = 22;
25634
26236
  break;
25635
26237
  }
25636
26238
 
25637
- _context32.next = 19;
26239
+ _context33.next = 19;
25638
26240
  return getIncreaseLiquidityTxData(this, dapp, tokenId, amountA, amountB);
25639
26241
 
25640
26242
  case 19:
25641
- txData = _context32.sent;
25642
- _context32.next = 23;
26243
+ txData = _context33.sent;
26244
+ _context33.next = 23;
25643
26245
  break;
25644
26246
 
25645
26247
  case 22:
25646
26248
  throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
25647
26249
 
25648
26250
  case 23:
25649
- _context32.next = 25;
26251
+ _context33.next = 25;
25650
26252
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25651
26253
 
25652
26254
  case 25:
25653
- tx = _context32.sent;
25654
- return _context32.abrupt("return", tx);
26255
+ tx = _context33.sent;
26256
+ return _context33.abrupt("return", tx);
25655
26257
 
25656
26258
  case 27:
25657
26259
  case "end":
25658
- return _context32.stop();
26260
+ return _context33.stop();
25659
26261
  }
25660
26262
  }
25661
- }, _callee32, this);
26263
+ }, _callee33, this);
25662
26264
  }));
25663
26265
 
25664
- function increaseLiquidity(_x152, _x153, _x154, _x155, _x156, _x157) {
26266
+ function increaseLiquidity(_x155, _x156, _x157, _x158, _x159, _x160) {
25665
26267
  return _increaseLiquidity.apply(this, arguments);
25666
26268
  }
25667
26269
 
@@ -25680,11 +26282,11 @@ var Pool = /*#__PURE__*/function () {
25680
26282
  _proto.claimFees =
25681
26283
  /*#__PURE__*/
25682
26284
  function () {
25683
- var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, options, estimateGas) {
26285
+ var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(dapp, tokenId, options, estimateGas) {
25684
26286
  var txData, contractAddress, iNonfungiblePositionManager, abi, tokenIdOwner, tx;
25685
- return runtime_1.wrap(function _callee33$(_context33) {
26287
+ return runtime_1.wrap(function _callee34$(_context34) {
25686
26288
  while (1) {
25687
- switch (_context33.prev = _context33.next) {
26289
+ switch (_context34.prev = _context34.next) {
25688
26290
  case 0:
25689
26291
  if (options === void 0) {
25690
26292
  options = null;
@@ -25695,69 +26297,74 @@ var Pool = /*#__PURE__*/function () {
25695
26297
  }
25696
26298
 
25697
26299
  iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
25698
- _context33.t0 = dapp;
25699
- _context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.RAMSESCL ? 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;
26300
+ _context34.t0 = dapp;
26301
+ _context34.next = _context34.t0 === Dapp.UNISWAPV3 ? 6 : _context34.t0 === Dapp.RAMSESCL ? 6 : _context34.t0 === Dapp.ARRAKIS ? 9 : _context34.t0 === Dapp.BALANCER ? 9 : _context34.t0 === Dapp.VELODROME ? 13 : _context34.t0 === Dapp.RAMSES ? 13 : _context34.t0 === Dapp.VELODROMEV2 ? 16 : _context34.t0 === Dapp.AERODROME ? 16 : _context34.t0 === Dapp.VELODROMECL ? 19 : _context34.t0 === Dapp.AERODROMECL ? 19 : _context34.t0 === Dapp.PANCAKECL ? 19 : 24;
25700
26302
  break;
25701
26303
 
25702
26304
  case 6:
25703
26305
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25704
26306
  txData = iNonfungiblePositionManager.encodeFunctionData(Transaction.COLLECT, [[tokenId, this.address, MaxUint128, MaxUint128]]);
25705
- return _context33.abrupt("break", 25);
26307
+ return _context34.abrupt("break", 25);
25706
26308
 
25707
26309
  case 9:
25708
26310
  contractAddress = tokenId;
25709
26311
  abi = new ethers.utils.Interface(ILiquidityGaugeV4.abi);
25710
26312
  txData = abi.encodeFunctionData("claim_rewards()", []);
25711
- return _context33.abrupt("break", 25);
26313
+ return _context34.abrupt("break", 25);
25712
26314
 
25713
26315
  case 13:
25714
26316
  contractAddress = tokenId;
25715
26317
  txData = getVelodromeClaimTxData(this, tokenId, false);
25716
- return _context33.abrupt("break", 25);
26318
+ return _context34.abrupt("break", 25);
25717
26319
 
25718
26320
  case 16:
25719
26321
  contractAddress = tokenId;
25720
26322
  txData = getVelodromeClaimTxData(this, tokenId, true);
25721
- return _context33.abrupt("break", 25);
26323
+ return _context34.abrupt("break", 25);
25722
26324
 
25723
26325
  case 19:
25724
- _context33.next = 21;
25725
- return getVelodromeClOwner(this, dapp, tokenId);
26326
+ _context34.next = 21;
26327
+ return getClOwner(this, dapp, tokenId);
25726
26328
 
25727
26329
  case 21:
25728
- tokenIdOwner = _context33.sent;
26330
+ tokenIdOwner = _context34.sent;
25729
26331
 
25730
26332
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25731
26333
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25732
26334
  txData = iNonfungiblePositionManager.encodeFunctionData(Transaction.COLLECT, [[tokenId, this.address, MaxUint128, MaxUint128]]);
25733
26335
  } else {
25734
- //staked in gauge
26336
+ //staked in gauge or pancake masterchef
25735
26337
  contractAddress = tokenIdOwner;
25736
- txData = getVelodromeCLClaimTxData(tokenId);
26338
+
26339
+ if (dapp === Dapp.PANCAKECL) {
26340
+ txData = getPancakeHarvestClaimTxData(this, tokenId);
26341
+ } else {
26342
+ txData = getVelodromeCLClaimTxData(tokenId);
26343
+ }
25737
26344
  }
25738
26345
 
25739
- return _context33.abrupt("break", 25);
26346
+ return _context34.abrupt("break", 25);
25740
26347
 
25741
26348
  case 24:
25742
26349
  throw new Error("dapp not supported");
25743
26350
 
25744
26351
  case 25:
25745
- _context33.next = 27;
26352
+ _context34.next = 27;
25746
26353
  return getPoolTxOrGasEstimate(this, [contractAddress, txData, options], estimateGas);
25747
26354
 
25748
26355
  case 27:
25749
- tx = _context33.sent;
25750
- return _context33.abrupt("return", tx);
26356
+ tx = _context34.sent;
26357
+ return _context34.abrupt("return", tx);
25751
26358
 
25752
26359
  case 29:
25753
26360
  case "end":
25754
- return _context33.stop();
26361
+ return _context34.stop();
25755
26362
  }
25756
26363
  }
25757
- }, _callee33, this);
26364
+ }, _callee34, this);
25758
26365
  }));
25759
26366
 
25760
- function claimFees(_x158, _x159, _x160, _x161) {
26367
+ function claimFees(_x161, _x162, _x163, _x164) {
25761
26368
  return _claimFees.apply(this, arguments);
25762
26369
  }
25763
26370
 
@@ -25777,11 +26384,11 @@ var Pool = /*#__PURE__*/function () {
25777
26384
  _proto.getRewards =
25778
26385
  /*#__PURE__*/
25779
26386
  function () {
25780
- var _getRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(dapp, tokenId, rewards, options, estimateGas) {
26387
+ var _getRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(dapp, tokenId, rewards, options, estimateGas) {
25781
26388
  var tx;
25782
- return runtime_1.wrap(function _callee34$(_context34) {
26389
+ return runtime_1.wrap(function _callee35$(_context35) {
25783
26390
  while (1) {
25784
- switch (_context34.prev = _context34.next) {
26391
+ switch (_context35.prev = _context35.next) {
25785
26392
  case 0:
25786
26393
  if (options === void 0) {
25787
26394
  options = null;
@@ -25791,22 +26398,22 @@ var Pool = /*#__PURE__*/function () {
25791
26398
  estimateGas = false;
25792
26399
  }
25793
26400
 
25794
- _context34.next = 4;
26401
+ _context35.next = 4;
25795
26402
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], getRewardsTxDta(tokenId, rewards), options], estimateGas);
25796
26403
 
25797
26404
  case 4:
25798
- tx = _context34.sent;
25799
- return _context34.abrupt("return", tx);
26405
+ tx = _context35.sent;
26406
+ return _context35.abrupt("return", tx);
25800
26407
 
25801
26408
  case 6:
25802
26409
  case "end":
25803
- return _context34.stop();
26410
+ return _context35.stop();
25804
26411
  }
25805
26412
  }
25806
- }, _callee34, this);
26413
+ }, _callee35, this);
25807
26414
  }));
25808
26415
 
25809
- function getRewards(_x162, _x163, _x164, _x165, _x166) {
26416
+ function getRewards(_x165, _x166, _x167, _x168, _x169) {
25810
26417
  return _getRewards.apply(this, arguments);
25811
26418
  }
25812
26419
 
@@ -25829,11 +26436,11 @@ var Pool = /*#__PURE__*/function () {
25829
26436
  _proto.tradeUniswapV3 =
25830
26437
  /*#__PURE__*/
25831
26438
  function () {
25832
- var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
26439
+ var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
25833
26440
  var swapxData, tx;
25834
- return runtime_1.wrap(function _callee35$(_context35) {
26441
+ return runtime_1.wrap(function _callee36$(_context36) {
25835
26442
  while (1) {
25836
- switch (_context35.prev = _context35.next) {
26443
+ switch (_context36.prev = _context36.next) {
25837
26444
  case 0:
25838
26445
  if (slippage === void 0) {
25839
26446
  slippage = 0.5;
@@ -25847,27 +26454,27 @@ var Pool = /*#__PURE__*/function () {
25847
26454
  estimateGas = false;
25848
26455
  }
25849
26456
 
25850
- _context35.next = 5;
26457
+ _context36.next = 5;
25851
26458
  return getUniswapV3SwapTxData(this, assetFrom, assetTo, amountIn, slippage, feeAmount);
25852
26459
 
25853
26460
  case 5:
25854
- swapxData = _context35.sent;
25855
- _context35.next = 8;
26461
+ swapxData = _context36.sent;
26462
+ _context36.next = 8;
25856
26463
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.UNISWAPV3], swapxData, options], estimateGas);
25857
26464
 
25858
26465
  case 8:
25859
- tx = _context35.sent;
25860
- return _context35.abrupt("return", tx);
26466
+ tx = _context36.sent;
26467
+ return _context36.abrupt("return", tx);
25861
26468
 
25862
26469
  case 10:
25863
26470
  case "end":
25864
- return _context35.stop();
26471
+ return _context36.stop();
25865
26472
  }
25866
26473
  }
25867
- }, _callee35, this);
26474
+ }, _callee36, this);
25868
26475
  }));
25869
26476
 
25870
- function tradeUniswapV3(_x167, _x168, _x169, _x170, _x171, _x172, _x173) {
26477
+ function tradeUniswapV3(_x170, _x171, _x172, _x173, _x174, _x175, _x176) {
25871
26478
  return _tradeUniswapV.apply(this, arguments);
25872
26479
  }
25873
26480
 
@@ -25886,71 +26493,10 @@ var Pool = /*#__PURE__*/function () {
25886
26493
  */
25887
26494
  ;
25888
26495
 
25889
- _proto.addLiquidityVelodrome =
25890
- /*#__PURE__*/
25891
- function () {
25892
- var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
25893
- var tx;
25894
- return runtime_1.wrap(function _callee36$(_context36) {
25895
- while (1) {
25896
- switch (_context36.prev = _context36.next) {
25897
- case 0:
25898
- if (options === void 0) {
25899
- options = null;
25900
- }
25901
-
25902
- if (estimateGas === void 0) {
25903
- estimateGas = false;
25904
- }
25905
-
25906
- _context36.t0 = getPoolTxOrGasEstimate;
25907
- _context36.t1 = this;
25908
- _context36.t2 = routerAddress[this.network][Dapp.VELODROME];
25909
- _context36.next = 7;
25910
- return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
25911
-
25912
- case 7:
25913
- _context36.t3 = _context36.sent;
25914
- _context36.t4 = options;
25915
- _context36.t5 = [_context36.t2, _context36.t3, _context36.t4];
25916
- _context36.t6 = estimateGas;
25917
- _context36.next = 13;
25918
- return (0, _context36.t0)(_context36.t1, _context36.t5, _context36.t6);
25919
-
25920
- case 13:
25921
- tx = _context36.sent;
25922
- return _context36.abrupt("return", tx);
25923
-
25924
- case 15:
25925
- case "end":
25926
- return _context36.stop();
25927
- }
25928
- }
25929
- }, _callee36, this);
25930
- }));
25931
-
25932
- function addLiquidityVelodrome(_x174, _x175, _x176, _x177, _x178, _x179, _x180) {
25933
- return _addLiquidityVelodrome.apply(this, arguments);
25934
- }
25935
-
25936
- return addLiquidityVelodrome;
25937
- }()
25938
- /**
25939
- * Remove liquidity from Velodrome pool
25940
- * @param {string} assetA First asset
25941
- * @param {string} assetB Second asset
25942
- * @param {BigNumber | string} amount Amount of LP tokens
25943
- * @param { boolean } isStable Is stable pool
25944
- * @param {any} options Transaction options
25945
- * @param {boolean} estimateGas Simulate/estimate gas
25946
- * @returns {Promise<any>} Transaction
25947
- */
25948
- ;
25949
-
25950
- _proto.removeLiquidityVelodrome =
26496
+ _proto.addLiquidityVelodrome =
25951
26497
  /*#__PURE__*/
25952
26498
  function () {
25953
- var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetA, assetB, amount, isStable, options, estimateGas) {
26499
+ var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
25954
26500
  var tx;
25955
26501
  return runtime_1.wrap(function _callee37$(_context37) {
25956
26502
  while (1) {
@@ -25968,7 +26514,7 @@ var Pool = /*#__PURE__*/function () {
25968
26514
  _context37.t1 = this;
25969
26515
  _context37.t2 = routerAddress[this.network][Dapp.VELODROME];
25970
26516
  _context37.next = 7;
25971
- return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26517
+ return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
25972
26518
 
25973
26519
  case 7:
25974
26520
  _context37.t3 = _context37.sent;
@@ -25990,18 +26536,17 @@ var Pool = /*#__PURE__*/function () {
25990
26536
  }, _callee37, this);
25991
26537
  }));
25992
26538
 
25993
- function removeLiquidityVelodrome(_x181, _x182, _x183, _x184, _x185, _x186) {
25994
- return _removeLiquidityVelodrome.apply(this, arguments);
26539
+ function addLiquidityVelodrome(_x177, _x178, _x179, _x180, _x181, _x182, _x183) {
26540
+ return _addLiquidityVelodrome.apply(this, arguments);
25995
26541
  }
25996
26542
 
25997
- return removeLiquidityVelodrome;
26543
+ return addLiquidityVelodrome;
25998
26544
  }()
25999
26545
  /**
26000
- * Add liquidity to Velodrome V2 pool
26546
+ * Remove liquidity from Velodrome pool
26001
26547
  * @param {string} assetA First asset
26002
26548
  * @param {string} assetB Second asset
26003
- * @param {BigNumber | string} amountA Amount first asset
26004
- * @param {BigNumber | string} amountB Amount second asset
26549
+ * @param {BigNumber | string} amount Amount of LP tokens
26005
26550
  * @param { boolean } isStable Is stable pool
26006
26551
  * @param {any} options Transaction options
26007
26552
  * @param {boolean} estimateGas Simulate/estimate gas
@@ -26009,10 +26554,10 @@ var Pool = /*#__PURE__*/function () {
26009
26554
  */
26010
26555
  ;
26011
26556
 
26012
- _proto.addLiquidityVelodromeV2 =
26557
+ _proto.removeLiquidityVelodrome =
26013
26558
  /*#__PURE__*/
26014
26559
  function () {
26015
- var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26560
+ var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amount, isStable, options, estimateGas) {
26016
26561
  var tx;
26017
26562
  return runtime_1.wrap(function _callee38$(_context38) {
26018
26563
  while (1) {
@@ -26028,9 +26573,9 @@ var Pool = /*#__PURE__*/function () {
26028
26573
 
26029
26574
  _context38.t0 = getPoolTxOrGasEstimate;
26030
26575
  _context38.t1 = this;
26031
- _context38.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26576
+ _context38.t2 = routerAddress[this.network][Dapp.VELODROME];
26032
26577
  _context38.next = 7;
26033
- return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26578
+ return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26034
26579
 
26035
26580
  case 7:
26036
26581
  _context38.t3 = _context38.sent;
@@ -26052,17 +26597,18 @@ var Pool = /*#__PURE__*/function () {
26052
26597
  }, _callee38, this);
26053
26598
  }));
26054
26599
 
26055
- function addLiquidityVelodromeV2(_x187, _x188, _x189, _x190, _x191, _x192, _x193) {
26056
- return _addLiquidityVelodromeV.apply(this, arguments);
26600
+ function removeLiquidityVelodrome(_x184, _x185, _x186, _x187, _x188, _x189) {
26601
+ return _removeLiquidityVelodrome.apply(this, arguments);
26057
26602
  }
26058
26603
 
26059
- return addLiquidityVelodromeV2;
26604
+ return removeLiquidityVelodrome;
26060
26605
  }()
26061
26606
  /**
26062
- * Remove liquidity from Velodrome V2 pool
26607
+ * Add liquidity to Velodrome V2 pool
26063
26608
  * @param {string} assetA First asset
26064
26609
  * @param {string} assetB Second asset
26065
- * @param {BigNumber | string} amount Amount of LP tokens
26610
+ * @param {BigNumber | string} amountA Amount first asset
26611
+ * @param {BigNumber | string} amountB Amount second asset
26066
26612
  * @param { boolean } isStable Is stable pool
26067
26613
  * @param {any} options Transaction options
26068
26614
  * @param {boolean} estimateGas Simulate/estimate gas
@@ -26070,10 +26616,10 @@ var Pool = /*#__PURE__*/function () {
26070
26616
  */
26071
26617
  ;
26072
26618
 
26073
- _proto.removeLiquidityVelodromeV2 =
26619
+ _proto.addLiquidityVelodromeV2 =
26074
26620
  /*#__PURE__*/
26075
26621
  function () {
26076
- var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(assetA, assetB, amount, isStable, options, estimateGas) {
26622
+ var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26077
26623
  var tx;
26078
26624
  return runtime_1.wrap(function _callee39$(_context39) {
26079
26625
  while (1) {
@@ -26091,7 +26637,7 @@ var Pool = /*#__PURE__*/function () {
26091
26637
  _context39.t1 = this;
26092
26638
  _context39.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26093
26639
  _context39.next = 7;
26094
- return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26640
+ return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26095
26641
 
26096
26642
  case 7:
26097
26643
  _context39.t3 = _context39.sent;
@@ -26113,19 +26659,17 @@ var Pool = /*#__PURE__*/function () {
26113
26659
  }, _callee39, this);
26114
26660
  }));
26115
26661
 
26116
- function removeLiquidityVelodromeV2(_x194, _x195, _x196, _x197, _x198, _x199) {
26117
- return _removeLiquidityVelodromeV.apply(this, arguments);
26662
+ function addLiquidityVelodromeV2(_x190, _x191, _x192, _x193, _x194, _x195, _x196) {
26663
+ return _addLiquidityVelodromeV.apply(this, arguments);
26118
26664
  }
26119
26665
 
26120
- return removeLiquidityVelodromeV2;
26666
+ return addLiquidityVelodromeV2;
26121
26667
  }()
26122
26668
  /**
26123
- * Add liquidity to Velodrome V2 or Ramses pool
26124
- * @param {Dapp} dapp VelodromeV2, Ramses or Aerodrome
26669
+ * Remove liquidity from Velodrome V2 pool
26125
26670
  * @param {string} assetA First asset
26126
26671
  * @param {string} assetB Second asset
26127
- * @param {BigNumber | string} amountA Amount first asset
26128
- * @param {BigNumber | string} amountB Amount second asset
26672
+ * @param {BigNumber | string} amount Amount of LP tokens
26129
26673
  * @param { boolean } isStable Is stable pool
26130
26674
  * @param {any} options Transaction options
26131
26675
  * @param {boolean} estimateGas Simulate/estimate gas
@@ -26133,10 +26677,10 @@ var Pool = /*#__PURE__*/function () {
26133
26677
  */
26134
26678
  ;
26135
26679
 
26136
- _proto.addLiquidityV2 =
26680
+ _proto.removeLiquidityVelodromeV2 =
26137
26681
  /*#__PURE__*/
26138
26682
  function () {
26139
- var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26683
+ var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(assetA, assetB, amount, isStable, options, estimateGas) {
26140
26684
  var tx;
26141
26685
  return runtime_1.wrap(function _callee40$(_context40) {
26142
26686
  while (1) {
@@ -26152,9 +26696,9 @@ var Pool = /*#__PURE__*/function () {
26152
26696
 
26153
26697
  _context40.t0 = getPoolTxOrGasEstimate;
26154
26698
  _context40.t1 = this;
26155
- _context40.t2 = routerAddress[this.network][dapp];
26699
+ _context40.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26156
26700
  _context40.next = 7;
26157
- return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26701
+ return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26158
26702
 
26159
26703
  case 7:
26160
26704
  _context40.t3 = _context40.sent;
@@ -26176,18 +26720,19 @@ var Pool = /*#__PURE__*/function () {
26176
26720
  }, _callee40, this);
26177
26721
  }));
26178
26722
 
26179
- function addLiquidityV2(_x200, _x201, _x202, _x203, _x204, _x205, _x206, _x207) {
26180
- return _addLiquidityV.apply(this, arguments);
26723
+ function removeLiquidityVelodromeV2(_x197, _x198, _x199, _x200, _x201, _x202) {
26724
+ return _removeLiquidityVelodromeV.apply(this, arguments);
26181
26725
  }
26182
26726
 
26183
- return addLiquidityV2;
26727
+ return removeLiquidityVelodromeV2;
26184
26728
  }()
26185
26729
  /**
26186
- * Remove liquidity from Velodrome V2 or Ramses pool
26730
+ * Add liquidity to Velodrome V2 or Ramses pool
26187
26731
  * @param {Dapp} dapp VelodromeV2, Ramses or Aerodrome
26188
26732
  * @param {string} assetA First asset
26189
26733
  * @param {string} assetB Second asset
26190
- * @param {BigNumber | string} amount Amount of LP tokens
26734
+ * @param {BigNumber | string} amountA Amount first asset
26735
+ * @param {BigNumber | string} amountB Amount second asset
26191
26736
  * @param { boolean } isStable Is stable pool
26192
26737
  * @param {any} options Transaction options
26193
26738
  * @param {boolean} estimateGas Simulate/estimate gas
@@ -26195,10 +26740,10 @@ var Pool = /*#__PURE__*/function () {
26195
26740
  */
26196
26741
  ;
26197
26742
 
26198
- _proto.removeLiquidityV2 =
26743
+ _proto.addLiquidityV2 =
26199
26744
  /*#__PURE__*/
26200
26745
  function () {
26201
- var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26746
+ var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26202
26747
  var tx;
26203
26748
  return runtime_1.wrap(function _callee41$(_context41) {
26204
26749
  while (1) {
@@ -26216,7 +26761,7 @@ var Pool = /*#__PURE__*/function () {
26216
26761
  _context41.t1 = this;
26217
26762
  _context41.t2 = routerAddress[this.network][dapp];
26218
26763
  _context41.next = 7;
26219
- return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26764
+ return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26220
26765
 
26221
26766
  case 7:
26222
26767
  _context41.t3 = _context41.sent;
@@ -26238,7 +26783,69 @@ var Pool = /*#__PURE__*/function () {
26238
26783
  }, _callee41, this);
26239
26784
  }));
26240
26785
 
26241
- function removeLiquidityV2(_x208, _x209, _x210, _x211, _x212, _x213, _x214) {
26786
+ function addLiquidityV2(_x203, _x204, _x205, _x206, _x207, _x208, _x209, _x210) {
26787
+ return _addLiquidityV.apply(this, arguments);
26788
+ }
26789
+
26790
+ return addLiquidityV2;
26791
+ }()
26792
+ /**
26793
+ * Remove liquidity from Velodrome V2 or Ramses pool
26794
+ * @param {Dapp} dapp VelodromeV2, Ramses or Aerodrome
26795
+ * @param {string} assetA First asset
26796
+ * @param {string} assetB Second asset
26797
+ * @param {BigNumber | string} amount Amount of LP tokens
26798
+ * @param { boolean } isStable Is stable pool
26799
+ * @param {any} options Transaction options
26800
+ * @param {boolean} estimateGas Simulate/estimate gas
26801
+ * @returns {Promise<any>} Transaction
26802
+ */
26803
+ ;
26804
+
26805
+ _proto.removeLiquidityV2 =
26806
+ /*#__PURE__*/
26807
+ function () {
26808
+ var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26809
+ var tx;
26810
+ return runtime_1.wrap(function _callee42$(_context42) {
26811
+ while (1) {
26812
+ switch (_context42.prev = _context42.next) {
26813
+ case 0:
26814
+ if (options === void 0) {
26815
+ options = null;
26816
+ }
26817
+
26818
+ if (estimateGas === void 0) {
26819
+ estimateGas = false;
26820
+ }
26821
+
26822
+ _context42.t0 = getPoolTxOrGasEstimate;
26823
+ _context42.t1 = this;
26824
+ _context42.t2 = routerAddress[this.network][dapp];
26825
+ _context42.next = 7;
26826
+ return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26827
+
26828
+ case 7:
26829
+ _context42.t3 = _context42.sent;
26830
+ _context42.t4 = options;
26831
+ _context42.t5 = [_context42.t2, _context42.t3, _context42.t4];
26832
+ _context42.t6 = estimateGas;
26833
+ _context42.next = 13;
26834
+ return (0, _context42.t0)(_context42.t1, _context42.t5, _context42.t6);
26835
+
26836
+ case 13:
26837
+ tx = _context42.sent;
26838
+ return _context42.abrupt("return", tx);
26839
+
26840
+ case 15:
26841
+ case "end":
26842
+ return _context42.stop();
26843
+ }
26844
+ }
26845
+ }, _callee42, this);
26846
+ }));
26847
+
26848
+ function removeLiquidityV2(_x211, _x212, _x213, _x214, _x215, _x216, _x217) {
26242
26849
  return _removeLiquidityV.apply(this, arguments);
26243
26850
  }
26244
26851
 
@@ -26264,11 +26871,11 @@ var Pool = /*#__PURE__*/function () {
26264
26871
  _proto.tradeLyraOption =
26265
26872
  /*#__PURE__*/
26266
26873
  function () {
26267
- var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26874
+ var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26268
26875
  var swapxData, tx;
26269
- return runtime_1.wrap(function _callee42$(_context42) {
26876
+ return runtime_1.wrap(function _callee43$(_context43) {
26270
26877
  while (1) {
26271
- switch (_context42.prev = _context42.next) {
26878
+ switch (_context43.prev = _context43.next) {
26272
26879
  case 0:
26273
26880
  if (collateralChangeAmount === void 0) {
26274
26881
  collateralChangeAmount = "0";
@@ -26286,27 +26893,27 @@ var Pool = /*#__PURE__*/function () {
26286
26893
  estimateGas = false;
26287
26894
  }
26288
26895
 
26289
- _context42.next = 6;
26896
+ _context43.next = 6;
26290
26897
  return getLyraOptionTxData(this, market, optionType, expiry, strike, tradeType, optionAmount, assetIn, BigNumber$1.from(collateralChangeAmount), isCoveredCall);
26291
26898
 
26292
26899
  case 6:
26293
- swapxData = _context42.sent;
26294
- _context42.next = 9;
26900
+ swapxData = _context43.sent;
26901
+ _context43.next = 9;
26295
26902
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.LYRA], swapxData, options], estimateGas);
26296
26903
 
26297
26904
  case 9:
26298
- tx = _context42.sent;
26299
- return _context42.abrupt("return", tx);
26905
+ tx = _context43.sent;
26906
+ return _context43.abrupt("return", tx);
26300
26907
 
26301
26908
  case 11:
26302
26909
  case "end":
26303
- return _context42.stop();
26910
+ return _context43.stop();
26304
26911
  }
26305
26912
  }
26306
- }, _callee42, this);
26913
+ }, _callee43, this);
26307
26914
  }));
26308
26915
 
26309
- function tradeLyraOption(_x215, _x216, _x217, _x218, _x219, _x220, _x221, _x222, _x223, _x224, _x225) {
26916
+ function tradeLyraOption(_x218, _x219, _x220, _x221, _x222, _x223, _x224, _x225, _x226, _x227, _x228) {
26310
26917
  return _tradeLyraOption.apply(this, arguments);
26311
26918
  }
26312
26919
 
@@ -26321,26 +26928,26 @@ var Pool = /*#__PURE__*/function () {
26321
26928
  _proto.getLyraPositions =
26322
26929
  /*#__PURE__*/
26323
26930
  function () {
26324
- var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market) {
26325
- return runtime_1.wrap(function _callee43$(_context43) {
26931
+ var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market) {
26932
+ return runtime_1.wrap(function _callee44$(_context44) {
26326
26933
  while (1) {
26327
- switch (_context43.prev = _context43.next) {
26934
+ switch (_context44.prev = _context44.next) {
26328
26935
  case 0:
26329
- _context43.next = 2;
26936
+ _context44.next = 2;
26330
26937
  return getOptionPositions(this, market);
26331
26938
 
26332
26939
  case 2:
26333
- return _context43.abrupt("return", _context43.sent);
26940
+ return _context44.abrupt("return", _context44.sent);
26334
26941
 
26335
26942
  case 3:
26336
26943
  case "end":
26337
- return _context43.stop();
26944
+ return _context44.stop();
26338
26945
  }
26339
26946
  }
26340
- }, _callee43, this);
26947
+ }, _callee44, this);
26341
26948
  }));
26342
26949
 
26343
- function getLyraPositions(_x226) {
26950
+ function getLyraPositions(_x229) {
26344
26951
  return _getLyraPositions.apply(this, arguments);
26345
26952
  }
26346
26953
 
@@ -26359,11 +26966,11 @@ var Pool = /*#__PURE__*/function () {
26359
26966
  _proto.changeFuturesMargin =
26360
26967
  /*#__PURE__*/
26361
26968
  function () {
26362
- var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market, changeAmount, options, estimateGas) {
26969
+ var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market, changeAmount, options, estimateGas) {
26363
26970
  var tx;
26364
- return runtime_1.wrap(function _callee44$(_context44) {
26971
+ return runtime_1.wrap(function _callee45$(_context45) {
26365
26972
  while (1) {
26366
- switch (_context44.prev = _context44.next) {
26973
+ switch (_context45.prev = _context45.next) {
26367
26974
  case 0:
26368
26975
  if (options === void 0) {
26369
26976
  options = null;
@@ -26373,22 +26980,22 @@ var Pool = /*#__PURE__*/function () {
26373
26980
  estimateGas = false;
26374
26981
  }
26375
26982
 
26376
- _context44.next = 4;
26983
+ _context45.next = 4;
26377
26984
  return getPoolTxOrGasEstimate(this, [market, getFuturesChangeMarginTxData(changeAmount), options], estimateGas);
26378
26985
 
26379
26986
  case 4:
26380
- tx = _context44.sent;
26381
- return _context44.abrupt("return", tx);
26987
+ tx = _context45.sent;
26988
+ return _context45.abrupt("return", tx);
26382
26989
 
26383
26990
  case 6:
26384
26991
  case "end":
26385
- return _context44.stop();
26992
+ return _context45.stop();
26386
26993
  }
26387
26994
  }
26388
- }, _callee44, this);
26995
+ }, _callee45, this);
26389
26996
  }));
26390
26997
 
26391
- function changeFuturesMargin(_x227, _x228, _x229, _x230) {
26998
+ function changeFuturesMargin(_x230, _x231, _x232, _x233) {
26392
26999
  return _changeFuturesMargin.apply(this, arguments);
26393
27000
  }
26394
27001
 
@@ -26407,11 +27014,11 @@ var Pool = /*#__PURE__*/function () {
26407
27014
  _proto.changeFuturesPosition =
26408
27015
  /*#__PURE__*/
26409
27016
  function () {
26410
- var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market, changeAmount, options, estimateGas) {
27017
+ var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(market, changeAmount, options, estimateGas) {
26411
27018
  var txData, tx;
26412
- return runtime_1.wrap(function _callee45$(_context45) {
27019
+ return runtime_1.wrap(function _callee46$(_context46) {
26413
27020
  while (1) {
26414
- switch (_context45.prev = _context45.next) {
27021
+ switch (_context46.prev = _context46.next) {
26415
27022
  case 0:
26416
27023
  if (options === void 0) {
26417
27024
  options = null;
@@ -26421,27 +27028,27 @@ var Pool = /*#__PURE__*/function () {
26421
27028
  estimateGas = false;
26422
27029
  }
26423
27030
 
26424
- _context45.next = 4;
27031
+ _context46.next = 4;
26425
27032
  return getFuturesChangePositionTxData(changeAmount, market, this);
26426
27033
 
26427
27034
  case 4:
26428
- txData = _context45.sent;
26429
- _context45.next = 7;
27035
+ txData = _context46.sent;
27036
+ _context46.next = 7;
26430
27037
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26431
27038
 
26432
27039
  case 7:
26433
- tx = _context45.sent;
26434
- return _context45.abrupt("return", tx);
27040
+ tx = _context46.sent;
27041
+ return _context46.abrupt("return", tx);
26435
27042
 
26436
27043
  case 9:
26437
27044
  case "end":
26438
- return _context45.stop();
27045
+ return _context46.stop();
26439
27046
  }
26440
27047
  }
26441
- }, _callee45, this);
27048
+ }, _callee46, this);
26442
27049
  }));
26443
27050
 
26444
- function changeFuturesPosition(_x231, _x232, _x233, _x234) {
27051
+ function changeFuturesPosition(_x234, _x235, _x236, _x237) {
26445
27052
  return _changeFuturesPosition.apply(this, arguments);
26446
27053
  }
26447
27054
 
@@ -26459,11 +27066,11 @@ var Pool = /*#__PURE__*/function () {
26459
27066
  _proto.cancelFuturesOrder =
26460
27067
  /*#__PURE__*/
26461
27068
  function () {
26462
- var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(market, options, estimateGas) {
27069
+ var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(market, options, estimateGas) {
26463
27070
  var txData, tx;
26464
- return runtime_1.wrap(function _callee46$(_context46) {
27071
+ return runtime_1.wrap(function _callee47$(_context47) {
26465
27072
  while (1) {
26466
- switch (_context46.prev = _context46.next) {
27073
+ switch (_context47.prev = _context47.next) {
26467
27074
  case 0:
26468
27075
  if (options === void 0) {
26469
27076
  options = null;
@@ -26473,27 +27080,27 @@ var Pool = /*#__PURE__*/function () {
26473
27080
  estimateGas = false;
26474
27081
  }
26475
27082
 
26476
- _context46.next = 4;
27083
+ _context47.next = 4;
26477
27084
  return getFuturesCancelOrderTxData(this);
26478
27085
 
26479
27086
  case 4:
26480
- txData = _context46.sent;
26481
- _context46.next = 7;
27087
+ txData = _context47.sent;
27088
+ _context47.next = 7;
26482
27089
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26483
27090
 
26484
27091
  case 7:
26485
- tx = _context46.sent;
26486
- return _context46.abrupt("return", tx);
27092
+ tx = _context47.sent;
27093
+ return _context47.abrupt("return", tx);
26487
27094
 
26488
27095
  case 9:
26489
27096
  case "end":
26490
- return _context46.stop();
27097
+ return _context47.stop();
26491
27098
  }
26492
27099
  }
26493
- }, _callee46, this);
27100
+ }, _callee47, this);
26494
27101
  }));
26495
27102
 
26496
- function cancelFuturesOrder(_x235, _x236, _x237) {
27103
+ function cancelFuturesOrder(_x238, _x239, _x240) {
26497
27104
  return _cancelFuturesOrder.apply(this, arguments);
26498
27105
  }
26499
27106
 
@@ -26510,11 +27117,11 @@ var Pool = /*#__PURE__*/function () {
26510
27117
  _proto.mintManagerFee =
26511
27118
  /*#__PURE__*/
26512
27119
  function () {
26513
- var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(options, estimateGas) {
27120
+ var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(options, estimateGas) {
26514
27121
  var tx;
26515
- return runtime_1.wrap(function _callee47$(_context47) {
27122
+ return runtime_1.wrap(function _callee48$(_context48) {
26516
27123
  while (1) {
26517
- switch (_context47.prev = _context47.next) {
27124
+ switch (_context48.prev = _context48.next) {
26518
27125
  case 0:
26519
27126
  if (options === void 0) {
26520
27127
  options = null;
@@ -26525,33 +27132,33 @@ var Pool = /*#__PURE__*/function () {
26525
27132
  }
26526
27133
 
26527
27134
  if (!estimateGas) {
26528
- _context47.next = 6;
27135
+ _context48.next = 6;
26529
27136
  break;
26530
27137
  }
26531
27138
 
26532
- _context47.next = 5;
27139
+ _context48.next = 5;
26533
27140
  return this.poolLogic.estimateGas.mintManagerFee(options);
26534
27141
 
26535
27142
  case 5:
26536
- return _context47.abrupt("return", _context47.sent);
27143
+ return _context48.abrupt("return", _context48.sent);
26537
27144
 
26538
27145
  case 6:
26539
- _context47.next = 8;
27146
+ _context48.next = 8;
26540
27147
  return this.poolLogic.mintManagerFee(options);
26541
27148
 
26542
27149
  case 8:
26543
- tx = _context47.sent;
26544
- return _context47.abrupt("return", tx);
27150
+ tx = _context48.sent;
27151
+ return _context48.abrupt("return", tx);
26545
27152
 
26546
27153
  case 10:
26547
27154
  case "end":
26548
- return _context47.stop();
27155
+ return _context48.stop();
26549
27156
  }
26550
27157
  }
26551
- }, _callee47, this);
27158
+ }, _callee48, this);
26552
27159
  }));
26553
27160
 
26554
- function mintManagerFee(_x238, _x239) {
27161
+ function mintManagerFee(_x241, _x242) {
26555
27162
  return _mintManagerFee.apply(this, arguments);
26556
27163
  }
26557
27164
 
@@ -26566,25 +27173,25 @@ var Pool = /*#__PURE__*/function () {
26566
27173
  _proto.getAvailableManagerFee =
26567
27174
  /*#__PURE__*/
26568
27175
  function () {
26569
- var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48() {
27176
+ var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49() {
26570
27177
  var fee;
26571
- return runtime_1.wrap(function _callee48$(_context48) {
27178
+ return runtime_1.wrap(function _callee49$(_context49) {
26572
27179
  while (1) {
26573
- switch (_context48.prev = _context48.next) {
27180
+ switch (_context49.prev = _context49.next) {
26574
27181
  case 0:
26575
- _context48.next = 2;
27182
+ _context49.next = 2;
26576
27183
  return this.poolLogic.availableManagerFee();
26577
27184
 
26578
27185
  case 2:
26579
- fee = _context48.sent;
26580
- return _context48.abrupt("return", BigNumber$1.from(fee));
27186
+ fee = _context49.sent;
27187
+ return _context49.abrupt("return", BigNumber$1.from(fee));
26581
27188
 
26582
27189
  case 4:
26583
27190
  case "end":
26584
- return _context48.stop();
27191
+ return _context49.stop();
26585
27192
  }
26586
27193
  }
26587
- }, _callee48, this);
27194
+ }, _callee49, this);
26588
27195
  }));
26589
27196
 
26590
27197
  function getAvailableManagerFee() {
@@ -26606,11 +27213,11 @@ var Pool = /*#__PURE__*/function () {
26606
27213
  _proto.vestTokens =
26607
27214
  /*#__PURE__*/
26608
27215
  function () {
26609
- var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(tokenAddress, amount, options, estimateGas) {
27216
+ var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(tokenAddress, amount, options, estimateGas) {
26610
27217
  var txData, tx;
26611
- return runtime_1.wrap(function _callee49$(_context49) {
27218
+ return runtime_1.wrap(function _callee50$(_context50) {
26612
27219
  while (1) {
26613
- switch (_context49.prev = _context49.next) {
27220
+ switch (_context50.prev = _context50.next) {
26614
27221
  case 0:
26615
27222
  if (options === void 0) {
26616
27223
  options = null;
@@ -26620,27 +27227,27 @@ var Pool = /*#__PURE__*/function () {
26620
27227
  estimateGas = false;
26621
27228
  }
26622
27229
 
26623
- _context49.next = 4;
27230
+ _context50.next = 4;
26624
27231
  return getCreateVestTxData(amount);
26625
27232
 
26626
27233
  case 4:
26627
- txData = _context49.sent;
26628
- _context49.next = 7;
27234
+ txData = _context50.sent;
27235
+ _context50.next = 7;
26629
27236
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26630
27237
 
26631
27238
  case 7:
26632
- tx = _context49.sent;
26633
- return _context49.abrupt("return", tx);
27239
+ tx = _context50.sent;
27240
+ return _context50.abrupt("return", tx);
26634
27241
 
26635
27242
  case 9:
26636
27243
  case "end":
26637
- return _context49.stop();
27244
+ return _context50.stop();
26638
27245
  }
26639
27246
  }
26640
- }, _callee49, this);
27247
+ }, _callee50, this);
26641
27248
  }));
26642
27249
 
26643
- function vestTokens(_x240, _x241, _x242, _x243) {
27250
+ function vestTokens(_x243, _x244, _x245, _x246) {
26644
27251
  return _vestTokens.apply(this, arguments);
26645
27252
  }
26646
27253
 
@@ -26659,11 +27266,11 @@ var Pool = /*#__PURE__*/function () {
26659
27266
  _proto.exitVestedToken =
26660
27267
  /*#__PURE__*/
26661
27268
  function () {
26662
- var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(tokenAddress, id, options, estimateGas) {
27269
+ var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(tokenAddress, id, options, estimateGas) {
26663
27270
  var txData, tx;
26664
- return runtime_1.wrap(function _callee50$(_context50) {
27271
+ return runtime_1.wrap(function _callee51$(_context51) {
26665
27272
  while (1) {
26666
- switch (_context50.prev = _context50.next) {
27273
+ switch (_context51.prev = _context51.next) {
26667
27274
  case 0:
26668
27275
  if (options === void 0) {
26669
27276
  options = null;
@@ -26673,27 +27280,27 @@ var Pool = /*#__PURE__*/function () {
26673
27280
  estimateGas = false;
26674
27281
  }
26675
27282
 
26676
- _context50.next = 4;
27283
+ _context51.next = 4;
26677
27284
  return getExitVestTxData(id);
26678
27285
 
26679
27286
  case 4:
26680
- txData = _context50.sent;
26681
- _context50.next = 7;
27287
+ txData = _context51.sent;
27288
+ _context51.next = 7;
26682
27289
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26683
27290
 
26684
27291
  case 7:
26685
- tx = _context50.sent;
26686
- return _context50.abrupt("return", tx);
27292
+ tx = _context51.sent;
27293
+ return _context51.abrupt("return", tx);
26687
27294
 
26688
27295
  case 9:
26689
27296
  case "end":
26690
- return _context50.stop();
27297
+ return _context51.stop();
26691
27298
  }
26692
27299
  }
26693
- }, _callee50, this);
27300
+ }, _callee51, this);
26694
27301
  }));
26695
27302
 
26696
- function exitVestedToken(_x244, _x245, _x246, _x247) {
27303
+ function exitVestedToken(_x247, _x248, _x249, _x250) {
26697
27304
  return _exitVestedToken.apply(this, arguments);
26698
27305
  }
26699
27306
 
@@ -26713,11 +27320,11 @@ var Pool = /*#__PURE__*/function () {
26713
27320
  _proto.mintUnitViaFlatMoney =
26714
27321
  /*#__PURE__*/
26715
27322
  function () {
26716
- var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27323
+ var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26717
27324
  var tx;
26718
- return runtime_1.wrap(function _callee51$(_context51) {
27325
+ return runtime_1.wrap(function _callee52$(_context52) {
26719
27326
  while (1) {
26720
- switch (_context51.prev = _context51.next) {
27327
+ switch (_context52.prev = _context52.next) {
26721
27328
  case 0:
26722
27329
  if (slippage === void 0) {
26723
27330
  slippage = 0.5;
@@ -26731,22 +27338,22 @@ var Pool = /*#__PURE__*/function () {
26731
27338
  estimateGas = false;
26732
27339
  }
26733
27340
 
26734
- _context51.next = 5;
27341
+ _context52.next = 5;
26735
27342
  return mintUnitViaFlatMoney(this, depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26736
27343
 
26737
27344
  case 5:
26738
- tx = _context51.sent;
26739
- return _context51.abrupt("return", tx);
27345
+ tx = _context52.sent;
27346
+ return _context52.abrupt("return", tx);
26740
27347
 
26741
27348
  case 7:
26742
27349
  case "end":
26743
- return _context51.stop();
27350
+ return _context52.stop();
26744
27351
  }
26745
27352
  }
26746
- }, _callee51, this);
27353
+ }, _callee52, this);
26747
27354
  }));
26748
27355
 
26749
- function mintUnitViaFlatMoney$1(_x248, _x249, _x250, _x251, _x252) {
27356
+ function mintUnitViaFlatMoney$1(_x251, _x252, _x253, _x254, _x255) {
26750
27357
  return _mintUnitViaFlatMoney2.apply(this, arguments);
26751
27358
  }
26752
27359
 
@@ -26766,11 +27373,11 @@ var Pool = /*#__PURE__*/function () {
26766
27373
  _proto.redeemUnitViaFlatMoney =
26767
27374
  /*#__PURE__*/
26768
27375
  function () {
26769
- var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27376
+ var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26770
27377
  var tx;
26771
- return runtime_1.wrap(function _callee52$(_context52) {
27378
+ return runtime_1.wrap(function _callee53$(_context53) {
26772
27379
  while (1) {
26773
- switch (_context52.prev = _context52.next) {
27380
+ switch (_context53.prev = _context53.next) {
26774
27381
  case 0:
26775
27382
  if (slippage === void 0) {
26776
27383
  slippage = 0.5;
@@ -26784,22 +27391,22 @@ var Pool = /*#__PURE__*/function () {
26784
27391
  estimateGas = false;
26785
27392
  }
26786
27393
 
26787
- _context52.next = 5;
27394
+ _context53.next = 5;
26788
27395
  return redeemUnitViaFlatMoney(this, withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26789
27396
 
26790
27397
  case 5:
26791
- tx = _context52.sent;
26792
- return _context52.abrupt("return", tx);
27398
+ tx = _context53.sent;
27399
+ return _context53.abrupt("return", tx);
26793
27400
 
26794
27401
  case 7:
26795
27402
  case "end":
26796
- return _context52.stop();
27403
+ return _context53.stop();
26797
27404
  }
26798
27405
  }
26799
- }, _callee52, this);
27406
+ }, _callee53, this);
26800
27407
  }));
26801
27408
 
26802
- function redeemUnitViaFlatMoney$1(_x253, _x254, _x255, _x256, _x257) {
27409
+ function redeemUnitViaFlatMoney$1(_x256, _x257, _x258, _x259, _x260) {
26803
27410
  return _redeemUnitViaFlatMoney2.apply(this, arguments);
26804
27411
  }
26805
27412
 
@@ -26807,11 +27414,11 @@ var Pool = /*#__PURE__*/function () {
26807
27414
  }();
26808
27415
 
26809
27416
  _proto.cancelOrderViaFlatMoney = /*#__PURE__*/function () {
26810
- var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(options, estimateGas) {
27417
+ var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(options, estimateGas) {
26811
27418
  var tx;
26812
- return runtime_1.wrap(function _callee53$(_context53) {
27419
+ return runtime_1.wrap(function _callee54$(_context54) {
26813
27420
  while (1) {
26814
- switch (_context53.prev = _context53.next) {
27421
+ switch (_context54.prev = _context54.next) {
26815
27422
  case 0:
26816
27423
  if (options === void 0) {
26817
27424
  options = null;
@@ -26821,22 +27428,22 @@ var Pool = /*#__PURE__*/function () {
26821
27428
  estimateGas = false;
26822
27429
  }
26823
27430
 
26824
- _context53.next = 4;
27431
+ _context54.next = 4;
26825
27432
  return cancelOrderViaFlatMoney(this, options, estimateGas);
26826
27433
 
26827
27434
  case 4:
26828
- tx = _context53.sent;
26829
- return _context53.abrupt("return", tx);
27435
+ tx = _context54.sent;
27436
+ return _context54.abrupt("return", tx);
26830
27437
 
26831
27438
  case 6:
26832
27439
  case "end":
26833
- return _context53.stop();
27440
+ return _context54.stop();
26834
27441
  }
26835
27442
  }
26836
- }, _callee53, this);
27443
+ }, _callee54, this);
26837
27444
  }));
26838
27445
 
26839
- function cancelOrderViaFlatMoney$1(_x258, _x259) {
27446
+ function cancelOrderViaFlatMoney$1(_x261, _x262) {
26840
27447
  return _cancelOrderViaFlatMoney2.apply(this, arguments);
26841
27448
  }
26842
27449
 
@@ -26855,11 +27462,11 @@ var Pool = /*#__PURE__*/function () {
26855
27462
  _proto.completeTorosWithdrawal =
26856
27463
  /*#__PURE__*/
26857
27464
  function () {
26858
- var _completeTorosWithdrawal = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(destinationToken, slippage, options, estimateGas) {
27465
+ var _completeTorosWithdrawal = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(destinationToken, slippage, options, estimateGas) {
26859
27466
  var txData, tx;
26860
- return runtime_1.wrap(function _callee54$(_context54) {
27467
+ return runtime_1.wrap(function _callee55$(_context55) {
26861
27468
  while (1) {
26862
- switch (_context54.prev = _context54.next) {
27469
+ switch (_context55.prev = _context55.next) {
26863
27470
  case 0:
26864
27471
  if (slippage === void 0) {
26865
27472
  slippage = 0.5;
@@ -26873,27 +27480,27 @@ var Pool = /*#__PURE__*/function () {
26873
27480
  estimateGas = false;
26874
27481
  }
26875
27482
 
26876
- _context54.next = 5;
27483
+ _context55.next = 5;
26877
27484
  return getCompleteWithdrawalTxData(this, destinationToken, slippage);
26878
27485
 
26879
27486
  case 5:
26880
- txData = _context54.sent;
26881
- _context54.next = 8;
27487
+ txData = _context55.sent;
27488
+ _context55.next = 8;
26882
27489
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network].toros, txData, options], estimateGas);
26883
27490
 
26884
27491
  case 8:
26885
- tx = _context54.sent;
26886
- return _context54.abrupt("return", tx);
27492
+ tx = _context55.sent;
27493
+ return _context55.abrupt("return", tx);
26887
27494
 
26888
27495
  case 10:
26889
27496
  case "end":
26890
- return _context54.stop();
27497
+ return _context55.stop();
26891
27498
  }
26892
27499
  }
26893
- }, _callee54, this);
27500
+ }, _callee55, this);
26894
27501
  }));
26895
27502
 
26896
- function completeTorosWithdrawal(_x260, _x261, _x262, _x263) {
27503
+ function completeTorosWithdrawal(_x263, _x264, _x265, _x266) {
26897
27504
  return _completeTorosWithdrawal.apply(this, arguments);
26898
27505
  }
26899
27506