@dhedge/v2-sdk 1.9.6 → 1.9.7
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/README.md +213 -76
- package/dist/entities/pool.d.ts +12 -6
- package/dist/test/constants.d.ts +22 -0
- package/dist/v2-sdk.cjs.development.js +175 -71
- 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 +175 -71
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/entities/pool.ts +46 -6
- package/src/test/arrakis.test.ts +119 -75
- package/src/test/constants.ts +32 -4
- package/src/test/uniswap.test.ts +101 -72
- package/dist/utils/index.d.ts +0 -7
- package/dist/utils/merkle.d.ts +0 -22
- package/src/utils/index.ts +0 -38
- package/src/utils/merkle.ts +0 -172
package/dist/v2-sdk.esm.js
CHANGED
|
@@ -4244,7 +4244,7 @@ var _factoryAddress, _Network$POLYGON, _Network$OPTIMISM, _Network$ARBITRUM, _Ne
|
|
|
4244
4244
|
require("dotenv").config();
|
|
4245
4245
|
|
|
4246
4246
|
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);
|
|
4247
|
-
var routerAddress = (_routerAddress = {}, _routerAddress[Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[Dapp.UNISWAPV3] = "
|
|
4247
|
+
var routerAddress = (_routerAddress = {}, _routerAddress[Network.POLYGON] = (_Network$POLYGON = {}, _Network$POLYGON[Dapp.SUSHISWAP] = "0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506", _Network$POLYGON[Dapp.AAVE] = "0x8dFf5E27EA6b7AC08EbFdf9eB090F32ee9a30fcf", _Network$POLYGON[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$POLYGON[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$POLYGON[Dapp.QUICKSWAP] = "0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff", _Network$POLYGON[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$POLYGON[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$POLYGON[Dapp.ARRAKIS] = "0xc73fb100a995b33f9fa181d420f4c8d74506df66", _Network$POLYGON[Dapp.TOROS] = "0xB2F1498983bf9c9442c35F772e6C1AdE66a8DeDE", _Network$POLYGON[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$POLYGON), _routerAddress[Network.OPTIMISM] = (_Network$OPTIMISM = {}, _Network$OPTIMISM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$OPTIMISM[Dapp.SYNTHETIX] = "0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4", _Network$OPTIMISM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$OPTIMISM[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$OPTIMISM[Dapp.TOROS] = "0x3988513793bCE39f0167064A9F7fC3617FaF35AB", _Network$OPTIMISM[Dapp.VELODROME] = "0x9c12939390052919aF3155f41Bf4160Fd3666A6f", _Network$OPTIMISM[Dapp.VELODROMEV2] = "0xa062ae8a9c5e11aaa026fc2670b0d65ccc8b2858", _Network$OPTIMISM[Dapp.LYRA] = "0xCCE7819d65f348c64B7Beb205BA367b3fE33763B", _Network$OPTIMISM[Dapp.ARRAKIS] = "0x9ce88a56d120300061593eF7AD074A1B710094d5", _Network$OPTIMISM[Dapp.ZEROEX] = "0xdef1abe32c034e558cdd535791643c58a13acc10", _Network$OPTIMISM), _routerAddress[Network.ARBITRUM] = (_Network$ARBITRUM = {}, _Network$ARBITRUM[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$ARBITRUM[Dapp.UNISWAPV3] = "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45", _Network$ARBITRUM[Dapp.AAVEV3] = "0x794a61358D6845594F94dc1DB02A252b5b4814aD", _Network$ARBITRUM[Dapp.BALANCER] = "0xBA12222222228d8Ba445958a75a0704d566BF2C8", _Network$ARBITRUM[Dapp.RAMSES] = "0xaaa87963efeb6f7e0a2711f397663105acb1805e", _Network$ARBITRUM), _routerAddress[Network.BASE] = (_Network$BASE = {}, _Network$BASE[Dapp.ONEINCH] = "0x1111111254EEB25477B68fb85Ed929f73A960582", _Network$BASE[Dapp.ZEROEX] = "0xdef1c0ded9bec7f1a1670819833240f027b25eff", _Network$BASE), _routerAddress);
|
|
4248
4248
|
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);
|
|
4249
4249
|
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] = {}, _stakingAddress[Network.ARBITRUM] = {}, _stakingAddress[Network.BASE] = {}, _stakingAddress);
|
|
4250
4250
|
var aaveAddressProvider = (_aaveAddressProvider = {}, _aaveAddressProvider[Network.POLYGON] = (_Network$POLYGON4 = {}, _Network$POLYGON4[Dapp.AAVE] = "0xd05e3E715d945B59290df0ae8eF85c1BdB684744", _Network$POLYGON4[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$POLYGON4), _aaveAddressProvider[Network.OPTIMISM] = (_Network$OPTIMISM2 = {}, _Network$OPTIMISM2[Dapp.AAVEV3] = "0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb", _Network$OPTIMISM2), _aaveAddressProvider[Network.ARBITRUM] = (_Network$ARBITRUM2 = {}, _Network$ARBITRUM2[Dapp.AAVEV3] = "0xa97684ead0e402dc232d5a977953df7ecbab3cdb", _Network$ARBITRUM2), _aaveAddressProvider[Network.BASE] = (_Network$BASE2 = {}, _Network$BASE2[Dapp.AAVEV3] = "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D", _Network$BASE2), _aaveAddressProvider);
|
|
@@ -20121,6 +20121,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20121
20121
|
* @param {string} nasset Address of deposit asset
|
|
20122
20122
|
* @param {BigNumber | string} amount Amount to be approved
|
|
20123
20123
|
* @param {any} options Transaction options
|
|
20124
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
20124
20125
|
* @returns {Promise<any>} Transaction
|
|
20125
20126
|
*/
|
|
20126
20127
|
;
|
|
@@ -20128,7 +20129,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20128
20129
|
_proto.approveDeposit =
|
|
20129
20130
|
/*#__PURE__*/
|
|
20130
20131
|
function () {
|
|
20131
|
-
var _approveDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(asset, amount, options) {
|
|
20132
|
+
var _approveDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(asset, amount, options, estimateGas) {
|
|
20132
20133
|
var iERC20, tx;
|
|
20133
20134
|
return runtime_1.wrap(function _callee2$(_context2) {
|
|
20134
20135
|
while (1) {
|
|
@@ -20138,15 +20139,32 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20138
20139
|
options = null;
|
|
20139
20140
|
}
|
|
20140
20141
|
|
|
20142
|
+
if (estimateGas === void 0) {
|
|
20143
|
+
estimateGas = false;
|
|
20144
|
+
}
|
|
20145
|
+
|
|
20141
20146
|
iERC20 = new ethers.Contract(asset, IERC20.abi, this.signer);
|
|
20142
|
-
|
|
20147
|
+
|
|
20148
|
+
if (!estimateGas) {
|
|
20149
|
+
_context2.next = 7;
|
|
20150
|
+
break;
|
|
20151
|
+
}
|
|
20152
|
+
|
|
20153
|
+
_context2.next = 6;
|
|
20154
|
+
return iERC20.estimateGas.approve(this.address, amount, options);
|
|
20155
|
+
|
|
20156
|
+
case 6:
|
|
20157
|
+
return _context2.abrupt("return", _context2.sent);
|
|
20158
|
+
|
|
20159
|
+
case 7:
|
|
20160
|
+
_context2.next = 9;
|
|
20143
20161
|
return iERC20.approve(this.address, amount, options);
|
|
20144
20162
|
|
|
20145
|
-
case
|
|
20163
|
+
case 9:
|
|
20146
20164
|
tx = _context2.sent;
|
|
20147
20165
|
return _context2.abrupt("return", tx);
|
|
20148
20166
|
|
|
20149
|
-
case
|
|
20167
|
+
case 11:
|
|
20150
20168
|
case "end":
|
|
20151
20169
|
return _context2.stop();
|
|
20152
20170
|
}
|
|
@@ -20154,7 +20172,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20154
20172
|
}, _callee2, this);
|
|
20155
20173
|
}));
|
|
20156
20174
|
|
|
20157
|
-
function approveDeposit(_x, _x2, _x3) {
|
|
20175
|
+
function approveDeposit(_x, _x2, _x3, _x4) {
|
|
20158
20176
|
return _approveDeposit.apply(this, arguments);
|
|
20159
20177
|
}
|
|
20160
20178
|
|
|
@@ -20165,6 +20183,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20165
20183
|
* @param {string} asset Address of asset
|
|
20166
20184
|
* @param {BigNumber | string} amount Amount to be deposited
|
|
20167
20185
|
* @param {any} options Transaction options
|
|
20186
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
20168
20187
|
* @returns {Promise<any>} Transaction
|
|
20169
20188
|
*/
|
|
20170
20189
|
;
|
|
@@ -20172,7 +20191,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20172
20191
|
_proto.deposit =
|
|
20173
20192
|
/*#__PURE__*/
|
|
20174
20193
|
function () {
|
|
20175
|
-
var _deposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(asset, amount, options) {
|
|
20194
|
+
var _deposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(asset, amount, options, estimateGas) {
|
|
20176
20195
|
var tx;
|
|
20177
20196
|
return runtime_1.wrap(function _callee3$(_context3) {
|
|
20178
20197
|
while (1) {
|
|
@@ -20182,14 +20201,30 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20182
20201
|
options = null;
|
|
20183
20202
|
}
|
|
20184
20203
|
|
|
20185
|
-
|
|
20204
|
+
if (estimateGas === void 0) {
|
|
20205
|
+
estimateGas = false;
|
|
20206
|
+
}
|
|
20207
|
+
|
|
20208
|
+
if (!estimateGas) {
|
|
20209
|
+
_context3.next = 6;
|
|
20210
|
+
break;
|
|
20211
|
+
}
|
|
20212
|
+
|
|
20213
|
+
_context3.next = 5;
|
|
20214
|
+
return this.poolLogic.estimateGas.deposit(asset, amount, options);
|
|
20215
|
+
|
|
20216
|
+
case 5:
|
|
20217
|
+
return _context3.abrupt("return", _context3.sent);
|
|
20218
|
+
|
|
20219
|
+
case 6:
|
|
20220
|
+
_context3.next = 8;
|
|
20186
20221
|
return this.poolLogic.deposit(asset, amount, options);
|
|
20187
20222
|
|
|
20188
|
-
case
|
|
20223
|
+
case 8:
|
|
20189
20224
|
tx = _context3.sent;
|
|
20190
20225
|
return _context3.abrupt("return", tx);
|
|
20191
20226
|
|
|
20192
|
-
case
|
|
20227
|
+
case 10:
|
|
20193
20228
|
case "end":
|
|
20194
20229
|
return _context3.stop();
|
|
20195
20230
|
}
|
|
@@ -20197,7 +20232,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20197
20232
|
}, _callee3, this);
|
|
20198
20233
|
}));
|
|
20199
20234
|
|
|
20200
|
-
function deposit(
|
|
20235
|
+
function deposit(_x5, _x6, _x7, _x8) {
|
|
20201
20236
|
return _deposit.apply(this, arguments);
|
|
20202
20237
|
}
|
|
20203
20238
|
|
|
@@ -20207,6 +20242,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20207
20242
|
* Withdraw assets from a pool
|
|
20208
20243
|
* @param fundTokenAmount Amount of pool tokens to be withdrawn
|
|
20209
20244
|
* @param {any} options Transaction options
|
|
20245
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
20210
20246
|
* @returns {Promise<any>} Transaction
|
|
20211
20247
|
*/
|
|
20212
20248
|
;
|
|
@@ -20214,7 +20250,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20214
20250
|
_proto.withdraw =
|
|
20215
20251
|
/*#__PURE__*/
|
|
20216
20252
|
function () {
|
|
20217
|
-
var _withdraw = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(fundTokenAmount, options) {
|
|
20253
|
+
var _withdraw = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(fundTokenAmount, options, estimateGas) {
|
|
20218
20254
|
var tx;
|
|
20219
20255
|
return runtime_1.wrap(function _callee4$(_context4) {
|
|
20220
20256
|
while (1) {
|
|
@@ -20224,14 +20260,30 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20224
20260
|
options = null;
|
|
20225
20261
|
}
|
|
20226
20262
|
|
|
20227
|
-
|
|
20263
|
+
if (estimateGas === void 0) {
|
|
20264
|
+
estimateGas = false;
|
|
20265
|
+
}
|
|
20266
|
+
|
|
20267
|
+
if (!estimateGas) {
|
|
20268
|
+
_context4.next = 6;
|
|
20269
|
+
break;
|
|
20270
|
+
}
|
|
20271
|
+
|
|
20272
|
+
_context4.next = 5;
|
|
20273
|
+
return this.poolLogic.estimateGas.withdraw(fundTokenAmount, options);
|
|
20274
|
+
|
|
20275
|
+
case 5:
|
|
20276
|
+
return _context4.abrupt("return", _context4.sent);
|
|
20277
|
+
|
|
20278
|
+
case 6:
|
|
20279
|
+
_context4.next = 8;
|
|
20228
20280
|
return this.poolLogic.withdraw(fundTokenAmount, options);
|
|
20229
20281
|
|
|
20230
|
-
case
|
|
20282
|
+
case 8:
|
|
20231
20283
|
tx = _context4.sent;
|
|
20232
20284
|
return _context4.abrupt("return", tx);
|
|
20233
20285
|
|
|
20234
|
-
case
|
|
20286
|
+
case 10:
|
|
20235
20287
|
case "end":
|
|
20236
20288
|
return _context4.stop();
|
|
20237
20289
|
}
|
|
@@ -20239,7 +20291,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20239
20291
|
}, _callee4, this);
|
|
20240
20292
|
}));
|
|
20241
20293
|
|
|
20242
|
-
function withdraw(
|
|
20294
|
+
function withdraw(_x9, _x10, _x11) {
|
|
20243
20295
|
return _withdraw.apply(this, arguments);
|
|
20244
20296
|
}
|
|
20245
20297
|
|
|
@@ -20291,7 +20343,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20291
20343
|
}, _callee5, this);
|
|
20292
20344
|
}));
|
|
20293
20345
|
|
|
20294
|
-
function approve(
|
|
20346
|
+
function approve(_x12, _x13, _x14, _x15, _x16) {
|
|
20295
20347
|
return _approve.apply(this, arguments);
|
|
20296
20348
|
}
|
|
20297
20349
|
|
|
@@ -20342,7 +20394,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20342
20394
|
}, _callee6, this);
|
|
20343
20395
|
}));
|
|
20344
20396
|
|
|
20345
|
-
function approveStaking(
|
|
20397
|
+
function approveStaking(_x17, _x18, _x19, _x20, _x21) {
|
|
20346
20398
|
return _approveStaking.apply(this, arguments);
|
|
20347
20399
|
}
|
|
20348
20400
|
|
|
@@ -20393,7 +20445,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20393
20445
|
}, _callee7, this);
|
|
20394
20446
|
}));
|
|
20395
20447
|
|
|
20396
|
-
function approveUniswapV3Liquidity(
|
|
20448
|
+
function approveUniswapV3Liquidity(_x22, _x23, _x24, _x25) {
|
|
20397
20449
|
return _approveUniswapV3Liquidity.apply(this, arguments);
|
|
20398
20450
|
}
|
|
20399
20451
|
|
|
@@ -20444,7 +20496,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20444
20496
|
}, _callee8, this);
|
|
20445
20497
|
}));
|
|
20446
20498
|
|
|
20447
|
-
function approveSpender(
|
|
20499
|
+
function approveSpender(_x26, _x27, _x28, _x29, _x30) {
|
|
20448
20500
|
return _approveSpender.apply(this, arguments);
|
|
20449
20501
|
}
|
|
20450
20502
|
|
|
@@ -20570,7 +20622,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20570
20622
|
}, _callee9, this);
|
|
20571
20623
|
}));
|
|
20572
20624
|
|
|
20573
|
-
function trade(
|
|
20625
|
+
function trade(_x31, _x32, _x33, _x34, _x35, _x36, _x37) {
|
|
20574
20626
|
return _trade.apply(this, arguments);
|
|
20575
20627
|
}
|
|
20576
20628
|
|
|
@@ -20636,7 +20688,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20636
20688
|
}, _callee10, this);
|
|
20637
20689
|
}));
|
|
20638
20690
|
|
|
20639
|
-
function addLiquidity(
|
|
20691
|
+
function addLiquidity(_x38, _x39, _x40, _x41, _x42, _x43, _x44) {
|
|
20640
20692
|
return _addLiquidity.apply(this, arguments);
|
|
20641
20693
|
}
|
|
20642
20694
|
|
|
@@ -20700,7 +20752,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20700
20752
|
}, _callee11, this);
|
|
20701
20753
|
}));
|
|
20702
20754
|
|
|
20703
|
-
function removeLiquidity(
|
|
20755
|
+
function removeLiquidity(_x45, _x46, _x47, _x48, _x49, _x50) {
|
|
20704
20756
|
return _removeLiquidity.apply(this, arguments);
|
|
20705
20757
|
}
|
|
20706
20758
|
|
|
@@ -20756,7 +20808,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20756
20808
|
}, _callee12, this);
|
|
20757
20809
|
}));
|
|
20758
20810
|
|
|
20759
|
-
function stake(
|
|
20811
|
+
function stake(_x51, _x52, _x53, _x54, _x55) {
|
|
20760
20812
|
return _stake.apply(this, arguments);
|
|
20761
20813
|
}
|
|
20762
20814
|
|
|
@@ -20826,7 +20878,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20826
20878
|
}, _callee13, this);
|
|
20827
20879
|
}));
|
|
20828
20880
|
|
|
20829
|
-
function stakeInGauge(
|
|
20881
|
+
function stakeInGauge(_x56, _x57, _x58, _x59, _x60) {
|
|
20830
20882
|
return _stakeInGauge.apply(this, arguments);
|
|
20831
20883
|
}
|
|
20832
20884
|
|
|
@@ -20882,7 +20934,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20882
20934
|
}, _callee14, this);
|
|
20883
20935
|
}));
|
|
20884
20936
|
|
|
20885
|
-
function unStake(
|
|
20937
|
+
function unStake(_x61, _x62, _x63, _x64, _x65) {
|
|
20886
20938
|
return _unStake.apply(this, arguments);
|
|
20887
20939
|
}
|
|
20888
20940
|
|
|
@@ -20932,7 +20984,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20932
20984
|
}, _callee15, this);
|
|
20933
20985
|
}));
|
|
20934
20986
|
|
|
20935
|
-
function unstakeFromGauge(
|
|
20987
|
+
function unstakeFromGauge(_x66, _x67, _x68, _x69) {
|
|
20936
20988
|
return _unstakeFromGauge.apply(this, arguments);
|
|
20937
20989
|
}
|
|
20938
20990
|
|
|
@@ -20988,7 +21040,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
20988
21040
|
}, _callee16, this);
|
|
20989
21041
|
}));
|
|
20990
21042
|
|
|
20991
|
-
function lend(
|
|
21043
|
+
function lend(_x70, _x71, _x72, _x73, _x74, _x75) {
|
|
20992
21044
|
return _lend.apply(this, arguments);
|
|
20993
21045
|
}
|
|
20994
21046
|
|
|
@@ -21039,7 +21091,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21039
21091
|
}, _callee17, this);
|
|
21040
21092
|
}));
|
|
21041
21093
|
|
|
21042
|
-
function withdrawDeposit(
|
|
21094
|
+
function withdrawDeposit(_x76, _x77, _x78, _x79, _x80) {
|
|
21043
21095
|
return _withdrawDeposit.apply(this, arguments);
|
|
21044
21096
|
}
|
|
21045
21097
|
|
|
@@ -21095,7 +21147,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21095
21147
|
}, _callee18, this);
|
|
21096
21148
|
}));
|
|
21097
21149
|
|
|
21098
|
-
function borrow(
|
|
21150
|
+
function borrow(_x81, _x82, _x83, _x84, _x85, _x86) {
|
|
21099
21151
|
return _borrow.apply(this, arguments);
|
|
21100
21152
|
}
|
|
21101
21153
|
|
|
@@ -21146,7 +21198,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21146
21198
|
}, _callee19, this);
|
|
21147
21199
|
}));
|
|
21148
21200
|
|
|
21149
|
-
function repay(
|
|
21201
|
+
function repay(_x87, _x88, _x89, _x90, _x91) {
|
|
21150
21202
|
return _repay.apply(this, arguments);
|
|
21151
21203
|
}
|
|
21152
21204
|
|
|
@@ -21201,7 +21253,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21201
21253
|
}, _callee20, this);
|
|
21202
21254
|
}));
|
|
21203
21255
|
|
|
21204
|
-
function harvestRewards(
|
|
21256
|
+
function harvestRewards(_x92, _x93, _x94, _x95) {
|
|
21205
21257
|
return _harvestRewards.apply(this, arguments);
|
|
21206
21258
|
}
|
|
21207
21259
|
|
|
@@ -21211,6 +21263,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21211
21263
|
* Change enabled pool assets
|
|
21212
21264
|
* @param {AssetEnabled[]} assets New pool assets
|
|
21213
21265
|
* @param {any} options Transaction options
|
|
21266
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
21214
21267
|
* @returns {Promise<any>} Transaction
|
|
21215
21268
|
*/
|
|
21216
21269
|
;
|
|
@@ -21218,7 +21271,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21218
21271
|
_proto.changeAssets =
|
|
21219
21272
|
/*#__PURE__*/
|
|
21220
21273
|
function () {
|
|
21221
|
-
var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(assets, options) {
|
|
21274
|
+
var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(assets, options, estimateGas) {
|
|
21222
21275
|
var currentAssetsEnabled, currentAssets, newAssets, removedAssets, changedAssets, tx;
|
|
21223
21276
|
return runtime_1.wrap(function _callee21$(_context21) {
|
|
21224
21277
|
while (1) {
|
|
@@ -21228,10 +21281,14 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21228
21281
|
options = null;
|
|
21229
21282
|
}
|
|
21230
21283
|
|
|
21231
|
-
|
|
21284
|
+
if (estimateGas === void 0) {
|
|
21285
|
+
estimateGas = false;
|
|
21286
|
+
}
|
|
21287
|
+
|
|
21288
|
+
_context21.next = 4;
|
|
21232
21289
|
return this.getComposition();
|
|
21233
21290
|
|
|
21234
|
-
case
|
|
21291
|
+
case 4:
|
|
21235
21292
|
currentAssetsEnabled = _context21.sent;
|
|
21236
21293
|
currentAssets = currentAssetsEnabled.map(function (e) {
|
|
21237
21294
|
return e.asset.toLocaleLowerCase();
|
|
@@ -21245,14 +21302,27 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21245
21302
|
changedAssets = assets.map(function (e) {
|
|
21246
21303
|
return [e.asset, e.isDeposit];
|
|
21247
21304
|
});
|
|
21248
|
-
|
|
21305
|
+
|
|
21306
|
+
if (!estimateGas) {
|
|
21307
|
+
_context21.next = 13;
|
|
21308
|
+
break;
|
|
21309
|
+
}
|
|
21310
|
+
|
|
21311
|
+
_context21.next = 12;
|
|
21312
|
+
return this.managerLogic.estimateGas.changeAssets(changedAssets, removedAssets, options);
|
|
21313
|
+
|
|
21314
|
+
case 12:
|
|
21315
|
+
return _context21.abrupt("return", _context21.sent);
|
|
21316
|
+
|
|
21317
|
+
case 13:
|
|
21318
|
+
_context21.next = 15;
|
|
21249
21319
|
return this.managerLogic.changeAssets(changedAssets, removedAssets, options);
|
|
21250
21320
|
|
|
21251
|
-
case
|
|
21321
|
+
case 15:
|
|
21252
21322
|
tx = _context21.sent;
|
|
21253
21323
|
return _context21.abrupt("return", tx);
|
|
21254
21324
|
|
|
21255
|
-
case
|
|
21325
|
+
case 17:
|
|
21256
21326
|
case "end":
|
|
21257
21327
|
return _context21.stop();
|
|
21258
21328
|
}
|
|
@@ -21260,7 +21330,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21260
21330
|
}, _callee21, this);
|
|
21261
21331
|
}));
|
|
21262
21332
|
|
|
21263
|
-
function changeAssets(
|
|
21333
|
+
function changeAssets(_x96, _x97, _x98) {
|
|
21264
21334
|
return _changeAssets.apply(this, arguments);
|
|
21265
21335
|
}
|
|
21266
21336
|
|
|
@@ -21270,6 +21340,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21270
21340
|
* Set a new trader with trading permissions
|
|
21271
21341
|
* @param {string} trader Address trader account
|
|
21272
21342
|
* @param {any} options Transaction options
|
|
21343
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
21273
21344
|
* @returns {Promise<any>} Transaction
|
|
21274
21345
|
*/
|
|
21275
21346
|
;
|
|
@@ -21277,7 +21348,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21277
21348
|
_proto.setTrader =
|
|
21278
21349
|
/*#__PURE__*/
|
|
21279
21350
|
function () {
|
|
21280
|
-
var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(trader, options) {
|
|
21351
|
+
var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(trader, options, estimateGas) {
|
|
21281
21352
|
var tx;
|
|
21282
21353
|
return runtime_1.wrap(function _callee22$(_context22) {
|
|
21283
21354
|
while (1) {
|
|
@@ -21287,14 +21358,30 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21287
21358
|
options = null;
|
|
21288
21359
|
}
|
|
21289
21360
|
|
|
21290
|
-
|
|
21361
|
+
if (estimateGas === void 0) {
|
|
21362
|
+
estimateGas = false;
|
|
21363
|
+
}
|
|
21364
|
+
|
|
21365
|
+
if (!estimateGas) {
|
|
21366
|
+
_context22.next = 6;
|
|
21367
|
+
break;
|
|
21368
|
+
}
|
|
21369
|
+
|
|
21370
|
+
_context22.next = 5;
|
|
21371
|
+
return this.managerLogic.estimateGas.setTrader(trader, options);
|
|
21372
|
+
|
|
21373
|
+
case 5:
|
|
21374
|
+
return _context22.abrupt("return", _context22.sent);
|
|
21375
|
+
|
|
21376
|
+
case 6:
|
|
21377
|
+
_context22.next = 8;
|
|
21291
21378
|
return this.managerLogic.setTrader(trader, options);
|
|
21292
21379
|
|
|
21293
|
-
case
|
|
21380
|
+
case 8:
|
|
21294
21381
|
tx = _context22.sent;
|
|
21295
21382
|
return _context22.abrupt("return", tx);
|
|
21296
21383
|
|
|
21297
|
-
case
|
|
21384
|
+
case 10:
|
|
21298
21385
|
case "end":
|
|
21299
21386
|
return _context22.stop();
|
|
21300
21387
|
}
|
|
@@ -21302,7 +21389,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21302
21389
|
}, _callee22, this);
|
|
21303
21390
|
}));
|
|
21304
21391
|
|
|
21305
|
-
function setTrader(
|
|
21392
|
+
function setTrader(_x99, _x100, _x101) {
|
|
21306
21393
|
return _setTrader.apply(this, arguments);
|
|
21307
21394
|
}
|
|
21308
21395
|
|
|
@@ -21352,7 +21439,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21352
21439
|
}, _callee23, this);
|
|
21353
21440
|
}));
|
|
21354
21441
|
|
|
21355
|
-
function joinBalancerPool(
|
|
21442
|
+
function joinBalancerPool(_x102, _x103, _x104, _x105, _x106) {
|
|
21356
21443
|
return _joinBalancerPool.apply(this, arguments);
|
|
21357
21444
|
}
|
|
21358
21445
|
|
|
@@ -21407,7 +21494,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21407
21494
|
}, _callee24, this);
|
|
21408
21495
|
}));
|
|
21409
21496
|
|
|
21410
|
-
function exitBalancerPool(
|
|
21497
|
+
function exitBalancerPool(_x107, _x108, _x109, _x110, _x111, _x112) {
|
|
21411
21498
|
return _exitBalancerPool.apply(this, arguments);
|
|
21412
21499
|
}
|
|
21413
21500
|
|
|
@@ -21463,7 +21550,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21463
21550
|
}, _callee25, this);
|
|
21464
21551
|
}));
|
|
21465
21552
|
|
|
21466
|
-
function harvestAaveRewards(
|
|
21553
|
+
function harvestAaveRewards(_x113, _x114, _x115) {
|
|
21467
21554
|
return _harvestAaveRewards.apply(this, arguments);
|
|
21468
21555
|
}
|
|
21469
21556
|
|
|
@@ -21516,7 +21603,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21516
21603
|
}, _callee26, this);
|
|
21517
21604
|
}));
|
|
21518
21605
|
|
|
21519
|
-
function harvestAaveV3Rewards(
|
|
21606
|
+
function harvestAaveV3Rewards(_x116, _x117, _x118, _x119) {
|
|
21520
21607
|
return _harvestAaveV3Rewards.apply(this, arguments);
|
|
21521
21608
|
}
|
|
21522
21609
|
|
|
@@ -21586,7 +21673,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21586
21673
|
}, _callee27, this);
|
|
21587
21674
|
}));
|
|
21588
21675
|
|
|
21589
|
-
function addLiquidityUniswapV3(
|
|
21676
|
+
function addLiquidityUniswapV3(_x120, _x121, _x122, _x123, _x124, _x125, _x126, _x127, _x128, _x129, _x130) {
|
|
21590
21677
|
return _addLiquidityUniswapV.apply(this, arguments);
|
|
21591
21678
|
}
|
|
21592
21679
|
|
|
@@ -21697,7 +21784,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21697
21784
|
}, _callee28, this);
|
|
21698
21785
|
}));
|
|
21699
21786
|
|
|
21700
|
-
function decreaseLiquidity(
|
|
21787
|
+
function decreaseLiquidity(_x131, _x132, _x133, _x134, _x135) {
|
|
21701
21788
|
return _decreaseLiquidity.apply(this, arguments);
|
|
21702
21789
|
}
|
|
21703
21790
|
|
|
@@ -21787,7 +21874,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21787
21874
|
}, _callee29, this);
|
|
21788
21875
|
}));
|
|
21789
21876
|
|
|
21790
|
-
function increaseLiquidity(
|
|
21877
|
+
function increaseLiquidity(_x136, _x137, _x138, _x139, _x140, _x141) {
|
|
21791
21878
|
return _increaseLiquidity.apply(this, arguments);
|
|
21792
21879
|
}
|
|
21793
21880
|
|
|
@@ -21865,7 +21952,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21865
21952
|
}, _callee30, this);
|
|
21866
21953
|
}));
|
|
21867
21954
|
|
|
21868
|
-
function claimFees(
|
|
21955
|
+
function claimFees(_x142, _x143, _x144, _x145) {
|
|
21869
21956
|
return _claimFees.apply(this, arguments);
|
|
21870
21957
|
}
|
|
21871
21958
|
|
|
@@ -21926,7 +22013,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21926
22013
|
}, _callee31, this);
|
|
21927
22014
|
}));
|
|
21928
22015
|
|
|
21929
|
-
function tradeUniswapV3(
|
|
22016
|
+
function tradeUniswapV3(_x146, _x147, _x148, _x149, _x150, _x151, _x152) {
|
|
21930
22017
|
return _tradeUniswapV.apply(this, arguments);
|
|
21931
22018
|
}
|
|
21932
22019
|
|
|
@@ -21988,7 +22075,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
21988
22075
|
}, _callee32, this);
|
|
21989
22076
|
}));
|
|
21990
22077
|
|
|
21991
|
-
function addLiquidityVelodrome(
|
|
22078
|
+
function addLiquidityVelodrome(_x153, _x154, _x155, _x156, _x157, _x158, _x159) {
|
|
21992
22079
|
return _addLiquidityVelodrome.apply(this, arguments);
|
|
21993
22080
|
}
|
|
21994
22081
|
|
|
@@ -22049,7 +22136,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22049
22136
|
}, _callee33, this);
|
|
22050
22137
|
}));
|
|
22051
22138
|
|
|
22052
|
-
function removeLiquidityVelodrome(
|
|
22139
|
+
function removeLiquidityVelodrome(_x160, _x161, _x162, _x163, _x164, _x165) {
|
|
22053
22140
|
return _removeLiquidityVelodrome.apply(this, arguments);
|
|
22054
22141
|
}
|
|
22055
22142
|
|
|
@@ -22111,7 +22198,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22111
22198
|
}, _callee34, this);
|
|
22112
22199
|
}));
|
|
22113
22200
|
|
|
22114
|
-
function addLiquidityVelodromeV2(
|
|
22201
|
+
function addLiquidityVelodromeV2(_x166, _x167, _x168, _x169, _x170, _x171, _x172) {
|
|
22115
22202
|
return _addLiquidityVelodromeV.apply(this, arguments);
|
|
22116
22203
|
}
|
|
22117
22204
|
|
|
@@ -22172,7 +22259,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22172
22259
|
}, _callee35, this);
|
|
22173
22260
|
}));
|
|
22174
22261
|
|
|
22175
|
-
function removeLiquidityVelodromeV2(
|
|
22262
|
+
function removeLiquidityVelodromeV2(_x173, _x174, _x175, _x176, _x177, _x178) {
|
|
22176
22263
|
return _removeLiquidityVelodromeV.apply(this, arguments);
|
|
22177
22264
|
}
|
|
22178
22265
|
|
|
@@ -22235,7 +22322,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22235
22322
|
}, _callee36, this);
|
|
22236
22323
|
}));
|
|
22237
22324
|
|
|
22238
|
-
function addLiquidityV2(
|
|
22325
|
+
function addLiquidityV2(_x179, _x180, _x181, _x182, _x183, _x184, _x185, _x186) {
|
|
22239
22326
|
return _addLiquidityV.apply(this, arguments);
|
|
22240
22327
|
}
|
|
22241
22328
|
|
|
@@ -22297,7 +22384,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22297
22384
|
}, _callee37, this);
|
|
22298
22385
|
}));
|
|
22299
22386
|
|
|
22300
|
-
function removeLiquidityV2(
|
|
22387
|
+
function removeLiquidityV2(_x187, _x188, _x189, _x190, _x191, _x192, _x193) {
|
|
22301
22388
|
return _removeLiquidityV.apply(this, arguments);
|
|
22302
22389
|
}
|
|
22303
22390
|
|
|
@@ -22365,7 +22452,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22365
22452
|
}, _callee38, this);
|
|
22366
22453
|
}));
|
|
22367
22454
|
|
|
22368
|
-
function tradeLyraOption(
|
|
22455
|
+
function tradeLyraOption(_x194, _x195, _x196, _x197, _x198, _x199, _x200, _x201, _x202, _x203, _x204) {
|
|
22369
22456
|
return _tradeLyraOption.apply(this, arguments);
|
|
22370
22457
|
}
|
|
22371
22458
|
|
|
@@ -22399,7 +22486,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22399
22486
|
}, _callee39, this);
|
|
22400
22487
|
}));
|
|
22401
22488
|
|
|
22402
|
-
function getLyraPositions(
|
|
22489
|
+
function getLyraPositions(_x205) {
|
|
22403
22490
|
return _getLyraPositions.apply(this, arguments);
|
|
22404
22491
|
}
|
|
22405
22492
|
|
|
@@ -22447,7 +22534,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22447
22534
|
}, _callee40, this);
|
|
22448
22535
|
}));
|
|
22449
22536
|
|
|
22450
|
-
function changeFuturesMargin(
|
|
22537
|
+
function changeFuturesMargin(_x206, _x207, _x208, _x209) {
|
|
22451
22538
|
return _changeFuturesMargin.apply(this, arguments);
|
|
22452
22539
|
}
|
|
22453
22540
|
|
|
@@ -22500,7 +22587,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22500
22587
|
}, _callee41, this);
|
|
22501
22588
|
}));
|
|
22502
22589
|
|
|
22503
|
-
function changeFuturesPosition(
|
|
22590
|
+
function changeFuturesPosition(_x210, _x211, _x212, _x213) {
|
|
22504
22591
|
return _changeFuturesPosition.apply(this, arguments);
|
|
22505
22592
|
}
|
|
22506
22593
|
|
|
@@ -22552,7 +22639,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22552
22639
|
}, _callee42, this);
|
|
22553
22640
|
}));
|
|
22554
22641
|
|
|
22555
|
-
function cancelFuturesOrder(
|
|
22642
|
+
function cancelFuturesOrder(_x214, _x215, _x216) {
|
|
22556
22643
|
return _cancelFuturesOrder.apply(this, arguments);
|
|
22557
22644
|
}
|
|
22558
22645
|
|
|
@@ -22561,6 +22648,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22561
22648
|
/**
|
|
22562
22649
|
* mintManagerFee
|
|
22563
22650
|
* @param {any} options Transaction options
|
|
22651
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
22564
22652
|
* @returns {Promise<any>} Transaction
|
|
22565
22653
|
*/
|
|
22566
22654
|
;
|
|
@@ -22568,7 +22656,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22568
22656
|
_proto.mintManagerFee =
|
|
22569
22657
|
/*#__PURE__*/
|
|
22570
22658
|
function () {
|
|
22571
|
-
var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(options) {
|
|
22659
|
+
var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(options, estimateGas) {
|
|
22572
22660
|
var tx;
|
|
22573
22661
|
return runtime_1.wrap(function _callee43$(_context43) {
|
|
22574
22662
|
while (1) {
|
|
@@ -22578,14 +22666,30 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22578
22666
|
options = null;
|
|
22579
22667
|
}
|
|
22580
22668
|
|
|
22581
|
-
|
|
22669
|
+
if (estimateGas === void 0) {
|
|
22670
|
+
estimateGas = false;
|
|
22671
|
+
}
|
|
22672
|
+
|
|
22673
|
+
if (!estimateGas) {
|
|
22674
|
+
_context43.next = 6;
|
|
22675
|
+
break;
|
|
22676
|
+
}
|
|
22677
|
+
|
|
22678
|
+
_context43.next = 5;
|
|
22679
|
+
return this.poolLogic.estimateGas.mintManagerFee(options);
|
|
22680
|
+
|
|
22681
|
+
case 5:
|
|
22682
|
+
return _context43.abrupt("return", _context43.sent);
|
|
22683
|
+
|
|
22684
|
+
case 6:
|
|
22685
|
+
_context43.next = 8;
|
|
22582
22686
|
return this.poolLogic.mintManagerFee(options);
|
|
22583
22687
|
|
|
22584
|
-
case
|
|
22688
|
+
case 8:
|
|
22585
22689
|
tx = _context43.sent;
|
|
22586
22690
|
return _context43.abrupt("return", tx);
|
|
22587
22691
|
|
|
22588
|
-
case
|
|
22692
|
+
case 10:
|
|
22589
22693
|
case "end":
|
|
22590
22694
|
return _context43.stop();
|
|
22591
22695
|
}
|
|
@@ -22593,7 +22697,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22593
22697
|
}, _callee43, this);
|
|
22594
22698
|
}));
|
|
22595
22699
|
|
|
22596
|
-
function mintManagerFee(
|
|
22700
|
+
function mintManagerFee(_x217, _x218) {
|
|
22597
22701
|
return _mintManagerFee.apply(this, arguments);
|
|
22598
22702
|
}
|
|
22599
22703
|
|
|
@@ -22682,7 +22786,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22682
22786
|
}, _callee45, this);
|
|
22683
22787
|
}));
|
|
22684
22788
|
|
|
22685
|
-
function vestTokens(
|
|
22789
|
+
function vestTokens(_x219, _x220, _x221, _x222) {
|
|
22686
22790
|
return _vestTokens.apply(this, arguments);
|
|
22687
22791
|
}
|
|
22688
22792
|
|
|
@@ -22735,7 +22839,7 @@ var Pool = /*#__PURE__*/function () {
|
|
|
22735
22839
|
}, _callee46, this);
|
|
22736
22840
|
}));
|
|
22737
22841
|
|
|
22738
|
-
function exitVestedToken(
|
|
22842
|
+
function exitVestedToken(_x223, _x224, _x225, _x226) {
|
|
22739
22843
|
return _exitVestedToken.apply(this, arguments);
|
|
22740
22844
|
}
|
|
22741
22845
|
|