@dhedge/v2-sdk 1.10.11 → 1.10.13

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.
@@ -4250,6 +4250,7 @@ var Network;
4250
4250
  Network["OPTIMISM"] = "optimism";
4251
4251
  Network["ARBITRUM"] = "arbitrum";
4252
4252
  Network["BASE"] = "base";
4253
+ Network["SONIC"] = "sonic";
4253
4254
  })(Network || (Network = {}));
4254
4255
 
4255
4256
  var Dapp;
@@ -4269,7 +4270,6 @@ var Dapp;
4269
4270
  Dapp["VELODROMEV2"] = "velodromeV2";
4270
4271
  Dapp["VELODROMECL"] = "velodromeCL";
4271
4272
  Dapp["LYRA"] = "lyra";
4272
- Dapp["ZEROEX"] = "0x";
4273
4273
  Dapp["RAMSES"] = "ramses";
4274
4274
  Dapp["AERODROME"] = "aerodrome";
4275
4275
  Dapp["AERODROMECL"] = "aerodromeCL";
@@ -4277,6 +4277,7 @@ var Dapp;
4277
4277
  Dapp["PANCAKECL"] = "pancakeCL";
4278
4278
  Dapp["COMPOUNDV3"] = "compoundV3";
4279
4279
  Dapp["ODOS"] = "odos";
4280
+ Dapp["SHADOWCL"] = "shadowCL";
4280
4281
  })(Dapp || (Dapp = {}));
4281
4282
 
4282
4283
  var Transaction;
@@ -4303,19 +4304,19 @@ var Transaction;
4303
4304
  Transaction["REMOVE_LIQUIDITY_UNSTAKE"] = "removeLiquidityAndUnstake";
4304
4305
  })(Transaction || (Transaction = {}));
4305
4306
 
4306
- 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;
4307
+ var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _Network$SONIC, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _Network$OPTIMISM2, _Network$ARBITRUM2, _Network$BASE2, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM3, _Network$ARBITRUM3, _Network$BASE3, _Network$SONIC2, _aaveAddressProvider, _Network$POLYGON5, _Network$OPTIMISM4, _Network$ARBITRUM4, _Network$BASE4, _Network$SONIC3, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap, _flatMoneyContractAdd;
4307
4308
 
4308
4309
  require("dotenv").config();
4309
4310
 
4310
- 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);
4311
- 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[Dapp.ODOS] = "0x4e3288c9ca110bcc82bf38f09a7b425c095d92bf", _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[Dapp.ODOS] = "0xca423977156bb05b13a2ba3b76bc5419e2fe9680", _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[Dapp.ODOS] = "0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13", _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[Dapp.ODOS] = "0x19cEeAd7105607Cd444F5ad10dd51356436095a1", _Network$BASE), _routerAddress);
4312
- 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);
4313
- 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[Dapp.PANCAKECL] = "0x5e09ACf80C0296740eC5d6F643005a4ef8DaA694", _Network$ARBITRUM2), _stakingAddress[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.PANCAKECL] = "0xC6A2Db661D5a5690172d8eB0a7DEA2d3008665A3", _Network$BASE2), _stakingAddress);
4314
- 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);
4315
- 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[Dapp.PANCAKECL] = "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364", _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);
4316
- var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap);
4317
- 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);
4318
- var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress);
4311
+ 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[Network.SONIC] = "", _factoryAddress);
4312
+ 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.ODOS] = "0x4e3288c9ca110bcc82bf38f09a7b425c095d92bf", _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.ODOS] = "0xca423977156bb05b13a2ba3b76bc5419e2fe9680", _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.TOROS] = "0xA5679C4272A056Bb83f039961fae7D99C48529F5", _Network$ARBITRUM[Dapp.ODOS] = "0xa669e7A0d4b3e4Fa48af2dE86BD4CD7126Be4e13", _Network$ARBITRUM), _routerAddress[Network.BASE] = (_Network$BASE = {}, _Network$BASE[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$BASE[Dapp.AERODROME] = "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43", _Network$BASE[Dapp.AAVEV3] = "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5", _Network$BASE[Dapp.TOROS] = "0xf067575Eb60c7587C11e867907AA7284833704d1", _Network$BASE[Dapp.ODOS] = "0x19cEeAd7105607Cd444F5ad10dd51356436095a1", _Network$BASE), _routerAddress[Network.SONIC] = (_Network$SONIC = {}, _Network$SONIC[Dapp.AAVEV3] = "0x5362dBb1e601abF3a4c14c22ffEdA64042E5eAA3", _Network$SONIC[Dapp.ODOS] = "0xaC041Df48dF9791B0654f1Dbbf2CC8450C5f2e9D", _Network$SONIC), _routerAddress);
4313
+ 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[Network.SONIC] = {}, _dappFactoryAddress);
4314
+ 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[Dapp.PANCAKECL] = "0x5e09ACf80C0296740eC5d6F643005a4ef8DaA694", _Network$ARBITRUM2), _stakingAddress[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.PANCAKECL] = "0xC6A2Db661D5a5690172d8eB0a7DEA2d3008665A3", _Network$BASE2), _stakingAddress[Network.SONIC] = {}, _stakingAddress);
4315
+ 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[Network.SONIC] = (_Network$SONIC2 = {}, _Network$SONIC2[Dapp.AAVEV3] = "0x5C2e738F6E27bCE0F7558051Bf90605dD6176900", _Network$SONIC2), _aaveAddressProvider);
4316
+ 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[Dapp.PANCAKECL] = "0x46a15b0b27311cedf172ab29e4f4766fbe7f4364", _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[Network.SONIC] = (_Network$SONIC3 = {}, _Network$SONIC3[Dapp.SHADOWCL] = "0x12e66c8f215ddd5d48d150c8f46ad0c6fb0f4406", _Network$SONIC3), _nonfungiblePositionM);
4317
+ var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap[Network.SONIC] = 146, _networkChainIdMap);
4318
+ 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[Network.SONIC] = "", _balancerSubgraph);
4319
+ var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress[Network.SONIC] = "", _multiCallAddress);
4319
4320
  var lyraNetworkMap = (_lyraNetworkMap = {}, _lyraNetworkMap[Network.OPTIMISM] = Deployment.Mainnet, _lyraNetworkMap);
4320
4321
  var MaxUint128 = "0xffffffffffffffffffffffffffffffff";
4321
4322
  var UNISWAPV3_QUOTER_ADDRESS = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
@@ -8682,6 +8683,1209 @@ var IVeldodromePositionManager = {
8682
8683
  abi: abi$d
8683
8684
  };
8684
8685
 
8686
+ var IShadowNonfungiblePositionManager = [
8687
+ {
8688
+ inputs: [
8689
+ {
8690
+ internalType: "address",
8691
+ name: "_deployer",
8692
+ type: "address"
8693
+ },
8694
+ {
8695
+ internalType: "address",
8696
+ name: "_WETH9",
8697
+ type: "address"
8698
+ },
8699
+ {
8700
+ internalType: "address",
8701
+ name: "_tokenDescriptor_",
8702
+ type: "address"
8703
+ },
8704
+ {
8705
+ internalType: "address",
8706
+ name: "_accessHub",
8707
+ type: "address"
8708
+ }
8709
+ ],
8710
+ stateMutability: "nonpayable",
8711
+ type: "constructor"
8712
+ },
8713
+ {
8714
+ inputs: [
8715
+ ],
8716
+ name: "CheckSlippage",
8717
+ type: "error"
8718
+ },
8719
+ {
8720
+ inputs: [
8721
+ ],
8722
+ name: "ERC721EnumerableForbiddenBatchMint",
8723
+ type: "error"
8724
+ },
8725
+ {
8726
+ inputs: [
8727
+ {
8728
+ internalType: "address",
8729
+ name: "sender",
8730
+ type: "address"
8731
+ },
8732
+ {
8733
+ internalType: "uint256",
8734
+ name: "tokenId",
8735
+ type: "uint256"
8736
+ },
8737
+ {
8738
+ internalType: "address",
8739
+ name: "owner",
8740
+ type: "address"
8741
+ }
8742
+ ],
8743
+ name: "ERC721IncorrectOwner",
8744
+ type: "error"
8745
+ },
8746
+ {
8747
+ inputs: [
8748
+ {
8749
+ internalType: "address",
8750
+ name: "operator",
8751
+ type: "address"
8752
+ },
8753
+ {
8754
+ internalType: "uint256",
8755
+ name: "tokenId",
8756
+ type: "uint256"
8757
+ }
8758
+ ],
8759
+ name: "ERC721InsufficientApproval",
8760
+ type: "error"
8761
+ },
8762
+ {
8763
+ inputs: [
8764
+ {
8765
+ internalType: "address",
8766
+ name: "approver",
8767
+ type: "address"
8768
+ }
8769
+ ],
8770
+ name: "ERC721InvalidApprover",
8771
+ type: "error"
8772
+ },
8773
+ {
8774
+ inputs: [
8775
+ {
8776
+ internalType: "address",
8777
+ name: "operator",
8778
+ type: "address"
8779
+ }
8780
+ ],
8781
+ name: "ERC721InvalidOperator",
8782
+ type: "error"
8783
+ },
8784
+ {
8785
+ inputs: [
8786
+ {
8787
+ internalType: "address",
8788
+ name: "owner",
8789
+ type: "address"
8790
+ }
8791
+ ],
8792
+ name: "ERC721InvalidOwner",
8793
+ type: "error"
8794
+ },
8795
+ {
8796
+ inputs: [
8797
+ {
8798
+ internalType: "address",
8799
+ name: "receiver",
8800
+ type: "address"
8801
+ }
8802
+ ],
8803
+ name: "ERC721InvalidReceiver",
8804
+ type: "error"
8805
+ },
8806
+ {
8807
+ inputs: [
8808
+ {
8809
+ internalType: "address",
8810
+ name: "sender",
8811
+ type: "address"
8812
+ }
8813
+ ],
8814
+ name: "ERC721InvalidSender",
8815
+ type: "error"
8816
+ },
8817
+ {
8818
+ inputs: [
8819
+ {
8820
+ internalType: "uint256",
8821
+ name: "tokenId",
8822
+ type: "uint256"
8823
+ }
8824
+ ],
8825
+ name: "ERC721NonexistentToken",
8826
+ type: "error"
8827
+ },
8828
+ {
8829
+ inputs: [
8830
+ {
8831
+ internalType: "address",
8832
+ name: "owner",
8833
+ type: "address"
8834
+ },
8835
+ {
8836
+ internalType: "uint256",
8837
+ name: "index",
8838
+ type: "uint256"
8839
+ }
8840
+ ],
8841
+ name: "ERC721OutOfBoundsIndex",
8842
+ type: "error"
8843
+ },
8844
+ {
8845
+ inputs: [
8846
+ {
8847
+ internalType: "uint256",
8848
+ name: "tokenId",
8849
+ type: "uint256"
8850
+ }
8851
+ ],
8852
+ name: "InvalidTokenId",
8853
+ type: "error"
8854
+ },
8855
+ {
8856
+ inputs: [
8857
+ ],
8858
+ name: "NotCleared",
8859
+ type: "error"
8860
+ },
8861
+ {
8862
+ inputs: [
8863
+ ],
8864
+ name: "Old",
8865
+ type: "error"
8866
+ },
8867
+ {
8868
+ inputs: [
8869
+ ],
8870
+ name: "Slippage",
8871
+ type: "error"
8872
+ },
8873
+ {
8874
+ inputs: [
8875
+ ],
8876
+ name: "T",
8877
+ type: "error"
8878
+ },
8879
+ {
8880
+ anonymous: false,
8881
+ inputs: [
8882
+ {
8883
+ indexed: true,
8884
+ internalType: "address",
8885
+ name: "owner",
8886
+ type: "address"
8887
+ },
8888
+ {
8889
+ indexed: true,
8890
+ internalType: "address",
8891
+ name: "approved",
8892
+ type: "address"
8893
+ },
8894
+ {
8895
+ indexed: true,
8896
+ internalType: "uint256",
8897
+ name: "tokenId",
8898
+ type: "uint256"
8899
+ }
8900
+ ],
8901
+ name: "Approval",
8902
+ type: "event"
8903
+ },
8904
+ {
8905
+ anonymous: false,
8906
+ inputs: [
8907
+ {
8908
+ indexed: true,
8909
+ internalType: "address",
8910
+ name: "owner",
8911
+ type: "address"
8912
+ },
8913
+ {
8914
+ indexed: true,
8915
+ internalType: "address",
8916
+ name: "operator",
8917
+ type: "address"
8918
+ },
8919
+ {
8920
+ indexed: false,
8921
+ internalType: "bool",
8922
+ name: "approved",
8923
+ type: "bool"
8924
+ }
8925
+ ],
8926
+ name: "ApprovalForAll",
8927
+ type: "event"
8928
+ },
8929
+ {
8930
+ anonymous: false,
8931
+ inputs: [
8932
+ {
8933
+ indexed: true,
8934
+ internalType: "uint256",
8935
+ name: "tokenId",
8936
+ type: "uint256"
8937
+ },
8938
+ {
8939
+ indexed: false,
8940
+ internalType: "address",
8941
+ name: "recipient",
8942
+ type: "address"
8943
+ },
8944
+ {
8945
+ indexed: false,
8946
+ internalType: "uint256",
8947
+ name: "amount0",
8948
+ type: "uint256"
8949
+ },
8950
+ {
8951
+ indexed: false,
8952
+ internalType: "uint256",
8953
+ name: "amount1",
8954
+ type: "uint256"
8955
+ }
8956
+ ],
8957
+ name: "Collect",
8958
+ type: "event"
8959
+ },
8960
+ {
8961
+ anonymous: false,
8962
+ inputs: [
8963
+ {
8964
+ indexed: true,
8965
+ internalType: "uint256",
8966
+ name: "tokenId",
8967
+ type: "uint256"
8968
+ },
8969
+ {
8970
+ indexed: false,
8971
+ internalType: "uint128",
8972
+ name: "liquidity",
8973
+ type: "uint128"
8974
+ },
8975
+ {
8976
+ indexed: false,
8977
+ internalType: "uint256",
8978
+ name: "amount0",
8979
+ type: "uint256"
8980
+ },
8981
+ {
8982
+ indexed: false,
8983
+ internalType: "uint256",
8984
+ name: "amount1",
8985
+ type: "uint256"
8986
+ }
8987
+ ],
8988
+ name: "DecreaseLiquidity",
8989
+ type: "event"
8990
+ },
8991
+ {
8992
+ anonymous: false,
8993
+ inputs: [
8994
+ {
8995
+ indexed: true,
8996
+ internalType: "uint256",
8997
+ name: "tokenId",
8998
+ type: "uint256"
8999
+ },
9000
+ {
9001
+ indexed: false,
9002
+ internalType: "uint128",
9003
+ name: "liquidity",
9004
+ type: "uint128"
9005
+ },
9006
+ {
9007
+ indexed: false,
9008
+ internalType: "uint256",
9009
+ name: "amount0",
9010
+ type: "uint256"
9011
+ },
9012
+ {
9013
+ indexed: false,
9014
+ internalType: "uint256",
9015
+ name: "amount1",
9016
+ type: "uint256"
9017
+ }
9018
+ ],
9019
+ name: "IncreaseLiquidity",
9020
+ type: "event"
9021
+ },
9022
+ {
9023
+ anonymous: false,
9024
+ inputs: [
9025
+ {
9026
+ indexed: true,
9027
+ internalType: "address",
9028
+ name: "from",
9029
+ type: "address"
9030
+ },
9031
+ {
9032
+ indexed: true,
9033
+ internalType: "address",
9034
+ name: "to",
9035
+ type: "address"
9036
+ },
9037
+ {
9038
+ indexed: true,
9039
+ internalType: "uint256",
9040
+ name: "tokenId",
9041
+ type: "uint256"
9042
+ }
9043
+ ],
9044
+ name: "Transfer",
9045
+ type: "event"
9046
+ },
9047
+ {
9048
+ inputs: [
9049
+ ],
9050
+ name: "WETH9",
9051
+ outputs: [
9052
+ {
9053
+ internalType: "address",
9054
+ name: "",
9055
+ type: "address"
9056
+ }
9057
+ ],
9058
+ stateMutability: "view",
9059
+ type: "function"
9060
+ },
9061
+ {
9062
+ inputs: [
9063
+ {
9064
+ internalType: "address",
9065
+ name: "to",
9066
+ type: "address"
9067
+ },
9068
+ {
9069
+ internalType: "uint256",
9070
+ name: "tokenId",
9071
+ type: "uint256"
9072
+ }
9073
+ ],
9074
+ name: "approve",
9075
+ outputs: [
9076
+ ],
9077
+ stateMutability: "nonpayable",
9078
+ type: "function"
9079
+ },
9080
+ {
9081
+ inputs: [
9082
+ {
9083
+ internalType: "address",
9084
+ name: "owner",
9085
+ type: "address"
9086
+ }
9087
+ ],
9088
+ name: "balanceOf",
9089
+ outputs: [
9090
+ {
9091
+ internalType: "uint256",
9092
+ name: "",
9093
+ type: "uint256"
9094
+ }
9095
+ ],
9096
+ stateMutability: "view",
9097
+ type: "function"
9098
+ },
9099
+ {
9100
+ inputs: [
9101
+ {
9102
+ internalType: "uint256",
9103
+ name: "tokenId",
9104
+ type: "uint256"
9105
+ }
9106
+ ],
9107
+ name: "burn",
9108
+ outputs: [
9109
+ ],
9110
+ stateMutability: "payable",
9111
+ type: "function"
9112
+ },
9113
+ {
9114
+ inputs: [
9115
+ {
9116
+ components: [
9117
+ {
9118
+ internalType: "uint256",
9119
+ name: "tokenId",
9120
+ type: "uint256"
9121
+ },
9122
+ {
9123
+ internalType: "address",
9124
+ name: "recipient",
9125
+ type: "address"
9126
+ },
9127
+ {
9128
+ internalType: "uint128",
9129
+ name: "amount0Max",
9130
+ type: "uint128"
9131
+ },
9132
+ {
9133
+ internalType: "uint128",
9134
+ name: "amount1Max",
9135
+ type: "uint128"
9136
+ }
9137
+ ],
9138
+ internalType: "struct INonfungiblePositionManager.CollectParams",
9139
+ name: "params",
9140
+ type: "tuple"
9141
+ }
9142
+ ],
9143
+ name: "collect",
9144
+ outputs: [
9145
+ {
9146
+ internalType: "uint256",
9147
+ name: "amount0",
9148
+ type: "uint256"
9149
+ },
9150
+ {
9151
+ internalType: "uint256",
9152
+ name: "amount1",
9153
+ type: "uint256"
9154
+ }
9155
+ ],
9156
+ stateMutability: "payable",
9157
+ type: "function"
9158
+ },
9159
+ {
9160
+ inputs: [
9161
+ {
9162
+ internalType: "address",
9163
+ name: "token0",
9164
+ type: "address"
9165
+ },
9166
+ {
9167
+ internalType: "address",
9168
+ name: "token1",
9169
+ type: "address"
9170
+ },
9171
+ {
9172
+ internalType: "int24",
9173
+ name: "tickSpacing",
9174
+ type: "int24"
9175
+ },
9176
+ {
9177
+ internalType: "uint160",
9178
+ name: "sqrtPriceX96",
9179
+ type: "uint160"
9180
+ }
9181
+ ],
9182
+ name: "createAndInitializePoolIfNecessary",
9183
+ outputs: [
9184
+ {
9185
+ internalType: "address",
9186
+ name: "pool",
9187
+ type: "address"
9188
+ }
9189
+ ],
9190
+ stateMutability: "payable",
9191
+ type: "function"
9192
+ },
9193
+ {
9194
+ inputs: [
9195
+ {
9196
+ components: [
9197
+ {
9198
+ internalType: "uint256",
9199
+ name: "tokenId",
9200
+ type: "uint256"
9201
+ },
9202
+ {
9203
+ internalType: "uint128",
9204
+ name: "liquidity",
9205
+ type: "uint128"
9206
+ },
9207
+ {
9208
+ internalType: "uint256",
9209
+ name: "amount0Min",
9210
+ type: "uint256"
9211
+ },
9212
+ {
9213
+ internalType: "uint256",
9214
+ name: "amount1Min",
9215
+ type: "uint256"
9216
+ },
9217
+ {
9218
+ internalType: "uint256",
9219
+ name: "deadline",
9220
+ type: "uint256"
9221
+ }
9222
+ ],
9223
+ internalType: "struct INonfungiblePositionManager.DecreaseLiquidityParams",
9224
+ name: "params",
9225
+ type: "tuple"
9226
+ }
9227
+ ],
9228
+ name: "decreaseLiquidity",
9229
+ outputs: [
9230
+ {
9231
+ internalType: "uint256",
9232
+ name: "amount0",
9233
+ type: "uint256"
9234
+ },
9235
+ {
9236
+ internalType: "uint256",
9237
+ name: "amount1",
9238
+ type: "uint256"
9239
+ }
9240
+ ],
9241
+ stateMutability: "payable",
9242
+ type: "function"
9243
+ },
9244
+ {
9245
+ inputs: [
9246
+ ],
9247
+ name: "deployer",
9248
+ outputs: [
9249
+ {
9250
+ internalType: "address",
9251
+ name: "",
9252
+ type: "address"
9253
+ }
9254
+ ],
9255
+ stateMutability: "view",
9256
+ type: "function"
9257
+ },
9258
+ {
9259
+ inputs: [
9260
+ {
9261
+ internalType: "uint256",
9262
+ name: "tokenId",
9263
+ type: "uint256"
9264
+ }
9265
+ ],
9266
+ name: "getApproved",
9267
+ outputs: [
9268
+ {
9269
+ internalType: "address",
9270
+ name: "",
9271
+ type: "address"
9272
+ }
9273
+ ],
9274
+ stateMutability: "view",
9275
+ type: "function"
9276
+ },
9277
+ {
9278
+ inputs: [
9279
+ {
9280
+ internalType: "uint256",
9281
+ name: "tokenId",
9282
+ type: "uint256"
9283
+ },
9284
+ {
9285
+ internalType: "address[]",
9286
+ name: "tokens",
9287
+ type: "address[]"
9288
+ }
9289
+ ],
9290
+ name: "getReward",
9291
+ outputs: [
9292
+ ],
9293
+ stateMutability: "nonpayable",
9294
+ type: "function"
9295
+ },
9296
+ {
9297
+ inputs: [
9298
+ {
9299
+ components: [
9300
+ {
9301
+ internalType: "uint256",
9302
+ name: "tokenId",
9303
+ type: "uint256"
9304
+ },
9305
+ {
9306
+ internalType: "uint256",
9307
+ name: "amount0Desired",
9308
+ type: "uint256"
9309
+ },
9310
+ {
9311
+ internalType: "uint256",
9312
+ name: "amount1Desired",
9313
+ type: "uint256"
9314
+ },
9315
+ {
9316
+ internalType: "uint256",
9317
+ name: "amount0Min",
9318
+ type: "uint256"
9319
+ },
9320
+ {
9321
+ internalType: "uint256",
9322
+ name: "amount1Min",
9323
+ type: "uint256"
9324
+ },
9325
+ {
9326
+ internalType: "uint256",
9327
+ name: "deadline",
9328
+ type: "uint256"
9329
+ }
9330
+ ],
9331
+ internalType: "struct INonfungiblePositionManager.IncreaseLiquidityParams",
9332
+ name: "params",
9333
+ type: "tuple"
9334
+ }
9335
+ ],
9336
+ name: "increaseLiquidity",
9337
+ outputs: [
9338
+ {
9339
+ internalType: "uint128",
9340
+ name: "liquidity",
9341
+ type: "uint128"
9342
+ },
9343
+ {
9344
+ internalType: "uint256",
9345
+ name: "amount0",
9346
+ type: "uint256"
9347
+ },
9348
+ {
9349
+ internalType: "uint256",
9350
+ name: "amount1",
9351
+ type: "uint256"
9352
+ }
9353
+ ],
9354
+ stateMutability: "payable",
9355
+ type: "function"
9356
+ },
9357
+ {
9358
+ inputs: [
9359
+ {
9360
+ internalType: "address",
9361
+ name: "owner",
9362
+ type: "address"
9363
+ },
9364
+ {
9365
+ internalType: "address",
9366
+ name: "operator",
9367
+ type: "address"
9368
+ }
9369
+ ],
9370
+ name: "isApprovedForAll",
9371
+ outputs: [
9372
+ {
9373
+ internalType: "bool",
9374
+ name: "",
9375
+ type: "bool"
9376
+ }
9377
+ ],
9378
+ stateMutability: "view",
9379
+ type: "function"
9380
+ },
9381
+ {
9382
+ inputs: [
9383
+ {
9384
+ components: [
9385
+ {
9386
+ internalType: "address",
9387
+ name: "token0",
9388
+ type: "address"
9389
+ },
9390
+ {
9391
+ internalType: "address",
9392
+ name: "token1",
9393
+ type: "address"
9394
+ },
9395
+ {
9396
+ internalType: "int24",
9397
+ name: "tickSpacing",
9398
+ type: "int24"
9399
+ },
9400
+ {
9401
+ internalType: "int24",
9402
+ name: "tickLower",
9403
+ type: "int24"
9404
+ },
9405
+ {
9406
+ internalType: "int24",
9407
+ name: "tickUpper",
9408
+ type: "int24"
9409
+ },
9410
+ {
9411
+ internalType: "uint256",
9412
+ name: "amount0Desired",
9413
+ type: "uint256"
9414
+ },
9415
+ {
9416
+ internalType: "uint256",
9417
+ name: "amount1Desired",
9418
+ type: "uint256"
9419
+ },
9420
+ {
9421
+ internalType: "uint256",
9422
+ name: "amount0Min",
9423
+ type: "uint256"
9424
+ },
9425
+ {
9426
+ internalType: "uint256",
9427
+ name: "amount1Min",
9428
+ type: "uint256"
9429
+ },
9430
+ {
9431
+ internalType: "address",
9432
+ name: "recipient",
9433
+ type: "address"
9434
+ },
9435
+ {
9436
+ internalType: "uint256",
9437
+ name: "deadline",
9438
+ type: "uint256"
9439
+ }
9440
+ ],
9441
+ internalType: "struct INonfungiblePositionManager.MintParams",
9442
+ name: "params",
9443
+ type: "tuple"
9444
+ }
9445
+ ],
9446
+ name: "mint",
9447
+ outputs: [
9448
+ {
9449
+ internalType: "uint256",
9450
+ name: "tokenId",
9451
+ type: "uint256"
9452
+ },
9453
+ {
9454
+ internalType: "uint128",
9455
+ name: "liquidity",
9456
+ type: "uint128"
9457
+ },
9458
+ {
9459
+ internalType: "uint256",
9460
+ name: "amount0",
9461
+ type: "uint256"
9462
+ },
9463
+ {
9464
+ internalType: "uint256",
9465
+ name: "amount1",
9466
+ type: "uint256"
9467
+ }
9468
+ ],
9469
+ stateMutability: "payable",
9470
+ type: "function"
9471
+ },
9472
+ {
9473
+ inputs: [
9474
+ {
9475
+ internalType: "bytes[]",
9476
+ name: "data",
9477
+ type: "bytes[]"
9478
+ }
9479
+ ],
9480
+ name: "multicall",
9481
+ outputs: [
9482
+ {
9483
+ internalType: "bytes[]",
9484
+ name: "results",
9485
+ type: "bytes[]"
9486
+ }
9487
+ ],
9488
+ stateMutability: "payable",
9489
+ type: "function"
9490
+ },
9491
+ {
9492
+ inputs: [
9493
+ ],
9494
+ name: "name",
9495
+ outputs: [
9496
+ {
9497
+ internalType: "string",
9498
+ name: "",
9499
+ type: "string"
9500
+ }
9501
+ ],
9502
+ stateMutability: "view",
9503
+ type: "function"
9504
+ },
9505
+ {
9506
+ inputs: [
9507
+ {
9508
+ internalType: "uint256",
9509
+ name: "tokenId",
9510
+ type: "uint256"
9511
+ }
9512
+ ],
9513
+ name: "ownerOf",
9514
+ outputs: [
9515
+ {
9516
+ internalType: "address",
9517
+ name: "",
9518
+ type: "address"
9519
+ }
9520
+ ],
9521
+ stateMutability: "view",
9522
+ type: "function"
9523
+ },
9524
+ {
9525
+ inputs: [
9526
+ {
9527
+ internalType: "uint256",
9528
+ name: "tokenId",
9529
+ type: "uint256"
9530
+ }
9531
+ ],
9532
+ name: "positions",
9533
+ outputs: [
9534
+ {
9535
+ internalType: "address",
9536
+ name: "token0",
9537
+ type: "address"
9538
+ },
9539
+ {
9540
+ internalType: "address",
9541
+ name: "token1",
9542
+ type: "address"
9543
+ },
9544
+ {
9545
+ internalType: "int24",
9546
+ name: "tickSpacing",
9547
+ type: "int24"
9548
+ },
9549
+ {
9550
+ internalType: "int24",
9551
+ name: "tickLower",
9552
+ type: "int24"
9553
+ },
9554
+ {
9555
+ internalType: "int24",
9556
+ name: "tickUpper",
9557
+ type: "int24"
9558
+ },
9559
+ {
9560
+ internalType: "uint128",
9561
+ name: "liquidity",
9562
+ type: "uint128"
9563
+ },
9564
+ {
9565
+ internalType: "uint256",
9566
+ name: "feeGrowthInside0LastX128",
9567
+ type: "uint256"
9568
+ },
9569
+ {
9570
+ internalType: "uint256",
9571
+ name: "feeGrowthInside1LastX128",
9572
+ type: "uint256"
9573
+ },
9574
+ {
9575
+ internalType: "uint128",
9576
+ name: "tokensOwed0",
9577
+ type: "uint128"
9578
+ },
9579
+ {
9580
+ internalType: "uint128",
9581
+ name: "tokensOwed1",
9582
+ type: "uint128"
9583
+ }
9584
+ ],
9585
+ stateMutability: "view",
9586
+ type: "function"
9587
+ },
9588
+ {
9589
+ inputs: [
9590
+ ],
9591
+ name: "refundETH",
9592
+ outputs: [
9593
+ ],
9594
+ stateMutability: "payable",
9595
+ type: "function"
9596
+ },
9597
+ {
9598
+ inputs: [
9599
+ {
9600
+ internalType: "address",
9601
+ name: "from",
9602
+ type: "address"
9603
+ },
9604
+ {
9605
+ internalType: "address",
9606
+ name: "to",
9607
+ type: "address"
9608
+ },
9609
+ {
9610
+ internalType: "uint256",
9611
+ name: "tokenId",
9612
+ type: "uint256"
9613
+ }
9614
+ ],
9615
+ name: "safeTransferFrom",
9616
+ outputs: [
9617
+ ],
9618
+ stateMutability: "nonpayable",
9619
+ type: "function"
9620
+ },
9621
+ {
9622
+ inputs: [
9623
+ {
9624
+ internalType: "address",
9625
+ name: "from",
9626
+ type: "address"
9627
+ },
9628
+ {
9629
+ internalType: "address",
9630
+ name: "to",
9631
+ type: "address"
9632
+ },
9633
+ {
9634
+ internalType: "uint256",
9635
+ name: "tokenId",
9636
+ type: "uint256"
9637
+ },
9638
+ {
9639
+ internalType: "bytes",
9640
+ name: "data",
9641
+ type: "bytes"
9642
+ }
9643
+ ],
9644
+ name: "safeTransferFrom",
9645
+ outputs: [
9646
+ ],
9647
+ stateMutability: "nonpayable",
9648
+ type: "function"
9649
+ },
9650
+ {
9651
+ inputs: [
9652
+ {
9653
+ internalType: "address",
9654
+ name: "operator",
9655
+ type: "address"
9656
+ },
9657
+ {
9658
+ internalType: "bool",
9659
+ name: "approved",
9660
+ type: "bool"
9661
+ }
9662
+ ],
9663
+ name: "setApprovalForAll",
9664
+ outputs: [
9665
+ ],
9666
+ stateMutability: "nonpayable",
9667
+ type: "function"
9668
+ },
9669
+ {
9670
+ inputs: [
9671
+ {
9672
+ internalType: "address",
9673
+ name: "_voter",
9674
+ type: "address"
9675
+ }
9676
+ ],
9677
+ name: "setVoter",
9678
+ outputs: [
9679
+ ],
9680
+ stateMutability: "nonpayable",
9681
+ type: "function"
9682
+ },
9683
+ {
9684
+ inputs: [
9685
+ {
9686
+ internalType: "bytes4",
9687
+ name: "interfaceId",
9688
+ type: "bytes4"
9689
+ }
9690
+ ],
9691
+ name: "supportsInterface",
9692
+ outputs: [
9693
+ {
9694
+ internalType: "bool",
9695
+ name: "",
9696
+ type: "bool"
9697
+ }
9698
+ ],
9699
+ stateMutability: "view",
9700
+ type: "function"
9701
+ },
9702
+ {
9703
+ inputs: [
9704
+ {
9705
+ internalType: "address",
9706
+ name: "token",
9707
+ type: "address"
9708
+ },
9709
+ {
9710
+ internalType: "uint256",
9711
+ name: "amountMinimum",
9712
+ type: "uint256"
9713
+ },
9714
+ {
9715
+ internalType: "address",
9716
+ name: "recipient",
9717
+ type: "address"
9718
+ }
9719
+ ],
9720
+ name: "sweepToken",
9721
+ outputs: [
9722
+ ],
9723
+ stateMutability: "payable",
9724
+ type: "function"
9725
+ },
9726
+ {
9727
+ inputs: [
9728
+ ],
9729
+ name: "symbol",
9730
+ outputs: [
9731
+ {
9732
+ internalType: "string",
9733
+ name: "",
9734
+ type: "string"
9735
+ }
9736
+ ],
9737
+ stateMutability: "view",
9738
+ type: "function"
9739
+ },
9740
+ {
9741
+ inputs: [
9742
+ {
9743
+ internalType: "uint256",
9744
+ name: "index",
9745
+ type: "uint256"
9746
+ }
9747
+ ],
9748
+ name: "tokenByIndex",
9749
+ outputs: [
9750
+ {
9751
+ internalType: "uint256",
9752
+ name: "",
9753
+ type: "uint256"
9754
+ }
9755
+ ],
9756
+ stateMutability: "view",
9757
+ type: "function"
9758
+ },
9759
+ {
9760
+ inputs: [
9761
+ {
9762
+ internalType: "address",
9763
+ name: "owner",
9764
+ type: "address"
9765
+ },
9766
+ {
9767
+ internalType: "uint256",
9768
+ name: "index",
9769
+ type: "uint256"
9770
+ }
9771
+ ],
9772
+ name: "tokenOfOwnerByIndex",
9773
+ outputs: [
9774
+ {
9775
+ internalType: "uint256",
9776
+ name: "",
9777
+ type: "uint256"
9778
+ }
9779
+ ],
9780
+ stateMutability: "view",
9781
+ type: "function"
9782
+ },
9783
+ {
9784
+ inputs: [
9785
+ {
9786
+ internalType: "uint256",
9787
+ name: "tokenId",
9788
+ type: "uint256"
9789
+ }
9790
+ ],
9791
+ name: "tokenURI",
9792
+ outputs: [
9793
+ {
9794
+ internalType: "string",
9795
+ name: "",
9796
+ type: "string"
9797
+ }
9798
+ ],
9799
+ stateMutability: "view",
9800
+ type: "function"
9801
+ },
9802
+ {
9803
+ inputs: [
9804
+ ],
9805
+ name: "totalSupply",
9806
+ outputs: [
9807
+ {
9808
+ internalType: "uint256",
9809
+ name: "",
9810
+ type: "uint256"
9811
+ }
9812
+ ],
9813
+ stateMutability: "view",
9814
+ type: "function"
9815
+ },
9816
+ {
9817
+ inputs: [
9818
+ {
9819
+ internalType: "address",
9820
+ name: "from",
9821
+ type: "address"
9822
+ },
9823
+ {
9824
+ internalType: "address",
9825
+ name: "to",
9826
+ type: "address"
9827
+ },
9828
+ {
9829
+ internalType: "uint256",
9830
+ name: "tokenId",
9831
+ type: "uint256"
9832
+ }
9833
+ ],
9834
+ name: "transferFrom",
9835
+ outputs: [
9836
+ ],
9837
+ stateMutability: "nonpayable",
9838
+ type: "function"
9839
+ },
9840
+ {
9841
+ inputs: [
9842
+ {
9843
+ internalType: "uint256",
9844
+ name: "amount0Owed",
9845
+ type: "uint256"
9846
+ },
9847
+ {
9848
+ internalType: "uint256",
9849
+ name: "amount1Owed",
9850
+ type: "uint256"
9851
+ },
9852
+ {
9853
+ internalType: "bytes",
9854
+ name: "data",
9855
+ type: "bytes"
9856
+ }
9857
+ ],
9858
+ name: "uniswapV3MintCallback",
9859
+ outputs: [
9860
+ ],
9861
+ stateMutability: "nonpayable",
9862
+ type: "function"
9863
+ },
9864
+ {
9865
+ inputs: [
9866
+ {
9867
+ internalType: "uint256",
9868
+ name: "amountMinimum",
9869
+ type: "uint256"
9870
+ },
9871
+ {
9872
+ internalType: "address",
9873
+ name: "recipient",
9874
+ type: "address"
9875
+ }
9876
+ ],
9877
+ name: "unwrapWETH9",
9878
+ outputs: [
9879
+ ],
9880
+ stateMutability: "payable",
9881
+ type: "function"
9882
+ },
9883
+ {
9884
+ stateMutability: "payable",
9885
+ type: "receive"
9886
+ }
9887
+ ];
9888
+
8685
9889
  var IRamsesNonfungiblePositionManager = [
8686
9890
  {
8687
9891
  anonymous: false,
@@ -9519,9 +10723,13 @@ function _getUniswapV3MintTxData() {
9519
10723
  mintParams.push(0);
9520
10724
  }
9521
10725
 
10726
+ if (dapp === Dapp.SHADOWCL) {
10727
+ iNonfungiblePositionManager = new ethers.utils.Interface(IShadowNonfungiblePositionManager);
10728
+ }
10729
+
9522
10730
  return _context.abrupt("return", iNonfungiblePositionManager.encodeFunctionData(Transaction.MINT, [mintParams]));
9523
10731
 
9524
- case 29:
10732
+ case 30:
9525
10733
  case "end":
9526
10734
  return _context.stop();
9527
10735
  }
@@ -9543,7 +10751,7 @@ function _getUniswapV3Liquidity() {
9543
10751
  switch (_context2.prev = _context2.next) {
9544
10752
  case 0:
9545
10753
  iNonfungiblePositionManager = new ethers.Contract( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
9546
- nonfungiblePositionManagerAddress[pool.network][dapp], INonfungiblePositionManager.abi, pool.signer);
10754
+ nonfungiblePositionManagerAddress[pool.network][dapp], dapp === Dapp.SHADOWCL ? IShadowNonfungiblePositionManager : INonfungiblePositionManager.abi, pool.signer);
9547
10755
  _context2.next = 3;
9548
10756
  return iNonfungiblePositionManager.positions(tokenId);
9549
10757
 
@@ -9573,7 +10781,7 @@ function _getIncreaseLiquidityTxData() {
9573
10781
  while (1) {
9574
10782
  switch (_context3.prev = _context3.next) {
9575
10783
  case 0:
9576
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
10784
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL || dapp === Dapp.SHADOWCL)) {
9577
10785
  _context3.next = 15;
9578
10786
  break;
9579
10787
  }
@@ -9638,7 +10846,7 @@ function _getDecreaseLiquidityTxData() {
9638
10846
  amount = 100;
9639
10847
  }
9640
10848
 
9641
- if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
10849
+ if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL || dapp === Dapp.SHADOWCL)) {
9642
10850
  _context4.next = 23;
9643
10851
  break;
9644
10852
  }
@@ -10487,7 +11695,7 @@ var _networkPortMap;
10487
11695
 
10488
11696
  require("dotenv").config();
10489
11697
 
10490
- var networkPortMap = (_networkPortMap = {}, _networkPortMap[Network.POLYGON] = 8542, _networkPortMap[Network.OPTIMISM] = 8544, _networkPortMap[Network.ARBITRUM] = 8540, _networkPortMap[Network.BASE] = 8546, _networkPortMap);
11698
+ var networkPortMap = (_networkPortMap = {}, _networkPortMap[Network.POLYGON] = 8542, _networkPortMap[Network.OPTIMISM] = 8544, _networkPortMap[Network.ARBITRUM] = 8540, _networkPortMap[Network.BASE] = 8546, _networkPortMap[Network.SONIC] = 8547, _networkPortMap);
10491
11699
 
10492
11700
  var _TEST_POOL, _CONTRACT_ADDRESS, _USDC_BALANCEOF_SLOT, _WETH_BALANCEOF_SLOT;
10493
11701
  var TEST_POOL = (_TEST_POOL = {}, _TEST_POOL[Network.POLYGON] = "0x699fd4d6eadb216704c7e355cfa0a12f51813163", _TEST_POOL[Network.OPTIMISM] = "0x12573bfdf764ab9d52aca20e2827497a66829716", _TEST_POOL[Network.ARBITRUM] = "0x0b5f6591c8eb23e5a68102d3d39ebbb464ee5c14", _TEST_POOL[Network.BASE] = "0x4842b42F68524383F609aa46eAfc18c1459cE3cD", _TEST_POOL);
@@ -10571,9 +11779,27 @@ var CONTRACT_ADDRESS = (_CONTRACT_ADDRESS = {}, _CONTRACT_ADDRESS[Network.POLYGO
10571
11779
  VELO: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
10572
11780
  COMPOUNDV3_WETH: "",
10573
11781
  TOROS: ""
11782
+ }, _CONTRACT_ADDRESS[Network.SONIC] = {
11783
+ USDC: "0x29219dd400f2bf60e5a23d13be72b486d4038894",
11784
+ USDT: "",
11785
+ SUSD: "",
11786
+ WETH: "0x50c42deacd8fc9773493ed674b675be577f2634b",
11787
+ WBTC: "",
11788
+ SWETH: "",
11789
+ uniswapV3: {
11790
+ nonfungiblePositionManager: ""
11791
+ },
11792
+ //
11793
+ ARRAKIS_USDC_WETH_GAUGE: "",
11794
+ ARRAKIS_USDC_WETH_LP: "",
11795
+ WMATIC: "",
11796
+ VELODROME_CL_USDC_WETH_GAUGE: "",
11797
+ VELO: "",
11798
+ COMPOUNDV3_WETH: "",
11799
+ TOROS: ""
10574
11800
  }, _CONTRACT_ADDRESS);
10575
- var USDC_BALANCEOF_SLOT = (_USDC_BALANCEOF_SLOT = {}, _USDC_BALANCEOF_SLOT[Network.OPTIMISM] = 9, _USDC_BALANCEOF_SLOT[Network.ARBITRUM] = 9, _USDC_BALANCEOF_SLOT[Network.POLYGON] = 0, _USDC_BALANCEOF_SLOT[Network.BASE] = 9, _USDC_BALANCEOF_SLOT);
10576
- var WETH_BALANCEOF_SLOT = (_WETH_BALANCEOF_SLOT = {}, _WETH_BALANCEOF_SLOT[Network.OPTIMISM] = 3, _WETH_BALANCEOF_SLOT[Network.ARBITRUM] = 51, _WETH_BALANCEOF_SLOT[Network.POLYGON] = 0, _WETH_BALANCEOF_SLOT[Network.BASE] = 0, _WETH_BALANCEOF_SLOT);
11801
+ var USDC_BALANCEOF_SLOT = (_USDC_BALANCEOF_SLOT = {}, _USDC_BALANCEOF_SLOT[Network.OPTIMISM] = 9, _USDC_BALANCEOF_SLOT[Network.ARBITRUM] = 9, _USDC_BALANCEOF_SLOT[Network.POLYGON] = 0, _USDC_BALANCEOF_SLOT[Network.BASE] = 9, _USDC_BALANCEOF_SLOT[Network.SONIC] = 9, _USDC_BALANCEOF_SLOT);
11802
+ var WETH_BALANCEOF_SLOT = (_WETH_BALANCEOF_SLOT = {}, _WETH_BALANCEOF_SLOT[Network.OPTIMISM] = 3, _WETH_BALANCEOF_SLOT[Network.ARBITRUM] = 51, _WETH_BALANCEOF_SLOT[Network.POLYGON] = 0, _WETH_BALANCEOF_SLOT[Network.BASE] = 0, _WETH_BALANCEOF_SLOT[Network.SONIC] = 0, _WETH_BALANCEOF_SLOT);
10577
11803
 
10578
11804
  var wait = function wait(seconds) {
10579
11805
  return new Promise(function (resolve) {
@@ -20828,94 +22054,6 @@ function _getFuturesCancelOrderTxData() {
20828
22054
  return _getFuturesCancelOrderTxData.apply(this, arguments);
20829
22055
  }
20830
22056
 
20831
- // see https://stackoverflow.com/a/41102306
20832
- var CAN_SET_PROTOTYPE = ("setPrototypeOf" in Object);
20833
- var ApiError = /*#__PURE__*/function (_Error) {
20834
- _inheritsLoose(ApiError, _Error);
20835
-
20836
- function ApiError(message) {
20837
- var _this;
20838
-
20839
- _this = _Error.call(this, message != null ? message : "Api request failed") || this;
20840
- _this.name = _this.constructor.name;
20841
- if (CAN_SET_PROTOTYPE) Object.setPrototypeOf(_assertThisInitialized(_this), (this instanceof ApiError ? this.constructor : void 0).prototype);
20842
- return _this;
20843
- }
20844
-
20845
- return ApiError;
20846
- }( /*#__PURE__*/_wrapNativeSuper(Error));
20847
-
20848
- // in 0x, e.g. 0.03 for 3% slippage allowed
20849
- // 1inch slippage 0.5% represented by 0.5
20850
- // 0x slippage 0.5% represented by 0.005
20851
-
20852
- var getZeroExSlippage = function getZeroExSlippage(slippage) {
20853
- return Number(slippage) / 100;
20854
- };
20855
-
20856
- var getZeroExTradeTxData = /*#__PURE__*/function () {
20857
- var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(network, assetFrom, assetTo, amountIn, slippage, takerAddress) {
20858
- var slippagePercentage, params, response;
20859
- return runtime_1.wrap(function _callee$(_context) {
20860
- while (1) {
20861
- switch (_context.prev = _context.next) {
20862
- case 0:
20863
- if (slippage === void 0) {
20864
- slippage = 0.5;
20865
- }
20866
-
20867
- if (process.env.ZEROEX_API_KEY) {
20868
- _context.next = 3;
20869
- break;
20870
- }
20871
-
20872
- throw new Error("ZEROEX_API_KEY not configured in .env file");
20873
-
20874
- case 3:
20875
- _context.prev = 3;
20876
- slippagePercentage = getZeroExSlippage(slippage);
20877
- params = {
20878
- buyToken: assetTo,
20879
- sellToken: assetFrom,
20880
- sellAmount: amountIn.toString(),
20881
- // necessary to skip quote validation is that in which the takerAddress refers to a smart contract
20882
- skipValidation: true,
20883
- // Used to enable RFQ-T liquidity
20884
- intentOnFilling: true,
20885
- takerAddress: takerAddress,
20886
- slippagePercentage: slippagePercentage // excludedSourcesParam
20887
-
20888
- };
20889
- _context.next = 8;
20890
- return axios.get("https://" + network + ".api.0x.org/swap/v1/quote", {
20891
- params: params,
20892
- headers: {
20893
- "0x-api-key": process.env.ZEROEX_API_KEY
20894
- }
20895
- });
20896
-
20897
- case 8:
20898
- response = _context.sent;
20899
- return _context.abrupt("return", response.data.data);
20900
-
20901
- case 12:
20902
- _context.prev = 12;
20903
- _context.t0 = _context["catch"](3);
20904
- throw new ApiError("Swap api request of 0x failed");
20905
-
20906
- case 15:
20907
- case "end":
20908
- return _context.stop();
20909
- }
20910
- }
20911
- }, _callee, null, [[3, 12]]);
20912
- }));
20913
-
20914
- return function getZeroExTradeTxData(_x, _x2, _x3, _x4, _x5, _x6) {
20915
- return _ref.apply(this, arguments);
20916
- };
20917
- }();
20918
-
20919
22057
  var abi$q = [
20920
22058
  {
20921
22059
  inputs: [
@@ -25021,69 +26159,61 @@ var Pool = /*#__PURE__*/function () {
25021
26159
  }
25022
26160
 
25023
26161
  _context10.t0 = dapp;
25024
- _context10.next = _context10.t0 === Dapp.ZEROEX ? 6 : _context10.t0 === Dapp.ONEINCH ? 10 : _context10.t0 === Dapp.BALANCER ? 15 : _context10.t0 === Dapp.SYNTHETIX ? 19 : _context10.t0 === Dapp.TOROS ? 26 : _context10.t0 === Dapp.ODOS ? 30 : 34;
26162
+ _context10.next = _context10.t0 === Dapp.ONEINCH ? 6 : _context10.t0 === Dapp.BALANCER ? 11 : _context10.t0 === Dapp.SYNTHETIX ? 15 : _context10.t0 === Dapp.TOROS ? 22 : _context10.t0 === Dapp.ODOS ? 26 : 30;
25025
26163
  break;
25026
26164
 
25027
26165
  case 6:
25028
26166
  _context10.next = 8;
25029
- return getZeroExTradeTxData(this.network, assetFrom, assetTo, amountIn, slippage, this.address);
25030
-
25031
- case 8:
25032
- swapTxData = _context10.sent;
25033
- return _context10.abrupt("break", 49);
25034
-
25035
- case 10:
25036
- _context10.next = 12;
25037
26167
  return getOneInchSwapTxData(this, assetFrom, assetTo, amountIn, slippage);
25038
26168
 
25039
- case 12:
26169
+ case 8:
25040
26170
  _yield$getOneInchSwap = _context10.sent;
25041
26171
  swapTxData = _yield$getOneInchSwap.swapTxData;
25042
- return _context10.abrupt("break", 49);
26172
+ return _context10.abrupt("break", 45);
25043
26173
 
25044
- case 15:
25045
- _context10.next = 17;
26174
+ case 11:
26175
+ _context10.next = 13;
25046
26176
  return this.utils.getBalancerSwapTx(this, assetFrom, assetTo, amountIn, slippage);
25047
26177
 
25048
- case 17:
26178
+ case 13:
25049
26179
  swapTxData = _context10.sent;
25050
- return _context10.abrupt("break", 49);
26180
+ return _context10.abrupt("break", 45);
25051
26181
 
25052
- case 19:
26182
+ case 15:
25053
26183
  iSynthetix = new ethers.utils.Interface(ISynthetix.abi);
25054
26184
  assets = [assetFrom, assetTo].map(function (asset) {
25055
26185
  return ethers.utils.formatBytes32String(asset);
25056
26186
  });
25057
- _context10.next = 23;
26187
+ _context10.next = 19;
25058
26188
  return this.factory.owner();
25059
26189
 
25060
- case 23:
26190
+ case 19:
25061
26191
  daoAddress = _context10.sent;
25062
26192
  swapTxData = iSynthetix.encodeFunctionData(Transaction.SWAP_SYNTHS, [assets[0], amountIn, assets[1], daoAddress, SYNTHETIX_TRACKING_CODE]);
25063
- return _context10.abrupt("break", 49);
26193
+ return _context10.abrupt("break", 45);
25064
26194
 
25065
- case 26:
25066
- _context10.next = 28;
26195
+ case 22:
26196
+ _context10.next = 24;
25067
26197
  return getEasySwapperTxData(this, assetFrom, assetTo, ethers.BigNumber.from(amountIn), slippage);
25068
26198
 
25069
- case 28:
26199
+ case 24:
25070
26200
  swapTxData = _context10.sent;
25071
- return _context10.abrupt("break", 49);
26201
+ return _context10.abrupt("break", 45);
25072
26202
 
25073
- case 30:
25074
- _context10.next = 32;
26203
+ case 26:
26204
+ _context10.next = 28;
25075
26205
  return getOdosSwapTxData(this, assetFrom, assetTo, amountIn, slippage);
25076
26206
 
25077
- case 32:
26207
+ case 28:
25078
26208
  swapTxData = _context10.sent;
25079
- return _context10.abrupt("break", 49);
26209
+ return _context10.abrupt("break", 45);
25080
26210
 
25081
- case 34:
26211
+ case 30:
25082
26212
  iUniswapV2Router = new ethers.utils.Interface(IUniswapV2Router.abi);
25083
- _context10.next = 37;
26213
+ _context10.next = 33;
25084
26214
  return this.utils.getMinAmountOut(dapp, assetFrom, assetTo, amountIn, slippage);
25085
26215
 
25086
- case 37:
26216
+ case 33:
25087
26217
  minAmountOut = _context10.sent;
25088
26218
  _context10.t1 = iUniswapV2Router;
25089
26219
  _context10.t2 = Transaction.SWAP;
@@ -25091,23 +26221,23 @@ var Pool = /*#__PURE__*/function () {
25091
26221
  _context10.t4 = minAmountOut;
25092
26222
  _context10.t5 = [assetFrom, assetTo];
25093
26223
  _context10.t6 = this.address;
25094
- _context10.next = 46;
26224
+ _context10.next = 42;
25095
26225
  return getDeadline(this);
25096
26226
 
25097
- case 46:
26227
+ case 42:
25098
26228
  _context10.t7 = _context10.sent;
25099
26229
  _context10.t8 = [_context10.t3, _context10.t4, _context10.t5, _context10.t6, _context10.t7];
25100
26230
  swapTxData = _context10.t1.encodeFunctionData.call(_context10.t1, _context10.t2, _context10.t8);
25101
26231
 
25102
- case 49:
25103
- _context10.next = 51;
26232
+ case 45:
26233
+ _context10.next = 47;
25104
26234
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], swapTxData, options], estimateGas);
25105
26235
 
25106
- case 51:
26236
+ case 47:
25107
26237
  tx = _context10.sent;
25108
26238
  return _context10.abrupt("return", tx);
25109
26239
 
25110
- case 53:
26240
+ case 49:
25111
26241
  case "end":
25112
26242
  return _context10.stop();
25113
26243
  }
@@ -26378,7 +27508,7 @@ var Pool = /*#__PURE__*/function () {
26378
27508
 
26379
27509
  isStaked = false;
26380
27510
  _context32.t0 = dapp;
26381
- _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;
27511
+ _context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 7 : _context32.t0 === Dapp.RAMSESCL ? 7 : _context32.t0 === Dapp.SHADOWCL ? 7 : _context32.t0 === Dapp.VELODROMECL ? 9 : _context32.t0 === Dapp.AERODROMECL ? 9 : _context32.t0 === Dapp.PANCAKECL ? 9 : _context32.t0 === Dapp.ARRAKIS ? 14 : 16;
26382
27512
  break;
26383
27513
 
26384
27514
  case 7:
@@ -26479,7 +27609,7 @@ var Pool = /*#__PURE__*/function () {
26479
27609
 
26480
27610
  isStaked = false;
26481
27611
  _context33.t0 = dapp;
26482
- _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;
27612
+ _context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.RAMSESCL ? 6 : _context33.t0 === Dapp.SHADOWCL ? 6 : _context33.t0 === Dapp.VELODROMECL ? 8 : _context33.t0 === Dapp.AERODROMECL ? 8 : _context33.t0 === Dapp.PANCAKECL ? 8 : _context33.t0 === Dapp.ARRAKIS ? 13 : 15;
26483
27613
  break;
26484
27614
 
26485
27615
  case 6:
@@ -26578,7 +27708,7 @@ var Pool = /*#__PURE__*/function () {
26578
27708
 
26579
27709
  iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
26580
27710
  _context34.t0 = dapp;
26581
- _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;
27711
+ _context34.next = _context34.t0 === Dapp.UNISWAPV3 ? 6 : _context34.t0 === Dapp.RAMSESCL ? 6 : _context34.t0 === Dapp.SHADOWCL ? 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;
26582
27712
  break;
26583
27713
 
26584
27714
  case 6:
@@ -31367,5 +32497,22 @@ var Dhedge = /*#__PURE__*/function () {
31367
32497
  return Dhedge;
31368
32498
  }();
31369
32499
 
32500
+ // see https://stackoverflow.com/a/41102306
32501
+ var CAN_SET_PROTOTYPE = ("setPrototypeOf" in Object);
32502
+ var ApiError = /*#__PURE__*/function (_Error) {
32503
+ _inheritsLoose(ApiError, _Error);
32504
+
32505
+ function ApiError(message) {
32506
+ var _this;
32507
+
32508
+ _this = _Error.call(this, message != null ? message : "Api request failed") || this;
32509
+ _this.name = _this.constructor.name;
32510
+ if (CAN_SET_PROTOTYPE) Object.setPrototypeOf(_assertThisInitialized(_this), (this instanceof ApiError ? this.constructor : void 0).prototype);
32511
+ return _this;
32512
+ }
32513
+
32514
+ return ApiError;
32515
+ }( /*#__PURE__*/_wrapNativeSuper(Error));
32516
+
31370
32517
  export { ApiError, Dapp, Dhedge, Network, Pool, Transaction };
31371
32518
  //# sourceMappingURL=v2-sdk.esm.js.map