@dhedge/v2-sdk 1.10.15 → 1.11.0
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.
- package/dist/entities/pool.d.ts +1 -1
- package/dist/services/pendle/index.d.ts +4 -0
- package/dist/services/uniswap/V3Liquidity.d.ts +1 -1
- package/dist/test/constants.d.ts +4 -4
- package/dist/test/wallet.d.ts +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/v2-sdk.cjs.development.js +388 -1254
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +388 -1254
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/abi/pendle/ActionMiscV3.json +122 -0
- package/src/config.ts +28 -20
- package/src/entities/pool.ts +58 -52
- package/src/services/pendle/index.ts +141 -0
- package/src/services/uniswap/V3Liquidity.ts +5 -16
- package/src/test/constants.ts +6 -6
- package/src/test/oneInch.test.ts +16 -4
- package/src/test/pendle.test.ts +132 -0
- package/src/test/wallet.ts +1 -1
- package/src/types.ts +2 -2
- package/src/abi/IShadowNonfungiblePositionManager.json +0 -697
package/dist/v2-sdk.esm.js
CHANGED
|
@@ -4250,7 +4250,7 @@ var Network;
|
|
|
4250
4250
|
Network["OPTIMISM"] = "optimism";
|
|
4251
4251
|
Network["ARBITRUM"] = "arbitrum";
|
|
4252
4252
|
Network["BASE"] = "base";
|
|
4253
|
-
Network["
|
|
4253
|
+
Network["ETHEREUM"] = "ethereum";
|
|
4254
4254
|
})(Network || (Network = {}));
|
|
4255
4255
|
|
|
4256
4256
|
var Dapp;
|
|
@@ -4277,7 +4277,7 @@ var Dapp;
|
|
|
4277
4277
|
Dapp["PANCAKECL"] = "pancakeCL";
|
|
4278
4278
|
Dapp["COMPOUNDV3"] = "compoundV3";
|
|
4279
4279
|
Dapp["ODOS"] = "odos";
|
|
4280
|
-
Dapp["
|
|
4280
|
+
Dapp["PENDLE"] = "pendle";
|
|
4281
4281
|
})(Dapp || (Dapp = {}));
|
|
4282
4282
|
|
|
4283
4283
|
var Transaction;
|
|
@@ -4304,19 +4304,19 @@ var Transaction;
|
|
|
4304
4304
|
Transaction["REMOVE_LIQUIDITY_UNSTAKE"] = "removeLiquidityAndUnstake";
|
|
4305
4305
|
})(Transaction || (Transaction = {}));
|
|
4306
4306
|
|
|
4307
|
-
var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _Network$
|
|
4307
|
+
var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _Network$ETHEREUM, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _Network$OPTIMISM2, _Network$ARBITRUM2, _Network$BASE2, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM3, _Network$ARBITRUM3, _Network$BASE3, _Network$ETHEREUM2, _aaveAddressProvider, _Network$POLYGON5, _Network$OPTIMISM4, _Network$ARBITRUM4, _Network$BASE4, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap, _flatMoneyContractAdd;
|
|
4308
4308
|
|
|
4309
4309
|
require("dotenv").config();
|
|
4310
4310
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
4317
|
-
var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap[Network.
|
|
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.
|
|
4319
|
-
var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress[Network.
|
|
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.ETHEREUM] = "0x96D33bCF84DdE326014248E2896F79bbb9c13D6d", _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[Dapp.PENDLE] = "0x888888888889758F76e7103c6CbF23ABbF58F946", _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[Dapp.PENDLE] = "0x888888888889758F76e7103c6CbF23ABbF58F946", _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[Dapp.PENDLE] = "0x888888888889758F76e7103c6CbF23ABbF58F946", _Network$BASE), _routerAddress[Network.ETHEREUM] = (_Network$ETHEREUM = {}, _Network$ETHEREUM[Dapp.AAVEV3] = "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2", _Network$ETHEREUM[Dapp.ODOS] = "0xCf5540fFFCdC3d510B18bFcA6d2b9987b0772559", _Network$ETHEREUM[Dapp.PENDLE] = "0x888888888889758F76e7103c6CbF23ABbF58F946", _Network$ETHEREUM[Dapp.ONEINCH] = "0x111111125421ca6dc452d289314280a0f8842a65", _Network$ETHEREUM), _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.ETHEREUM] = {}, _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.ETHEREUM] = {}, _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.ETHEREUM] = (_Network$ETHEREUM2 = {}, _Network$ETHEREUM2[Dapp.AAVEV3] = "0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e", _Network$ETHEREUM2), _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.ETHEREUM] = {}, _nonfungiblePositionM);
|
|
4317
|
+
var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[Network.POLYGON] = 137, _networkChainIdMap[Network.OPTIMISM] = 10, _networkChainIdMap[Network.ARBITRUM] = 42161, _networkChainIdMap[Network.BASE] = 8453, _networkChainIdMap[Network.ETHEREUM] = 1, _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.ETHEREUM] = "", _balancerSubgraph);
|
|
4319
|
+
var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[Network.OPTIMISM] = "", _multiCallAddress[Network.ARBITRUM] = "", _multiCallAddress[Network.BASE] = "", _multiCallAddress[Network.ETHEREUM] = "", _multiCallAddress);
|
|
4320
4320
|
var lyraNetworkMap = (_lyraNetworkMap = {}, _lyraNetworkMap[Network.OPTIMISM] = Deployment.Mainnet, _lyraNetworkMap);
|
|
4321
4321
|
var MaxUint128 = "0xffffffffffffffffffffffffffffffff";
|
|
4322
4322
|
var UNISWAPV3_QUOTER_ADDRESS = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
|
|
@@ -4333,6 +4333,12 @@ var flatMoneyContractAddresses = (_flatMoneyContractAdd = {}, _flatMoneyContract
|
|
|
4333
4333
|
FlatcoinVault: "0x86C7b9640302082B0dF78023F930d8612bFcaD3f",
|
|
4334
4334
|
COLLATERAL: "0x68f180fcCe6836688e9084f035309E29Bf0A2095",
|
|
4335
4335
|
StableModule: "0x357CB23571EF7a3d6189b7FAcFC361eA71f7CAB5"
|
|
4336
|
+
}, _flatMoneyContractAdd[Network.ARBITRUM] = {
|
|
4337
|
+
OrderExecution: "0x7e50AD6E467D9FAFC3B4BFd003247cEaA2F17e5b",
|
|
4338
|
+
DelayedOrder: "0x2326BB21B769D81E134C9b305ca156f989249fE7",
|
|
4339
|
+
FlatcoinVault: "0x29fAD9d44C550e5D8081AB35763797B39d75b858",
|
|
4340
|
+
COLLATERAL: "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f",
|
|
4341
|
+
StableModule: "0xcD3657cB0E851b6a734c4D1e7FC2640Bcd9f6B2d"
|
|
4336
4342
|
}, _flatMoneyContractAdd);
|
|
4337
4343
|
|
|
4338
4344
|
var abi$3 = [
|
|
@@ -8683,1209 +8689,6 @@ var IVeldodromePositionManager = {
|
|
|
8683
8689
|
abi: abi$d
|
|
8684
8690
|
};
|
|
8685
8691
|
|
|
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
|
-
|
|
9889
8692
|
var IRamsesNonfungiblePositionManager = [
|
|
9890
8693
|
{
|
|
9891
8694
|
anonymous: false,
|
|
@@ -10723,13 +9526,9 @@ function _getUniswapV3MintTxData() {
|
|
|
10723
9526
|
mintParams.push(0);
|
|
10724
9527
|
}
|
|
10725
9528
|
|
|
10726
|
-
if (dapp === Dapp.SHADOWCL) {
|
|
10727
|
-
iNonfungiblePositionManager = new ethers.utils.Interface(IShadowNonfungiblePositionManager);
|
|
10728
|
-
}
|
|
10729
|
-
|
|
10730
9529
|
return _context.abrupt("return", iNonfungiblePositionManager.encodeFunctionData(Transaction.MINT, [mintParams]));
|
|
10731
9530
|
|
|
10732
|
-
case
|
|
9531
|
+
case 29:
|
|
10733
9532
|
case "end":
|
|
10734
9533
|
return _context.stop();
|
|
10735
9534
|
}
|
|
@@ -10751,7 +9550,7 @@ function _getUniswapV3Liquidity() {
|
|
|
10751
9550
|
switch (_context2.prev = _context2.next) {
|
|
10752
9551
|
case 0:
|
|
10753
9552
|
iNonfungiblePositionManager = new ethers.Contract( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10754
|
-
nonfungiblePositionManagerAddress[pool.network][dapp],
|
|
9553
|
+
nonfungiblePositionManagerAddress[pool.network][dapp], INonfungiblePositionManager.abi, pool.signer);
|
|
10755
9554
|
_context2.next = 3;
|
|
10756
9555
|
return iNonfungiblePositionManager.positions(tokenId);
|
|
10757
9556
|
|
|
@@ -10781,7 +9580,7 @@ function _getIncreaseLiquidityTxData() {
|
|
|
10781
9580
|
while (1) {
|
|
10782
9581
|
switch (_context3.prev = _context3.next) {
|
|
10783
9582
|
case 0:
|
|
10784
|
-
if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL
|
|
9583
|
+
if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
|
|
10785
9584
|
_context3.next = 15;
|
|
10786
9585
|
break;
|
|
10787
9586
|
}
|
|
@@ -10846,7 +9645,7 @@ function _getDecreaseLiquidityTxData() {
|
|
|
10846
9645
|
amount = 100;
|
|
10847
9646
|
}
|
|
10848
9647
|
|
|
10849
|
-
if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL
|
|
9648
|
+
if (!(dapp === Dapp.UNISWAPV3 || dapp === Dapp.VELODROMECL || dapp === Dapp.AERODROMECL || dapp === Dapp.RAMSESCL || dapp === Dapp.PANCAKECL)) {
|
|
10850
9649
|
_context4.next = 23;
|
|
10851
9650
|
break;
|
|
10852
9651
|
}
|
|
@@ -11695,10 +10494,10 @@ var _networkPortMap;
|
|
|
11695
10494
|
|
|
11696
10495
|
require("dotenv").config();
|
|
11697
10496
|
|
|
11698
|
-
var networkPortMap = (_networkPortMap = {}, _networkPortMap[Network.POLYGON] = 8542, _networkPortMap[Network.OPTIMISM] = 8544, _networkPortMap[Network.ARBITRUM] = 8540, _networkPortMap[Network.BASE] = 8546, _networkPortMap[Network.
|
|
10497
|
+
var networkPortMap = (_networkPortMap = {}, _networkPortMap[Network.POLYGON] = 8542, _networkPortMap[Network.OPTIMISM] = 8544, _networkPortMap[Network.ARBITRUM] = 8540, _networkPortMap[Network.BASE] = 8546, _networkPortMap[Network.ETHEREUM] = 8547, _networkPortMap);
|
|
11699
10498
|
|
|
11700
10499
|
var _TEST_POOL, _CONTRACT_ADDRESS, _USDC_BALANCEOF_SLOT, _WETH_BALANCEOF_SLOT;
|
|
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[Network.
|
|
10500
|
+
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[Network.ETHEREUM] = "0xe8e74f664d2d6a919a18b911990db0979789b6f7", _TEST_POOL);
|
|
11702
10501
|
var CONTRACT_ADDRESS = (_CONTRACT_ADDRESS = {}, _CONTRACT_ADDRESS[Network.POLYGON] = {
|
|
11703
10502
|
USDC: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
|
|
11704
10503
|
USDT: "",
|
|
@@ -11779,11 +10578,11 @@ var CONTRACT_ADDRESS = (_CONTRACT_ADDRESS = {}, _CONTRACT_ADDRESS[Network.POLYGO
|
|
|
11779
10578
|
VELO: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
|
|
11780
10579
|
COMPOUNDV3_WETH: "",
|
|
11781
10580
|
TOROS: ""
|
|
11782
|
-
}, _CONTRACT_ADDRESS[Network.
|
|
11783
|
-
USDC: "
|
|
10581
|
+
}, _CONTRACT_ADDRESS[Network.ETHEREUM] = {
|
|
10582
|
+
USDC: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
11784
10583
|
USDT: "",
|
|
11785
10584
|
SUSD: "",
|
|
11786
|
-
WETH: "
|
|
10585
|
+
WETH: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
|
11787
10586
|
WBTC: "",
|
|
11788
10587
|
SWETH: "",
|
|
11789
10588
|
uniswapV3: {
|
|
@@ -11799,8 +10598,8 @@ var CONTRACT_ADDRESS = (_CONTRACT_ADDRESS = {}, _CONTRACT_ADDRESS[Network.POLYGO
|
|
|
11799
10598
|
TOROS: "",
|
|
11800
10599
|
UNIT: ""
|
|
11801
10600
|
}, _CONTRACT_ADDRESS);
|
|
11802
|
-
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.
|
|
11803
|
-
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.
|
|
10601
|
+
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.ETHEREUM] = 9, _USDC_BALANCEOF_SLOT);
|
|
10602
|
+
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.ETHEREUM] = 3, _WETH_BALANCEOF_SLOT);
|
|
11804
10603
|
|
|
11805
10604
|
var wait = function wait(seconds) {
|
|
11806
10605
|
return new Promise(function (resolve) {
|
|
@@ -25623,6 +24422,335 @@ function _getOdosSwapTxData() {
|
|
|
25623
24422
|
return _getOdosSwapTxData.apply(this, arguments);
|
|
25624
24423
|
}
|
|
25625
24424
|
|
|
24425
|
+
var ActionMiscV3Abi = [
|
|
24426
|
+
{
|
|
24427
|
+
inputs: [
|
|
24428
|
+
{
|
|
24429
|
+
internalType: "address",
|
|
24430
|
+
name: "receiver",
|
|
24431
|
+
type: "address"
|
|
24432
|
+
},
|
|
24433
|
+
{
|
|
24434
|
+
internalType: "address",
|
|
24435
|
+
name: "market",
|
|
24436
|
+
type: "address"
|
|
24437
|
+
},
|
|
24438
|
+
{
|
|
24439
|
+
internalType: "uint256",
|
|
24440
|
+
name: "netPtIn",
|
|
24441
|
+
type: "uint256"
|
|
24442
|
+
},
|
|
24443
|
+
{
|
|
24444
|
+
internalType: "uint256",
|
|
24445
|
+
name: "netLpIn",
|
|
24446
|
+
type: "uint256"
|
|
24447
|
+
},
|
|
24448
|
+
{
|
|
24449
|
+
components: [
|
|
24450
|
+
{
|
|
24451
|
+
internalType: "address",
|
|
24452
|
+
name: "tokenOut",
|
|
24453
|
+
type: "address"
|
|
24454
|
+
},
|
|
24455
|
+
{
|
|
24456
|
+
internalType: "uint256",
|
|
24457
|
+
name: "minTokenOut",
|
|
24458
|
+
type: "uint256"
|
|
24459
|
+
},
|
|
24460
|
+
{
|
|
24461
|
+
internalType: "address",
|
|
24462
|
+
name: "tokenRedeemSy",
|
|
24463
|
+
type: "address"
|
|
24464
|
+
},
|
|
24465
|
+
{
|
|
24466
|
+
internalType: "address",
|
|
24467
|
+
name: "pendleSwap",
|
|
24468
|
+
type: "address"
|
|
24469
|
+
},
|
|
24470
|
+
{
|
|
24471
|
+
components: [
|
|
24472
|
+
{
|
|
24473
|
+
internalType: "enum SwapType",
|
|
24474
|
+
name: "swapType",
|
|
24475
|
+
type: "uint8"
|
|
24476
|
+
},
|
|
24477
|
+
{
|
|
24478
|
+
internalType: "address",
|
|
24479
|
+
name: "extRouter",
|
|
24480
|
+
type: "address"
|
|
24481
|
+
},
|
|
24482
|
+
{
|
|
24483
|
+
internalType: "bytes",
|
|
24484
|
+
name: "extCalldata",
|
|
24485
|
+
type: "bytes"
|
|
24486
|
+
},
|
|
24487
|
+
{
|
|
24488
|
+
internalType: "bool",
|
|
24489
|
+
name: "needScale",
|
|
24490
|
+
type: "bool"
|
|
24491
|
+
}
|
|
24492
|
+
],
|
|
24493
|
+
internalType: "struct SwapData",
|
|
24494
|
+
name: "swapData",
|
|
24495
|
+
type: "tuple"
|
|
24496
|
+
}
|
|
24497
|
+
],
|
|
24498
|
+
internalType: "struct TokenOutput",
|
|
24499
|
+
name: "output",
|
|
24500
|
+
type: "tuple"
|
|
24501
|
+
}
|
|
24502
|
+
],
|
|
24503
|
+
name: "exitPostExpToToken",
|
|
24504
|
+
outputs: [
|
|
24505
|
+
{
|
|
24506
|
+
internalType: "uint256",
|
|
24507
|
+
name: "totalTokenOut",
|
|
24508
|
+
type: "uint256"
|
|
24509
|
+
},
|
|
24510
|
+
{
|
|
24511
|
+
components: [
|
|
24512
|
+
{
|
|
24513
|
+
internalType: "uint256",
|
|
24514
|
+
name: "netPtFromRemove",
|
|
24515
|
+
type: "uint256"
|
|
24516
|
+
},
|
|
24517
|
+
{
|
|
24518
|
+
internalType: "uint256",
|
|
24519
|
+
name: "netSyFromRemove",
|
|
24520
|
+
type: "uint256"
|
|
24521
|
+
},
|
|
24522
|
+
{
|
|
24523
|
+
internalType: "uint256",
|
|
24524
|
+
name: "netPtRedeem",
|
|
24525
|
+
type: "uint256"
|
|
24526
|
+
},
|
|
24527
|
+
{
|
|
24528
|
+
internalType: "uint256",
|
|
24529
|
+
name: "netSyFromRedeem",
|
|
24530
|
+
type: "uint256"
|
|
24531
|
+
},
|
|
24532
|
+
{
|
|
24533
|
+
internalType: "uint256",
|
|
24534
|
+
name: "totalSyOut",
|
|
24535
|
+
type: "uint256"
|
|
24536
|
+
}
|
|
24537
|
+
],
|
|
24538
|
+
internalType: "struct IPActionMiscV3.ExitPostExpReturnParams",
|
|
24539
|
+
name: "params",
|
|
24540
|
+
type: "tuple"
|
|
24541
|
+
}
|
|
24542
|
+
],
|
|
24543
|
+
stateMutability: "nonpayable",
|
|
24544
|
+
type: "function"
|
|
24545
|
+
}
|
|
24546
|
+
];
|
|
24547
|
+
|
|
24548
|
+
var pendleBaseUrl = "https://api-v2.pendle.finance/core/v1";
|
|
24549
|
+
function getPendleSwapTxData(_x, _x2, _x3, _x4, _x5) {
|
|
24550
|
+
return _getPendleSwapTxData.apply(this, arguments);
|
|
24551
|
+
}
|
|
24552
|
+
|
|
24553
|
+
function _getPendleSwapTxData() {
|
|
24554
|
+
_getPendleSwapTxData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(pool, tokenIn, tokenOut, amountIn, slippage) {
|
|
24555
|
+
var expiredMarket, params, market, swapResult;
|
|
24556
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
|
24557
|
+
while (1) {
|
|
24558
|
+
switch (_context2.prev = _context2.next) {
|
|
24559
|
+
case 0:
|
|
24560
|
+
_context2.next = 2;
|
|
24561
|
+
return checkExitPostExpPT(pool, tokenIn, tokenOut);
|
|
24562
|
+
|
|
24563
|
+
case 2:
|
|
24564
|
+
expiredMarket = _context2.sent;
|
|
24565
|
+
|
|
24566
|
+
if (!expiredMarket) {
|
|
24567
|
+
_context2.next = 5;
|
|
24568
|
+
break;
|
|
24569
|
+
}
|
|
24570
|
+
|
|
24571
|
+
return _context2.abrupt("return", getExitExpPTTxData(pool, tokenOut, amountIn, expiredMarket));
|
|
24572
|
+
|
|
24573
|
+
case 5:
|
|
24574
|
+
params = {
|
|
24575
|
+
receiver: pool.address,
|
|
24576
|
+
tokenIn: tokenIn,
|
|
24577
|
+
tokenOut: tokenOut,
|
|
24578
|
+
amountIn: amountIn.toString(),
|
|
24579
|
+
slippage: slippage
|
|
24580
|
+
};
|
|
24581
|
+
_context2.next = 8;
|
|
24582
|
+
return getMarket(pool, tokenIn, tokenOut);
|
|
24583
|
+
|
|
24584
|
+
case 8:
|
|
24585
|
+
market = _context2.sent;
|
|
24586
|
+
_context2.prev = 9;
|
|
24587
|
+
_context2.next = 12;
|
|
24588
|
+
return axios.get(pendleBaseUrl + "/sdk/" + networkChainIdMap[pool.network] + "/markets/" + market + "/swap", {
|
|
24589
|
+
params: params
|
|
24590
|
+
});
|
|
24591
|
+
|
|
24592
|
+
case 12:
|
|
24593
|
+
swapResult = _context2.sent;
|
|
24594
|
+
return _context2.abrupt("return", swapResult.data.tx.data);
|
|
24595
|
+
|
|
24596
|
+
case 16:
|
|
24597
|
+
_context2.prev = 16;
|
|
24598
|
+
_context2.t0 = _context2["catch"](9);
|
|
24599
|
+
console.error("Error in Pendle API request:", _context2.t0);
|
|
24600
|
+
throw new ApiError("Pendle api request failed");
|
|
24601
|
+
|
|
24602
|
+
case 20:
|
|
24603
|
+
case "end":
|
|
24604
|
+
return _context2.stop();
|
|
24605
|
+
}
|
|
24606
|
+
}
|
|
24607
|
+
}, _callee2, null, [[9, 16]]);
|
|
24608
|
+
}));
|
|
24609
|
+
return _getPendleSwapTxData.apply(this, arguments);
|
|
24610
|
+
}
|
|
24611
|
+
|
|
24612
|
+
var checkUnderlying = function checkUnderlying(market, token, networkId) {
|
|
24613
|
+
if (market.underlyingAsset !== networkId + "-" + token.toLocaleLowerCase()) {
|
|
24614
|
+
throw new Error("Can only trade in or out of the underlying asset");
|
|
24615
|
+
}
|
|
24616
|
+
};
|
|
24617
|
+
|
|
24618
|
+
function getMarket(_x6, _x7, _x8) {
|
|
24619
|
+
return _getMarket.apply(this, arguments);
|
|
24620
|
+
}
|
|
24621
|
+
|
|
24622
|
+
function _getMarket() {
|
|
24623
|
+
_getMarket = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(pool, tokenIn, tokenOut) {
|
|
24624
|
+
var networkId, marketResult, allMarkets, markets;
|
|
24625
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
|
24626
|
+
while (1) {
|
|
24627
|
+
switch (_context3.prev = _context3.next) {
|
|
24628
|
+
case 0:
|
|
24629
|
+
networkId = networkChainIdMap[pool.network];
|
|
24630
|
+
_context3.prev = 1;
|
|
24631
|
+
_context3.next = 4;
|
|
24632
|
+
return axios.get(pendleBaseUrl + "/" + networkId + "/markets/active");
|
|
24633
|
+
|
|
24634
|
+
case 4:
|
|
24635
|
+
marketResult = _context3.sent;
|
|
24636
|
+
_context3.next = 11;
|
|
24637
|
+
break;
|
|
24638
|
+
|
|
24639
|
+
case 7:
|
|
24640
|
+
_context3.prev = 7;
|
|
24641
|
+
_context3.t0 = _context3["catch"](1);
|
|
24642
|
+
console.error("Error in Pendle API request:", _context3.t0);
|
|
24643
|
+
throw new ApiError("Pendle api request failed");
|
|
24644
|
+
|
|
24645
|
+
case 11:
|
|
24646
|
+
allMarkets = marketResult.data.markets;
|
|
24647
|
+
markets = [tokenIn, tokenOut].map(function (token) {
|
|
24648
|
+
return allMarkets.find(function (market) {
|
|
24649
|
+
return market.pt === networkId + "-" + token.toLocaleLowerCase();
|
|
24650
|
+
});
|
|
24651
|
+
});
|
|
24652
|
+
|
|
24653
|
+
if (!markets[0]) {
|
|
24654
|
+
_context3.next = 18;
|
|
24655
|
+
break;
|
|
24656
|
+
}
|
|
24657
|
+
|
|
24658
|
+
checkUnderlying(markets[0], tokenOut, networkId);
|
|
24659
|
+
return _context3.abrupt("return", markets[0].address);
|
|
24660
|
+
|
|
24661
|
+
case 18:
|
|
24662
|
+
if (!markets[1]) {
|
|
24663
|
+
_context3.next = 23;
|
|
24664
|
+
break;
|
|
24665
|
+
}
|
|
24666
|
+
|
|
24667
|
+
checkUnderlying(markets[1], tokenIn, networkId);
|
|
24668
|
+
return _context3.abrupt("return", markets[1].address);
|
|
24669
|
+
|
|
24670
|
+
case 23:
|
|
24671
|
+
throw new Error("Can only trade PT assets");
|
|
24672
|
+
|
|
24673
|
+
case 24:
|
|
24674
|
+
case "end":
|
|
24675
|
+
return _context3.stop();
|
|
24676
|
+
}
|
|
24677
|
+
}
|
|
24678
|
+
}, _callee3, null, [[1, 7]]);
|
|
24679
|
+
}));
|
|
24680
|
+
return _getMarket.apply(this, arguments);
|
|
24681
|
+
}
|
|
24682
|
+
|
|
24683
|
+
var checkExitPostExpPT = /*#__PURE__*/function () {
|
|
24684
|
+
var _ref = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(pool, tokenIn, tokenOut) {
|
|
24685
|
+
var networkId, inactiveMarketResult, allInactiveMarkets, markets;
|
|
24686
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
24687
|
+
while (1) {
|
|
24688
|
+
switch (_context.prev = _context.next) {
|
|
24689
|
+
case 0:
|
|
24690
|
+
networkId = networkChainIdMap[pool.network];
|
|
24691
|
+
_context.prev = 1;
|
|
24692
|
+
_context.next = 4;
|
|
24693
|
+
return axios.get(pendleBaseUrl + "/" + networkId + "/markets/inactive");
|
|
24694
|
+
|
|
24695
|
+
case 4:
|
|
24696
|
+
inactiveMarketResult = _context.sent;
|
|
24697
|
+
_context.next = 11;
|
|
24698
|
+
break;
|
|
24699
|
+
|
|
24700
|
+
case 7:
|
|
24701
|
+
_context.prev = 7;
|
|
24702
|
+
_context.t0 = _context["catch"](1);
|
|
24703
|
+
console.error("Error in Pendle API request:", _context.t0);
|
|
24704
|
+
throw new ApiError("Pendle api request failed");
|
|
24705
|
+
|
|
24706
|
+
case 11:
|
|
24707
|
+
allInactiveMarkets = inactiveMarketResult.data.markets;
|
|
24708
|
+
markets = [tokenIn, tokenOut].map(function (token) {
|
|
24709
|
+
return allInactiveMarkets.find(function (market) {
|
|
24710
|
+
return market.pt === networkId + "-" + token.toLocaleLowerCase();
|
|
24711
|
+
});
|
|
24712
|
+
});
|
|
24713
|
+
|
|
24714
|
+
if (!markets[0]) {
|
|
24715
|
+
_context.next = 18;
|
|
24716
|
+
break;
|
|
24717
|
+
}
|
|
24718
|
+
|
|
24719
|
+
checkUnderlying(markets[0], tokenOut, networkId);
|
|
24720
|
+
return _context.abrupt("return", markets[0].address);
|
|
24721
|
+
|
|
24722
|
+
case 18:
|
|
24723
|
+
if (!markets[1]) {
|
|
24724
|
+
_context.next = 22;
|
|
24725
|
+
break;
|
|
24726
|
+
}
|
|
24727
|
+
|
|
24728
|
+
throw new Error("Can not trade to expired PT asset");
|
|
24729
|
+
|
|
24730
|
+
case 22:
|
|
24731
|
+
return _context.abrupt("return", null);
|
|
24732
|
+
|
|
24733
|
+
case 23:
|
|
24734
|
+
case "end":
|
|
24735
|
+
return _context.stop();
|
|
24736
|
+
}
|
|
24737
|
+
}
|
|
24738
|
+
}, _callee, null, [[1, 7]]);
|
|
24739
|
+
}));
|
|
24740
|
+
|
|
24741
|
+
return function checkExitPostExpPT(_x9, _x10, _x11) {
|
|
24742
|
+
return _ref.apply(this, arguments);
|
|
24743
|
+
};
|
|
24744
|
+
}();
|
|
24745
|
+
|
|
24746
|
+
var getExitExpPTTxData = function getExitExpPTTxData(pool, tokenOut, amountIn, market) {
|
|
24747
|
+
var actionMiscV3 = new ethers.utils.Interface(ActionMiscV3Abi);
|
|
24748
|
+
var txData = actionMiscV3.encodeFunctionData("exitPostExpToToken", [pool.address, market, amountIn.toString(), 0, [tokenOut, 0, tokenOut, ethers.constants.AddressZero, // swapData
|
|
24749
|
+
[0, ethers.constants.AddressZero, ethers.constants.HashZero, false // needScale
|
|
24750
|
+
]]]);
|
|
24751
|
+
return txData;
|
|
24752
|
+
};
|
|
24753
|
+
|
|
25626
24754
|
var Pool = /*#__PURE__*/function () {
|
|
25627
24755
|
function Pool(network, signer, poolLogic, mangerLogic, utils, factory, isDhedge) {
|
|
25628
24756
|
if (isDhedge === void 0) {
|
|
@@ -26160,7 +25288,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26160
25288
|
}
|
|
26161
25289
|
|
|
26162
25290
|
_context10.t0 = dapp;
|
|
26163
|
-
_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;
|
|
25291
|
+
_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 : _context10.t0 === Dapp.PENDLE ? 30 : 34;
|
|
26164
25292
|
break;
|
|
26165
25293
|
|
|
26166
25294
|
case 6:
|
|
@@ -26170,7 +25298,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26170
25298
|
case 8:
|
|
26171
25299
|
_yield$getOneInchSwap = _context10.sent;
|
|
26172
25300
|
swapTxData = _yield$getOneInchSwap.swapTxData;
|
|
26173
|
-
return _context10.abrupt("break",
|
|
25301
|
+
return _context10.abrupt("break", 49);
|
|
26174
25302
|
|
|
26175
25303
|
case 11:
|
|
26176
25304
|
_context10.next = 13;
|
|
@@ -26178,7 +25306,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26178
25306
|
|
|
26179
25307
|
case 13:
|
|
26180
25308
|
swapTxData = _context10.sent;
|
|
26181
|
-
return _context10.abrupt("break",
|
|
25309
|
+
return _context10.abrupt("break", 49);
|
|
26182
25310
|
|
|
26183
25311
|
case 15:
|
|
26184
25312
|
iSynthetix = new ethers.utils.Interface(ISynthetix.abi);
|
|
@@ -26191,7 +25319,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26191
25319
|
case 19:
|
|
26192
25320
|
daoAddress = _context10.sent;
|
|
26193
25321
|
swapTxData = iSynthetix.encodeFunctionData(Transaction.SWAP_SYNTHS, [assets[0], amountIn, assets[1], daoAddress, SYNTHETIX_TRACKING_CODE]);
|
|
26194
|
-
return _context10.abrupt("break",
|
|
25322
|
+
return _context10.abrupt("break", 49);
|
|
26195
25323
|
|
|
26196
25324
|
case 22:
|
|
26197
25325
|
_context10.next = 24;
|
|
@@ -26199,7 +25327,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26199
25327
|
|
|
26200
25328
|
case 24:
|
|
26201
25329
|
swapTxData = _context10.sent;
|
|
26202
|
-
return _context10.abrupt("break",
|
|
25330
|
+
return _context10.abrupt("break", 49);
|
|
26203
25331
|
|
|
26204
25332
|
case 26:
|
|
26205
25333
|
_context10.next = 28;
|
|
@@ -26207,14 +25335,22 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26207
25335
|
|
|
26208
25336
|
case 28:
|
|
26209
25337
|
swapTxData = _context10.sent;
|
|
26210
|
-
return _context10.abrupt("break",
|
|
25338
|
+
return _context10.abrupt("break", 49);
|
|
26211
25339
|
|
|
26212
25340
|
case 30:
|
|
25341
|
+
_context10.next = 32;
|
|
25342
|
+
return getPendleSwapTxData(this, assetFrom, assetTo, amountIn, slippage);
|
|
25343
|
+
|
|
25344
|
+
case 32:
|
|
25345
|
+
swapTxData = _context10.sent;
|
|
25346
|
+
return _context10.abrupt("break", 49);
|
|
25347
|
+
|
|
25348
|
+
case 34:
|
|
26213
25349
|
iUniswapV2Router = new ethers.utils.Interface(IUniswapV2Router.abi);
|
|
26214
|
-
_context10.next =
|
|
25350
|
+
_context10.next = 37;
|
|
26215
25351
|
return this.utils.getMinAmountOut(dapp, assetFrom, assetTo, amountIn, slippage);
|
|
26216
25352
|
|
|
26217
|
-
case
|
|
25353
|
+
case 37:
|
|
26218
25354
|
minAmountOut = _context10.sent;
|
|
26219
25355
|
_context10.t1 = iUniswapV2Router;
|
|
26220
25356
|
_context10.t2 = Transaction.SWAP;
|
|
@@ -26222,23 +25358,23 @@ var Pool = /*#__PURE__*/function () {
|
|
|
26222
25358
|
_context10.t4 = minAmountOut;
|
|
26223
25359
|
_context10.t5 = [assetFrom, assetTo];
|
|
26224
25360
|
_context10.t6 = this.address;
|
|
26225
|
-
_context10.next =
|
|
25361
|
+
_context10.next = 46;
|
|
26226
25362
|
return getDeadline(this);
|
|
26227
25363
|
|
|
26228
|
-
case
|
|
25364
|
+
case 46:
|
|
26229
25365
|
_context10.t7 = _context10.sent;
|
|
26230
25366
|
_context10.t8 = [_context10.t3, _context10.t4, _context10.t5, _context10.t6, _context10.t7];
|
|
26231
25367
|
swapTxData = _context10.t1.encodeFunctionData.call(_context10.t1, _context10.t2, _context10.t8);
|
|
26232
25368
|
|
|
26233
|
-
case
|
|
26234
|
-
_context10.next =
|
|
25369
|
+
case 49:
|
|
25370
|
+
_context10.next = 51;
|
|
26235
25371
|
return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], swapTxData, options], estimateGas);
|
|
26236
25372
|
|
|
26237
|
-
case
|
|
25373
|
+
case 51:
|
|
26238
25374
|
tx = _context10.sent;
|
|
26239
25375
|
return _context10.abrupt("return", tx);
|
|
26240
25376
|
|
|
26241
|
-
case
|
|
25377
|
+
case 53:
|
|
26242
25378
|
case "end":
|
|
26243
25379
|
return _context10.stop();
|
|
26244
25380
|
}
|
|
@@ -27509,7 +26645,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
27509
26645
|
|
|
27510
26646
|
isStaked = false;
|
|
27511
26647
|
_context32.t0 = dapp;
|
|
27512
|
-
_context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 7 : _context32.t0 === Dapp.RAMSESCL ? 7 : _context32.t0 === Dapp.
|
|
26648
|
+
_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;
|
|
27513
26649
|
break;
|
|
27514
26650
|
|
|
27515
26651
|
case 7:
|
|
@@ -27610,7 +26746,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
27610
26746
|
|
|
27611
26747
|
isStaked = false;
|
|
27612
26748
|
_context33.t0 = dapp;
|
|
27613
|
-
_context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.RAMSESCL ? 6 : _context33.t0 === Dapp.
|
|
26749
|
+
_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;
|
|
27614
26750
|
break;
|
|
27615
26751
|
|
|
27616
26752
|
case 6:
|
|
@@ -27709,7 +26845,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
27709
26845
|
|
|
27710
26846
|
iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
|
|
27711
26847
|
_context34.t0 = dapp;
|
|
27712
|
-
_context34.next = _context34.t0 === Dapp.UNISWAPV3 ? 6 : _context34.t0 === Dapp.RAMSESCL ? 6 : _context34.t0 === Dapp.
|
|
26848
|
+
_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;
|
|
27713
26849
|
break;
|
|
27714
26850
|
|
|
27715
26851
|
case 6:
|
|
@@ -27796,7 +26932,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
27796
26932
|
/*#__PURE__*/
|
|
27797
26933
|
function () {
|
|
27798
26934
|
var _getRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(dapp, tokenId, rewards, options, estimateGas) {
|
|
27799
|
-
var
|
|
26935
|
+
var tx;
|
|
27800
26936
|
return runtime_1.wrap(function _callee35$(_context35) {
|
|
27801
26937
|
while (1) {
|
|
27802
26938
|
switch (_context35.prev = _context35.next) {
|
|
@@ -27809,16 +26945,14 @@ var Pool = /*#__PURE__*/function () {
|
|
|
27809
26945
|
estimateGas = false;
|
|
27810
26946
|
}
|
|
27811
26947
|
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
_context35.next = 5;
|
|
27815
|
-
return getPoolTxOrGasEstimate(this, [claimAddress, getRewardsTxDta(tokenId, rewards), options], estimateGas);
|
|
26948
|
+
_context35.next = 4;
|
|
26949
|
+
return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], getRewardsTxDta(tokenId, rewards), options], estimateGas);
|
|
27816
26950
|
|
|
27817
|
-
case
|
|
26951
|
+
case 4:
|
|
27818
26952
|
tx = _context35.sent;
|
|
27819
26953
|
return _context35.abrupt("return", tx);
|
|
27820
26954
|
|
|
27821
|
-
case
|
|
26955
|
+
case 6:
|
|
27822
26956
|
case "end":
|
|
27823
26957
|
return _context35.stop();
|
|
27824
26958
|
}
|