@dhedge/v2-sdk 1.10.1 → 1.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4247,11 +4247,11 @@ var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Ne
4247
4247
  require("dotenv").config();
4248
4248
 
4249
4249
  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);
4250
- 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] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _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] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _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] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$ARBITRUM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM), _routerAddress[Network.BASE] = (_Network$BASE = {}, _Network$BASE[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$BASE[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE[Dapp.AERODROME] = "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43", _Network$BASE[Dapp.AAVEV3] = "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", _Network$BASE), _routerAddress);
4250
+ 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] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _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] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _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), _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), _routerAddress);
4251
4251
  var dappFactoryAddress = (_dappFactoryAddress = {}, _dappFactoryAddress[Network.POLYGON] = (_Network$POLYGON2 = {}, _Network$POLYGON2[Dapp.SUSHISWAP] = "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", _Network$POLYGON2[Dapp.QUICKSWAP] = "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", _Network$POLYGON2), _dappFactoryAddress[Network.OPTIMISM] = {}, _dappFactoryAddress[Network.ARBITRUM] = {}, _dappFactoryAddress[Network.BASE] = {}, _dappFactoryAddress);
4252
4252
  var stakingAddress = (_stakingAddress = {}, _stakingAddress[Network.POLYGON] = (_Network$POLYGON3 = {}, _Network$POLYGON3[Dapp.SUSHISWAP] = "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F", _Network$POLYGON3[Dapp.BALANCER] = "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e", _Network$POLYGON3[Dapp.AAVE] = "0x357D51124f59836DeD84c8a1730D72B749d8BC23", _Network$POLYGON3[Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$POLYGON3), _stakingAddress[Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$OPTIMISM2), _stakingAddress[Network.ARBITRUM] = {}, _stakingAddress[Network.BASE] = {}, _stakingAddress);
4253
4253
  var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[Network.OPTIMISM] = (_Network$OPTIMISM3 = {}, _Network$OPTIMISM3[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM3), _aaveAddressProvider[Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE2), _aaveAddressProvider);
4254
- var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[Dapp.VELODROMECL] = "0xbb5dfe1380333cee4c2eebd7202c80de2256adf4", _Network$OPTIMISM4), _nonfungiblePositionM[Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3), _nonfungiblePositionM);
4254
+ var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[Network.POLYGON] = (_Network$POLYGON5 = {}, _Network$POLYGON5[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$POLYGON5), _nonfungiblePositionM[Network.OPTIMISM] = (_Network$OPTIMISM4 = {}, _Network$OPTIMISM4[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$OPTIMISM4[Dapp.VELODROMECL] = "0x416b433906b1B72FA758e166e239c43d68dC6F29", _Network$OPTIMISM4), _nonfungiblePositionM[Network.ARBITRUM] = (_Network$ARBITRUM3 = {}, _Network$ARBITRUM3[Dapp.UNISWAPV3] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _Network$ARBITRUM3), _nonfungiblePositionM[Network.BASE] = (_Network$BASE3 = {}, _Network$BASE3[Dapp.UNISWAPV3] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _Network$BASE3), _nonfungiblePositionM);
4255
4255
  var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap);
4256
4256
  var balancerSubgraph = (_balancerSubgraph = {}, _balancerSubgraph[Network.POLYGON] = "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2", _balancerSubgraph[Network.OPTIMISM] = "", _balancerSubgraph[Network.ARBITRUM] = "", _balancerSubgraph[Network.BASE] = "", _balancerSubgraph);
4257
4257
  var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress);
@@ -14702,180 +14702,6 @@ var IVelodromeRouter = {
14702
14702
  abi: abi$m
14703
14703
  };
14704
14704
 
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
14705
  function getVelodromeAddLiquidityTxData(_x, _x2, _x3, _x4, _x5, _x6) {
14880
14706
  return _getVelodromeAddLiquidityTxData.apply(this, arguments);
14881
14707
  }
@@ -14951,108 +14777,36 @@ function _getVelodromeRemoveLiquidityTxData() {
14951
14777
  return _getVelodromeRemoveLiquidityTxData.apply(this, arguments);
14952
14778
  }
14953
14779
 
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.utils.Interface(IVelodromeCLGauge.abi);
14966
- _context3.next = 3;
14967
- return getUniswapV3Liquidity(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.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) {
14780
+ function getVelodromeClOwner(_x12, _x13) {
15027
14781
  return _getVelodromeClOwner.apply(this, arguments);
15028
14782
  }
15029
14783
 
15030
14784
  function _getVelodromeClOwner() {
15031
- _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(pool, tokenId) {
14785
+ _getVelodromeClOwner = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, tokenId) {
15032
14786
  var iNonfungiblePositionManager;
15033
- return runtime_1.wrap(function _callee6$(_context6) {
14787
+ return runtime_1.wrap(function _callee3$(_context3) {
15034
14788
  while (1) {
15035
- switch (_context6.prev = _context6.next) {
14789
+ switch (_context3.prev = _context3.next) {
15036
14790
  case 0:
15037
14791
  iNonfungiblePositionManager = new ethers.Contract( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15038
14792
  nonfungiblePositionManagerAddress[pool.network][Dapp.VELODROMECL], INonfungiblePositionManager.abi, pool.signer);
15039
- _context6.next = 3;
14793
+ _context3.next = 3;
15040
14794
  return iNonfungiblePositionManager.ownerOf(tokenId);
15041
14795
 
15042
14796
  case 3:
15043
- return _context6.abrupt("return", _context6.sent);
14797
+ return _context3.abrupt("return", _context3.sent);
15044
14798
 
15045
14799
  case 4:
15046
14800
  case "end":
15047
- return _context6.stop();
14801
+ return _context3.stop();
15048
14802
  }
15049
14803
  }
15050
- }, _callee6);
14804
+ }, _callee3);
15051
14805
  }));
15052
14806
  return _getVelodromeClOwner.apply(this, arguments);
15053
14807
  }
15054
14808
 
15055
- var abi$o = [
14809
+ var abi$n = [
15056
14810
  {
15057
14811
  inputs: [
15058
14812
  {
@@ -16094,10 +15848,10 @@ var abi$o = [
16094
15848
  }
16095
15849
  ];
16096
15850
  var IVelodromeGaugeV1 = {
16097
- abi: abi$o
15851
+ abi: abi$n
16098
15852
  };
16099
15853
 
16100
- var abi$p = [
15854
+ var abi$o = [
16101
15855
  {
16102
15856
  inputs: [
16103
15857
  {
@@ -16297,6 +16051,180 @@ var abi$p = [
16297
16051
  }
16298
16052
  ];
16299
16053
  var IVelodromeGaugeV2 = {
16054
+ abi: abi$o
16055
+ };
16056
+
16057
+ var abi$p = [
16058
+ {
16059
+ inputs: [
16060
+ {
16061
+ internalType: "uint256",
16062
+ name: "tokenId",
16063
+ type: "uint256"
16064
+ },
16065
+ {
16066
+ internalType: "uint128",
16067
+ name: "liquidity",
16068
+ type: "uint128"
16069
+ },
16070
+ {
16071
+ internalType: "uint256",
16072
+ name: "amount0Min",
16073
+ type: "uint256"
16074
+ },
16075
+ {
16076
+ internalType: "uint256",
16077
+ name: "amount1Min",
16078
+ type: "uint256"
16079
+ },
16080
+ {
16081
+ internalType: "uint256",
16082
+ name: "deadline",
16083
+ type: "uint256"
16084
+ }
16085
+ ],
16086
+ name: "decreaseStakedLiquidity",
16087
+ outputs: [
16088
+ {
16089
+ internalType: "uint256",
16090
+ name: "amount0",
16091
+ type: "uint256"
16092
+ },
16093
+ {
16094
+ internalType: "uint256",
16095
+ name: "amount1",
16096
+ type: "uint256"
16097
+ }
16098
+ ],
16099
+ stateMutability: "nonpayable",
16100
+ type: "function"
16101
+ },
16102
+ {
16103
+ inputs: [
16104
+ {
16105
+ internalType: "uint256",
16106
+ name: "tokenId",
16107
+ type: "uint256"
16108
+ }
16109
+ ],
16110
+ name: "deposit",
16111
+ outputs: [
16112
+ ],
16113
+ stateMutability: "nonpayable",
16114
+ type: "function"
16115
+ },
16116
+ {
16117
+ inputs: [
16118
+ {
16119
+ internalType: "uint256",
16120
+ name: "tokenId",
16121
+ type: "uint256"
16122
+ }
16123
+ ],
16124
+ name: "getReward",
16125
+ outputs: [
16126
+ ],
16127
+ stateMutability: "nonpayable",
16128
+ type: "function"
16129
+ },
16130
+ {
16131
+ inputs: [
16132
+ {
16133
+ internalType: "address",
16134
+ name: "account",
16135
+ type: "address"
16136
+ }
16137
+ ],
16138
+ name: "getReward",
16139
+ outputs: [
16140
+ ],
16141
+ stateMutability: "nonpayable",
16142
+ type: "function"
16143
+ },
16144
+ {
16145
+ inputs: [
16146
+ {
16147
+ internalType: "uint256",
16148
+ name: "tokenId",
16149
+ type: "uint256"
16150
+ },
16151
+ {
16152
+ internalType: "uint256",
16153
+ name: "amount0Desired",
16154
+ type: "uint256"
16155
+ },
16156
+ {
16157
+ internalType: "uint256",
16158
+ name: "amount1Desired",
16159
+ type: "uint256"
16160
+ },
16161
+ {
16162
+ internalType: "uint256",
16163
+ name: "amount0Min",
16164
+ type: "uint256"
16165
+ },
16166
+ {
16167
+ internalType: "uint256",
16168
+ name: "amount1Min",
16169
+ type: "uint256"
16170
+ },
16171
+ {
16172
+ internalType: "uint256",
16173
+ name: "deadline",
16174
+ type: "uint256"
16175
+ }
16176
+ ],
16177
+ name: "increaseStakedLiquidity",
16178
+ outputs: [
16179
+ {
16180
+ internalType: "uint128",
16181
+ name: "liquidity",
16182
+ type: "uint128"
16183
+ },
16184
+ {
16185
+ internalType: "uint256",
16186
+ name: "amount0",
16187
+ type: "uint256"
16188
+ },
16189
+ {
16190
+ internalType: "uint256",
16191
+ name: "amount1",
16192
+ type: "uint256"
16193
+ }
16194
+ ],
16195
+ stateMutability: "payable",
16196
+ type: "function"
16197
+ },
16198
+ {
16199
+ inputs: [
16200
+ ],
16201
+ name: "nft",
16202
+ outputs: [
16203
+ {
16204
+ internalType: "address",
16205
+ name: "",
16206
+ type: "address"
16207
+ }
16208
+ ],
16209
+ stateMutability: "view",
16210
+ type: "function"
16211
+ },
16212
+ {
16213
+ inputs: [
16214
+ {
16215
+ internalType: "uint256",
16216
+ name: "tokenId",
16217
+ type: "uint256"
16218
+ }
16219
+ ],
16220
+ name: "withdraw",
16221
+ outputs: [
16222
+ ],
16223
+ stateMutability: "nonpayable",
16224
+ type: "function"
16225
+ }
16226
+ ];
16227
+ var IVelodromeCLGauge = {
16300
16228
  abi: abi$p
16301
16229
  };
16302
16230
 
@@ -21120,14 +21048,14 @@ var getZeroExTradeTxData = /*#__PURE__*/function () {
21120
21048
  };
21121
21049
  }();
21122
21050
 
21123
- var oneInchBaseUrl = "https://api.1inch.dev/swap/v5.2/";
21051
+ var oneInchBaseUrl = "https://api.1inch.dev/swap/v6.0/";
21124
21052
  function getOneInchSwapTxData(_x, _x2, _x3, _x4, _x5) {
21125
21053
  return _getOneInchSwapTxData.apply(this, arguments);
21126
21054
  }
21127
21055
 
21128
21056
  function _getOneInchSwapTxData() {
21129
21057
  _getOneInchSwapTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, assetFrom, assetTo, amountIn, slippage) {
21130
- var chainId, apiUrl, response;
21058
+ var chainId, apiUrl, params, response;
21131
21059
  return runtime_1.wrap(function _callee$(_context) {
21132
21060
  while (1) {
21133
21061
  switch (_context.prev = _context.next) {
@@ -21141,30 +21069,41 @@ function _getOneInchSwapTxData() {
21141
21069
 
21142
21070
  case 2:
21143
21071
  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;
21072
+ apiUrl = "" + oneInchBaseUrl + chainId + "/swap";
21073
+ params = {
21074
+ src: assetFrom,
21075
+ dst: assetTo,
21076
+ amount: amountIn.toString(),
21077
+ from: pool.address,
21078
+ origin: pool.signer.address,
21079
+ slippage: slippage,
21080
+ disableEstimate: true,
21081
+ usePermit2: false
21082
+ };
21083
+ _context.prev = 5;
21084
+ _context.next = 8;
21147
21085
  return axios.get(apiUrl, {
21148
21086
  headers: {
21149
21087
  Authorization: "Bearer " + process.env.ONEINCH_API_KEY
21150
- }
21088
+ },
21089
+ params: params
21151
21090
  });
21152
21091
 
21153
- case 7:
21092
+ case 8:
21154
21093
  response = _context.sent;
21155
21094
  return _context.abrupt("return", response.data.tx.data);
21156
21095
 
21157
- case 11:
21158
- _context.prev = 11;
21159
- _context.t0 = _context["catch"](4);
21096
+ case 12:
21097
+ _context.prev = 12;
21098
+ _context.t0 = _context["catch"](5);
21160
21099
  throw new ApiError("Swap api request of 1inch failed");
21161
21100
 
21162
- case 14:
21101
+ case 15:
21163
21102
  case "end":
21164
21103
  return _context.stop();
21165
21104
  }
21166
21105
  }
21167
- }, _callee, null, [[4, 11]]);
21106
+ }, _callee, null, [[5, 12]]);
21168
21107
  }));
21169
21108
  return _getOneInchSwapTxData.apply(this, arguments);
21170
21109
  }
@@ -25782,25 +25721,21 @@ var Pool = /*#__PURE__*/function () {
25782
25721
 
25783
25722
  case 20:
25784
25723
  txData = _context29.sent;
25785
- _context29.next = 26;
25724
+ _context29.next = 24;
25786
25725
  break;
25787
25726
 
25788
25727
  case 23:
25789
- _context29.next = 25;
25790
- return getVelodromeCLDecreaseStakedLiquidityTxData(this, tokenId, amount);
25728
+ throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
25791
25729
 
25792
- case 25:
25793
- txData = _context29.sent;
25794
-
25795
- case 26:
25796
- _context29.next = 28;
25730
+ case 24:
25731
+ _context29.next = 26;
25797
25732
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25798
25733
 
25799
- case 28:
25734
+ case 26:
25800
25735
  tx = _context29.sent;
25801
25736
  return _context29.abrupt("return", tx);
25802
25737
 
25803
- case 30:
25738
+ case 28:
25804
25739
  case "end":
25805
25740
  return _context29.stop();
25806
25741
  }
@@ -25887,25 +25822,21 @@ var Pool = /*#__PURE__*/function () {
25887
25822
 
25888
25823
  case 19:
25889
25824
  txData = _context30.sent;
25890
- _context30.next = 25;
25825
+ _context30.next = 23;
25891
25826
  break;
25892
25827
 
25893
25828
  case 22:
25894
- _context30.next = 24;
25895
- return getVelodromeCLIncreaseStakedLiquidityTxData(this, tokenId, amountA, amountB);
25829
+ throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
25896
25830
 
25897
- case 24:
25898
- txData = _context30.sent;
25899
-
25900
- case 25:
25901
- _context30.next = 27;
25831
+ case 23:
25832
+ _context30.next = 25;
25902
25833
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25903
25834
 
25904
- case 27:
25835
+ case 25:
25905
25836
  tx = _context30.sent;
25906
25837
  return _context30.abrupt("return", tx);
25907
25838
 
25908
- case 29:
25839
+ case 27:
25909
25840
  case "end":
25910
25841
  return _context30.stop();
25911
25842
  }