@dhedge/v2-sdk 1.10.3 → 1.10.4

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.
@@ -23966,6 +23966,68 @@ function _cancelOrderViaFlatMoney() {
23966
23966
  return _cancelOrderViaFlatMoney.apply(this, arguments);
23967
23967
  }
23968
23968
 
23969
+ var ICompoundV3Comet = [
23970
+ {
23971
+ inputs: [
23972
+ ],
23973
+ name: "baseToken",
23974
+ outputs: [
23975
+ {
23976
+ internalType: "address",
23977
+ name: "",
23978
+ type: "address"
23979
+ }
23980
+ ],
23981
+ stateMutability: "view",
23982
+ type: "function"
23983
+ },
23984
+ {
23985
+ inputs: [
23986
+ {
23987
+ internalType: "address",
23988
+ name: "asset",
23989
+ type: "address"
23990
+ },
23991
+ {
23992
+ internalType: "uint256",
23993
+ name: "amount",
23994
+ type: "uint256"
23995
+ }
23996
+ ],
23997
+ name: "supply",
23998
+ outputs: [
23999
+ ],
24000
+ stateMutability: "nonpayable",
24001
+ type: "function"
24002
+ },
24003
+ {
24004
+ inputs: [
24005
+ {
24006
+ internalType: "address",
24007
+ name: "asset",
24008
+ type: "address"
24009
+ },
24010
+ {
24011
+ internalType: "uint256",
24012
+ name: "amount",
24013
+ type: "uint256"
24014
+ }
24015
+ ],
24016
+ name: "withdraw",
24017
+ outputs: [
24018
+ ],
24019
+ stateMutability: "nonpayable",
24020
+ type: "function"
24021
+ }
24022
+ ];
24023
+
24024
+ function getCompoundV3LendTxData(asset, amount) {
24025
+ return new ethers.utils.Interface(ICompoundV3Comet).encodeFunctionData("supply", [asset, amount]);
24026
+ }
24027
+ function getCompoundV3WithdrawTxData(asset, amount) {
24028
+ return new ethers.utils.Interface(ICompoundV3Comet).encodeFunctionData("withdraw", [asset, amount]);
24029
+ }
24030
+
23969
24031
  var Pool = /*#__PURE__*/function () {
23970
24032
  function Pool(network, signer, poolLogic, mangerLogic, utils, factory) {
23971
24033
  this.network = network;
@@ -25006,6 +25068,56 @@ var Pool = /*#__PURE__*/function () {
25006
25068
 
25007
25069
  return lend;
25008
25070
  }()
25071
+ /**
25072
+ * Lend asset to a Compound V3 style lending pool
25073
+ * @param {string} market Address of market e.g cUSDCv3 address
25074
+ * @param {string} asset Asset
25075
+ * @param {BigNumber | string} amount Amount of asset to lend
25076
+ * @param {any} options Transaction options
25077
+ * @param {boolean} estimateGas Simulate/estimate gas
25078
+ * @returns {Promise<any>} Transaction
25079
+ */
25080
+ ;
25081
+
25082
+ _proto.lendCompoundV3 =
25083
+ /*#__PURE__*/
25084
+ function () {
25085
+ var _lendCompoundV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(market, asset, amount, options, estimateGas) {
25086
+ var supplyTxData, tx;
25087
+ return runtime_1.wrap(function _callee18$(_context18) {
25088
+ while (1) {
25089
+ switch (_context18.prev = _context18.next) {
25090
+ case 0:
25091
+ if (options === void 0) {
25092
+ options = null;
25093
+ }
25094
+
25095
+ if (estimateGas === void 0) {
25096
+ estimateGas = false;
25097
+ }
25098
+
25099
+ supplyTxData = getCompoundV3LendTxData(asset, amount);
25100
+ _context18.next = 5;
25101
+ return getPoolTxOrGasEstimate(this, [market, supplyTxData, options], estimateGas);
25102
+
25103
+ case 5:
25104
+ tx = _context18.sent;
25105
+ return _context18.abrupt("return", tx);
25106
+
25107
+ case 7:
25108
+ case "end":
25109
+ return _context18.stop();
25110
+ }
25111
+ }
25112
+ }, _callee18, this);
25113
+ }));
25114
+
25115
+ function lendCompoundV3(_x81, _x82, _x83, _x84, _x85) {
25116
+ return _lendCompoundV.apply(this, arguments);
25117
+ }
25118
+
25119
+ return lendCompoundV3;
25120
+ }()
25009
25121
  /**
25010
25122
  * Witdraw asset from a lending pool
25011
25123
  * @param {Dapp} dapp Platform like Aave
@@ -25020,11 +25132,11 @@ var Pool = /*#__PURE__*/function () {
25020
25132
  _proto.withdrawDeposit =
25021
25133
  /*#__PURE__*/
25022
25134
  function () {
25023
- var _withdrawDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(dapp, asset, amount, options, estimateGas) {
25135
+ var _withdrawDeposit = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(dapp, asset, amount, options, estimateGas) {
25024
25136
  var iLendingPool, withdrawTxData, tx;
25025
- return runtime_1.wrap(function _callee18$(_context18) {
25137
+ return runtime_1.wrap(function _callee19$(_context19) {
25026
25138
  while (1) {
25027
- switch (_context18.prev = _context18.next) {
25139
+ switch (_context19.prev = _context19.next) {
25028
25140
  case 0:
25029
25141
  if (options === void 0) {
25030
25142
  options = null;
@@ -25036,27 +25148,77 @@ var Pool = /*#__PURE__*/function () {
25036
25148
 
25037
25149
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25038
25150
  withdrawTxData = iLendingPool.encodeFunctionData(Transaction.WITHDRAW, [asset, amount, this.address]);
25039
- _context18.next = 6;
25151
+ _context19.next = 6;
25040
25152
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], withdrawTxData, options], estimateGas);
25041
25153
 
25042
25154
  case 6:
25043
- tx = _context18.sent;
25044
- return _context18.abrupt("return", tx);
25155
+ tx = _context19.sent;
25156
+ return _context19.abrupt("return", tx);
25045
25157
 
25046
25158
  case 8:
25047
25159
  case "end":
25048
- return _context18.stop();
25160
+ return _context19.stop();
25049
25161
  }
25050
25162
  }
25051
- }, _callee18, this);
25163
+ }, _callee19, this);
25052
25164
  }));
25053
25165
 
25054
- function withdrawDeposit(_x81, _x82, _x83, _x84, _x85) {
25166
+ function withdrawDeposit(_x86, _x87, _x88, _x89, _x90) {
25055
25167
  return _withdrawDeposit.apply(this, arguments);
25056
25168
  }
25057
25169
 
25058
25170
  return withdrawDeposit;
25059
25171
  }()
25172
+ /**
25173
+ * Witdraw asset from a COmpound V3 style lending pool
25174
+ * @param {string} market Address of market e.g cUSDCv3 address
25175
+ * @param {string} asset Asset
25176
+ * @param {BigNumber | string} amount Amount of asset to withdraw
25177
+ * @param {any} options Transaction options
25178
+ * @param {boolean} estimateGas Simulate/estimate gas
25179
+ * @returns {Promise<any>} Transaction
25180
+ */
25181
+ ;
25182
+
25183
+ _proto.withdrawCompoundV3 =
25184
+ /*#__PURE__*/
25185
+ function () {
25186
+ var _withdrawCompoundV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(market, asset, amount, options, estimateGas) {
25187
+ var withdrawTxData, tx;
25188
+ return runtime_1.wrap(function _callee20$(_context20) {
25189
+ while (1) {
25190
+ switch (_context20.prev = _context20.next) {
25191
+ case 0:
25192
+ if (options === void 0) {
25193
+ options = null;
25194
+ }
25195
+
25196
+ if (estimateGas === void 0) {
25197
+ estimateGas = false;
25198
+ }
25199
+
25200
+ withdrawTxData = getCompoundV3WithdrawTxData(asset, amount);
25201
+ _context20.next = 5;
25202
+ return getPoolTxOrGasEstimate(this, [market, withdrawTxData, options], estimateGas);
25203
+
25204
+ case 5:
25205
+ tx = _context20.sent;
25206
+ return _context20.abrupt("return", tx);
25207
+
25208
+ case 7:
25209
+ case "end":
25210
+ return _context20.stop();
25211
+ }
25212
+ }
25213
+ }, _callee20, this);
25214
+ }));
25215
+
25216
+ function withdrawCompoundV3(_x91, _x92, _x93, _x94, _x95) {
25217
+ return _withdrawCompoundV.apply(this, arguments);
25218
+ }
25219
+
25220
+ return withdrawCompoundV3;
25221
+ }()
25060
25222
  /**
25061
25223
  * Borrow asset from a lending pool
25062
25224
  * @param {Dapp} dapp Platform like Aave
@@ -25072,11 +25234,11 @@ var Pool = /*#__PURE__*/function () {
25072
25234
  _proto.borrow =
25073
25235
  /*#__PURE__*/
25074
25236
  function () {
25075
- var _borrow = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(dapp, asset, amount, referralCode, options, estimateGas) {
25237
+ var _borrow = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(dapp, asset, amount, referralCode, options, estimateGas) {
25076
25238
  var iLendingPool, borrowTxData, tx;
25077
- return runtime_1.wrap(function _callee19$(_context19) {
25239
+ return runtime_1.wrap(function _callee21$(_context21) {
25078
25240
  while (1) {
25079
- switch (_context19.prev = _context19.next) {
25241
+ switch (_context21.prev = _context21.next) {
25080
25242
  case 0:
25081
25243
  if (referralCode === void 0) {
25082
25244
  referralCode = 0;
@@ -25092,22 +25254,22 @@ var Pool = /*#__PURE__*/function () {
25092
25254
 
25093
25255
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25094
25256
  borrowTxData = iLendingPool.encodeFunctionData(Transaction.BORROW, [asset, amount, 2, referralCode, this.address]);
25095
- _context19.next = 7;
25257
+ _context21.next = 7;
25096
25258
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], borrowTxData, options], estimateGas);
25097
25259
 
25098
25260
  case 7:
25099
- tx = _context19.sent;
25100
- return _context19.abrupt("return", tx);
25261
+ tx = _context21.sent;
25262
+ return _context21.abrupt("return", tx);
25101
25263
 
25102
25264
  case 9:
25103
25265
  case "end":
25104
- return _context19.stop();
25266
+ return _context21.stop();
25105
25267
  }
25106
25268
  }
25107
- }, _callee19, this);
25269
+ }, _callee21, this);
25108
25270
  }));
25109
25271
 
25110
- function borrow(_x86, _x87, _x88, _x89, _x90, _x91) {
25272
+ function borrow(_x96, _x97, _x98, _x99, _x100, _x101) {
25111
25273
  return _borrow.apply(this, arguments);
25112
25274
  }
25113
25275
 
@@ -25127,11 +25289,11 @@ var Pool = /*#__PURE__*/function () {
25127
25289
  _proto.repay =
25128
25290
  /*#__PURE__*/
25129
25291
  function () {
25130
- var _repay = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(dapp, asset, amount, options, estimateGas) {
25292
+ var _repay = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(dapp, asset, amount, options, estimateGas) {
25131
25293
  var iLendingPool, repayTxData, tx;
25132
- return runtime_1.wrap(function _callee20$(_context20) {
25294
+ return runtime_1.wrap(function _callee22$(_context22) {
25133
25295
  while (1) {
25134
- switch (_context20.prev = _context20.next) {
25296
+ switch (_context22.prev = _context22.next) {
25135
25297
  case 0:
25136
25298
  if (options === void 0) {
25137
25299
  options = null;
@@ -25143,22 +25305,22 @@ var Pool = /*#__PURE__*/function () {
25143
25305
 
25144
25306
  iLendingPool = new ethers.utils.Interface(ILendingPool.abi);
25145
25307
  repayTxData = iLendingPool.encodeFunctionData(Transaction.REPAY, [asset, amount, 2, this.address]);
25146
- _context20.next = 6;
25308
+ _context22.next = 6;
25147
25309
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][dapp], repayTxData, options], estimateGas);
25148
25310
 
25149
25311
  case 6:
25150
- tx = _context20.sent;
25151
- return _context20.abrupt("return", tx);
25312
+ tx = _context22.sent;
25313
+ return _context22.abrupt("return", tx);
25152
25314
 
25153
25315
  case 8:
25154
25316
  case "end":
25155
- return _context20.stop();
25317
+ return _context22.stop();
25156
25318
  }
25157
25319
  }
25158
- }, _callee20, this);
25320
+ }, _callee22, this);
25159
25321
  }));
25160
25322
 
25161
- function repay(_x92, _x93, _x94, _x95, _x96) {
25323
+ function repay(_x102, _x103, _x104, _x105, _x106) {
25162
25324
  return _repay.apply(this, arguments);
25163
25325
  }
25164
25326
 
@@ -25177,11 +25339,11 @@ var Pool = /*#__PURE__*/function () {
25177
25339
  _proto.harvestRewards =
25178
25340
  /*#__PURE__*/
25179
25341
  function () {
25180
- var _harvestRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(dapp, asset, options, estimateGas) {
25342
+ var _harvestRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(dapp, asset, options, estimateGas) {
25181
25343
  var iMiniChefV2, poolId, harvestTxData, tx;
25182
- return runtime_1.wrap(function _callee21$(_context21) {
25344
+ return runtime_1.wrap(function _callee23$(_context23) {
25183
25345
  while (1) {
25184
- switch (_context21.prev = _context21.next) {
25346
+ switch (_context23.prev = _context23.next) {
25185
25347
  case 0:
25186
25348
  if (options === void 0) {
25187
25349
  options = null;
@@ -25192,28 +25354,28 @@ var Pool = /*#__PURE__*/function () {
25192
25354
  }
25193
25355
 
25194
25356
  iMiniChefV2 = new ethers.utils.Interface(IMiniChefV2.abi);
25195
- _context21.next = 5;
25357
+ _context23.next = 5;
25196
25358
  return this.utils.getLpPoolId(dapp, asset);
25197
25359
 
25198
25360
  case 5:
25199
- poolId = _context21.sent;
25361
+ poolId = _context23.sent;
25200
25362
  harvestTxData = iMiniChefV2.encodeFunctionData(Transaction.HARVEST, [poolId, this.address]);
25201
- _context21.next = 9;
25363
+ _context23.next = 9;
25202
25364
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][dapp], harvestTxData, options], estimateGas);
25203
25365
 
25204
25366
  case 9:
25205
- tx = _context21.sent;
25206
- return _context21.abrupt("return", tx);
25367
+ tx = _context23.sent;
25368
+ return _context23.abrupt("return", tx);
25207
25369
 
25208
25370
  case 11:
25209
25371
  case "end":
25210
- return _context21.stop();
25372
+ return _context23.stop();
25211
25373
  }
25212
25374
  }
25213
- }, _callee21, this);
25375
+ }, _callee23, this);
25214
25376
  }));
25215
25377
 
25216
- function harvestRewards(_x97, _x98, _x99, _x100) {
25378
+ function harvestRewards(_x107, _x108, _x109, _x110) {
25217
25379
  return _harvestRewards.apply(this, arguments);
25218
25380
  }
25219
25381
 
@@ -25231,11 +25393,11 @@ var Pool = /*#__PURE__*/function () {
25231
25393
  _proto.changeAssets =
25232
25394
  /*#__PURE__*/
25233
25395
  function () {
25234
- var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(assets, options, estimateGas) {
25396
+ var _changeAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(assets, options, estimateGas) {
25235
25397
  var currentAssetsEnabled, currentAssets, newAssets, removedAssets, changedAssets, tx;
25236
- return runtime_1.wrap(function _callee22$(_context22) {
25398
+ return runtime_1.wrap(function _callee24$(_context24) {
25237
25399
  while (1) {
25238
- switch (_context22.prev = _context22.next) {
25400
+ switch (_context24.prev = _context24.next) {
25239
25401
  case 0:
25240
25402
  if (options === void 0) {
25241
25403
  options = null;
@@ -25245,11 +25407,11 @@ var Pool = /*#__PURE__*/function () {
25245
25407
  estimateGas = false;
25246
25408
  }
25247
25409
 
25248
- _context22.next = 4;
25410
+ _context24.next = 4;
25249
25411
  return this.getComposition();
25250
25412
 
25251
25413
  case 4:
25252
- currentAssetsEnabled = _context22.sent;
25414
+ currentAssetsEnabled = _context24.sent;
25253
25415
  currentAssets = currentAssetsEnabled.map(function (e) {
25254
25416
  return e.asset.toLocaleLowerCase();
25255
25417
  });
@@ -25264,33 +25426,33 @@ var Pool = /*#__PURE__*/function () {
25264
25426
  });
25265
25427
 
25266
25428
  if (!estimateGas) {
25267
- _context22.next = 13;
25429
+ _context24.next = 13;
25268
25430
  break;
25269
25431
  }
25270
25432
 
25271
- _context22.next = 12;
25433
+ _context24.next = 12;
25272
25434
  return this.managerLogic.estimateGas.changeAssets(changedAssets, removedAssets, options);
25273
25435
 
25274
25436
  case 12:
25275
- return _context22.abrupt("return", _context22.sent);
25437
+ return _context24.abrupt("return", _context24.sent);
25276
25438
 
25277
25439
  case 13:
25278
- _context22.next = 15;
25440
+ _context24.next = 15;
25279
25441
  return this.managerLogic.changeAssets(changedAssets, removedAssets, options);
25280
25442
 
25281
25443
  case 15:
25282
- tx = _context22.sent;
25283
- return _context22.abrupt("return", tx);
25444
+ tx = _context24.sent;
25445
+ return _context24.abrupt("return", tx);
25284
25446
 
25285
25447
  case 17:
25286
25448
  case "end":
25287
- return _context22.stop();
25449
+ return _context24.stop();
25288
25450
  }
25289
25451
  }
25290
- }, _callee22, this);
25452
+ }, _callee24, this);
25291
25453
  }));
25292
25454
 
25293
- function changeAssets(_x101, _x102, _x103) {
25455
+ function changeAssets(_x111, _x112, _x113) {
25294
25456
  return _changeAssets.apply(this, arguments);
25295
25457
  }
25296
25458
 
@@ -25308,11 +25470,11 @@ var Pool = /*#__PURE__*/function () {
25308
25470
  _proto.setTrader =
25309
25471
  /*#__PURE__*/
25310
25472
  function () {
25311
- var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(trader, options, estimateGas) {
25473
+ var _setTrader = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(trader, options, estimateGas) {
25312
25474
  var tx;
25313
- return runtime_1.wrap(function _callee23$(_context23) {
25475
+ return runtime_1.wrap(function _callee25$(_context25) {
25314
25476
  while (1) {
25315
- switch (_context23.prev = _context23.next) {
25477
+ switch (_context25.prev = _context25.next) {
25316
25478
  case 0:
25317
25479
  if (options === void 0) {
25318
25480
  options = null;
@@ -25323,33 +25485,33 @@ var Pool = /*#__PURE__*/function () {
25323
25485
  }
25324
25486
 
25325
25487
  if (!estimateGas) {
25326
- _context23.next = 6;
25488
+ _context25.next = 6;
25327
25489
  break;
25328
25490
  }
25329
25491
 
25330
- _context23.next = 5;
25492
+ _context25.next = 5;
25331
25493
  return this.managerLogic.estimateGas.setTrader(trader, options);
25332
25494
 
25333
25495
  case 5:
25334
- return _context23.abrupt("return", _context23.sent);
25496
+ return _context25.abrupt("return", _context25.sent);
25335
25497
 
25336
25498
  case 6:
25337
- _context23.next = 8;
25499
+ _context25.next = 8;
25338
25500
  return this.managerLogic.setTrader(trader, options);
25339
25501
 
25340
25502
  case 8:
25341
- tx = _context23.sent;
25342
- return _context23.abrupt("return", tx);
25503
+ tx = _context25.sent;
25504
+ return _context25.abrupt("return", tx);
25343
25505
 
25344
25506
  case 10:
25345
25507
  case "end":
25346
- return _context23.stop();
25508
+ return _context25.stop();
25347
25509
  }
25348
25510
  }
25349
- }, _callee23, this);
25511
+ }, _callee25, this);
25350
25512
  }));
25351
25513
 
25352
- function setTrader(_x104, _x105, _x106) {
25514
+ function setTrader(_x114, _x115, _x116) {
25353
25515
  return _setTrader.apply(this, arguments);
25354
25516
  }
25355
25517
 
@@ -25369,11 +25531,11 @@ var Pool = /*#__PURE__*/function () {
25369
25531
  _proto.joinBalancerPool =
25370
25532
  /*#__PURE__*/
25371
25533
  function () {
25372
- var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(poolId, assets, amountsIn, options, estimateGas) {
25534
+ var _joinBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(poolId, assets, amountsIn, options, estimateGas) {
25373
25535
  var joinPoolTxData, tx;
25374
- return runtime_1.wrap(function _callee24$(_context24) {
25536
+ return runtime_1.wrap(function _callee26$(_context26) {
25375
25537
  while (1) {
25376
- switch (_context24.prev = _context24.next) {
25538
+ switch (_context26.prev = _context26.next) {
25377
25539
  case 0:
25378
25540
  if (options === void 0) {
25379
25541
  options = null;
@@ -25384,22 +25546,22 @@ var Pool = /*#__PURE__*/function () {
25384
25546
  }
25385
25547
 
25386
25548
  joinPoolTxData = this.utils.getBalancerJoinPoolTx(this, poolId, assets, amountsIn);
25387
- _context24.next = 5;
25549
+ _context26.next = 5;
25388
25550
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.BALANCER], joinPoolTxData, options], estimateGas);
25389
25551
 
25390
25552
  case 5:
25391
- tx = _context24.sent;
25392
- return _context24.abrupt("return", tx);
25553
+ tx = _context26.sent;
25554
+ return _context26.abrupt("return", tx);
25393
25555
 
25394
25556
  case 7:
25395
25557
  case "end":
25396
- return _context24.stop();
25558
+ return _context26.stop();
25397
25559
  }
25398
25560
  }
25399
- }, _callee24, this);
25561
+ }, _callee26, this);
25400
25562
  }));
25401
25563
 
25402
- function joinBalancerPool(_x107, _x108, _x109, _x110, _x111) {
25564
+ function joinBalancerPool(_x117, _x118, _x119, _x120, _x121) {
25403
25565
  return _joinBalancerPool.apply(this, arguments);
25404
25566
  }
25405
25567
 
@@ -25420,11 +25582,11 @@ var Pool = /*#__PURE__*/function () {
25420
25582
  _proto.exitBalancerPool =
25421
25583
  /*#__PURE__*/
25422
25584
  function () {
25423
- var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(poolId, assets, amount, singleExitAssetIndex, options, estimateGas) {
25585
+ var _exitBalancerPool = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(poolId, assets, amount, singleExitAssetIndex, options, estimateGas) {
25424
25586
  var exitPoolTxData, tx;
25425
- return runtime_1.wrap(function _callee25$(_context25) {
25587
+ return runtime_1.wrap(function _callee27$(_context27) {
25426
25588
  while (1) {
25427
- switch (_context25.prev = _context25.next) {
25589
+ switch (_context27.prev = _context27.next) {
25428
25590
  case 0:
25429
25591
  if (singleExitAssetIndex === void 0) {
25430
25592
  singleExitAssetIndex = null;
@@ -25439,22 +25601,22 @@ var Pool = /*#__PURE__*/function () {
25439
25601
  }
25440
25602
 
25441
25603
  exitPoolTxData = this.utils.getBalancerExitPoolTx(this, poolId, assets, singleExitAssetIndex, amount);
25442
- _context25.next = 6;
25604
+ _context27.next = 6;
25443
25605
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.BALANCER], exitPoolTxData, options], estimateGas);
25444
25606
 
25445
25607
  case 6:
25446
- tx = _context25.sent;
25447
- return _context25.abrupt("return", tx);
25608
+ tx = _context27.sent;
25609
+ return _context27.abrupt("return", tx);
25448
25610
 
25449
25611
  case 8:
25450
25612
  case "end":
25451
- return _context25.stop();
25613
+ return _context27.stop();
25452
25614
  }
25453
25615
  }
25454
- }, _callee25, this);
25616
+ }, _callee27, this);
25455
25617
  }));
25456
25618
 
25457
- function exitBalancerPool(_x112, _x113, _x114, _x115, _x116, _x117) {
25619
+ function exitBalancerPool(_x122, _x123, _x124, _x125, _x126, _x127) {
25458
25620
  return _exitBalancerPool.apply(this, arguments);
25459
25621
  }
25460
25622
 
@@ -25472,11 +25634,11 @@ var Pool = /*#__PURE__*/function () {
25472
25634
  _proto.harvestAaveRewards =
25473
25635
  /*#__PURE__*/
25474
25636
  function () {
25475
- var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(assets, options, estimateGas) {
25637
+ var _harvestAaveRewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(assets, options, estimateGas) {
25476
25638
  var aaveIncentivesAddress, iAaveIncentivesController, aaveIncentivesController, amount, claimTxData, tx;
25477
- return runtime_1.wrap(function _callee26$(_context26) {
25639
+ return runtime_1.wrap(function _callee28$(_context28) {
25478
25640
  while (1) {
25479
- switch (_context26.prev = _context26.next) {
25641
+ switch (_context28.prev = _context28.next) {
25480
25642
  case 0:
25481
25643
  if (options === void 0) {
25482
25644
  options = null;
@@ -25489,28 +25651,28 @@ var Pool = /*#__PURE__*/function () {
25489
25651
  aaveIncentivesAddress = stakingAddress[this.network][Dapp.AAVE];
25490
25652
  iAaveIncentivesController = new ethers.utils.Interface(IAaveIncentivesController.abi);
25491
25653
  aaveIncentivesController = new ethers.Contract(aaveIncentivesAddress, iAaveIncentivesController, this.signer);
25492
- _context26.next = 7;
25654
+ _context28.next = 7;
25493
25655
  return aaveIncentivesController.getUserUnclaimedRewards(this.address);
25494
25656
 
25495
25657
  case 7:
25496
- amount = _context26.sent;
25658
+ amount = _context28.sent;
25497
25659
  claimTxData = iAaveIncentivesController.encodeFunctionData(Transaction.CLAIM_REWARDS, [assets, amount, this.address]);
25498
- _context26.next = 11;
25660
+ _context28.next = 11;
25499
25661
  return getPoolTxOrGasEstimate(this, [aaveIncentivesAddress, claimTxData, options], estimateGas);
25500
25662
 
25501
25663
  case 11:
25502
- tx = _context26.sent;
25503
- return _context26.abrupt("return", tx);
25664
+ tx = _context28.sent;
25665
+ return _context28.abrupt("return", tx);
25504
25666
 
25505
25667
  case 13:
25506
25668
  case "end":
25507
- return _context26.stop();
25669
+ return _context28.stop();
25508
25670
  }
25509
25671
  }
25510
- }, _callee26, this);
25672
+ }, _callee28, this);
25511
25673
  }));
25512
25674
 
25513
- function harvestAaveRewards(_x118, _x119, _x120) {
25675
+ function harvestAaveRewards(_x128, _x129, _x130) {
25514
25676
  return _harvestAaveRewards.apply(this, arguments);
25515
25677
  }
25516
25678
 
@@ -25529,11 +25691,11 @@ var Pool = /*#__PURE__*/function () {
25529
25691
  _proto.harvestAaveV3Rewards =
25530
25692
  /*#__PURE__*/
25531
25693
  function () {
25532
- var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(assets, rewardAsset, options, estimateGas) {
25694
+ var _harvestAaveV3Rewards = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(assets, rewardAsset, options, estimateGas) {
25533
25695
  var claimTxData, tx;
25534
- return runtime_1.wrap(function _callee27$(_context27) {
25696
+ return runtime_1.wrap(function _callee29$(_context29) {
25535
25697
  while (1) {
25536
- switch (_context27.prev = _context27.next) {
25698
+ switch (_context29.prev = _context29.next) {
25537
25699
  case 0:
25538
25700
  if (options === void 0) {
25539
25701
  options = null;
@@ -25543,27 +25705,27 @@ var Pool = /*#__PURE__*/function () {
25543
25705
  estimateGas = false;
25544
25706
  }
25545
25707
 
25546
- _context27.next = 4;
25708
+ _context29.next = 4;
25547
25709
  return getAaveV3ClaimTxData(this, assets, rewardAsset);
25548
25710
 
25549
25711
  case 4:
25550
- claimTxData = _context27.sent;
25551
- _context27.next = 7;
25712
+ claimTxData = _context29.sent;
25713
+ _context29.next = 7;
25552
25714
  return getPoolTxOrGasEstimate(this, [stakingAddress[this.network][Dapp.AAVEV3], claimTxData, options], estimateGas);
25553
25715
 
25554
25716
  case 7:
25555
- tx = _context27.sent;
25556
- return _context27.abrupt("return", tx);
25717
+ tx = _context29.sent;
25718
+ return _context29.abrupt("return", tx);
25557
25719
 
25558
25720
  case 9:
25559
25721
  case "end":
25560
- return _context27.stop();
25722
+ return _context29.stop();
25561
25723
  }
25562
25724
  }
25563
- }, _callee27, this);
25725
+ }, _callee29, this);
25564
25726
  }));
25565
25727
 
25566
- function harvestAaveV3Rewards(_x121, _x122, _x123, _x124) {
25728
+ function harvestAaveV3Rewards(_x131, _x132, _x133, _x134) {
25567
25729
  return _harvestAaveV3Rewards.apply(this, arguments);
25568
25730
  }
25569
25731
 
@@ -25590,11 +25752,11 @@ var Pool = /*#__PURE__*/function () {
25590
25752
  _proto.addLiquidityUniswapV3 =
25591
25753
  /*#__PURE__*/
25592
25754
  function () {
25593
- var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
25755
+ var _addLiquidityUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(dapp, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing, options, estimateGas) {
25594
25756
  var mintTxData, tx;
25595
- return runtime_1.wrap(function _callee28$(_context28) {
25757
+ return runtime_1.wrap(function _callee30$(_context30) {
25596
25758
  while (1) {
25597
- switch (_context28.prev = _context28.next) {
25759
+ switch (_context30.prev = _context30.next) {
25598
25760
  case 0:
25599
25761
  if (options === void 0) {
25600
25762
  options = null;
@@ -25605,7 +25767,7 @@ var Pool = /*#__PURE__*/function () {
25605
25767
  }
25606
25768
 
25607
25769
  if (!((minPrice === null || maxPrice === null) && (minTick === null || maxTick === null))) {
25608
- _context28.next = 4;
25770
+ _context30.next = 4;
25609
25771
  break;
25610
25772
  }
25611
25773
 
@@ -25613,34 +25775,34 @@ var Pool = /*#__PURE__*/function () {
25613
25775
 
25614
25776
  case 4:
25615
25777
  if (!((minPrice || maxPrice) && dapp !== Dapp.UNISWAPV3)) {
25616
- _context28.next = 6;
25778
+ _context30.next = 6;
25617
25779
  break;
25618
25780
  }
25619
25781
 
25620
25782
  throw new Error("no price conversion for Aerodrome/Velodrome CL");
25621
25783
 
25622
25784
  case 6:
25623
- _context28.next = 8;
25785
+ _context30.next = 8;
25624
25786
  return getUniswapV3MintTxData(dapp, this, assetA, assetB, amountA, amountB, minPrice, maxPrice, minTick, maxTick, feeAmountOrTickSpacing);
25625
25787
 
25626
25788
  case 8:
25627
- mintTxData = _context28.sent;
25628
- _context28.next = 11;
25789
+ mintTxData = _context30.sent;
25790
+ _context30.next = 11;
25629
25791
  return getPoolTxOrGasEstimate(this, [nonfungiblePositionManagerAddress[this.network][dapp], mintTxData, options], estimateGas);
25630
25792
 
25631
25793
  case 11:
25632
- tx = _context28.sent;
25633
- return _context28.abrupt("return", tx);
25794
+ tx = _context30.sent;
25795
+ return _context30.abrupt("return", tx);
25634
25796
 
25635
25797
  case 13:
25636
25798
  case "end":
25637
- return _context28.stop();
25799
+ return _context30.stop();
25638
25800
  }
25639
25801
  }
25640
- }, _callee28, this);
25802
+ }, _callee30, this);
25641
25803
  }));
25642
25804
 
25643
- function addLiquidityUniswapV3(_x125, _x126, _x127, _x128, _x129, _x130, _x131, _x132, _x133, _x134, _x135, _x136) {
25805
+ function addLiquidityUniswapV3(_x135, _x136, _x137, _x138, _x139, _x140, _x141, _x142, _x143, _x144, _x145, _x146) {
25644
25806
  return _addLiquidityUniswapV.apply(this, arguments);
25645
25807
  }
25646
25808
 
@@ -25660,11 +25822,11 @@ var Pool = /*#__PURE__*/function () {
25660
25822
  _proto.decreaseLiquidity =
25661
25823
  /*#__PURE__*/
25662
25824
  function () {
25663
- var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(dapp, tokenId, amount, options, estimateGas) {
25825
+ var _decreaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, tokenId, amount, options, estimateGas) {
25664
25826
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25665
- return runtime_1.wrap(function _callee29$(_context29) {
25827
+ return runtime_1.wrap(function _callee31$(_context31) {
25666
25828
  while (1) {
25667
- switch (_context29.prev = _context29.next) {
25829
+ switch (_context31.prev = _context31.next) {
25668
25830
  case 0:
25669
25831
  if (amount === void 0) {
25670
25832
  amount = 100;
@@ -25679,20 +25841,20 @@ var Pool = /*#__PURE__*/function () {
25679
25841
  }
25680
25842
 
25681
25843
  isStaked = false;
25682
- _context29.t0 = dapp;
25683
- _context29.next = _context29.t0 === Dapp.UNISWAPV3 ? 7 : _context29.t0 === Dapp.VELODROMECL ? 9 : _context29.t0 === Dapp.AERODROMECL ? 9 : _context29.t0 === Dapp.ARRAKIS ? 14 : 16;
25844
+ _context31.t0 = dapp;
25845
+ _context31.next = _context31.t0 === Dapp.UNISWAPV3 ? 7 : _context31.t0 === Dapp.VELODROMECL ? 9 : _context31.t0 === Dapp.AERODROMECL ? 9 : _context31.t0 === Dapp.ARRAKIS ? 14 : 16;
25684
25846
  break;
25685
25847
 
25686
25848
  case 7:
25687
25849
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25688
- return _context29.abrupt("break", 17);
25850
+ return _context31.abrupt("break", 17);
25689
25851
 
25690
25852
  case 9:
25691
- _context29.next = 11;
25853
+ _context31.next = 11;
25692
25854
  return getVelodromeClOwner(this, dapp, tokenId);
25693
25855
 
25694
25856
  case 11:
25695
- tokenIdOwner = _context29.sent;
25857
+ tokenIdOwner = _context31.sent;
25696
25858
 
25697
25859
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25698
25860
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25702,49 +25864,49 @@ var Pool = /*#__PURE__*/function () {
25702
25864
  isStaked = true;
25703
25865
  }
25704
25866
 
25705
- return _context29.abrupt("break", 17);
25867
+ return _context31.abrupt("break", 17);
25706
25868
 
25707
25869
  case 14:
25708
25870
  dappAddress = routerAddress[this.network][dapp];
25709
- return _context29.abrupt("break", 17);
25871
+ return _context31.abrupt("break", 17);
25710
25872
 
25711
25873
  case 16:
25712
25874
  throw new Error("dapp not supported");
25713
25875
 
25714
25876
  case 17:
25715
25877
  if (isStaked) {
25716
- _context29.next = 23;
25878
+ _context31.next = 23;
25717
25879
  break;
25718
25880
  }
25719
25881
 
25720
- _context29.next = 20;
25882
+ _context31.next = 20;
25721
25883
  return getDecreaseLiquidityTxData(this, dapp, tokenId, amount);
25722
25884
 
25723
25885
  case 20:
25724
- txData = _context29.sent;
25725
- _context29.next = 24;
25886
+ txData = _context31.sent;
25887
+ _context31.next = 24;
25726
25888
  break;
25727
25889
 
25728
25890
  case 23:
25729
25891
  throw new Error("unsupported decreaseStakedLiquidity: unstake first to decrease lp");
25730
25892
 
25731
25893
  case 24:
25732
- _context29.next = 26;
25894
+ _context31.next = 26;
25733
25895
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25734
25896
 
25735
25897
  case 26:
25736
- tx = _context29.sent;
25737
- return _context29.abrupt("return", tx);
25898
+ tx = _context31.sent;
25899
+ return _context31.abrupt("return", tx);
25738
25900
 
25739
25901
  case 28:
25740
25902
  case "end":
25741
- return _context29.stop();
25903
+ return _context31.stop();
25742
25904
  }
25743
25905
  }
25744
- }, _callee29, this);
25906
+ }, _callee31, this);
25745
25907
  }));
25746
25908
 
25747
- function decreaseLiquidity(_x137, _x138, _x139, _x140, _x141) {
25909
+ function decreaseLiquidity(_x147, _x148, _x149, _x150, _x151) {
25748
25910
  return _decreaseLiquidity.apply(this, arguments);
25749
25911
  }
25750
25912
 
@@ -25765,11 +25927,11 @@ var Pool = /*#__PURE__*/function () {
25765
25927
  _proto.increaseLiquidity =
25766
25928
  /*#__PURE__*/
25767
25929
  function () {
25768
- var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(dapp, tokenId, amountA, amountB, options, estimateGas) {
25930
+ var _increaseLiquidity = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(dapp, tokenId, amountA, amountB, options, estimateGas) {
25769
25931
  var dappAddress, isStaked, txData, tokenIdOwner, tx;
25770
- return runtime_1.wrap(function _callee30$(_context30) {
25932
+ return runtime_1.wrap(function _callee32$(_context32) {
25771
25933
  while (1) {
25772
- switch (_context30.prev = _context30.next) {
25934
+ switch (_context32.prev = _context32.next) {
25773
25935
  case 0:
25774
25936
  if (options === void 0) {
25775
25937
  options = null;
@@ -25780,20 +25942,20 @@ var Pool = /*#__PURE__*/function () {
25780
25942
  }
25781
25943
 
25782
25944
  isStaked = false;
25783
- _context30.t0 = dapp;
25784
- _context30.next = _context30.t0 === Dapp.UNISWAPV3 ? 6 : _context30.t0 === Dapp.VELODROMECL ? 8 : _context30.t0 === Dapp.AERODROMECL ? 8 : _context30.t0 === Dapp.ARRAKIS ? 13 : 15;
25945
+ _context32.t0 = dapp;
25946
+ _context32.next = _context32.t0 === Dapp.UNISWAPV3 ? 6 : _context32.t0 === Dapp.VELODROMECL ? 8 : _context32.t0 === Dapp.AERODROMECL ? 8 : _context32.t0 === Dapp.ARRAKIS ? 13 : 15;
25785
25947
  break;
25786
25948
 
25787
25949
  case 6:
25788
25950
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25789
- return _context30.abrupt("break", 16);
25951
+ return _context32.abrupt("break", 16);
25790
25952
 
25791
25953
  case 8:
25792
- _context30.next = 10;
25954
+ _context32.next = 10;
25793
25955
  return getVelodromeClOwner(this, dapp, tokenId);
25794
25956
 
25795
25957
  case 10:
25796
- tokenIdOwner = _context30.sent;
25958
+ tokenIdOwner = _context32.sent;
25797
25959
 
25798
25960
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25799
25961
  dappAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25803,49 +25965,49 @@ var Pool = /*#__PURE__*/function () {
25803
25965
  isStaked = true;
25804
25966
  }
25805
25967
 
25806
- return _context30.abrupt("break", 16);
25968
+ return _context32.abrupt("break", 16);
25807
25969
 
25808
25970
  case 13:
25809
25971
  dappAddress = routerAddress[this.network][dapp];
25810
- return _context30.abrupt("break", 16);
25972
+ return _context32.abrupt("break", 16);
25811
25973
 
25812
25974
  case 15:
25813
25975
  throw new Error("dapp not supported");
25814
25976
 
25815
25977
  case 16:
25816
25978
  if (isStaked) {
25817
- _context30.next = 22;
25979
+ _context32.next = 22;
25818
25980
  break;
25819
25981
  }
25820
25982
 
25821
- _context30.next = 19;
25983
+ _context32.next = 19;
25822
25984
  return getIncreaseLiquidityTxData(this, dapp, tokenId, amountA, amountB);
25823
25985
 
25824
25986
  case 19:
25825
- txData = _context30.sent;
25826
- _context30.next = 23;
25987
+ txData = _context32.sent;
25988
+ _context32.next = 23;
25827
25989
  break;
25828
25990
 
25829
25991
  case 22:
25830
25992
  throw new Error("unsupported increaseStakedLiquidity: unstake first to increase lp");
25831
25993
 
25832
25994
  case 23:
25833
- _context30.next = 25;
25995
+ _context32.next = 25;
25834
25996
  return getPoolTxOrGasEstimate(this, [dappAddress, txData, options], estimateGas);
25835
25997
 
25836
25998
  case 25:
25837
- tx = _context30.sent;
25838
- return _context30.abrupt("return", tx);
25999
+ tx = _context32.sent;
26000
+ return _context32.abrupt("return", tx);
25839
26001
 
25840
26002
  case 27:
25841
26003
  case "end":
25842
- return _context30.stop();
26004
+ return _context32.stop();
25843
26005
  }
25844
26006
  }
25845
- }, _callee30, this);
26007
+ }, _callee32, this);
25846
26008
  }));
25847
26009
 
25848
- function increaseLiquidity(_x142, _x143, _x144, _x145, _x146, _x147) {
26010
+ function increaseLiquidity(_x152, _x153, _x154, _x155, _x156, _x157) {
25849
26011
  return _increaseLiquidity.apply(this, arguments);
25850
26012
  }
25851
26013
 
@@ -25864,11 +26026,11 @@ var Pool = /*#__PURE__*/function () {
25864
26026
  _proto.claimFees =
25865
26027
  /*#__PURE__*/
25866
26028
  function () {
25867
- var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(dapp, tokenId, options, estimateGas) {
26029
+ var _claimFees = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(dapp, tokenId, options, estimateGas) {
25868
26030
  var txData, contractAddress, iNonfungiblePositionManager, abi, tokenIdOwner, tx;
25869
- return runtime_1.wrap(function _callee31$(_context31) {
26031
+ return runtime_1.wrap(function _callee33$(_context33) {
25870
26032
  while (1) {
25871
- switch (_context31.prev = _context31.next) {
26033
+ switch (_context33.prev = _context33.next) {
25872
26034
  case 0:
25873
26035
  if (options === void 0) {
25874
26036
  options = null;
@@ -25879,37 +26041,37 @@ var Pool = /*#__PURE__*/function () {
25879
26041
  }
25880
26042
 
25881
26043
  iNonfungiblePositionManager = new ethers.utils.Interface(INonfungiblePositionManager.abi);
25882
- _context31.t0 = dapp;
25883
- _context31.next = _context31.t0 === Dapp.UNISWAPV3 ? 6 : _context31.t0 === Dapp.ARRAKIS ? 9 : _context31.t0 === Dapp.BALANCER ? 9 : _context31.t0 === Dapp.VELODROME ? 13 : _context31.t0 === Dapp.RAMSES ? 13 : _context31.t0 === Dapp.VELODROMEV2 ? 16 : _context31.t0 === Dapp.AERODROME ? 16 : _context31.t0 === Dapp.VELODROMECL ? 19 : _context31.t0 === Dapp.AERODROMECL ? 19 : 24;
26044
+ _context33.t0 = dapp;
26045
+ _context33.next = _context33.t0 === Dapp.UNISWAPV3 ? 6 : _context33.t0 === Dapp.ARRAKIS ? 9 : _context33.t0 === Dapp.BALANCER ? 9 : _context33.t0 === Dapp.VELODROME ? 13 : _context33.t0 === Dapp.RAMSES ? 13 : _context33.t0 === Dapp.VELODROMEV2 ? 16 : _context33.t0 === Dapp.AERODROME ? 16 : _context33.t0 === Dapp.VELODROMECL ? 19 : _context33.t0 === Dapp.AERODROMECL ? 19 : 24;
25884
26046
  break;
25885
26047
 
25886
26048
  case 6:
25887
26049
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
25888
26050
  txData = iNonfungiblePositionManager.encodeFunctionData(Transaction.COLLECT, [[tokenId, this.address, MaxUint128, MaxUint128]]);
25889
- return _context31.abrupt("break", 25);
26051
+ return _context33.abrupt("break", 25);
25890
26052
 
25891
26053
  case 9:
25892
26054
  contractAddress = tokenId;
25893
26055
  abi = new ethers.utils.Interface(ILiquidityGaugeV4.abi);
25894
26056
  txData = abi.encodeFunctionData("claim_rewards()", []);
25895
- return _context31.abrupt("break", 25);
26057
+ return _context33.abrupt("break", 25);
25896
26058
 
25897
26059
  case 13:
25898
26060
  contractAddress = tokenId;
25899
26061
  txData = getVelodromeClaimTxData(this, tokenId, false);
25900
- return _context31.abrupt("break", 25);
26062
+ return _context33.abrupt("break", 25);
25901
26063
 
25902
26064
  case 16:
25903
26065
  contractAddress = tokenId;
25904
26066
  txData = getVelodromeClaimTxData(this, tokenId, true);
25905
- return _context31.abrupt("break", 25);
26067
+ return _context33.abrupt("break", 25);
25906
26068
 
25907
26069
  case 19:
25908
- _context31.next = 21;
26070
+ _context33.next = 21;
25909
26071
  return getVelodromeClOwner(this, dapp, tokenId);
25910
26072
 
25911
26073
  case 21:
25912
- tokenIdOwner = _context31.sent;
26074
+ tokenIdOwner = _context33.sent;
25913
26075
 
25914
26076
  if (tokenIdOwner.toLowerCase() === this.address.toLowerCase()) {
25915
26077
  contractAddress = nonfungiblePositionManagerAddress[this.network][dapp];
@@ -25920,28 +26082,28 @@ var Pool = /*#__PURE__*/function () {
25920
26082
  txData = getVelodromeCLClaimTxData(tokenId);
25921
26083
  }
25922
26084
 
25923
- return _context31.abrupt("break", 25);
26085
+ return _context33.abrupt("break", 25);
25924
26086
 
25925
26087
  case 24:
25926
26088
  throw new Error("dapp not supported");
25927
26089
 
25928
26090
  case 25:
25929
- _context31.next = 27;
26091
+ _context33.next = 27;
25930
26092
  return getPoolTxOrGasEstimate(this, [contractAddress, txData, options], estimateGas);
25931
26093
 
25932
26094
  case 27:
25933
- tx = _context31.sent;
25934
- return _context31.abrupt("return", tx);
26095
+ tx = _context33.sent;
26096
+ return _context33.abrupt("return", tx);
25935
26097
 
25936
26098
  case 29:
25937
26099
  case "end":
25938
- return _context31.stop();
26100
+ return _context33.stop();
25939
26101
  }
25940
26102
  }
25941
- }, _callee31, this);
26103
+ }, _callee33, this);
25942
26104
  }));
25943
26105
 
25944
- function claimFees(_x148, _x149, _x150, _x151) {
26106
+ function claimFees(_x158, _x159, _x160, _x161) {
25945
26107
  return _claimFees.apply(this, arguments);
25946
26108
  }
25947
26109
 
@@ -25964,11 +26126,11 @@ var Pool = /*#__PURE__*/function () {
25964
26126
  _proto.tradeUniswapV3 =
25965
26127
  /*#__PURE__*/
25966
26128
  function () {
25967
- var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
26129
+ var _tradeUniswapV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(assetFrom, assetTo, amountIn, feeAmount, slippage, options, estimateGas) {
25968
26130
  var swapxData, tx;
25969
- return runtime_1.wrap(function _callee32$(_context32) {
26131
+ return runtime_1.wrap(function _callee34$(_context34) {
25970
26132
  while (1) {
25971
- switch (_context32.prev = _context32.next) {
26133
+ switch (_context34.prev = _context34.next) {
25972
26134
  case 0:
25973
26135
  if (slippage === void 0) {
25974
26136
  slippage = 0.5;
@@ -25982,27 +26144,27 @@ var Pool = /*#__PURE__*/function () {
25982
26144
  estimateGas = false;
25983
26145
  }
25984
26146
 
25985
- _context32.next = 5;
26147
+ _context34.next = 5;
25986
26148
  return getUniswapV3SwapTxData(this, assetFrom, assetTo, amountIn, slippage, feeAmount);
25987
26149
 
25988
26150
  case 5:
25989
- swapxData = _context32.sent;
25990
- _context32.next = 8;
26151
+ swapxData = _context34.sent;
26152
+ _context34.next = 8;
25991
26153
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.UNISWAPV3], swapxData, options], estimateGas);
25992
26154
 
25993
26155
  case 8:
25994
- tx = _context32.sent;
25995
- return _context32.abrupt("return", tx);
26156
+ tx = _context34.sent;
26157
+ return _context34.abrupt("return", tx);
25996
26158
 
25997
26159
  case 10:
25998
26160
  case "end":
25999
- return _context32.stop();
26161
+ return _context34.stop();
26000
26162
  }
26001
26163
  }
26002
- }, _callee32, this);
26164
+ }, _callee34, this);
26003
26165
  }));
26004
26166
 
26005
- function tradeUniswapV3(_x152, _x153, _x154, _x155, _x156, _x157, _x158) {
26167
+ function tradeUniswapV3(_x162, _x163, _x164, _x165, _x166, _x167, _x168) {
26006
26168
  return _tradeUniswapV.apply(this, arguments);
26007
26169
  }
26008
26170
 
@@ -26024,11 +26186,11 @@ var Pool = /*#__PURE__*/function () {
26024
26186
  _proto.addLiquidityVelodrome =
26025
26187
  /*#__PURE__*/
26026
26188
  function () {
26027
- var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26189
+ var _addLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26028
26190
  var tx;
26029
- return runtime_1.wrap(function _callee33$(_context33) {
26191
+ return runtime_1.wrap(function _callee35$(_context35) {
26030
26192
  while (1) {
26031
- switch (_context33.prev = _context33.next) {
26193
+ switch (_context35.prev = _context35.next) {
26032
26194
  case 0:
26033
26195
  if (options === void 0) {
26034
26196
  options = null;
@@ -26038,33 +26200,33 @@ var Pool = /*#__PURE__*/function () {
26038
26200
  estimateGas = false;
26039
26201
  }
26040
26202
 
26041
- _context33.t0 = getPoolTxOrGasEstimate;
26042
- _context33.t1 = this;
26043
- _context33.t2 = routerAddress[this.network][Dapp.VELODROME];
26044
- _context33.next = 7;
26203
+ _context35.t0 = getPoolTxOrGasEstimate;
26204
+ _context35.t1 = this;
26205
+ _context35.t2 = routerAddress[this.network][Dapp.VELODROME];
26206
+ _context35.next = 7;
26045
26207
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26046
26208
 
26047
26209
  case 7:
26048
- _context33.t3 = _context33.sent;
26049
- _context33.t4 = options;
26050
- _context33.t5 = [_context33.t2, _context33.t3, _context33.t4];
26051
- _context33.t6 = estimateGas;
26052
- _context33.next = 13;
26053
- return (0, _context33.t0)(_context33.t1, _context33.t5, _context33.t6);
26210
+ _context35.t3 = _context35.sent;
26211
+ _context35.t4 = options;
26212
+ _context35.t5 = [_context35.t2, _context35.t3, _context35.t4];
26213
+ _context35.t6 = estimateGas;
26214
+ _context35.next = 13;
26215
+ return (0, _context35.t0)(_context35.t1, _context35.t5, _context35.t6);
26054
26216
 
26055
26217
  case 13:
26056
- tx = _context33.sent;
26057
- return _context33.abrupt("return", tx);
26218
+ tx = _context35.sent;
26219
+ return _context35.abrupt("return", tx);
26058
26220
 
26059
26221
  case 15:
26060
26222
  case "end":
26061
- return _context33.stop();
26223
+ return _context35.stop();
26062
26224
  }
26063
26225
  }
26064
- }, _callee33, this);
26226
+ }, _callee35, this);
26065
26227
  }));
26066
26228
 
26067
- function addLiquidityVelodrome(_x159, _x160, _x161, _x162, _x163, _x164, _x165) {
26229
+ function addLiquidityVelodrome(_x169, _x170, _x171, _x172, _x173, _x174, _x175) {
26068
26230
  return _addLiquidityVelodrome.apply(this, arguments);
26069
26231
  }
26070
26232
 
@@ -26085,11 +26247,11 @@ var Pool = /*#__PURE__*/function () {
26085
26247
  _proto.removeLiquidityVelodrome =
26086
26248
  /*#__PURE__*/
26087
26249
  function () {
26088
- var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(assetA, assetB, amount, isStable, options, estimateGas) {
26250
+ var _removeLiquidityVelodrome = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetA, assetB, amount, isStable, options, estimateGas) {
26089
26251
  var tx;
26090
- return runtime_1.wrap(function _callee34$(_context34) {
26252
+ return runtime_1.wrap(function _callee36$(_context36) {
26091
26253
  while (1) {
26092
- switch (_context34.prev = _context34.next) {
26254
+ switch (_context36.prev = _context36.next) {
26093
26255
  case 0:
26094
26256
  if (options === void 0) {
26095
26257
  options = null;
@@ -26099,33 +26261,33 @@ var Pool = /*#__PURE__*/function () {
26099
26261
  estimateGas = false;
26100
26262
  }
26101
26263
 
26102
- _context34.t0 = getPoolTxOrGasEstimate;
26103
- _context34.t1 = this;
26104
- _context34.t2 = routerAddress[this.network][Dapp.VELODROME];
26105
- _context34.next = 7;
26264
+ _context36.t0 = getPoolTxOrGasEstimate;
26265
+ _context36.t1 = this;
26266
+ _context36.t2 = routerAddress[this.network][Dapp.VELODROME];
26267
+ _context36.next = 7;
26106
26268
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26107
26269
 
26108
26270
  case 7:
26109
- _context34.t3 = _context34.sent;
26110
- _context34.t4 = options;
26111
- _context34.t5 = [_context34.t2, _context34.t3, _context34.t4];
26112
- _context34.t6 = estimateGas;
26113
- _context34.next = 13;
26114
- return (0, _context34.t0)(_context34.t1, _context34.t5, _context34.t6);
26271
+ _context36.t3 = _context36.sent;
26272
+ _context36.t4 = options;
26273
+ _context36.t5 = [_context36.t2, _context36.t3, _context36.t4];
26274
+ _context36.t6 = estimateGas;
26275
+ _context36.next = 13;
26276
+ return (0, _context36.t0)(_context36.t1, _context36.t5, _context36.t6);
26115
26277
 
26116
26278
  case 13:
26117
- tx = _context34.sent;
26118
- return _context34.abrupt("return", tx);
26279
+ tx = _context36.sent;
26280
+ return _context36.abrupt("return", tx);
26119
26281
 
26120
26282
  case 15:
26121
26283
  case "end":
26122
- return _context34.stop();
26284
+ return _context36.stop();
26123
26285
  }
26124
26286
  }
26125
- }, _callee34, this);
26287
+ }, _callee36, this);
26126
26288
  }));
26127
26289
 
26128
- function removeLiquidityVelodrome(_x166, _x167, _x168, _x169, _x170, _x171) {
26290
+ function removeLiquidityVelodrome(_x176, _x177, _x178, _x179, _x180, _x181) {
26129
26291
  return _removeLiquidityVelodrome.apply(this, arguments);
26130
26292
  }
26131
26293
 
@@ -26147,11 +26309,11 @@ var Pool = /*#__PURE__*/function () {
26147
26309
  _proto.addLiquidityVelodromeV2 =
26148
26310
  /*#__PURE__*/
26149
26311
  function () {
26150
- var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26312
+ var _addLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26151
26313
  var tx;
26152
- return runtime_1.wrap(function _callee35$(_context35) {
26314
+ return runtime_1.wrap(function _callee37$(_context37) {
26153
26315
  while (1) {
26154
- switch (_context35.prev = _context35.next) {
26316
+ switch (_context37.prev = _context37.next) {
26155
26317
  case 0:
26156
26318
  if (options === void 0) {
26157
26319
  options = null;
@@ -26161,33 +26323,33 @@ var Pool = /*#__PURE__*/function () {
26161
26323
  estimateGas = false;
26162
26324
  }
26163
26325
 
26164
- _context35.t0 = getPoolTxOrGasEstimate;
26165
- _context35.t1 = this;
26166
- _context35.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26167
- _context35.next = 7;
26326
+ _context37.t0 = getPoolTxOrGasEstimate;
26327
+ _context37.t1 = this;
26328
+ _context37.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26329
+ _context37.next = 7;
26168
26330
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26169
26331
 
26170
26332
  case 7:
26171
- _context35.t3 = _context35.sent;
26172
- _context35.t4 = options;
26173
- _context35.t5 = [_context35.t2, _context35.t3, _context35.t4];
26174
- _context35.t6 = estimateGas;
26175
- _context35.next = 13;
26176
- return (0, _context35.t0)(_context35.t1, _context35.t5, _context35.t6);
26333
+ _context37.t3 = _context37.sent;
26334
+ _context37.t4 = options;
26335
+ _context37.t5 = [_context37.t2, _context37.t3, _context37.t4];
26336
+ _context37.t6 = estimateGas;
26337
+ _context37.next = 13;
26338
+ return (0, _context37.t0)(_context37.t1, _context37.t5, _context37.t6);
26177
26339
 
26178
26340
  case 13:
26179
- tx = _context35.sent;
26180
- return _context35.abrupt("return", tx);
26341
+ tx = _context37.sent;
26342
+ return _context37.abrupt("return", tx);
26181
26343
 
26182
26344
  case 15:
26183
26345
  case "end":
26184
- return _context35.stop();
26346
+ return _context37.stop();
26185
26347
  }
26186
26348
  }
26187
- }, _callee35, this);
26349
+ }, _callee37, this);
26188
26350
  }));
26189
26351
 
26190
- function addLiquidityVelodromeV2(_x172, _x173, _x174, _x175, _x176, _x177, _x178) {
26352
+ function addLiquidityVelodromeV2(_x182, _x183, _x184, _x185, _x186, _x187, _x188) {
26191
26353
  return _addLiquidityVelodromeV.apply(this, arguments);
26192
26354
  }
26193
26355
 
@@ -26208,11 +26370,11 @@ var Pool = /*#__PURE__*/function () {
26208
26370
  _proto.removeLiquidityVelodromeV2 =
26209
26371
  /*#__PURE__*/
26210
26372
  function () {
26211
- var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(assetA, assetB, amount, isStable, options, estimateGas) {
26373
+ var _removeLiquidityVelodromeV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(assetA, assetB, amount, isStable, options, estimateGas) {
26212
26374
  var tx;
26213
- return runtime_1.wrap(function _callee36$(_context36) {
26375
+ return runtime_1.wrap(function _callee38$(_context38) {
26214
26376
  while (1) {
26215
- switch (_context36.prev = _context36.next) {
26377
+ switch (_context38.prev = _context38.next) {
26216
26378
  case 0:
26217
26379
  if (options === void 0) {
26218
26380
  options = null;
@@ -26222,33 +26384,33 @@ var Pool = /*#__PURE__*/function () {
26222
26384
  estimateGas = false;
26223
26385
  }
26224
26386
 
26225
- _context36.t0 = getPoolTxOrGasEstimate;
26226
- _context36.t1 = this;
26227
- _context36.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26228
- _context36.next = 7;
26387
+ _context38.t0 = getPoolTxOrGasEstimate;
26388
+ _context38.t1 = this;
26389
+ _context38.t2 = routerAddress[this.network][Dapp.VELODROMEV2];
26390
+ _context38.next = 7;
26229
26391
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26230
26392
 
26231
26393
  case 7:
26232
- _context36.t3 = _context36.sent;
26233
- _context36.t4 = options;
26234
- _context36.t5 = [_context36.t2, _context36.t3, _context36.t4];
26235
- _context36.t6 = estimateGas;
26236
- _context36.next = 13;
26237
- return (0, _context36.t0)(_context36.t1, _context36.t5, _context36.t6);
26394
+ _context38.t3 = _context38.sent;
26395
+ _context38.t4 = options;
26396
+ _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
26397
+ _context38.t6 = estimateGas;
26398
+ _context38.next = 13;
26399
+ return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
26238
26400
 
26239
26401
  case 13:
26240
- tx = _context36.sent;
26241
- return _context36.abrupt("return", tx);
26402
+ tx = _context38.sent;
26403
+ return _context38.abrupt("return", tx);
26242
26404
 
26243
26405
  case 15:
26244
26406
  case "end":
26245
- return _context36.stop();
26407
+ return _context38.stop();
26246
26408
  }
26247
26409
  }
26248
- }, _callee36, this);
26410
+ }, _callee38, this);
26249
26411
  }));
26250
26412
 
26251
- function removeLiquidityVelodromeV2(_x179, _x180, _x181, _x182, _x183, _x184) {
26413
+ function removeLiquidityVelodromeV2(_x189, _x190, _x191, _x192, _x193, _x194) {
26252
26414
  return _removeLiquidityVelodromeV.apply(this, arguments);
26253
26415
  }
26254
26416
 
@@ -26271,11 +26433,11 @@ var Pool = /*#__PURE__*/function () {
26271
26433
  _proto.addLiquidityV2 =
26272
26434
  /*#__PURE__*/
26273
26435
  function () {
26274
- var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26436
+ var _addLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(dapp, assetA, assetB, amountA, amountB, isStable, options, estimateGas) {
26275
26437
  var tx;
26276
- return runtime_1.wrap(function _callee37$(_context37) {
26438
+ return runtime_1.wrap(function _callee39$(_context39) {
26277
26439
  while (1) {
26278
- switch (_context37.prev = _context37.next) {
26440
+ switch (_context39.prev = _context39.next) {
26279
26441
  case 0:
26280
26442
  if (options === void 0) {
26281
26443
  options = null;
@@ -26285,33 +26447,33 @@ var Pool = /*#__PURE__*/function () {
26285
26447
  estimateGas = false;
26286
26448
  }
26287
26449
 
26288
- _context37.t0 = getPoolTxOrGasEstimate;
26289
- _context37.t1 = this;
26290
- _context37.t2 = routerAddress[this.network][dapp];
26291
- _context37.next = 7;
26450
+ _context39.t0 = getPoolTxOrGasEstimate;
26451
+ _context39.t1 = this;
26452
+ _context39.t2 = routerAddress[this.network][dapp];
26453
+ _context39.next = 7;
26292
26454
  return getVelodromeAddLiquidityTxData(this, assetA, assetB, amountA, amountB, isStable);
26293
26455
 
26294
26456
  case 7:
26295
- _context37.t3 = _context37.sent;
26296
- _context37.t4 = options;
26297
- _context37.t5 = [_context37.t2, _context37.t3, _context37.t4];
26298
- _context37.t6 = estimateGas;
26299
- _context37.next = 13;
26300
- return (0, _context37.t0)(_context37.t1, _context37.t5, _context37.t6);
26457
+ _context39.t3 = _context39.sent;
26458
+ _context39.t4 = options;
26459
+ _context39.t5 = [_context39.t2, _context39.t3, _context39.t4];
26460
+ _context39.t6 = estimateGas;
26461
+ _context39.next = 13;
26462
+ return (0, _context39.t0)(_context39.t1, _context39.t5, _context39.t6);
26301
26463
 
26302
26464
  case 13:
26303
- tx = _context37.sent;
26304
- return _context37.abrupt("return", tx);
26465
+ tx = _context39.sent;
26466
+ return _context39.abrupt("return", tx);
26305
26467
 
26306
26468
  case 15:
26307
26469
  case "end":
26308
- return _context37.stop();
26470
+ return _context39.stop();
26309
26471
  }
26310
26472
  }
26311
- }, _callee37, this);
26473
+ }, _callee39, this);
26312
26474
  }));
26313
26475
 
26314
- function addLiquidityV2(_x185, _x186, _x187, _x188, _x189, _x190, _x191, _x192) {
26476
+ function addLiquidityV2(_x195, _x196, _x197, _x198, _x199, _x200, _x201, _x202) {
26315
26477
  return _addLiquidityV.apply(this, arguments);
26316
26478
  }
26317
26479
 
@@ -26333,11 +26495,11 @@ var Pool = /*#__PURE__*/function () {
26333
26495
  _proto.removeLiquidityV2 =
26334
26496
  /*#__PURE__*/
26335
26497
  function () {
26336
- var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26498
+ var _removeLiquidityV = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(dapp, assetA, assetB, amount, isStable, options, estimateGas) {
26337
26499
  var tx;
26338
- return runtime_1.wrap(function _callee38$(_context38) {
26500
+ return runtime_1.wrap(function _callee40$(_context40) {
26339
26501
  while (1) {
26340
- switch (_context38.prev = _context38.next) {
26502
+ switch (_context40.prev = _context40.next) {
26341
26503
  case 0:
26342
26504
  if (options === void 0) {
26343
26505
  options = null;
@@ -26347,33 +26509,33 @@ var Pool = /*#__PURE__*/function () {
26347
26509
  estimateGas = false;
26348
26510
  }
26349
26511
 
26350
- _context38.t0 = getPoolTxOrGasEstimate;
26351
- _context38.t1 = this;
26352
- _context38.t2 = routerAddress[this.network][dapp];
26353
- _context38.next = 7;
26512
+ _context40.t0 = getPoolTxOrGasEstimate;
26513
+ _context40.t1 = this;
26514
+ _context40.t2 = routerAddress[this.network][dapp];
26515
+ _context40.next = 7;
26354
26516
  return getVelodromeRemoveLiquidityTxData(this, assetA, assetB, amount, isStable);
26355
26517
 
26356
26518
  case 7:
26357
- _context38.t3 = _context38.sent;
26358
- _context38.t4 = options;
26359
- _context38.t5 = [_context38.t2, _context38.t3, _context38.t4];
26360
- _context38.t6 = estimateGas;
26361
- _context38.next = 13;
26362
- return (0, _context38.t0)(_context38.t1, _context38.t5, _context38.t6);
26519
+ _context40.t3 = _context40.sent;
26520
+ _context40.t4 = options;
26521
+ _context40.t5 = [_context40.t2, _context40.t3, _context40.t4];
26522
+ _context40.t6 = estimateGas;
26523
+ _context40.next = 13;
26524
+ return (0, _context40.t0)(_context40.t1, _context40.t5, _context40.t6);
26363
26525
 
26364
26526
  case 13:
26365
- tx = _context38.sent;
26366
- return _context38.abrupt("return", tx);
26527
+ tx = _context40.sent;
26528
+ return _context40.abrupt("return", tx);
26367
26529
 
26368
26530
  case 15:
26369
26531
  case "end":
26370
- return _context38.stop();
26532
+ return _context40.stop();
26371
26533
  }
26372
26534
  }
26373
- }, _callee38, this);
26535
+ }, _callee40, this);
26374
26536
  }));
26375
26537
 
26376
- function removeLiquidityV2(_x193, _x194, _x195, _x196, _x197, _x198, _x199) {
26538
+ function removeLiquidityV2(_x203, _x204, _x205, _x206, _x207, _x208, _x209) {
26377
26539
  return _removeLiquidityV.apply(this, arguments);
26378
26540
  }
26379
26541
 
@@ -26399,11 +26561,11 @@ var Pool = /*#__PURE__*/function () {
26399
26561
  _proto.tradeLyraOption =
26400
26562
  /*#__PURE__*/
26401
26563
  function () {
26402
- var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26564
+ var _tradeLyraOption = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(market, expiry, strike, optionType, tradeType, optionAmount, assetIn, collateralChangeAmount, isCoveredCall, options, estimateGas) {
26403
26565
  var swapxData, tx;
26404
- return runtime_1.wrap(function _callee39$(_context39) {
26566
+ return runtime_1.wrap(function _callee41$(_context41) {
26405
26567
  while (1) {
26406
- switch (_context39.prev = _context39.next) {
26568
+ switch (_context41.prev = _context41.next) {
26407
26569
  case 0:
26408
26570
  if (collateralChangeAmount === void 0) {
26409
26571
  collateralChangeAmount = "0";
@@ -26421,27 +26583,27 @@ var Pool = /*#__PURE__*/function () {
26421
26583
  estimateGas = false;
26422
26584
  }
26423
26585
 
26424
- _context39.next = 6;
26586
+ _context41.next = 6;
26425
26587
  return getLyraOptionTxData(this, market, optionType, expiry, strike, tradeType, optionAmount, assetIn, BigNumber$1.from(collateralChangeAmount), isCoveredCall);
26426
26588
 
26427
26589
  case 6:
26428
- swapxData = _context39.sent;
26429
- _context39.next = 9;
26590
+ swapxData = _context41.sent;
26591
+ _context41.next = 9;
26430
26592
  return getPoolTxOrGasEstimate(this, [routerAddress[this.network][Dapp.LYRA], swapxData, options], estimateGas);
26431
26593
 
26432
26594
  case 9:
26433
- tx = _context39.sent;
26434
- return _context39.abrupt("return", tx);
26595
+ tx = _context41.sent;
26596
+ return _context41.abrupt("return", tx);
26435
26597
 
26436
26598
  case 11:
26437
26599
  case "end":
26438
- return _context39.stop();
26600
+ return _context41.stop();
26439
26601
  }
26440
26602
  }
26441
- }, _callee39, this);
26603
+ }, _callee41, this);
26442
26604
  }));
26443
26605
 
26444
- function tradeLyraOption(_x200, _x201, _x202, _x203, _x204, _x205, _x206, _x207, _x208, _x209, _x210) {
26606
+ function tradeLyraOption(_x210, _x211, _x212, _x213, _x214, _x215, _x216, _x217, _x218, _x219, _x220) {
26445
26607
  return _tradeLyraOption.apply(this, arguments);
26446
26608
  }
26447
26609
 
@@ -26456,26 +26618,26 @@ var Pool = /*#__PURE__*/function () {
26456
26618
  _proto.getLyraPositions =
26457
26619
  /*#__PURE__*/
26458
26620
  function () {
26459
- var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(market) {
26460
- return runtime_1.wrap(function _callee40$(_context40) {
26621
+ var _getLyraPositions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market) {
26622
+ return runtime_1.wrap(function _callee42$(_context42) {
26461
26623
  while (1) {
26462
- switch (_context40.prev = _context40.next) {
26624
+ switch (_context42.prev = _context42.next) {
26463
26625
  case 0:
26464
- _context40.next = 2;
26626
+ _context42.next = 2;
26465
26627
  return getOptionPositions(this, market);
26466
26628
 
26467
26629
  case 2:
26468
- return _context40.abrupt("return", _context40.sent);
26630
+ return _context42.abrupt("return", _context42.sent);
26469
26631
 
26470
26632
  case 3:
26471
26633
  case "end":
26472
- return _context40.stop();
26634
+ return _context42.stop();
26473
26635
  }
26474
26636
  }
26475
- }, _callee40, this);
26637
+ }, _callee42, this);
26476
26638
  }));
26477
26639
 
26478
- function getLyraPositions(_x211) {
26640
+ function getLyraPositions(_x221) {
26479
26641
  return _getLyraPositions.apply(this, arguments);
26480
26642
  }
26481
26643
 
@@ -26494,11 +26656,11 @@ var Pool = /*#__PURE__*/function () {
26494
26656
  _proto.changeFuturesMargin =
26495
26657
  /*#__PURE__*/
26496
26658
  function () {
26497
- var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(market, changeAmount, options, estimateGas) {
26659
+ var _changeFuturesMargin = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, changeAmount, options, estimateGas) {
26498
26660
  var tx;
26499
- return runtime_1.wrap(function _callee41$(_context41) {
26661
+ return runtime_1.wrap(function _callee43$(_context43) {
26500
26662
  while (1) {
26501
- switch (_context41.prev = _context41.next) {
26663
+ switch (_context43.prev = _context43.next) {
26502
26664
  case 0:
26503
26665
  if (options === void 0) {
26504
26666
  options = null;
@@ -26508,22 +26670,22 @@ var Pool = /*#__PURE__*/function () {
26508
26670
  estimateGas = false;
26509
26671
  }
26510
26672
 
26511
- _context41.next = 4;
26673
+ _context43.next = 4;
26512
26674
  return getPoolTxOrGasEstimate(this, [market, getFuturesChangeMarginTxData(changeAmount), options], estimateGas);
26513
26675
 
26514
26676
  case 4:
26515
- tx = _context41.sent;
26516
- return _context41.abrupt("return", tx);
26677
+ tx = _context43.sent;
26678
+ return _context43.abrupt("return", tx);
26517
26679
 
26518
26680
  case 6:
26519
26681
  case "end":
26520
- return _context41.stop();
26682
+ return _context43.stop();
26521
26683
  }
26522
26684
  }
26523
- }, _callee41, this);
26685
+ }, _callee43, this);
26524
26686
  }));
26525
26687
 
26526
- function changeFuturesMargin(_x212, _x213, _x214, _x215) {
26688
+ function changeFuturesMargin(_x222, _x223, _x224, _x225) {
26527
26689
  return _changeFuturesMargin.apply(this, arguments);
26528
26690
  }
26529
26691
 
@@ -26542,11 +26704,11 @@ var Pool = /*#__PURE__*/function () {
26542
26704
  _proto.changeFuturesPosition =
26543
26705
  /*#__PURE__*/
26544
26706
  function () {
26545
- var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(market, changeAmount, options, estimateGas) {
26707
+ var _changeFuturesPosition = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(market, changeAmount, options, estimateGas) {
26546
26708
  var txData, tx;
26547
- return runtime_1.wrap(function _callee42$(_context42) {
26709
+ return runtime_1.wrap(function _callee44$(_context44) {
26548
26710
  while (1) {
26549
- switch (_context42.prev = _context42.next) {
26711
+ switch (_context44.prev = _context44.next) {
26550
26712
  case 0:
26551
26713
  if (options === void 0) {
26552
26714
  options = null;
@@ -26556,27 +26718,27 @@ var Pool = /*#__PURE__*/function () {
26556
26718
  estimateGas = false;
26557
26719
  }
26558
26720
 
26559
- _context42.next = 4;
26721
+ _context44.next = 4;
26560
26722
  return getFuturesChangePositionTxData(changeAmount, market, this);
26561
26723
 
26562
26724
  case 4:
26563
- txData = _context42.sent;
26564
- _context42.next = 7;
26725
+ txData = _context44.sent;
26726
+ _context44.next = 7;
26565
26727
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26566
26728
 
26567
26729
  case 7:
26568
- tx = _context42.sent;
26569
- return _context42.abrupt("return", tx);
26730
+ tx = _context44.sent;
26731
+ return _context44.abrupt("return", tx);
26570
26732
 
26571
26733
  case 9:
26572
26734
  case "end":
26573
- return _context42.stop();
26735
+ return _context44.stop();
26574
26736
  }
26575
26737
  }
26576
- }, _callee42, this);
26738
+ }, _callee44, this);
26577
26739
  }));
26578
26740
 
26579
- function changeFuturesPosition(_x216, _x217, _x218, _x219) {
26741
+ function changeFuturesPosition(_x226, _x227, _x228, _x229) {
26580
26742
  return _changeFuturesPosition.apply(this, arguments);
26581
26743
  }
26582
26744
 
@@ -26594,11 +26756,11 @@ var Pool = /*#__PURE__*/function () {
26594
26756
  _proto.cancelFuturesOrder =
26595
26757
  /*#__PURE__*/
26596
26758
  function () {
26597
- var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(market, options, estimateGas) {
26759
+ var _cancelFuturesOrder = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(market, options, estimateGas) {
26598
26760
  var txData, tx;
26599
- return runtime_1.wrap(function _callee43$(_context43) {
26761
+ return runtime_1.wrap(function _callee45$(_context45) {
26600
26762
  while (1) {
26601
- switch (_context43.prev = _context43.next) {
26763
+ switch (_context45.prev = _context45.next) {
26602
26764
  case 0:
26603
26765
  if (options === void 0) {
26604
26766
  options = null;
@@ -26608,27 +26770,27 @@ var Pool = /*#__PURE__*/function () {
26608
26770
  estimateGas = false;
26609
26771
  }
26610
26772
 
26611
- _context43.next = 4;
26773
+ _context45.next = 4;
26612
26774
  return getFuturesCancelOrderTxData(this);
26613
26775
 
26614
26776
  case 4:
26615
- txData = _context43.sent;
26616
- _context43.next = 7;
26777
+ txData = _context45.sent;
26778
+ _context45.next = 7;
26617
26779
  return getPoolTxOrGasEstimate(this, [market, txData, options], estimateGas);
26618
26780
 
26619
26781
  case 7:
26620
- tx = _context43.sent;
26621
- return _context43.abrupt("return", tx);
26782
+ tx = _context45.sent;
26783
+ return _context45.abrupt("return", tx);
26622
26784
 
26623
26785
  case 9:
26624
26786
  case "end":
26625
- return _context43.stop();
26787
+ return _context45.stop();
26626
26788
  }
26627
26789
  }
26628
- }, _callee43, this);
26790
+ }, _callee45, this);
26629
26791
  }));
26630
26792
 
26631
- function cancelFuturesOrder(_x220, _x221, _x222) {
26793
+ function cancelFuturesOrder(_x230, _x231, _x232) {
26632
26794
  return _cancelFuturesOrder.apply(this, arguments);
26633
26795
  }
26634
26796
 
@@ -26645,11 +26807,11 @@ var Pool = /*#__PURE__*/function () {
26645
26807
  _proto.mintManagerFee =
26646
26808
  /*#__PURE__*/
26647
26809
  function () {
26648
- var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(options, estimateGas) {
26810
+ var _mintManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(options, estimateGas) {
26649
26811
  var tx;
26650
- return runtime_1.wrap(function _callee44$(_context44) {
26812
+ return runtime_1.wrap(function _callee46$(_context46) {
26651
26813
  while (1) {
26652
- switch (_context44.prev = _context44.next) {
26814
+ switch (_context46.prev = _context46.next) {
26653
26815
  case 0:
26654
26816
  if (options === void 0) {
26655
26817
  options = null;
@@ -26660,33 +26822,33 @@ var Pool = /*#__PURE__*/function () {
26660
26822
  }
26661
26823
 
26662
26824
  if (!estimateGas) {
26663
- _context44.next = 6;
26825
+ _context46.next = 6;
26664
26826
  break;
26665
26827
  }
26666
26828
 
26667
- _context44.next = 5;
26829
+ _context46.next = 5;
26668
26830
  return this.poolLogic.estimateGas.mintManagerFee(options);
26669
26831
 
26670
26832
  case 5:
26671
- return _context44.abrupt("return", _context44.sent);
26833
+ return _context46.abrupt("return", _context46.sent);
26672
26834
 
26673
26835
  case 6:
26674
- _context44.next = 8;
26836
+ _context46.next = 8;
26675
26837
  return this.poolLogic.mintManagerFee(options);
26676
26838
 
26677
26839
  case 8:
26678
- tx = _context44.sent;
26679
- return _context44.abrupt("return", tx);
26840
+ tx = _context46.sent;
26841
+ return _context46.abrupt("return", tx);
26680
26842
 
26681
26843
  case 10:
26682
26844
  case "end":
26683
- return _context44.stop();
26845
+ return _context46.stop();
26684
26846
  }
26685
26847
  }
26686
- }, _callee44, this);
26848
+ }, _callee46, this);
26687
26849
  }));
26688
26850
 
26689
- function mintManagerFee(_x223, _x224) {
26851
+ function mintManagerFee(_x233, _x234) {
26690
26852
  return _mintManagerFee.apply(this, arguments);
26691
26853
  }
26692
26854
 
@@ -26701,25 +26863,25 @@ var Pool = /*#__PURE__*/function () {
26701
26863
  _proto.getAvailableManagerFee =
26702
26864
  /*#__PURE__*/
26703
26865
  function () {
26704
- var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45() {
26866
+ var _getAvailableManagerFee = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47() {
26705
26867
  var fee;
26706
- return runtime_1.wrap(function _callee45$(_context45) {
26868
+ return runtime_1.wrap(function _callee47$(_context47) {
26707
26869
  while (1) {
26708
- switch (_context45.prev = _context45.next) {
26870
+ switch (_context47.prev = _context47.next) {
26709
26871
  case 0:
26710
- _context45.next = 2;
26872
+ _context47.next = 2;
26711
26873
  return this.poolLogic.availableManagerFee();
26712
26874
 
26713
26875
  case 2:
26714
- fee = _context45.sent;
26715
- return _context45.abrupt("return", BigNumber$1.from(fee));
26876
+ fee = _context47.sent;
26877
+ return _context47.abrupt("return", BigNumber$1.from(fee));
26716
26878
 
26717
26879
  case 4:
26718
26880
  case "end":
26719
- return _context45.stop();
26881
+ return _context47.stop();
26720
26882
  }
26721
26883
  }
26722
- }, _callee45, this);
26884
+ }, _callee47, this);
26723
26885
  }));
26724
26886
 
26725
26887
  function getAvailableManagerFee() {
@@ -26741,11 +26903,11 @@ var Pool = /*#__PURE__*/function () {
26741
26903
  _proto.vestTokens =
26742
26904
  /*#__PURE__*/
26743
26905
  function () {
26744
- var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(tokenAddress, amount, options, estimateGas) {
26906
+ var _vestTokens = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(tokenAddress, amount, options, estimateGas) {
26745
26907
  var txData, tx;
26746
- return runtime_1.wrap(function _callee46$(_context46) {
26908
+ return runtime_1.wrap(function _callee48$(_context48) {
26747
26909
  while (1) {
26748
- switch (_context46.prev = _context46.next) {
26910
+ switch (_context48.prev = _context48.next) {
26749
26911
  case 0:
26750
26912
  if (options === void 0) {
26751
26913
  options = null;
@@ -26755,27 +26917,27 @@ var Pool = /*#__PURE__*/function () {
26755
26917
  estimateGas = false;
26756
26918
  }
26757
26919
 
26758
- _context46.next = 4;
26920
+ _context48.next = 4;
26759
26921
  return getCreateVestTxData(amount);
26760
26922
 
26761
26923
  case 4:
26762
- txData = _context46.sent;
26763
- _context46.next = 7;
26924
+ txData = _context48.sent;
26925
+ _context48.next = 7;
26764
26926
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26765
26927
 
26766
26928
  case 7:
26767
- tx = _context46.sent;
26768
- return _context46.abrupt("return", tx);
26929
+ tx = _context48.sent;
26930
+ return _context48.abrupt("return", tx);
26769
26931
 
26770
26932
  case 9:
26771
26933
  case "end":
26772
- return _context46.stop();
26934
+ return _context48.stop();
26773
26935
  }
26774
26936
  }
26775
- }, _callee46, this);
26937
+ }, _callee48, this);
26776
26938
  }));
26777
26939
 
26778
- function vestTokens(_x225, _x226, _x227, _x228) {
26940
+ function vestTokens(_x235, _x236, _x237, _x238) {
26779
26941
  return _vestTokens.apply(this, arguments);
26780
26942
  }
26781
26943
 
@@ -26794,11 +26956,11 @@ var Pool = /*#__PURE__*/function () {
26794
26956
  _proto.exitVestedToken =
26795
26957
  /*#__PURE__*/
26796
26958
  function () {
26797
- var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(tokenAddress, id, options, estimateGas) {
26959
+ var _exitVestedToken = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(tokenAddress, id, options, estimateGas) {
26798
26960
  var txData, tx;
26799
- return runtime_1.wrap(function _callee47$(_context47) {
26961
+ return runtime_1.wrap(function _callee49$(_context49) {
26800
26962
  while (1) {
26801
- switch (_context47.prev = _context47.next) {
26963
+ switch (_context49.prev = _context49.next) {
26802
26964
  case 0:
26803
26965
  if (options === void 0) {
26804
26966
  options = null;
@@ -26808,27 +26970,27 @@ var Pool = /*#__PURE__*/function () {
26808
26970
  estimateGas = false;
26809
26971
  }
26810
26972
 
26811
- _context47.next = 4;
26973
+ _context49.next = 4;
26812
26974
  return getExitVestTxData(id);
26813
26975
 
26814
26976
  case 4:
26815
- txData = _context47.sent;
26816
- _context47.next = 7;
26977
+ txData = _context49.sent;
26978
+ _context49.next = 7;
26817
26979
  return getPoolTxOrGasEstimate(this, [tokenAddress, txData, options], estimateGas);
26818
26980
 
26819
26981
  case 7:
26820
- tx = _context47.sent;
26821
- return _context47.abrupt("return", tx);
26982
+ tx = _context49.sent;
26983
+ return _context49.abrupt("return", tx);
26822
26984
 
26823
26985
  case 9:
26824
26986
  case "end":
26825
- return _context47.stop();
26987
+ return _context49.stop();
26826
26988
  }
26827
26989
  }
26828
- }, _callee47, this);
26990
+ }, _callee49, this);
26829
26991
  }));
26830
26992
 
26831
- function exitVestedToken(_x229, _x230, _x231, _x232) {
26993
+ function exitVestedToken(_x239, _x240, _x241, _x242) {
26832
26994
  return _exitVestedToken.apply(this, arguments);
26833
26995
  }
26834
26996
 
@@ -26848,11 +27010,11 @@ var Pool = /*#__PURE__*/function () {
26848
27010
  _proto.mintUnitViaFlatMoney =
26849
27011
  /*#__PURE__*/
26850
27012
  function () {
26851
- var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27013
+ var _mintUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26852
27014
  var tx;
26853
- return runtime_1.wrap(function _callee48$(_context48) {
27015
+ return runtime_1.wrap(function _callee50$(_context50) {
26854
27016
  while (1) {
26855
- switch (_context48.prev = _context48.next) {
27017
+ switch (_context50.prev = _context50.next) {
26856
27018
  case 0:
26857
27019
  if (slippage === void 0) {
26858
27020
  slippage = 0.5;
@@ -26866,22 +27028,22 @@ var Pool = /*#__PURE__*/function () {
26866
27028
  estimateGas = false;
26867
27029
  }
26868
27030
 
26869
- _context48.next = 5;
27031
+ _context50.next = 5;
26870
27032
  return mintUnitViaFlatMoney(this, depositAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26871
27033
 
26872
27034
  case 5:
26873
- tx = _context48.sent;
26874
- return _context48.abrupt("return", tx);
27035
+ tx = _context50.sent;
27036
+ return _context50.abrupt("return", tx);
26875
27037
 
26876
27038
  case 7:
26877
27039
  case "end":
26878
- return _context48.stop();
27040
+ return _context50.stop();
26879
27041
  }
26880
27042
  }
26881
- }, _callee48, this);
27043
+ }, _callee50, this);
26882
27044
  }));
26883
27045
 
26884
- function mintUnitViaFlatMoney$1(_x233, _x234, _x235, _x236, _x237) {
27046
+ function mintUnitViaFlatMoney$1(_x243, _x244, _x245, _x246, _x247) {
26885
27047
  return _mintUnitViaFlatMoney2.apply(this, arguments);
26886
27048
  }
26887
27049
 
@@ -26901,11 +27063,11 @@ var Pool = /*#__PURE__*/function () {
26901
27063
  _proto.redeemUnitViaFlatMoney =
26902
27064
  /*#__PURE__*/
26903
27065
  function () {
26904
- var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
27066
+ var _redeemUnitViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas) {
26905
27067
  var tx;
26906
- return runtime_1.wrap(function _callee49$(_context49) {
27068
+ return runtime_1.wrap(function _callee51$(_context51) {
26907
27069
  while (1) {
26908
- switch (_context49.prev = _context49.next) {
27070
+ switch (_context51.prev = _context51.next) {
26909
27071
  case 0:
26910
27072
  if (slippage === void 0) {
26911
27073
  slippage = 0.5;
@@ -26919,22 +27081,22 @@ var Pool = /*#__PURE__*/function () {
26919
27081
  estimateGas = false;
26920
27082
  }
26921
27083
 
26922
- _context49.next = 5;
27084
+ _context51.next = 5;
26923
27085
  return redeemUnitViaFlatMoney(this, withdrawAmount, slippage, maxKeeperFeeInUsd, options, estimateGas);
26924
27086
 
26925
27087
  case 5:
26926
- tx = _context49.sent;
26927
- return _context49.abrupt("return", tx);
27088
+ tx = _context51.sent;
27089
+ return _context51.abrupt("return", tx);
26928
27090
 
26929
27091
  case 7:
26930
27092
  case "end":
26931
- return _context49.stop();
27093
+ return _context51.stop();
26932
27094
  }
26933
27095
  }
26934
- }, _callee49, this);
27096
+ }, _callee51, this);
26935
27097
  }));
26936
27098
 
26937
- function redeemUnitViaFlatMoney$1(_x238, _x239, _x240, _x241, _x242) {
27099
+ function redeemUnitViaFlatMoney$1(_x248, _x249, _x250, _x251, _x252) {
26938
27100
  return _redeemUnitViaFlatMoney2.apply(this, arguments);
26939
27101
  }
26940
27102
 
@@ -26942,11 +27104,11 @@ var Pool = /*#__PURE__*/function () {
26942
27104
  }();
26943
27105
 
26944
27106
  _proto.cancelOrderViaFlatMoney = /*#__PURE__*/function () {
26945
- var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(options, estimateGas) {
27107
+ var _cancelOrderViaFlatMoney2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(options, estimateGas) {
26946
27108
  var tx;
26947
- return runtime_1.wrap(function _callee50$(_context50) {
27109
+ return runtime_1.wrap(function _callee52$(_context52) {
26948
27110
  while (1) {
26949
- switch (_context50.prev = _context50.next) {
27111
+ switch (_context52.prev = _context52.next) {
26950
27112
  case 0:
26951
27113
  if (options === void 0) {
26952
27114
  options = null;
@@ -26956,22 +27118,22 @@ var Pool = /*#__PURE__*/function () {
26956
27118
  estimateGas = false;
26957
27119
  }
26958
27120
 
26959
- _context50.next = 4;
27121
+ _context52.next = 4;
26960
27122
  return cancelOrderViaFlatMoney(this, options, estimateGas);
26961
27123
 
26962
27124
  case 4:
26963
- tx = _context50.sent;
26964
- return _context50.abrupt("return", tx);
27125
+ tx = _context52.sent;
27126
+ return _context52.abrupt("return", tx);
26965
27127
 
26966
27128
  case 6:
26967
27129
  case "end":
26968
- return _context50.stop();
27130
+ return _context52.stop();
26969
27131
  }
26970
27132
  }
26971
- }, _callee50, this);
27133
+ }, _callee52, this);
26972
27134
  }));
26973
27135
 
26974
- function cancelOrderViaFlatMoney$1(_x243, _x244) {
27136
+ function cancelOrderViaFlatMoney$1(_x253, _x254) {
26975
27137
  return _cancelOrderViaFlatMoney2.apply(this, arguments);
26976
27138
  }
26977
27139