@dhedge/v2-sdk 1.10.1 → 1.10.3

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.
@@ -4218,6 +4218,7 @@ var ManagerLogic = {
4218
4218
  Dapp["ZEROEX"] = "0x";
4219
4219
  Dapp["RAMSES"] = "ramses";
4220
4220
  Dapp["AERODROME"] = "aerodrome";
4221
+ Dapp["AERODROMECL"] = "aerodromeCL";
4221
4222
  })(exports.Dapp || (exports.Dapp = {}));
4222
4223
 
4223
4224
  (function (Transaction) {
@@ -4247,11 +4248,11 @@ var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Ne
4247
4248
  require("dotenv").config();
4248
4249
 
4249
4250
  var factoryAddress = (_factoryAddress = {}, _factoryAddress[exports.Network.POLYGON] = process.env.STAGING_CONTRACTS ? "0xDd87eCdB10cFF7004276AAbAbd30e7a08F69bb53" : "0xfdc7b8bFe0DD3513Cc669bB8d601Cb83e2F69cB0", _factoryAddress[exports.Network.OPTIMISM] = "0x5e61a079A178f0E5784107a4963baAe0c5a680c6", _factoryAddress[exports.Network.ARBITRUM] = "0xfffb5fb14606eb3a548c113026355020ddf27535", _factoryAddress[exports.Network.BASE] = "0x49Afe3abCf66CF09Fab86cb1139D8811C8afe56F", _factoryAddress);
4250
- var routerAddress = (_routerAddress = {}, _routerAddress[exports.Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[exports.Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[exports.Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[exports.Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[exports.Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[exports.Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[exports.Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[exports.Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[exports.Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[exports.Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[exports.Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[exports.Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[exports.Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[exports.Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[exports.Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$ARBITRUM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[exports.Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM), _routerAddress[exports.Network.BASE] = (_Network$BASE = {}, _Network$BASE[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$BASE[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE[exports.Dapp.AERODROME] = "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43", _Network$BASE[exports.Dapp.AAVEV3] = "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", _Network$BASE), _routerAddress);
4251
+ var routerAddress = (_routerAddress = {}, _routerAddress[exports.Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[exports.Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[exports.Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[exports.Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$POLYGON[exports.Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[exports.Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[exports.Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[exports.Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[exports.Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[exports.Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$OPTIMISM[exports.Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[exports.Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[exports.Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[exports.Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[exports.Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[exports.Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[exports.Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[exports.Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$ARBITRUM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$ARBITRUM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[exports.Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$ARBITRUM), _routerAddress[exports.Network.BASE] = (_Network$BASE = {}, _Network$BASE[exports.Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$BASE[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE[exports.Dapp.AERODROME] = "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43", _Network$BASE[exports.Dapp.AAVEV3] = "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", _Network$BASE), _routerAddress);
4251
4252
  var dappFactoryAddress = (_dappFactoryAddress = {}, _dappFactoryAddress[exports.Network.POLYGON] = (_Network$POLYGON2 = {}, _Network$POLYGON2[exports.Dapp.SUSHISWAP] = "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", _Network$POLYGON2[exports.Dapp.QUICKSWAP] = "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", _Network$POLYGON2), _dappFactoryAddress[exports.Network.OPTIMISM] = {}, _dappFactoryAddress[exports.Network.ARBITRUM] = {}, _dappFactoryAddress[exports.Network.BASE] = {}, _dappFactoryAddress);
4252
4253
  var stakingAddress = (_stakingAddress = {}, _stakingAddress[exports.Network.POLYGON] = (_Network$POLYGON3 = {}, _Network$POLYGON3[exports.Dapp.SUSHISWAP] = "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F", _Network$POLYGON3[exports.Dapp.BALANCER] = "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e", _Network$POLYGON3[exports.Dapp.AAVE] = "0x357D51124f59836DeD84c8a1730D72B749d8BC23", _Network$POLYGON3[exports.Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$POLYGON3), _stakingAddress[exports.Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[exports.Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$OPTIMISM2), _stakingAddress[exports.Network.ARBITRUM] = {}, _stakingAddress[exports.Network.BASE] = {}, _stakingAddress);
4253
4254
  var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[exports.Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[exports.Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[exports.Network.OPTIMISM] = (_Network$OPTIMISM3 = {}, _Network$OPTIMISM3[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM3), _aaveAddressProvider[exports.Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[exports.Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider[exports.Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[exports.Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE2), _aaveAddressProvider);
4254
- var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[exports.Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[exports.Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[exports.Dapp.VELODROMECL] = "0xbb5dfe1380333cee4c2eebd7202c80de2256adf4", _Network$OPTIMISM4), _nonfungiblePositionM[exports.Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[exports.Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[exports.Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3), _nonfungiblePositionM);
4255
+ var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[exports.Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[exports.Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[exports.Dapp.VELODROMECL] = "0x416b433906b1B72FA758e166e239c43d68dC6F29", _Network$OPTIMISM4), _nonfungiblePositionM[exports.Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[exports.Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[exports.Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[exports.Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3[exports.Dapp.AERODROMECL] = "0x827922686190790b37229fd06084350e74485b72", _Network$BASE3), _nonfungiblePositionM);
4255
4256
  var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[exports.Network.POLYGON] = 137, _networkChainIdMap[exports.Network.OPTIMISM] = 10, _networkChainIdMap[exports.Network.ARBITRUM] = 42161, _networkChainIdMap[exports.Network.BASE] = 8453, _networkChainIdMap);
4256
4257
  var balancerSubgraph = (_balancerSubgraph = {}, _balancerSubgraph[exports.Network.POLYGON] = "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2", _balancerSubgraph[exports.Network.OPTIMISM] = "", _balancerSubgraph[exports.Network.ARBITRUM] = "", _balancerSubgraph[exports.Network.BASE] = "", _balancerSubgraph);
4257
4258
  var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[exports.Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[exports.Network.OPTIMISM] = "", _multiCallAddress[exports.Network.ARBITRUM] = "", _multiCallAddress[exports.Network.BASE] = "", _multiCallAddress);
@@ -8864,7 +8865,7 @@ function _getUniswapV3MintTxData() {
8864
8865
  mintParams = [_context.t0, _context.t1, _context.t2, _context.t3, _context.t4, _context.t5, _context.t6, "0", "0", _context.t7, _context.t8];
8865
8866
  iNonfungiblePositionManager = new ethers.ethers.utils.Interface(INonfungiblePositionManager.abi);
8866
8867
 
8867
- if (dapp === exports.Dapp.VELODROMECL) {
8868
+ if (dapp === exports.Dapp.VELODROMECL || dapp === exports.Dapp.AERODROMECL) {
8868
8869
  iNonfungiblePositionManager = new ethers.ethers.utils.Interface(IVeldodromePositionManager.abi);
8869
8870
  mintParams.push(0);
8870
8871
  }
@@ -8923,7 +8924,7 @@ function _getIncreaseLiquidityTxData() {
8923
8924
  while (1) {
8924
8925
  switch (_context3.prev = _context3.next) {
8925
8926
  case 0:
8926
- if (!(dapp === exports.Dapp.UNISWAPV3 || dapp === exports.Dapp.VELODROMECL)) {
8927
+ if (!(dapp === exports.Dapp.UNISWAPV3 || dapp === exports.Dapp.VELODROMECL || dapp === exports.Dapp.AERODROMECL)) {
8927
8928
  _context3.next = 15;
8928
8929
  break;
8929
8930
  }
@@ -8988,7 +8989,7 @@ function _getDecreaseLiquidityTxData() {
8988
8989
  amount = 100;
8989
8990
  }
8990
8991
 
8991
- if (!(dapp === exports.Dapp.UNISWAPV3 || dapp === exports.Dapp.VELODROMECL)) {
8992
+ if (!(dapp === exports.Dapp.UNISWAPV3 || dapp === exports.Dapp.VELODROMECL || dapp === exports.Dapp.AERODROMECL)) {
8992
8993
  _context4.next = 22;
8993
8994
  break;
8994
8995
  }
@@ -14702,180 +14703,6 @@ var IVelodromeRouter = {
14702
14703
  abi: abi$m
14703
14704
  };
14704
14705
 
14705
- var abi$n = [
14706
- {
14707
- inputs: [
14708
- {
14709
- internalType: "uint256",
14710
- name: "tokenId",
14711
- type: "uint256"
14712
- },
14713
- {
14714
- internalType: "uint128",
14715
- name: "liquidity",
14716
- type: "uint128"
14717
- },
14718
- {
14719
- internalType: "uint256",
14720
- name: "amount0Min",
14721
- type: "uint256"
14722
- },
14723
- {
14724
- internalType: "uint256",
14725
- name: "amount1Min",
14726
- type: "uint256"
14727
- },
14728
- {
14729
- internalType: "uint256",
14730
- name: "deadline",
14731
- type: "uint256"
14732
- }
14733
- ],
14734
- name: "decreaseStakedLiquidity",
14735
- outputs: [
14736
- {
14737
- internalType: "uint256",
14738
- name: "amount0",
14739
- type: "uint256"
14740
- },
14741
- {
14742
- internalType: "uint256",
14743
- name: "amount1",
14744
- type: "uint256"
14745
- }
14746
- ],
14747
- stateMutability: "nonpayable",
14748
- type: "function"
14749
- },
14750
- {
14751
- inputs: [
14752
- {
14753
- internalType: "uint256",
14754
- name: "tokenId",
14755
- type: "uint256"
14756
- }
14757
- ],
14758
- name: "deposit",
14759
- outputs: [
14760
- ],
14761
- stateMutability: "nonpayable",
14762
- type: "function"
14763
- },
14764
- {
14765
- inputs: [
14766
- {
14767
- internalType: "uint256",
14768
- name: "tokenId",
14769
- type: "uint256"
14770
- }
14771
- ],
14772
- name: "getReward",
14773
- outputs: [
14774
- ],
14775
- stateMutability: "nonpayable",
14776
- type: "function"
14777
- },
14778
- {
14779
- inputs: [
14780
- {
14781
- internalType: "address",
14782
- name: "account",
14783
- type: "address"
14784
- }
14785
- ],
14786
- name: "getReward",
14787
- outputs: [
14788
- ],
14789
- stateMutability: "nonpayable",
14790
- type: "function"
14791
- },
14792
- {
14793
- inputs: [
14794
- {
14795
- internalType: "uint256",
14796
- name: "tokenId",
14797
- type: "uint256"
14798
- },
14799
- {
14800
- internalType: "uint256",
14801
- name: "amount0Desired",
14802
- type: "uint256"
14803
- },
14804
- {
14805
- internalType: "uint256",
14806
- name: "amount1Desired",
14807
- type: "uint256"
14808
- },
14809
- {
14810
- internalType: "uint256",
14811
- name: "amount0Min",
14812
- type: "uint256"
14813
- },
14814
- {
14815
- internalType: "uint256",
14816
- name: "amount1Min",
14817
- type: "uint256"
14818
- },
14819
- {
14820
- internalType: "uint256",
14821
- name: "deadline",
14822
- type: "uint256"
14823
- }
14824
- ],
14825
- name: "increaseStakedLiquidity",
14826
- outputs: [
14827
- {
14828
- internalType: "uint128",
14829
- name: "liquidity",
14830
- type: "uint128"
14831
- },
14832
- {
14833
- internalType: "uint256",
14834
- name: "amount0",
14835
- type: "uint256"
14836
- },
14837
- {
14838
- internalType: "uint256",
14839
- name: "amount1",
14840
- type: "uint256"
14841
- }
14842
- ],
14843
- stateMutability: "payable",
14844
- type: "function"
14845
- },
14846
- {
14847
- inputs: [
14848
- ],
14849
- name: "nft",
14850
- outputs: [
14851
- {
14852
- internalType: "address",
14853
- name: "",
14854
- type: "address"
14855
- }
14856
- ],
14857
- stateMutability: "view",
14858
- type: "function"
14859
- },
14860
- {
14861
- inputs: [
14862
- {
14863
- internalType: "uint256",
14864
- name: "tokenId",
14865
- type: "uint256"
14866
- }
14867
- ],
14868
- name: "withdraw",
14869
- outputs: [
14870
- ],
14871
- stateMutability: "nonpayable",
14872
- type: "function"
14873
- }
14874
- ];
14875
- var IVelodromeCLGauge = {
14876
- abi: abi$n
14877
- };
14878
-
14879
14706
  function getVelodromeAddLiquidityTxData(_x, _x2, _x3, _x4, _x5, _x6) {
14880
14707
  return _getVelodromeAddLiquidityTxData.apply(this, arguments);
14881
14708
  }
@@ -14951,108 +14778,36 @@ function _getVelodromeRemoveLiquidityTxData() {
14951
14778
  return _getVelodromeRemoveLiquidityTxData.apply(this, arguments);
14952
14779
  }
14953
14780
 
14954
- function getVelodromeCLDecreaseStakedLiquidityTxData(_x12, _x13, _x14) {
14955
- return _getVelodromeCLDecreaseStakedLiquidityTxData.apply(this, arguments);
14956
- }
14957
-
14958
- function _getVelodromeCLDecreaseStakedLiquidityTxData() {
14959
- _getVelodromeCLDecreaseStakedLiquidityTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, tokenId, amount) {
14960
- var abi, liquidity;
14961
- return runtime_1.wrap(function _callee3$(_context3) {
14962
- while (1) {
14963
- switch (_context3.prev = _context3.next) {
14964
- case 0:
14965
- abi = new ethers.ethers.utils.Interface(IVelodromeCLGauge.abi);
14966
- _context3.next = 3;
14967
- return getUniswapV3Liquidity(exports.Dapp.VELODROMECL, tokenId, pool);
14968
-
14969
- case 3:
14970
- liquidity = _context3.sent.times(amount).div(100);
14971
- _context3.t0 = abi;
14972
- _context3.t1 = tokenId;
14973
- _context3.t2 = liquidity.toFixed(0);
14974
- _context3.next = 9;
14975
- return getDeadline(pool);
14976
-
14977
- case 9:
14978
- _context3.t3 = _context3.sent;
14979
- _context3.t4 = [_context3.t1, _context3.t2, 0, 0, _context3.t3];
14980
- return _context3.abrupt("return", _context3.t0.encodeFunctionData.call(_context3.t0, "decreaseStakedLiquidity", _context3.t4));
14981
-
14982
- case 12:
14983
- case "end":
14984
- return _context3.stop();
14985
- }
14986
- }
14987
- }, _callee3);
14988
- }));
14989
- return _getVelodromeCLDecreaseStakedLiquidityTxData.apply(this, arguments);
14990
- }
14991
-
14992
- function getVelodromeCLIncreaseStakedLiquidityTxData(_x15, _x16, _x17, _x18) {
14993
- return _getVelodromeCLIncreaseStakedLiquidityTxData.apply(this, arguments);
14994
- }
14995
-
14996
- function _getVelodromeCLIncreaseStakedLiquidityTxData() {
14997
- _getVelodromeCLIncreaseStakedLiquidityTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(pool, tokenId, amountA, amountB) {
14998
- var abi;
14999
- return runtime_1.wrap(function _callee4$(_context4) {
15000
- while (1) {
15001
- switch (_context4.prev = _context4.next) {
15002
- case 0:
15003
- abi = new ethers.ethers.utils.Interface(IVelodromeCLGauge.abi);
15004
- _context4.t0 = abi;
15005
- _context4.t1 = tokenId;
15006
- _context4.t2 = amountA;
15007
- _context4.t3 = amountB;
15008
- _context4.next = 7;
15009
- return getDeadline(pool);
15010
-
15011
- case 7:
15012
- _context4.t4 = _context4.sent;
15013
- _context4.t5 = [_context4.t1, _context4.t2, _context4.t3, 0, 0, _context4.t4];
15014
- return _context4.abrupt("return", _context4.t0.encodeFunctionData.call(_context4.t0, "increaseStakedLiquidity", _context4.t5));
15015
-
15016
- case 10:
15017
- case "end":
15018
- return _context4.stop();
15019
- }
15020
- }
15021
- }, _callee4);
15022
- }));
15023
- return _getVelodromeCLIncreaseStakedLiquidityTxData.apply(this, arguments);
15024
- }
15025
-
15026
- function getVelodromeClOwner(_x23, _x24) {
14781
+ function getVelodromeClOwner(_x12, _x13, _x14) {
15027
14782
  return _getVelodromeClOwner.apply(this, arguments);
15028
14783
  }
15029
14784
 
15030
14785
  function _getVelodromeClOwner() {
15031
- _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(pool, tokenId) {
14786
+ _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, dapp, tokenId) {
15032
14787
  var iNonfungiblePositionManager;
15033
- return runtime_1.wrap(function _callee6$(_context6) {
14788
+ return runtime_1.wrap(function _callee3$(_context3) {
15034
14789
  while (1) {
15035
- switch (_context6.prev = _context6.next) {
14790
+ switch (_context3.prev = _context3.next) {
15036
14791
  case 0:
15037
14792
  iNonfungiblePositionManager = new ethers.ethers.Contract( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15038
- nonfungiblePositionManagerAddress[pool.network][exports.Dapp.VELODROMECL], INonfungiblePositionManager.abi, pool.signer);
15039
- _context6.next = 3;
14793
+ nonfungiblePositionManagerAddress[pool.network][dapp], INonfungiblePositionManager.abi, pool.signer);
14794
+ _context3.next = 3;
15040
14795
  return iNonfungiblePositionManager.ownerOf(tokenId);
15041
14796
 
15042
14797
  case 3:
15043
- return _context6.abrupt("return", _context6.sent);
14798
+ return _context3.abrupt("return", _context3.sent);
15044
14799
 
15045
14800
  case 4:
15046
14801
  case "end":
15047
- return _context6.stop();
14802
+ return _context3.stop();
15048
14803
  }
15049
14804
  }
15050
- }, _callee6);
14805
+ }, _callee3);
15051
14806
  }));
15052
14807
  return _getVelodromeClOwner.apply(this, arguments);
15053
14808
  }
15054
14809
 
15055
- var abi$o = [
14810
+ var abi$n = [
15056
14811
  {
15057
14812
  inputs: [
15058
14813
  {
@@ -16094,10 +15849,10 @@ var abi$o = [
16094
15849
  }
16095
15850
  ];
16096
15851
  var IVelodromeGaugeV1 = {
16097
- abi: abi$o
15852
+ abi: abi$n
16098
15853
  };
16099
15854
 
16100
- var abi$p = [
15855
+ var abi$o = [
16101
15856
  {
16102
15857
  inputs: [
16103
15858
  {
@@ -16297,6 +16052,180 @@ var abi$p = [
16297
16052
  }
16298
16053
  ];
16299
16054
  var IVelodromeGaugeV2 = {
16055
+ abi: abi$o
16056
+ };
16057
+
16058
+ var abi$p = [
16059
+ {
16060
+ inputs: [
16061
+ {
16062
+ internalType: "uint256",
16063
+ name: "tokenId",
16064
+ type: "uint256"
16065
+ },
16066
+ {
16067
+ internalType: "uint128",
16068
+ name: "liquidity",
16069
+ type: "uint128"
16070
+ },
16071
+ {
16072
+ internalType: "uint256",
16073
+ name: "amount0Min",
16074
+ type: "uint256"
16075
+ },
16076
+ {
16077
+ internalType: "uint256",
16078
+ name: "amount1Min",
16079
+ type: "uint256"
16080
+ },
16081
+ {
16082
+ internalType: "uint256",
16083
+ name: "deadline",
16084
+ type: "uint256"
16085
+ }
16086
+ ],
16087
+ name: "decreaseStakedLiquidity",
16088
+ outputs: [
16089
+ {
16090
+ internalType: "uint256",
16091
+ name: "amount0",
16092
+ type: "uint256"
16093
+ },
16094
+ {
16095
+ internalType: "uint256",
16096
+ name: "amount1",
16097
+ type: "uint256"
16098
+ }
16099
+ ],
16100
+ stateMutability: "nonpayable",
16101
+ type: "function"
16102
+ },
16103
+ {
16104
+ inputs: [
16105
+ {
16106
+ internalType: "uint256",
16107
+ name: "tokenId",
16108
+ type: "uint256"
16109
+ }
16110
+ ],
16111
+ name: "deposit",
16112
+ outputs: [
16113
+ ],
16114
+ stateMutability: "nonpayable",
16115
+ type: "function"
16116
+ },
16117
+ {
16118
+ inputs: [
16119
+ {
16120
+ internalType: "uint256",
16121
+ name: "tokenId",
16122
+ type: "uint256"
16123
+ }
16124
+ ],
16125
+ name: "getReward",
16126
+ outputs: [
16127
+ ],
16128
+ stateMutability: "nonpayable",
16129
+ type: "function"
16130
+ },
16131
+ {
16132
+ inputs: [
16133
+ {
16134
+ internalType: "address",
16135
+ name: "account",
16136
+ type: "address"
16137
+ }
16138
+ ],
16139
+ name: "getReward",
16140
+ outputs: [
16141
+ ],
16142
+ stateMutability: "nonpayable",
16143
+ type: "function"
16144
+ },
16145
+ {
16146
+ inputs: [
16147
+ {
16148
+ internalType: "uint256",
16149
+ name: "tokenId",
16150
+ type: "uint256"
16151
+ },
16152
+ {
16153
+ internalType: "uint256",
16154
+ name: "amount0Desired",
16155
+ type: "uint256"
16156
+ },
16157
+ {
16158
+ internalType: "uint256",
16159
+ name: "amount1Desired",
16160
+ type: "uint256"
16161
+ },
16162
+ {
16163
+ internalType: "uint256",
16164
+ name: "amount0Min",
16165
+ type: "uint256"
16166
+ },
16167
+ {
16168
+ internalType: "uint256",
16169
+ name: "amount1Min",
16170
+ type: "uint256"
16171
+ },
16172
+ {
16173
+ internalType: "uint256",
16174
+ name: "deadline",
16175
+ type: "uint256"
16176
+ }
16177
+ ],
16178
+ name: "increaseStakedLiquidity",
16179
+ outputs: [
16180
+ {
16181
+ internalType: "uint128",
16182
+ name: "liquidity",
16183
+ type: "uint128"
16184
+ },
16185
+ {
16186
+ internalType: "uint256",
16187
+ name: "amount0",
16188
+ type: "uint256"
16189
+ },
16190
+ {
16191
+ internalType: "uint256",
16192
+ name: "amount1",
16193
+ type: "uint256"
16194
+ }
16195
+ ],
16196
+ stateMutability: "payable",
16197
+ type: "function"
16198
+ },
16199
+ {
16200
+ inputs: [
16201
+ ],
16202
+ name: "nft",
16203
+ outputs: [
16204
+ {
16205
+ internalType: "address",
16206
+ name: "",
16207
+ type: "address"
16208
+ }
16209
+ ],
16210
+ stateMutability: "view",
16211
+ type: "function"
16212
+ },
16213
+ {
16214
+ inputs: [
16215
+ {
16216
+ internalType: "uint256",
16217
+ name: "tokenId",
16218
+ type: "uint256"
16219
+ }
16220
+ ],
16221
+ name: "withdraw",
16222
+ outputs: [
16223
+ ],
16224
+ stateMutability: "nonpayable",
16225
+ type: "function"
16226
+ }
16227
+ ];
16228
+ var IVelodromeCLGauge = {
16300
16229
  abi: abi$p
16301
16230
  };
16302
16231
 
@@ -21120,14 +21049,14 @@ var getZeroExTradeTxData = /*#__PURE__*/function () {
21120
21049
  };
21121
21050
  }();
21122
21051
 
21123
- var oneInchBaseUrl = "https://api.1inch.dev/swap/v5.2/";
21052
+ var oneInchBaseUrl = "https://api.1inch.dev/swap/v6.0/";
21124
21053
  function getOneInchSwapTxData(_x, _x2, _x3, _x4, _x5) {
21125
21054
  return _getOneInchSwapTxData.apply(this, arguments);
21126
21055
  }
21127
21056
 
21128
21057
  function _getOneInchSwapTxData() {
21129
21058
  _getOneInchSwapTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, assetFrom, assetTo, amountIn, slippage) {
21130
- var chainId, apiUrl, response;
21059
+ var chainId, apiUrl, params, response;
21131
21060
  return runtime_1.wrap(function _callee$(_context) {
21132
21061
  while (1) {
21133
21062
  switch (_context.prev = _context.next) {
@@ -21141,30 +21070,41 @@ function _getOneInchSwapTxData() {
21141
21070
 
21142
21071
  case 2:
21143
21072
  chainId = networkChainIdMap[pool.network];
21144
- apiUrl = "" + oneInchBaseUrl + chainId + "/swap?src=" + assetFrom + "&dst=" + assetTo + "&amount=" + amountIn.toString() + "&from=" + pool.address + "&slippage=" + slippage.toString() + "&disableEstimate=true";
21145
- _context.prev = 4;
21146
- _context.next = 7;
21073
+ apiUrl = "" + oneInchBaseUrl + chainId + "/swap";
21074
+ params = {
21075
+ src: assetFrom,
21076
+ dst: assetTo,
21077
+ amount: amountIn.toString(),
21078
+ from: pool.address,
21079
+ origin: pool.signer.address,
21080
+ slippage: slippage,
21081
+ disableEstimate: true,
21082
+ usePermit2: false
21083
+ };
21084
+ _context.prev = 5;
21085
+ _context.next = 8;
21147
21086
  return axios.get(apiUrl, {
21148
21087
  headers: {
21149
21088
  Authorization: "Bearer " + process.env.ONEINCH_API_KEY
21150
- }
21089
+ },
21090
+ params: params
21151
21091
  });
21152
21092
 
21153
- case 7:
21093
+ case 8:
21154
21094
  response = _context.sent;
21155
21095
  return _context.abrupt("return", response.data.tx.data);
21156
21096
 
21157
- case 11:
21158
- _context.prev = 11;
21159
- _context.t0 = _context["catch"](4);
21097
+ case 12:
21098
+ _context.prev = 12;
21099
+ _context.t0 = _context["catch"](5);
21160
21100
  throw new ApiError("Swap api request of 1inch failed");
21161
21101
 
21162
- case 14:
21102
+ case 15:
21163
21103
  case "end":
21164
21104
  return _context.stop();
21165
21105
  }
21166
21106
  }
21167
- }, _callee, null, [[4, 11]]);
21107
+ }, _callee, null, [[5, 12]]);
21168
21108
  }));
21169
21109
  return _getOneInchSwapTxData.apply(this, arguments);
21170
21110
  }
@@ -24863,7 +24803,7 @@ var Pool = /*#__PURE__*/function () {
24863
24803
  }
24864
24804
 
24865
24805
  _context14.t0 = dapp;
24866
- _context14.next = _context14.t0 === exports.Dapp.BALANCER ? 5 : _context14.t0 === exports.Dapp.VELODROME ? 8 : _context14.t0 === exports.Dapp.RAMSES ? 8 : _context14.t0 === exports.Dapp.VELODROMEV2 ? 10 : _context14.t0 === exports.Dapp.AERODROME ? 10 : _context14.t0 === exports.Dapp.VELODROMECL ? 10 : 12;
24806
+ _context14.next = _context14.t0 === exports.Dapp.BALANCER ? 5 : _context14.t0 === exports.Dapp.VELODROME ? 8 : _context14.t0 === exports.Dapp.RAMSES ? 8 : _context14.t0 === exports.Dapp.VELODROMEV2 ? 10 : _context14.t0 === exports.Dapp.AERODROME ? 10 : _context14.t0 === exports.Dapp.VELODROMECL ? 10 : _context14.t0 === exports.Dapp.AERODROMECL ? 10 : 12;
24867
24807
  break;
24868
24808
 
24869
24809
  case 5:
@@ -25631,7 +25571,7 @@ var Pool = /*#__PURE__*/function () {
25631
25571
  }()
25632
25572
  /**
25633
25573
  * Create UniswapV3 liquidity pool
25634
- * @param {dapp} Platform either UniswapV3 or VelodromeCL
25574
+ * @param {dapp} Platform UniswapV3, VelodromeCL or AerodromeCL
25635
25575
  * @param {string} assetA First asset
25636
25576
  * @param {string} assetB Second asset
25637
25577
  * @param {BigNumber | string} amountA Amount first asset
@@ -25672,12 +25612,12 @@ var Pool = /*#__PURE__*/function () {
25672
25612
  throw new Error("Need to provide price or tick range");
25673
25613
 
25674
25614
  case 4:
25675
- if (!((minPrice || maxPrice) && dapp === exports.Dapp.VELODROMECL)) {
25615
+ if (!((minPrice || maxPrice) && dapp !== exports.Dapp.UNISWAPV3)) {
25676
25616
  _context28.next = 6;
25677
25617
  break;
25678
25618
  }
25679
25619
 
25680
- throw new Error("no price conversion for Velodrome CL");
25620
+ throw new Error("no price conversion for Aerodrome/Velodrome CL");
25681
25621
 
25682
25622
  case 6:
25683
25623
  _context28.next = 8;
@@ -25740,7 +25680,7 @@ var Pool = /*#__PURE__*/function () {
25740
25680
 
25741
25681
  isStaked = false;
25742
25682
  _context29.t0 = dapp;
25743
- _context29.next = _context29.t0 === exports.Dapp.UNISWAPV3 ? 7 : _context29.t0 === exports.Dapp.VELODROMECL ? 9 : _context29.t0 === exports.Dapp.ARRAKIS ? 14 : 16;
25683
+ _context29.next = _context29.t0 === exports.Dapp.UNISWAPV3 ? 7 : _context29.t0 === exports.Dapp.VELODROMECL ? 9 : _context29.t0 === exports.Dapp.AERODROMECL ? 9 : _context29.t0 === exports.Dapp.ARRAKIS ? 14 : 16;
25744
25684
  break;
25745
25685
 
25746
25686
  case 7:
@@ -25749,7 +25689,7 @@ var Pool = /*#__PURE__*/function () {
25749
25689
 
25750
25690
  case 9:
25751
25691
  _context29.next = 11;
25752
- return getVelodromeClOwner(this, tokenId);
25692
+ return getVelodromeClOwner(this, dapp, tokenId);
25753
25693
 
25754
25694
  case 11:
25755
25695
  tokenIdOwner = _context29.sent;
@@ -25782,25 +25722,21 @@ var Pool = /*#__PURE__*/function () {
25782
25722
 
25783
25723
  case 20:
25784
25724
  txData = _context29.sent;
25785
- _context29.next = 26;
25725
+ _context29.next = 24;
25786
25726
  break;
25787
25727
 
25788
25728
  case 23:
25789
- _context29.next = 25;
25790
- return getVelodromeCLDecreaseStakedLiquidityTxData(this, tokenId, amount);
25729
+ throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
25791
25730
 
25792
- case 25:
25793
- txData = _context29.sent;
25794
-
25795
- case 26:
25796
- _context29.next = 28;
25731
+ case 24:
25732
+ _context29.next = 26;
25797
25733
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25798
25734
 
25799
- case 28:
25735
+ case 26:
25800
25736
  tx = _context29.sent;
25801
25737
  return _context29.abrupt("return", tx);
25802
25738
 
25803
- case 30:
25739
+ case 28:
25804
25740
  case "end":
25805
25741
  return _context29.stop();
25806
25742
  }
@@ -25845,7 +25781,7 @@ var Pool = /*#__PURE__*/function () {
25845
25781
 
25846
25782
  isStaked = false;
25847
25783
  _context30.t0 = dapp;
25848
- _context30.next = _context30.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context30.t0 === exports.Dapp.VELODROMECL ? 8 : _context30.t0 === exports.Dapp.ARRAKIS ? 13 : 15;
25784
+ _context30.next = _context30.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context30.t0 === exports.Dapp.VELODROMECL ? 8 : _context30.t0 === exports.Dapp.AERODROMECL ? 8 : _context30.t0 === exports.Dapp.ARRAKIS ? 13 : 15;
25849
25785
  break;
25850
25786
 
25851
25787
  case 6:
@@ -25854,7 +25790,7 @@ var Pool = /*#__PURE__*/function () {
25854
25790
 
25855
25791
  case 8:
25856
25792
  _context30.next = 10;
25857
- return getVelodromeClOwner(this, tokenId);
25793
+ return getVelodromeClOwner(this, dapp, tokenId);
25858
25794
 
25859
25795
  case 10:
25860
25796
  tokenIdOwner = _context30.sent;
@@ -25887,25 +25823,21 @@ var Pool = /*#__PURE__*/function () {
25887
25823
 
25888
25824
  case 19:
25889
25825
  txData = _context30.sent;
25890
- _context30.next = 25;
25826
+ _context30.next = 23;
25891
25827
  break;
25892
25828
 
25893
25829
  case 22:
25894
- _context30.next = 24;
25895
- return getVelodromeCLIncreaseStakedLiquidityTxData(this, tokenId, amountA, amountB);
25830
+ throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
25896
25831
 
25897
- case 24:
25898
- txData = _context30.sent;
25899
-
25900
- case 25:
25901
- _context30.next = 27;
25832
+ case 23:
25833
+ _context30.next = 25;
25902
25834
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25903
25835
 
25904
- case 27:
25836
+ case 25:
25905
25837
  tx = _context30.sent;
25906
25838
  return _context30.abrupt("return", tx);
25907
25839
 
25908
- case 29:
25840
+ case 27:
25909
25841
  case "end":
25910
25842
  return _context30.stop();
25911
25843
  }
@@ -25948,7 +25880,7 @@ var Pool = /*#__PURE__*/function () {
25948
25880
 
25949
25881
  iNonfungiblePositionManager = new ethers.ethers.utils.Interface(INonfungiblePositionManager.abi);
25950
25882
  _context31.t0 = dapp;
25951
- _context31.next = _context31.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context31.t0 === exports.Dapp.ARRAKIS ? 9 : _context31.t0 === exports.Dapp.BALANCER ? 9 : _context31.t0 === exports.Dapp.VELODROME ? 13 : _context31.t0 === exports.Dapp.RAMSES ? 13 : _context31.t0 === exports.Dapp.VELODROMEV2 ? 16 : _context31.t0 === exports.Dapp.AERODROME ? 16 : _context31.t0 === exports.Dapp.VELODROMECL ? 19 : 24;
25883
+ _context31.next = _context31.t0 === exports.Dapp.UNISWAPV3 ? 6 : _context31.t0 === exports.Dapp.ARRAKIS ? 9 : _context31.t0 === exports.Dapp.BALANCER ? 9 : _context31.t0 === exports.Dapp.VELODROME ? 13 : _context31.t0 === exports.Dapp.RAMSES ? 13 : _context31.t0 === exports.Dapp.VELODROMEV2 ? 16 : _context31.t0 === exports.Dapp.AERODROME ? 16 : _context31.t0 === exports.Dapp.VELODROMECL ? 19 : _context31.t0 === exports.Dapp.AERODROMECL ? 19 : 24;
25952
25884
  break;
25953
25885
 
25954
25886
  case 6:
@@ -25974,7 +25906,7 @@ var Pool = /*#__PURE__*/function () {
25974
25906
 
25975
25907
  case 19:
25976
25908
  _context31.next = 21;
25977
- return getVelodromeClOwner(this, tokenId);
25909
+ return getVelodromeClOwner(this, dapp, tokenId);
25978
25910
 
25979
25911
  case 21:
25980
25912
  tokenIdOwner = _context31.sent;