@dhedge/v2-sdk 1.9.3 → 1.9.5
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 +39 -0
- package/dist/services/ramses/vesting.d.ts +3 -0
- package/dist/test/constants.d.ts +16 -0
- package/dist/test/utils/testingHelper.d.ts +13 -0
- package/dist/test/wallet.d.ts +1 -0
- package/dist/types.d.ts +4 -2
- package/dist/v2-sdk.cjs.development.js +405 -85
- 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 +405 -85
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/abi/IXRam.json +99 -0
- package/src/config.ts +25 -8
- package/src/entities/pool.ts +115 -0
- package/src/services/ramses/vesting.ts +13 -0
- package/src/test/constants.ts +19 -2
- package/src/test/lyra.test.ts +7 -6
- package/src/test/oneInch.test.ts +34 -3
- package/src/test/ramses.test.ts +190 -0
- package/src/test/synthetix.test.ts +3 -1
- package/src/test/uniswap.test.ts +180 -148
- package/src/test/utils/testingHelper.ts +51 -1
- package/src/test/wallet.ts +2 -1
- package/src/test/zeroEx.test.ts +40 -4
- package/src/types.ts +4 -2
|
@@ -3907,6 +3907,7 @@ var ManagerLogic = {
|
|
|
3907
3907
|
Network["POLYGON"] = "polygon";
|
|
3908
3908
|
Network["OPTIMISM"] = "optimism";
|
|
3909
3909
|
Network["ARBITRUM"] = "arbitrum";
|
|
3910
|
+
Network["BASE"] = "base";
|
|
3910
3911
|
})(exports.Network || (exports.Network = {}));
|
|
3911
3912
|
|
|
3912
3913
|
(function (Dapp) {
|
|
@@ -3924,6 +3925,7 @@ var ManagerLogic = {
|
|
|
3924
3925
|
Dapp["VELODROMEV2"] = "velodromeV2";
|
|
3925
3926
|
Dapp["LYRA"] = "lyra";
|
|
3926
3927
|
Dapp["ZEROEX"] = "0x";
|
|
3928
|
+
Dapp["RAMSES"] = "ramses";
|
|
3927
3929
|
})(exports.Dapp || (exports.Dapp = {}));
|
|
3928
3930
|
|
|
3929
3931
|
(function (Transaction) {
|
|
@@ -3948,19 +3950,19 @@ var ManagerLogic = {
|
|
|
3948
3950
|
Transaction["REMOVE_LIQUIDITY_UNSTAKE"] = "removeLiquidityAndUnstake";
|
|
3949
3951
|
})(exports.Transaction || (exports.Transaction = {}));
|
|
3950
3952
|
|
|
3951
|
-
var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM2, _Network$ARBITRUM2, _aaveAddressProvider, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap;
|
|
3953
|
+
var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Network$BASE, _routerAddress, _Network$POLYGON2, _dappFactoryAddress, _Network$POLYGON3, _stakingAddress, _Network$POLYGON4, _Network$OPTIMISM2, _Network$ARBITRUM2, _Network$BASE2, _aaveAddressProvider, _nonfungiblePositionM, _networkChainIdMap, _balancerSubgraph, _multiCallAddress, _lyraNetworkMap;
|
|
3952
3954
|
|
|
3953
3955
|
require("dotenv").config();
|
|
3954
3956
|
|
|
3955
|
-
var factoryAddress = (_factoryAddress = {}, _factoryAddress[exports.Network.POLYGON] = process.env.STAGING_CONTRACTS ? "0xDd87eCdB10cFF7004276AAbAbd30e7a08F69bb53" : "0xfdc7b8bFe0DD3513Cc669bB8d601Cb83e2F69cB0", _factoryAddress[exports.Network.OPTIMISM] = "0x5e61a079A178f0E5784107a4963baAe0c5a680c6", _factoryAddress[exports.Network.ARBITRUM] = "0xfffb5fb14606eb3a548c113026355020ddf27535", _factoryAddress);
|
|
3956
|
-
var routerAddress = (_routerAddress = {}, _routerAddress[exports.Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[exports.Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[exports.Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[exports.Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[exports.Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[exports.Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[exports.Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[exports.Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[exports.Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[exports.Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[exports.Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[exports.Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[exports.Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[exports.Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[exports.Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[exports.Dapp.UNISWAPV3] = "0xe592427a0aece92de3edee1f18e0157c05861564", _Network$ARBITRUM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM), _routerAddress);
|
|
3957
|
-
var dappFactoryAddress = (_dappFactoryAddress = {}, _dappFactoryAddress[exports.Network.POLYGON] = (_Network$POLYGON2 = {}, _Network$POLYGON2[exports.Dapp.SUSHISWAP] = "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", _Network$POLYGON2[exports.Dapp.QUICKSWAP] = "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", _Network$POLYGON2), _dappFactoryAddress[exports.Network.OPTIMISM] = {}, _dappFactoryAddress[exports.Network.ARBITRUM] = {}, _dappFactoryAddress);
|
|
3958
|
-
var stakingAddress = (_stakingAddress = {}, _stakingAddress[exports.Network.POLYGON] = (_Network$POLYGON3 = {}, _Network$POLYGON3[exports.Dapp.SUSHISWAP] = "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F", _Network$POLYGON3[exports.Dapp.BALANCER] = "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e", _Network$POLYGON3[exports.Dapp.AAVE] = "0x357D51124f59836DeD84c8a1730D72B749d8BC23", _Network$POLYGON3[exports.Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$POLYGON3), _stakingAddress[exports.Network.OPTIMISM] = {}, _stakingAddress[exports.Network.ARBITRUM] = {}, _stakingAddress);
|
|
3959
|
-
var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[exports.Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[exports.Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[exports.Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM2), _aaveAddressProvider[exports.Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[exports.Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider);
|
|
3960
|
-
var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[exports.Network.POLYGON] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM[exports.Network.OPTIMISM] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM[exports.Network.ARBITRUM] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM);
|
|
3961
|
-
var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[exports.Network.POLYGON] = 137, _networkChainIdMap[exports.Network.OPTIMISM] = 10, _networkChainIdMap[exports.Network.ARBITRUM] = 42161, _networkChainIdMap);
|
|
3962
|
-
var balancerSubgraph = (_balancerSubgraph = {}, _balancerSubgraph[exports.Network.POLYGON] = "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2", _balancerSubgraph[exports.Network.OPTIMISM] = "", _balancerSubgraph[exports.Network.ARBITRUM] = "", _balancerSubgraph);
|
|
3963
|
-
var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[exports.Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[exports.Network.OPTIMISM] = "", _multiCallAddress[exports.Network.ARBITRUM] = "", _multiCallAddress);
|
|
3957
|
+
var factoryAddress = (_factoryAddress = {}, _factoryAddress[exports.Network.POLYGON] = process.env.STAGING_CONTRACTS ? "0xDd87eCdB10cFF7004276AAbAbd30e7a08F69bb53" : "0xfdc7b8bFe0DD3513Cc669bB8d601Cb83e2F69cB0", _factoryAddress[exports.Network.OPTIMISM] = "0x5e61a079A178f0E5784107a4963baAe0c5a680c6", _factoryAddress[exports.Network.ARBITRUM] = "0xfffb5fb14606eb3a548c113026355020ddf27535", _factoryAddress[exports.Network.BASE] = "0x49Afe3abCf66CF09Fab86cb1139D8811C8afe56F", _factoryAddress);
|
|
3958
|
+
var routerAddress = (_routerAddress = {}, _routerAddress[exports.Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[exports.Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[exports.Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[exports.Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[exports.Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[exports.Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[exports.Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[exports.Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[exports.Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[exports.Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[exports.Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[exports.Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[exports.Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[exports.Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[exports.Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[exports.Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[exports.Dapp.UNISWAPV3] = "0xe592427a0aece92de3edee1f18e0157c05861564", _Network$ARBITRUM[exports.Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[exports.Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[exports.Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM), _routerAddress[exports.Network.BASE] = (_Network$BASE = {}, _Network$BASE[exports.Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$BASE[exports.Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE), _routerAddress);
|
|
3959
|
+
var dappFactoryAddress = (_dappFactoryAddress = {}, _dappFactoryAddress[exports.Network.POLYGON] = (_Network$POLYGON2 = {}, _Network$POLYGON2[exports.Dapp.SUSHISWAP] = "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", _Network$POLYGON2[exports.Dapp.QUICKSWAP] = "0x5757371414417b8C6CAad45bAeF941aBc7d3Ab32", _Network$POLYGON2), _dappFactoryAddress[exports.Network.OPTIMISM] = {}, _dappFactoryAddress[exports.Network.ARBITRUM] = {}, _dappFactoryAddress[exports.Network.BASE] = {}, _dappFactoryAddress);
|
|
3960
|
+
var stakingAddress = (_stakingAddress = {}, _stakingAddress[exports.Network.POLYGON] = (_Network$POLYGON3 = {}, _Network$POLYGON3[exports.Dapp.SUSHISWAP] = "0x0769fd68dFb93167989C6f7254cd0D766Fb2841F", _Network$POLYGON3[exports.Dapp.BALANCER] = "0x0F3e0c4218b7b0108a3643cFe9D3ec0d4F57c54e", _Network$POLYGON3[exports.Dapp.AAVE] = "0x357D51124f59836DeD84c8a1730D72B749d8BC23", _Network$POLYGON3[exports.Dapp.AAVEV3] = "0x929EC64c34a17401F460460D4B9390518E5B473e", _Network$POLYGON3), _stakingAddress[exports.Network.OPTIMISM] = {}, _stakingAddress[exports.Network.ARBITRUM] = {}, _stakingAddress[exports.Network.BASE] = {}, _stakingAddress);
|
|
3961
|
+
var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[exports.Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[exports.Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[exports.Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[exports.Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM2), _aaveAddressProvider[exports.Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[exports.Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider[exports.Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[exports.Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE2), _aaveAddressProvider);
|
|
3962
|
+
var nonfungiblePositionManagerAddress = (_nonfungiblePositionM = {}, _nonfungiblePositionM[exports.Network.POLYGON] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM[exports.Network.OPTIMISM] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM[exports.Network.ARBITRUM] = "0xC36442b4a4522E871399CD717aBDD847Ab11FE88", _nonfungiblePositionM[exports.Network.BASE] = "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1", _nonfungiblePositionM);
|
|
3963
|
+
var networkChainIdMap = (_networkChainIdMap = {}, _networkChainIdMap[exports.Network.POLYGON] = 137, _networkChainIdMap[exports.Network.OPTIMISM] = 10, _networkChainIdMap[exports.Network.ARBITRUM] = 42161, _networkChainIdMap[exports.Network.BASE] = 8453, _networkChainIdMap);
|
|
3964
|
+
var balancerSubgraph = (_balancerSubgraph = {}, _balancerSubgraph[exports.Network.POLYGON] = "https://api.thegraph.com/subgraphs/name/balancer-labs/balancer-polygon-v2", _balancerSubgraph[exports.Network.OPTIMISM] = "", _balancerSubgraph[exports.Network.ARBITRUM] = "", _balancerSubgraph[exports.Network.BASE] = "", _balancerSubgraph);
|
|
3965
|
+
var multiCallAddress = (_multiCallAddress = {}, _multiCallAddress[exports.Network.POLYGON] = "0x275617327c958bD06b5D6b871E7f491D76113dd8", _multiCallAddress[exports.Network.OPTIMISM] = "", _multiCallAddress[exports.Network.ARBITRUM] = "", _multiCallAddress[exports.Network.BASE] = "", _multiCallAddress);
|
|
3964
3966
|
var lyraNetworkMap = (_lyraNetworkMap = {}, _lyraNetworkMap[exports.Network.OPTIMISM] = Lyra.Deployment.Mainnet, _lyraNetworkMap);
|
|
3965
3967
|
var MaxUint128 = "0xffffffffffffffffffffffffffffffff";
|
|
3966
3968
|
var UNISWAPV3_QUOTER_ADDRESS = "0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6";
|
|
@@ -19617,6 +19619,119 @@ function _getOneInchSwapTxData() {
|
|
|
19617
19619
|
return _getOneInchSwapTxData.apply(this, arguments);
|
|
19618
19620
|
}
|
|
19619
19621
|
|
|
19622
|
+
var abi$q = [
|
|
19623
|
+
{
|
|
19624
|
+
inputs: [
|
|
19625
|
+
{
|
|
19626
|
+
internalType: "uint256",
|
|
19627
|
+
name: "_amount",
|
|
19628
|
+
type: "uint256"
|
|
19629
|
+
}
|
|
19630
|
+
],
|
|
19631
|
+
name: "createVest",
|
|
19632
|
+
outputs: [
|
|
19633
|
+
],
|
|
19634
|
+
stateMutability: "nonpayable",
|
|
19635
|
+
type: "function"
|
|
19636
|
+
},
|
|
19637
|
+
{
|
|
19638
|
+
inputs: [
|
|
19639
|
+
{
|
|
19640
|
+
internalType: "uint256",
|
|
19641
|
+
name: "_vestID",
|
|
19642
|
+
type: "uint256"
|
|
19643
|
+
},
|
|
19644
|
+
{
|
|
19645
|
+
internalType: "bool",
|
|
19646
|
+
name: "_ve",
|
|
19647
|
+
type: "bool"
|
|
19648
|
+
}
|
|
19649
|
+
],
|
|
19650
|
+
name: "exitVest",
|
|
19651
|
+
outputs: [
|
|
19652
|
+
{
|
|
19653
|
+
internalType: "bool",
|
|
19654
|
+
name: "",
|
|
19655
|
+
type: "bool"
|
|
19656
|
+
}
|
|
19657
|
+
],
|
|
19658
|
+
stateMutability: "nonpayable",
|
|
19659
|
+
type: "function"
|
|
19660
|
+
},
|
|
19661
|
+
{
|
|
19662
|
+
inputs: [
|
|
19663
|
+
{
|
|
19664
|
+
internalType: "address",
|
|
19665
|
+
name: "_user",
|
|
19666
|
+
type: "address"
|
|
19667
|
+
}
|
|
19668
|
+
],
|
|
19669
|
+
name: "usersTotalVests",
|
|
19670
|
+
outputs: [
|
|
19671
|
+
{
|
|
19672
|
+
internalType: "uint256",
|
|
19673
|
+
name: "",
|
|
19674
|
+
type: "uint256"
|
|
19675
|
+
}
|
|
19676
|
+
],
|
|
19677
|
+
stateMutability: "view",
|
|
19678
|
+
type: "function"
|
|
19679
|
+
},
|
|
19680
|
+
{
|
|
19681
|
+
inputs: [
|
|
19682
|
+
{
|
|
19683
|
+
internalType: "address",
|
|
19684
|
+
name: "user",
|
|
19685
|
+
type: "address"
|
|
19686
|
+
}
|
|
19687
|
+
],
|
|
19688
|
+
name: "vestInfo",
|
|
19689
|
+
outputs: [
|
|
19690
|
+
{
|
|
19691
|
+
components: [
|
|
19692
|
+
{
|
|
19693
|
+
internalType: "uint256",
|
|
19694
|
+
name: "amount",
|
|
19695
|
+
type: "uint256"
|
|
19696
|
+
},
|
|
19697
|
+
{
|
|
19698
|
+
internalType: "uint256",
|
|
19699
|
+
name: "start",
|
|
19700
|
+
type: "uint256"
|
|
19701
|
+
},
|
|
19702
|
+
{
|
|
19703
|
+
internalType: "uint256",
|
|
19704
|
+
name: "maxEnd",
|
|
19705
|
+
type: "uint256"
|
|
19706
|
+
},
|
|
19707
|
+
{
|
|
19708
|
+
internalType: "uint256",
|
|
19709
|
+
name: "vestID",
|
|
19710
|
+
type: "uint256"
|
|
19711
|
+
}
|
|
19712
|
+
],
|
|
19713
|
+
internalType: "struct IXRam.VestPosition[]",
|
|
19714
|
+
name: "",
|
|
19715
|
+
type: "tuple[]"
|
|
19716
|
+
}
|
|
19717
|
+
],
|
|
19718
|
+
stateMutability: "view",
|
|
19719
|
+
type: "function"
|
|
19720
|
+
}
|
|
19721
|
+
];
|
|
19722
|
+
var IXRam = {
|
|
19723
|
+
abi: abi$q
|
|
19724
|
+
};
|
|
19725
|
+
|
|
19726
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
19727
|
+
var iXRam = /*#__PURE__*/new ethers.ethers.utils.Interface(IXRam.abi);
|
|
19728
|
+
function getCreateVestTxData(amount) {
|
|
19729
|
+
return iXRam.encodeFunctionData("createVest", [amount]);
|
|
19730
|
+
}
|
|
19731
|
+
function getExitVestTxData(vestId) {
|
|
19732
|
+
return iXRam.encodeFunctionData("exitVest", [vestId, false]);
|
|
19733
|
+
}
|
|
19734
|
+
|
|
19620
19735
|
var Pool = /*#__PURE__*/function () {
|
|
19621
19736
|
function Pool(network, signer, poolLogic, mangerLogic, utils, factory) {
|
|
19622
19737
|
this.network = network;
|
|
@@ -20306,7 +20421,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20306
20421
|
}
|
|
20307
20422
|
|
|
20308
20423
|
_context13.t0 = dapp;
|
|
20309
|
-
_context13.next = _context13.t0 === exports.Dapp.BALANCER ? 4 : _context13.t0 === exports.Dapp.VELODROME ? 7 : _context13.t0 === exports.Dapp.VELODROMEV2 ? 9 : 11;
|
|
20424
|
+
_context13.next = _context13.t0 === exports.Dapp.BALANCER ? 4 : _context13.t0 === exports.Dapp.VELODROME ? 7 : _context13.t0 === exports.Dapp.RAMSES ? 7 : _context13.t0 === exports.Dapp.VELODROMEV2 ? 9 : 11;
|
|
20310
20425
|
break;
|
|
20311
20426
|
|
|
20312
20427
|
case 4:
|
|
@@ -21261,7 +21376,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21261
21376
|
}
|
|
21262
21377
|
|
|
21263
21378
|
_context30.t0 = dapp;
|
|
21264
|
-
_context30.next = _context30.t0 === exports.Dapp.UNISWAPV3 ? 4 : _context30.t0 === exports.Dapp.ARRAKIS ? 8 : _context30.t0 === exports.Dapp.BALANCER ? 8 : _context30.t0 === exports.Dapp.VELODROME ? 12 : _context30.t0 === exports.Dapp.VELODROMEV2 ? 15 : 18;
|
|
21379
|
+
_context30.next = _context30.t0 === exports.Dapp.UNISWAPV3 ? 4 : _context30.t0 === exports.Dapp.ARRAKIS ? 8 : _context30.t0 === exports.Dapp.BALANCER ? 8 : _context30.t0 === exports.Dapp.VELODROME ? 12 : _context30.t0 === exports.Dapp.RAMSES ? 12 : _context30.t0 === exports.Dapp.VELODROMEV2 ? 15 : 18;
|
|
21265
21380
|
break;
|
|
21266
21381
|
|
|
21267
21382
|
case 4:
|
|
@@ -21581,6 +21696,115 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21581
21696
|
|
|
21582
21697
|
return removeLiquidityVelodromeV2;
|
|
21583
21698
|
}()
|
|
21699
|
+
/**
|
|
21700
|
+
* Add liquidity to Velodrome V2 or Ramses pool
|
|
21701
|
+
* @param {Dapp} dapp VelodromeV2 or Ramses
|
|
21702
|
+
* @param {string} assetA First asset
|
|
21703
|
+
* @param {string} assetB Second asset
|
|
21704
|
+
* @param {BigNumber | string} amountA Amount first asset
|
|
21705
|
+
* @param {BigNumber | string} amountB Amount second asset
|
|
21706
|
+
* @param { boolean } isStable Is stable pool
|
|
21707
|
+
* @param {any} options Transaction options
|
|
21708
|
+
* @returns {Promise<any>} Transaction
|
|
21709
|
+
*/
|
|
21710
|
+
;
|
|
21711
|
+
|
|
21712
|
+
_proto.addLiquidityV2 =
|
|
21713
|
+
/*#__PURE__*/
|
|
21714
|
+
function () {
|
|
21715
|
+
var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(dapp, assetA, assetB, amountA, amountB, isStable, options) {
|
|
21716
|
+
var tx;
|
|
21717
|
+
return runtime_1.wrap(function _callee36$(_context36) {
|
|
21718
|
+
while (1) {
|
|
21719
|
+
switch (_context36.prev = _context36.next) {
|
|
21720
|
+
case 0:
|
|
21721
|
+
if (options === void 0) {
|
|
21722
|
+
options = null;
|
|
21723
|
+
}
|
|
21724
|
+
|
|
21725
|
+
_context36.t0 = this.poolLogic;
|
|
21726
|
+
_context36.t1 = routerAddress[this.network][dapp];
|
|
21727
|
+
_context36.next = 5;
|
|
21728
|
+
return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
|
|
21729
|
+
|
|
21730
|
+
case 5:
|
|
21731
|
+
_context36.t2 = _context36.sent;
|
|
21732
|
+
_context36.t3 = options;
|
|
21733
|
+
_context36.next = 9;
|
|
21734
|
+
return _context36.t0.execTransaction.call(_context36.t0, _context36.t1, _context36.t2, _context36.t3);
|
|
21735
|
+
|
|
21736
|
+
case 9:
|
|
21737
|
+
tx = _context36.sent;
|
|
21738
|
+
return _context36.abrupt("return", tx);
|
|
21739
|
+
|
|
21740
|
+
case 11:
|
|
21741
|
+
case "end":
|
|
21742
|
+
return _context36.stop();
|
|
21743
|
+
}
|
|
21744
|
+
}
|
|
21745
|
+
}, _callee36, this);
|
|
21746
|
+
}));
|
|
21747
|
+
|
|
21748
|
+
function addLiquidityV2(_x145, _x146, _x147, _x148, _x149, _x150, _x151) {
|
|
21749
|
+
return _addLiquidityV.apply(this, arguments);
|
|
21750
|
+
}
|
|
21751
|
+
|
|
21752
|
+
return addLiquidityV2;
|
|
21753
|
+
}()
|
|
21754
|
+
/**
|
|
21755
|
+
* Remove liquidity from Velodrome V2 or Ramses pool
|
|
21756
|
+
* @param {Dapp} dapp VelodromeV2 or Ramses
|
|
21757
|
+
* @param {string} assetA First asset
|
|
21758
|
+
* @param {string} assetB Second asset
|
|
21759
|
+
* @param {BigNumber | string} amount Amount of LP tokens
|
|
21760
|
+
* @param { boolean } isStable Is stable pool
|
|
21761
|
+
* @param {any} options Transaction options
|
|
21762
|
+
* @returns {Promise<any>} Transaction
|
|
21763
|
+
*/
|
|
21764
|
+
;
|
|
21765
|
+
|
|
21766
|
+
_proto.removeLiquidityV2 =
|
|
21767
|
+
/*#__PURE__*/
|
|
21768
|
+
function () {
|
|
21769
|
+
var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(dapp, assetA, assetB, amount, isStable, options) {
|
|
21770
|
+
var tx;
|
|
21771
|
+
return runtime_1.wrap(function _callee37$(_context37) {
|
|
21772
|
+
while (1) {
|
|
21773
|
+
switch (_context37.prev = _context37.next) {
|
|
21774
|
+
case 0:
|
|
21775
|
+
if (options === void 0) {
|
|
21776
|
+
options = null;
|
|
21777
|
+
}
|
|
21778
|
+
|
|
21779
|
+
_context37.t0 = this.poolLogic;
|
|
21780
|
+
_context37.t1 = routerAddress[this.network][dapp];
|
|
21781
|
+
_context37.next = 5;
|
|
21782
|
+
return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
|
|
21783
|
+
|
|
21784
|
+
case 5:
|
|
21785
|
+
_context37.t2 = _context37.sent;
|
|
21786
|
+
_context37.t3 = options;
|
|
21787
|
+
_context37.next = 9;
|
|
21788
|
+
return _context37.t0.execTransaction.call(_context37.t0, _context37.t1, _context37.t2, _context37.t3);
|
|
21789
|
+
|
|
21790
|
+
case 9:
|
|
21791
|
+
tx = _context37.sent;
|
|
21792
|
+
return _context37.abrupt("return", tx);
|
|
21793
|
+
|
|
21794
|
+
case 11:
|
|
21795
|
+
case "end":
|
|
21796
|
+
return _context37.stop();
|
|
21797
|
+
}
|
|
21798
|
+
}
|
|
21799
|
+
}, _callee37, this);
|
|
21800
|
+
}));
|
|
21801
|
+
|
|
21802
|
+
function removeLiquidityV2(_x152, _x153, _x154, _x155, _x156, _x157) {
|
|
21803
|
+
return _removeLiquidityV.apply(this, arguments);
|
|
21804
|
+
}
|
|
21805
|
+
|
|
21806
|
+
return removeLiquidityV2;
|
|
21807
|
+
}()
|
|
21584
21808
|
/**
|
|
21585
21809
|
* Trade options on lyra
|
|
21586
21810
|
* @param {LyraOptionMarket} market Underlying market e.g. eth
|
|
@@ -21600,11 +21824,11 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21600
21824
|
_proto.tradeLyraOption =
|
|
21601
21825
|
/*#__PURE__*/
|
|
21602
21826
|
function () {
|
|
21603
|
-
var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
21827
|
+
var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options) {
|
|
21604
21828
|
var swapxData, tx;
|
|
21605
|
-
return runtime_1.wrap(function
|
|
21829
|
+
return runtime_1.wrap(function _callee38$(_context38) {
|
|
21606
21830
|
while (1) {
|
|
21607
|
-
switch (
|
|
21831
|
+
switch (_context38.prev = _context38.next) {
|
|
21608
21832
|
case 0:
|
|
21609
21833
|
if (collateralChangeAmount === void 0) {
|
|
21610
21834
|
collateralChangeAmount = "0";
|
|
@@ -21618,27 +21842,27 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21618
21842
|
options = null;
|
|
21619
21843
|
}
|
|
21620
21844
|
|
|
21621
|
-
|
|
21845
|
+
_context38.next = 5;
|
|
21622
21846
|
return getLyraOptionTxData(this, market, optionType, expiry, strike, tradeType, optionAmount, assetIn, ethers.BigNumber.from(collateralChangeAmount), isCoveredCall);
|
|
21623
21847
|
|
|
21624
21848
|
case 5:
|
|
21625
|
-
swapxData =
|
|
21626
|
-
|
|
21849
|
+
swapxData = _context38.sent;
|
|
21850
|
+
_context38.next = 8;
|
|
21627
21851
|
return this.poolLogic.execTransaction(routerAddress[this.network][exports.Dapp.LYRA], swapxData, options);
|
|
21628
21852
|
|
|
21629
21853
|
case 8:
|
|
21630
|
-
tx =
|
|
21631
|
-
return
|
|
21854
|
+
tx = _context38.sent;
|
|
21855
|
+
return _context38.abrupt("return", tx);
|
|
21632
21856
|
|
|
21633
21857
|
case 10:
|
|
21634
21858
|
case "end":
|
|
21635
|
-
return
|
|
21859
|
+
return _context38.stop();
|
|
21636
21860
|
}
|
|
21637
21861
|
}
|
|
21638
|
-
},
|
|
21862
|
+
}, _callee38, this);
|
|
21639
21863
|
}));
|
|
21640
21864
|
|
|
21641
|
-
function tradeLyraOption(
|
|
21865
|
+
function tradeLyraOption(_x158, _x159, _x160, _x161, _x162, _x163, _x164, _x165, _x166, _x167) {
|
|
21642
21866
|
return _tradeLyraOption.apply(this, arguments);
|
|
21643
21867
|
}
|
|
21644
21868
|
|
|
@@ -21653,26 +21877,26 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21653
21877
|
_proto.getLyraPositions =
|
|
21654
21878
|
/*#__PURE__*/
|
|
21655
21879
|
function () {
|
|
21656
|
-
var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
21657
|
-
return runtime_1.wrap(function
|
|
21880
|
+
var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(market) {
|
|
21881
|
+
return runtime_1.wrap(function _callee39$(_context39) {
|
|
21658
21882
|
while (1) {
|
|
21659
|
-
switch (
|
|
21883
|
+
switch (_context39.prev = _context39.next) {
|
|
21660
21884
|
case 0:
|
|
21661
|
-
|
|
21885
|
+
_context39.next = 2;
|
|
21662
21886
|
return getOptionPositions(this, market);
|
|
21663
21887
|
|
|
21664
21888
|
case 2:
|
|
21665
|
-
return
|
|
21889
|
+
return _context39.abrupt("return", _context39.sent);
|
|
21666
21890
|
|
|
21667
21891
|
case 3:
|
|
21668
21892
|
case "end":
|
|
21669
|
-
return
|
|
21893
|
+
return _context39.stop();
|
|
21670
21894
|
}
|
|
21671
21895
|
}
|
|
21672
|
-
},
|
|
21896
|
+
}, _callee39, this);
|
|
21673
21897
|
}));
|
|
21674
21898
|
|
|
21675
|
-
function getLyraPositions(
|
|
21899
|
+
function getLyraPositions(_x168) {
|
|
21676
21900
|
return _getLyraPositions.apply(this, arguments);
|
|
21677
21901
|
}
|
|
21678
21902
|
|
|
@@ -21690,32 +21914,32 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21690
21914
|
_proto.changeFuturesMargin =
|
|
21691
21915
|
/*#__PURE__*/
|
|
21692
21916
|
function () {
|
|
21693
|
-
var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
21917
|
+
var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(market, changeAmount, options) {
|
|
21694
21918
|
var tx;
|
|
21695
|
-
return runtime_1.wrap(function
|
|
21919
|
+
return runtime_1.wrap(function _callee40$(_context40) {
|
|
21696
21920
|
while (1) {
|
|
21697
|
-
switch (
|
|
21921
|
+
switch (_context40.prev = _context40.next) {
|
|
21698
21922
|
case 0:
|
|
21699
21923
|
if (options === void 0) {
|
|
21700
21924
|
options = null;
|
|
21701
21925
|
}
|
|
21702
21926
|
|
|
21703
|
-
|
|
21927
|
+
_context40.next = 3;
|
|
21704
21928
|
return this.poolLogic.execTransaction(market, getFuturesChangeMarginTxData(changeAmount), options);
|
|
21705
21929
|
|
|
21706
21930
|
case 3:
|
|
21707
|
-
tx =
|
|
21708
|
-
return
|
|
21931
|
+
tx = _context40.sent;
|
|
21932
|
+
return _context40.abrupt("return", tx);
|
|
21709
21933
|
|
|
21710
21934
|
case 5:
|
|
21711
21935
|
case "end":
|
|
21712
|
-
return
|
|
21936
|
+
return _context40.stop();
|
|
21713
21937
|
}
|
|
21714
21938
|
}
|
|
21715
|
-
},
|
|
21939
|
+
}, _callee40, this);
|
|
21716
21940
|
}));
|
|
21717
21941
|
|
|
21718
|
-
function changeFuturesMargin(
|
|
21942
|
+
function changeFuturesMargin(_x169, _x170, _x171) {
|
|
21719
21943
|
return _changeFuturesMargin.apply(this, arguments);
|
|
21720
21944
|
}
|
|
21721
21945
|
|
|
@@ -21733,37 +21957,37 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21733
21957
|
_proto.changeFuturesPosition =
|
|
21734
21958
|
/*#__PURE__*/
|
|
21735
21959
|
function () {
|
|
21736
|
-
var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
21960
|
+
var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(market, changeAmount, options) {
|
|
21737
21961
|
var txData, tx;
|
|
21738
|
-
return runtime_1.wrap(function
|
|
21962
|
+
return runtime_1.wrap(function _callee41$(_context41) {
|
|
21739
21963
|
while (1) {
|
|
21740
|
-
switch (
|
|
21964
|
+
switch (_context41.prev = _context41.next) {
|
|
21741
21965
|
case 0:
|
|
21742
21966
|
if (options === void 0) {
|
|
21743
21967
|
options = null;
|
|
21744
21968
|
}
|
|
21745
21969
|
|
|
21746
|
-
|
|
21970
|
+
_context41.next = 3;
|
|
21747
21971
|
return getFuturesChangePositionTxData(changeAmount, market, this);
|
|
21748
21972
|
|
|
21749
21973
|
case 3:
|
|
21750
|
-
txData =
|
|
21751
|
-
|
|
21974
|
+
txData = _context41.sent;
|
|
21975
|
+
_context41.next = 6;
|
|
21752
21976
|
return this.poolLogic.execTransaction(market, txData, options);
|
|
21753
21977
|
|
|
21754
21978
|
case 6:
|
|
21755
|
-
tx =
|
|
21756
|
-
return
|
|
21979
|
+
tx = _context41.sent;
|
|
21980
|
+
return _context41.abrupt("return", tx);
|
|
21757
21981
|
|
|
21758
21982
|
case 8:
|
|
21759
21983
|
case "end":
|
|
21760
|
-
return
|
|
21984
|
+
return _context41.stop();
|
|
21761
21985
|
}
|
|
21762
21986
|
}
|
|
21763
|
-
},
|
|
21987
|
+
}, _callee41, this);
|
|
21764
21988
|
}));
|
|
21765
21989
|
|
|
21766
|
-
function changeFuturesPosition(
|
|
21990
|
+
function changeFuturesPosition(_x172, _x173, _x174) {
|
|
21767
21991
|
return _changeFuturesPosition.apply(this, arguments);
|
|
21768
21992
|
}
|
|
21769
21993
|
|
|
@@ -21780,37 +22004,37 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21780
22004
|
_proto.cancelFuturesOrder =
|
|
21781
22005
|
/*#__PURE__*/
|
|
21782
22006
|
function () {
|
|
21783
|
-
var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
22007
|
+
var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market, options) {
|
|
21784
22008
|
var txData, tx;
|
|
21785
|
-
return runtime_1.wrap(function
|
|
22009
|
+
return runtime_1.wrap(function _callee42$(_context42) {
|
|
21786
22010
|
while (1) {
|
|
21787
|
-
switch (
|
|
22011
|
+
switch (_context42.prev = _context42.next) {
|
|
21788
22012
|
case 0:
|
|
21789
22013
|
if (options === void 0) {
|
|
21790
22014
|
options = null;
|
|
21791
22015
|
}
|
|
21792
22016
|
|
|
21793
|
-
|
|
22017
|
+
_context42.next = 3;
|
|
21794
22018
|
return getFuturesCancelOrderTxData(this);
|
|
21795
22019
|
|
|
21796
22020
|
case 3:
|
|
21797
|
-
txData =
|
|
21798
|
-
|
|
22021
|
+
txData = _context42.sent;
|
|
22022
|
+
_context42.next = 6;
|
|
21799
22023
|
return this.poolLogic.execTransaction(market, txData, options);
|
|
21800
22024
|
|
|
21801
22025
|
case 6:
|
|
21802
|
-
tx =
|
|
21803
|
-
return
|
|
22026
|
+
tx = _context42.sent;
|
|
22027
|
+
return _context42.abrupt("return", tx);
|
|
21804
22028
|
|
|
21805
22029
|
case 8:
|
|
21806
22030
|
case "end":
|
|
21807
|
-
return
|
|
22031
|
+
return _context42.stop();
|
|
21808
22032
|
}
|
|
21809
22033
|
}
|
|
21810
|
-
},
|
|
22034
|
+
}, _callee42, this);
|
|
21811
22035
|
}));
|
|
21812
22036
|
|
|
21813
|
-
function cancelFuturesOrder(
|
|
22037
|
+
function cancelFuturesOrder(_x175, _x176) {
|
|
21814
22038
|
return _cancelFuturesOrder.apply(this, arguments);
|
|
21815
22039
|
}
|
|
21816
22040
|
|
|
@@ -21826,32 +22050,32 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21826
22050
|
_proto.mintManagerFee =
|
|
21827
22051
|
/*#__PURE__*/
|
|
21828
22052
|
function () {
|
|
21829
|
-
var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
22053
|
+
var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(options) {
|
|
21830
22054
|
var tx;
|
|
21831
|
-
return runtime_1.wrap(function
|
|
22055
|
+
return runtime_1.wrap(function _callee43$(_context43) {
|
|
21832
22056
|
while (1) {
|
|
21833
|
-
switch (
|
|
22057
|
+
switch (_context43.prev = _context43.next) {
|
|
21834
22058
|
case 0:
|
|
21835
22059
|
if (options === void 0) {
|
|
21836
22060
|
options = null;
|
|
21837
22061
|
}
|
|
21838
22062
|
|
|
21839
|
-
|
|
22063
|
+
_context43.next = 3;
|
|
21840
22064
|
return this.poolLogic.mintManagerFee(options);
|
|
21841
22065
|
|
|
21842
22066
|
case 3:
|
|
21843
|
-
tx =
|
|
21844
|
-
return
|
|
22067
|
+
tx = _context43.sent;
|
|
22068
|
+
return _context43.abrupt("return", tx);
|
|
21845
22069
|
|
|
21846
22070
|
case 5:
|
|
21847
22071
|
case "end":
|
|
21848
|
-
return
|
|
22072
|
+
return _context43.stop();
|
|
21849
22073
|
}
|
|
21850
22074
|
}
|
|
21851
|
-
},
|
|
22075
|
+
}, _callee43, this);
|
|
21852
22076
|
}));
|
|
21853
22077
|
|
|
21854
|
-
function mintManagerFee(
|
|
22078
|
+
function mintManagerFee(_x177) {
|
|
21855
22079
|
return _mintManagerFee.apply(this, arguments);
|
|
21856
22080
|
}
|
|
21857
22081
|
|
|
@@ -21866,25 +22090,25 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21866
22090
|
_proto.getAvailableManagerFee =
|
|
21867
22091
|
/*#__PURE__*/
|
|
21868
22092
|
function () {
|
|
21869
|
-
var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
22093
|
+
var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44() {
|
|
21870
22094
|
var fee;
|
|
21871
|
-
return runtime_1.wrap(function
|
|
22095
|
+
return runtime_1.wrap(function _callee44$(_context44) {
|
|
21872
22096
|
while (1) {
|
|
21873
|
-
switch (
|
|
22097
|
+
switch (_context44.prev = _context44.next) {
|
|
21874
22098
|
case 0:
|
|
21875
|
-
|
|
22099
|
+
_context44.next = 2;
|
|
21876
22100
|
return this.poolLogic.availableManagerFee();
|
|
21877
22101
|
|
|
21878
22102
|
case 2:
|
|
21879
|
-
fee =
|
|
21880
|
-
return
|
|
22103
|
+
fee = _context44.sent;
|
|
22104
|
+
return _context44.abrupt("return", ethers.BigNumber.from(fee));
|
|
21881
22105
|
|
|
21882
22106
|
case 4:
|
|
21883
22107
|
case "end":
|
|
21884
|
-
return
|
|
22108
|
+
return _context44.stop();
|
|
21885
22109
|
}
|
|
21886
22110
|
}
|
|
21887
|
-
},
|
|
22111
|
+
}, _callee44, this);
|
|
21888
22112
|
}));
|
|
21889
22113
|
|
|
21890
22114
|
function getAvailableManagerFee() {
|
|
@@ -21892,12 +22116,108 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21892
22116
|
}
|
|
21893
22117
|
|
|
21894
22118
|
return getAvailableManagerFee;
|
|
22119
|
+
}()
|
|
22120
|
+
/** Vest tokens (e.g. Ramses xoRAM)
|
|
22121
|
+
*
|
|
22122
|
+
* @param {string} tokenAddress Address of the token to vest
|
|
22123
|
+
* @param {BigNumber | string } changeAmount Negative for short, positive for long
|
|
22124
|
+
* @param {any} options Transaction options
|
|
22125
|
+
* @returns {Promise<any>} Transaction
|
|
22126
|
+
*/
|
|
22127
|
+
;
|
|
22128
|
+
|
|
22129
|
+
_proto.vestTokens =
|
|
22130
|
+
/*#__PURE__*/
|
|
22131
|
+
function () {
|
|
22132
|
+
var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(tokenAddress, amount, options) {
|
|
22133
|
+
var txData, tx;
|
|
22134
|
+
return runtime_1.wrap(function _callee45$(_context45) {
|
|
22135
|
+
while (1) {
|
|
22136
|
+
switch (_context45.prev = _context45.next) {
|
|
22137
|
+
case 0:
|
|
22138
|
+
if (options === void 0) {
|
|
22139
|
+
options = null;
|
|
22140
|
+
}
|
|
22141
|
+
|
|
22142
|
+
_context45.next = 3;
|
|
22143
|
+
return getCreateVestTxData(amount);
|
|
22144
|
+
|
|
22145
|
+
case 3:
|
|
22146
|
+
txData = _context45.sent;
|
|
22147
|
+
_context45.next = 6;
|
|
22148
|
+
return this.poolLogic.execTransaction(tokenAddress, txData, options);
|
|
22149
|
+
|
|
22150
|
+
case 6:
|
|
22151
|
+
tx = _context45.sent;
|
|
22152
|
+
return _context45.abrupt("return", tx);
|
|
22153
|
+
|
|
22154
|
+
case 8:
|
|
22155
|
+
case "end":
|
|
22156
|
+
return _context45.stop();
|
|
22157
|
+
}
|
|
22158
|
+
}
|
|
22159
|
+
}, _callee45, this);
|
|
22160
|
+
}));
|
|
22161
|
+
|
|
22162
|
+
function vestTokens(_x178, _x179, _x180) {
|
|
22163
|
+
return _vestTokens.apply(this, arguments);
|
|
22164
|
+
}
|
|
22165
|
+
|
|
22166
|
+
return vestTokens;
|
|
22167
|
+
}()
|
|
22168
|
+
/** Exit position of vested tokens (e.g. Ramses xoRAM)
|
|
22169
|
+
*
|
|
22170
|
+
* @param {string} tokenAddress Address of the token to vest
|
|
22171
|
+
* @param {number } id position Id of the vested tokens
|
|
22172
|
+
* @param {any} options Transaction options
|
|
22173
|
+
* @returns {Promise<any>} Transaction
|
|
22174
|
+
*/
|
|
22175
|
+
;
|
|
22176
|
+
|
|
22177
|
+
_proto.exitVestedToken =
|
|
22178
|
+
/*#__PURE__*/
|
|
22179
|
+
function () {
|
|
22180
|
+
var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(tokenAddress, id, options) {
|
|
22181
|
+
var txData, tx;
|
|
22182
|
+
return runtime_1.wrap(function _callee46$(_context46) {
|
|
22183
|
+
while (1) {
|
|
22184
|
+
switch (_context46.prev = _context46.next) {
|
|
22185
|
+
case 0:
|
|
22186
|
+
if (options === void 0) {
|
|
22187
|
+
options = null;
|
|
22188
|
+
}
|
|
22189
|
+
|
|
22190
|
+
_context46.next = 3;
|
|
22191
|
+
return getExitVestTxData(id);
|
|
22192
|
+
|
|
22193
|
+
case 3:
|
|
22194
|
+
txData = _context46.sent;
|
|
22195
|
+
_context46.next = 6;
|
|
22196
|
+
return this.poolLogic.execTransaction(tokenAddress, txData, options);
|
|
22197
|
+
|
|
22198
|
+
case 6:
|
|
22199
|
+
tx = _context46.sent;
|
|
22200
|
+
return _context46.abrupt("return", tx);
|
|
22201
|
+
|
|
22202
|
+
case 8:
|
|
22203
|
+
case "end":
|
|
22204
|
+
return _context46.stop();
|
|
22205
|
+
}
|
|
22206
|
+
}
|
|
22207
|
+
}, _callee46, this);
|
|
22208
|
+
}));
|
|
22209
|
+
|
|
22210
|
+
function exitVestedToken(_x181, _x182, _x183) {
|
|
22211
|
+
return _exitVestedToken.apply(this, arguments);
|
|
22212
|
+
}
|
|
22213
|
+
|
|
22214
|
+
return exitVestedToken;
|
|
21895
22215
|
}();
|
|
21896
22216
|
|
|
21897
22217
|
return Pool;
|
|
21898
22218
|
}();
|
|
21899
22219
|
|
|
21900
|
-
var abi$
|
|
22220
|
+
var abi$r = [
|
|
21901
22221
|
{
|
|
21902
22222
|
inputs: [
|
|
21903
22223
|
{
|
|
@@ -22121,10 +22441,10 @@ var abi$q = [
|
|
|
22121
22441
|
}
|
|
22122
22442
|
];
|
|
22123
22443
|
var UniswapV2Factory = {
|
|
22124
|
-
abi: abi$
|
|
22444
|
+
abi: abi$r
|
|
22125
22445
|
};
|
|
22126
22446
|
|
|
22127
|
-
var abi$
|
|
22447
|
+
var abi$s = [
|
|
22128
22448
|
{
|
|
22129
22449
|
anonymous: false,
|
|
22130
22450
|
inputs: [
|
|
@@ -22868,7 +23188,7 @@ var evm = {
|
|
|
22868
23188
|
}
|
|
22869
23189
|
};
|
|
22870
23190
|
var UniswapV2Pair = {
|
|
22871
|
-
abi: abi$
|
|
23191
|
+
abi: abi$s,
|
|
22872
23192
|
evm: evm,
|
|
22873
23193
|
"interface": [
|
|
22874
23194
|
{
|
|
@@ -23599,7 +23919,7 @@ var UniswapV2Pair = {
|
|
|
23599
23919
|
]
|
|
23600
23920
|
};
|
|
23601
23921
|
|
|
23602
|
-
var abi$
|
|
23922
|
+
var abi$t = [
|
|
23603
23923
|
{
|
|
23604
23924
|
inputs: [
|
|
23605
23925
|
{
|
|
@@ -24794,7 +25114,7 @@ var abi$s = [
|
|
|
24794
25114
|
}
|
|
24795
25115
|
];
|
|
24796
25116
|
var IBalancerV2Vault = {
|
|
24797
|
-
abi: abi$
|
|
25117
|
+
abi: abi$t
|
|
24798
25118
|
};
|
|
24799
25119
|
|
|
24800
25120
|
var Utils = /*#__PURE__*/function () {
|