@enzymefinance/testutils 4.0.0-next.7 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import _asyncToGenerator from '@babel/runtime/helpers/esm/asyncToGenerator';
2
2
  import _regeneratorRuntime from '@babel/runtime/regenerator';
3
- import { AaveAdapter, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, ConvexCurveLpStakingAdapter, ConvexCurveLpStakingWrapperFactory, ConvexCurveLpStakingWrapperPriceFeed, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAaveAdapter, CurveLiquidityAdapter, CurveLiquiditySethAdapter, CurveLiquidityStethAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, FuseAdapter, FusePriceFeed, GasRelayPaymasterFactory, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, ManagementFee, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OlympusV2Adapter, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV4Adapter, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, StakehoundEthPriceFeed, SynthetixAdapter, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter, IntegrationManagerActionId, addTrackedAssetsToVaultArgs, removeTrackedAssetsFromVaultArgs, StandardToken, callOnExternalPositionArgs, ExternalPositionManagerActionId, IExternalPositionProxy, encodeArgs, externalPositionReactivateArgs, externalPositionRemoveArgs, compoundExternalPositionActionArgs, CompoundDebtPositionActionId, ExternalPositionType, MockGenericExternalPositionParser, MockGenericExternalPositionLib, mockGenericExternalPositionActionArgs, MockGenericExternalPositionActionId, uniswapV3LiquidityPositionAddLiquidityArgs, UniswapV3LiquidityPositionActionId, uniswapV3LiquidityPositionCollectArgs, UniswapV3LiquidityPositionLib, uniswapV3LiquidityPositionMintArgs, uniswapV3LiquidityPositionPurgeArgs, uniswapV3LiquidityPositionRemoveLiquidityArgs, feeManagerConfigArgs, FeeSettlementType, FeeHook, IFee, aaveLendArgs, callOnIntegrationArgs, lendSelector, aaveRedeemArgs, redeemSelector, compoundClaimRewardsArgs, claimRewardsSelector, compoundArgs, curveTakeOrderArgs, takeOrderSelector, curveClaimRewardsArgs, curveLendArgs, curveLendAndStakeArgs, lendAndStakeSelector, curveRedeemArgs, curveStakeArgs, stakeSelector, curveUnstakeArgs, unstakeSelector, curveUnstakeAndRedeemArgs, unstakeAndRedeemSelector, curveAaveLendArgs, curveAaveLendAndStakeArgs, curveAaveRedeemArgs, curveAaveStakeArgs, curveAaveUnstakeAndRedeemArgs, curveAaveUnstakeArgs, curveSethLendArgs, curveSethLendAndStakeArgs, curveSethRedeemArgs, curveSethStakeArgs, curveSethUnstakeAndRedeemArgs, curveSethUnstakeArgs, curveStethLendArgs, curveStethLendAndStakeArgs, curveStethRedeemArgs, curveStethStakeArgs, curveStethUnstakeAndRedeemArgs, curveStethUnstakeArgs, idleClaimRewardsArgs, idleLendArgs, idleRedeemArgs, sighash, olympusV2StakeArgs, olympusV2UnstakeArgs, paraSwapV4TakeOrderArgs, paraSwapV5TakeOrderArgs, poolTogetherV4LendArgs, poolTogetherV4RedeemArgs, poolTogetherV4ClaimRewardsArgs, synthetixAssignExchangeDelegateSelector, synthetixRedeemArgs, synthetixTakeOrderArgs, uniswapV2LendArgs, uniswapV2RedeemArgs, uniswapV2TakeOrderArgs, uniswapV3TakeOrderArgs, yearnVaultV2LendArgs, yearnVaultV2RedeemArgs, zeroExV2TakeOrderArgs, policyManagerConfigArgs, PolicyHook, IPolicy, encodeFunctionData, ComptrollerProxy, VaultProxy, GasRelayPaymasterLib, addressListRegistryCreateListSelector, curveMinterMintSelector, curveMinterMintManySelector, curveMinterToggleApproveMintSelector, IGsnRelayHub, createSignedRelayRequest, isTypedDataSigner } from '@enzymefinance/protocol';
3
+ import { AaveAdapter, AaveDebtPositionLib, AaveDebtPositionParser, AavePriceFeed, AddressListRegistry, AllowedAdapterIncomingAssetsPolicy, AllowedAdaptersPolicy, AllowedAssetsForRedemptionPolicy, AllowedDepositRecipientsPolicy, AllowedExternalPositionTypesPolicy, AllowedSharesTransferRecipientsPolicy, CompoundAdapter, CompoundDebtPositionLib, CompoundDebtPositionParser, CompoundPriceFeed, ComptrollerLib, ConvexCurveLpStakingAdapter, ConvexCurveLpStakingWrapperFactory, ConvexCurveLpStakingWrapperPriceFeed, CumulativeSlippageTolerancePolicy, CurveExchangeAdapter, CurveLiquidityAdapter, CurvePriceFeed, DepositWrapper, Dispatcher, EntranceRateBurnFee, EntranceRateDirectFee, ExitRateBurnFee, ExitRateDirectFee, ExternalPositionFactory, ExternalPositionManager, FeeManager, FundDeployer, FundValueCalculator, FundValueCalculatorRouter, FundValueCalculatorUsdWrapper, FuseAdapter, FusePriceFeed, GasRelayPaymasterFactory, IdleAdapter, IdlePriceFeed, IntegrationManager, LidoStethPriceFeed, ManagementFee, MinAssetBalancesPostRedemptionPolicy, MinMaxInvestmentPolicy, OlympusV2Adapter, OnlyRemoveDustExternalPositionPolicy, OnlyUntrackDustOrPricelessAssetsPolicy, ParaSwapV5Adapter, PerformanceFee, PolicyManager, PoolTogetherV4Adapter, PoolTogetherV4PriceFeed, ProtocolFeeReserveLib, ProtocolFeeTracker, RevertingPriceFeed, SynthetixAdapter, UniswapV2ExchangeAdapter, UniswapV2LiquidityAdapter, UniswapV2PoolPriceFeed, UniswapV3Adapter, UnpermissionedActionsWrapper, UsdEthSimulatedAggregator, ValueInterpreter, VaultLib, YearnVaultV2Adapter, YearnVaultV2PriceFeed, ZeroExV2Adapter, IntegrationManagerActionId, addTrackedAssetsToVaultArgs, removeTrackedAssetsFromVaultArgs, StandardToken, callOnExternalPositionArgs, ExternalPositionManagerActionId, IExternalPositionProxy, encodeArgs, externalPositionReactivateArgs, externalPositionRemoveArgs, compoundExternalPositionActionArgs, CompoundDebtPositionActionId, ExternalPositionType, MockGenericExternalPositionParser, MockGenericExternalPositionLib, mockGenericExternalPositionActionArgs, MockGenericExternalPositionActionId, aaveDebtPositionAddCollateralArgs, AaveDebtPositionActionId, aaveDebtPositionBorrowArgs, aaveDebtPositionClaimRewardsArgs, aaveDebtPositionRemoveCollateralArgs, aaveDebtPositionRepayBorrowArgs, uniswapV3LiquidityPositionAddLiquidityArgs, UniswapV3LiquidityPositionActionId, uniswapV3LiquidityPositionCollectArgs, UniswapV3LiquidityPositionLib, uniswapV3LiquidityPositionMintArgs, uniswapV3LiquidityPositionPurgeArgs, uniswapV3LiquidityPositionRemoveLiquidityArgs, feeManagerConfigArgs, FeeSettlementType, FeeHook, IFee, aaveLendArgs, callOnIntegrationArgs, lendSelector, aaveRedeemArgs, redeemSelector, compoundClaimRewardsArgs, claimRewardsSelector, compoundArgs, curveTakeOrderArgs, takeOrderSelector, curveClaimRewardsArgs, curveLendArgs, curveLendAndStakeArgs, lendAndStakeSelector, curveRedeemArgs, curveStakeArgs, stakeSelector, curveUnstakeArgs, unstakeSelector, curveUnstakeAndRedeemArgs, unstakeAndRedeemSelector, idleClaimRewardsArgs, idleLendArgs, idleRedeemArgs, sighash, olympusV2StakeArgs, olympusV2UnstakeArgs, paraSwapV5TakeOrderArgs, poolTogetherV4LendArgs, poolTogetherV4RedeemArgs, poolTogetherV4ClaimRewardsArgs, synthetixAssignExchangeDelegateSelector, synthetixRedeemArgs, synthetixTakeOrderArgs, uniswapV2LendArgs, uniswapV2RedeemArgs, uniswapV2TakeOrderArgs, uniswapV3TakeOrderArgs, yearnVaultV2LendArgs, yearnVaultV2RedeemArgs, zeroExV2TakeOrderArgs, policyManagerConfigArgs, PolicyHook, IPolicy, encodeFunctionData, ComptrollerProxy, VaultProxy, GasRelayPaymasterLib, addressListRegistryCreateListSelector, curveMinterMintSelector, curveMinterMintManySelector, curveMinterToggleApproveMintSelector, IGsnRelayHub, createSignedRelayRequest, isTypedDataSigner } from '@enzymefinance/protocol';
4
4
  import { utils, constants, BigNumber } from 'ethers';
5
5
  import { extractEvent, contract, resolveAddress, randomAddress } from '@enzymefinance/ethers';
6
6
  import _taggedTemplateLiteral from '@babel/runtime/helpers/esm/taggedTemplateLiteral';
@@ -105,6 +105,8 @@ function _deployProtocolFixture() {
105
105
 
106
106
  deployment = {
107
107
  aaveAdapter: new AaveAdapter(fixture['AaveAdapter'].address, deployer),
108
+ aaveDebtPositionLib: new AaveDebtPositionLib(fixture['AaveDebtPositionLib'].address, deployer),
109
+ aaveDebtPositionParser: new AaveDebtPositionParser(fixture['AaveDebtPositionParser'].address, deployer),
108
110
  aavePriceFeed: new AavePriceFeed(fixture['AavePriceFeed'].address, deployer),
109
111
  addressListRegistry: new AddressListRegistry(fixture['AddressListRegistry'].address, deployer),
110
112
  allowedAdapterIncomingAssetsPolicy: new AllowedAdapterIncomingAssetsPolicy(fixture['AllowedAdapterIncomingAssetsPolicy'].address, deployer),
@@ -123,10 +125,7 @@ function _deployProtocolFixture() {
123
125
  convexCurveLpStakingWrapperPriceFeed: new ConvexCurveLpStakingWrapperPriceFeed(fixture['ConvexCurveLpStakingWrapperPriceFeed'].address, deployer),
124
126
  cumulativeSlippageTolerancePolicy: new CumulativeSlippageTolerancePolicy(fixture['CumulativeSlippageTolerancePolicy'].address, deployer),
125
127
  curveExchangeAdapter: new CurveExchangeAdapter(fixture['CurveExchangeAdapter'].address, deployer),
126
- curveLiquidityAaveAdapter: new CurveLiquidityAaveAdapter(fixture['CurveLiquidityAaveAdapter'].address, deployer),
127
128
  curveLiquidityAdapter: new CurveLiquidityAdapter(fixture['CurveLiquidityAdapter'].address, deployer),
128
- curveLiquiditySethAdapter: new CurveLiquiditySethAdapter(fixture['CurveLiquiditySethAdapter'].address, deployer),
129
- curveLiquidityStethAdapter: new CurveLiquidityStethAdapter(fixture['CurveLiquidityStethAdapter'].address, deployer),
130
129
  curvePriceFeed: new CurvePriceFeed(fixture['CurvePriceFeed'].address, deployer),
131
130
  depositWrapper: new DepositWrapper(fixture['DepositWrapper'].address, deployer),
132
131
  dispatcher: new Dispatcher(fixture['Dispatcher'].address, deployer),
@@ -154,7 +153,6 @@ function _deployProtocolFixture() {
154
153
  olympusV2Adapter: new OlympusV2Adapter(fixture['OlympusV2Adapter'].address, deployer),
155
154
  onlyRemoveDustExternalPositionPolicy: new OnlyRemoveDustExternalPositionPolicy(fixture['OnlyRemoveDustExternalPositionPolicy'].address, deployer),
156
155
  onlyUntrackDustOrPricelessAssetsPolicy: new OnlyUntrackDustOrPricelessAssetsPolicy(fixture['OnlyUntrackDustOrPricelessAssetsPolicy'].address, deployer),
157
- paraSwapV4Adapter: new ParaSwapV4Adapter(fixture['ParaSwapV4Adapter'].address, deployer),
158
156
  paraSwapV5Adapter: new ParaSwapV5Adapter(fixture['ParaSwapV5Adapter'].address, deployer),
159
157
  performanceFee: new PerformanceFee(fixture['PerformanceFee'].address, deployer),
160
158
  policyManager: new PolicyManager(fixture['PolicyManager'].address, deployer),
@@ -164,13 +162,13 @@ function _deployProtocolFixture() {
164
162
  protocolFeeReserveProxy: new ProtocolFeeReserveLib(fixture['ProtocolFeeReserveProxy'].address, deployer),
165
163
  protocolFeeTracker: new ProtocolFeeTracker(fixture['ProtocolFeeTracker'].address, deployer),
166
164
  revertingPriceFeed: new RevertingPriceFeed(fixture['RevertingPriceFeed'].address, deployer),
167
- stakehoundEthPriceFeed: new StakehoundEthPriceFeed(fixture['StakehoundEthPriceFeed'].address, deployer),
168
165
  synthetixAdapter: new SynthetixAdapter(fixture['SynthetixAdapter'].address, deployer),
169
166
  uniswapV2ExchangeAdapter: new UniswapV2ExchangeAdapter(fixture['UniswapV2ExchangeAdapter'].address, deployer),
170
167
  uniswapV2LiquidityAdapter: new UniswapV2LiquidityAdapter(fixture['UniswapV2LiquidityAdapter'].address, deployer),
171
168
  uniswapV2PoolPriceFeed: new UniswapV2PoolPriceFeed(fixture['UniswapV2PoolPriceFeed'].address, deployer),
172
169
  uniswapV3Adapter: new UniswapV3Adapter(fixture['UniswapV3Adapter'].address, deployer),
173
170
  unpermissionedActionsWrapper: new UnpermissionedActionsWrapper(fixture['UnpermissionedActionsWrapper'].address, deployer),
171
+ usdEthSimulatedAggregator: new UsdEthSimulatedAggregator(fixture['UsdEthSimulatedAggregator'].address, deployer),
174
172
  valueInterpreter: new ValueInterpreter(fixture['ValueInterpreter'].address, deployer),
175
173
  vaultLib: new VaultLib(fixture['VaultLib'].address, deployer),
176
174
  yearnVaultV2Adapter: new YearnVaultV2Adapter(fixture['YearnVaultV2Adapter'].address, deployer),
@@ -1110,6 +1108,209 @@ function _mockExternalPositionRemoveManagedAssets() {
1110
1108
  return _mockExternalPositionRemoveManagedAssets.apply(this, arguments);
1111
1109
  }
1112
1110
 
1111
+ function aaveDebtPositionAddCollateral(_x) {
1112
+ return _aaveDebtPositionAddCollateral.apply(this, arguments);
1113
+ }
1114
+
1115
+ function _aaveDebtPositionAddCollateral() {
1116
+ _aaveDebtPositionAddCollateral = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
1117
+ var comptrollerProxy, externalPositionManager, signer, aTokens, amounts, externalPositionProxy, actionArgs;
1118
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
1119
+ while (1) {
1120
+ switch (_context.prev = _context.next) {
1121
+ case 0:
1122
+ comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager, signer = _ref.signer, aTokens = _ref.aTokens, amounts = _ref.amounts, externalPositionProxy = _ref.externalPositionProxy;
1123
+ actionArgs = aaveDebtPositionAddCollateralArgs({
1124
+ aTokens: aTokens,
1125
+ amounts: amounts
1126
+ });
1127
+ return _context.abrupt("return", callOnExternalPosition({
1128
+ actionArgs: actionArgs,
1129
+ actionId: AaveDebtPositionActionId.AddCollateralAssets,
1130
+ comptrollerProxy: comptrollerProxy,
1131
+ externalPositionManager: externalPositionManager,
1132
+ externalPositionProxy: externalPositionProxy,
1133
+ signer: signer
1134
+ }));
1135
+
1136
+ case 3:
1137
+ case "end":
1138
+ return _context.stop();
1139
+ }
1140
+ }
1141
+ }, _callee);
1142
+ }));
1143
+ return _aaveDebtPositionAddCollateral.apply(this, arguments);
1144
+ }
1145
+
1146
+ function aaveDebtPositionBorrow(_x2) {
1147
+ return _aaveDebtPositionBorrow.apply(this, arguments);
1148
+ }
1149
+
1150
+ function _aaveDebtPositionBorrow() {
1151
+ _aaveDebtPositionBorrow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
1152
+ var comptrollerProxy, externalPositionManager, signer, tokens, amounts, externalPositionProxy, actionArgs;
1153
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
1154
+ while (1) {
1155
+ switch (_context2.prev = _context2.next) {
1156
+ case 0:
1157
+ comptrollerProxy = _ref2.comptrollerProxy, externalPositionManager = _ref2.externalPositionManager, signer = _ref2.signer, tokens = _ref2.tokens, amounts = _ref2.amounts, externalPositionProxy = _ref2.externalPositionProxy;
1158
+ actionArgs = aaveDebtPositionBorrowArgs({
1159
+ amounts: amounts,
1160
+ tokens: tokens
1161
+ });
1162
+ return _context2.abrupt("return", callOnExternalPosition({
1163
+ actionArgs: actionArgs,
1164
+ actionId: AaveDebtPositionActionId.BorrowAsset,
1165
+ comptrollerProxy: comptrollerProxy,
1166
+ externalPositionManager: externalPositionManager,
1167
+ externalPositionProxy: externalPositionProxy,
1168
+ signer: signer
1169
+ }));
1170
+
1171
+ case 3:
1172
+ case "end":
1173
+ return _context2.stop();
1174
+ }
1175
+ }
1176
+ }, _callee2);
1177
+ }));
1178
+ return _aaveDebtPositionBorrow.apply(this, arguments);
1179
+ }
1180
+
1181
+ function aaveDebtPositionClaimRewards(_x3) {
1182
+ return _aaveDebtPositionClaimRewards.apply(this, arguments);
1183
+ }
1184
+
1185
+ function _aaveDebtPositionClaimRewards() {
1186
+ _aaveDebtPositionClaimRewards = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
1187
+ var comptrollerProxy, externalPositionManager, signer, assets, externalPositionProxy, actionArgs;
1188
+ return _regeneratorRuntime.wrap(function _callee3$(_context3) {
1189
+ while (1) {
1190
+ switch (_context3.prev = _context3.next) {
1191
+ case 0:
1192
+ comptrollerProxy = _ref3.comptrollerProxy, externalPositionManager = _ref3.externalPositionManager, signer = _ref3.signer, assets = _ref3.assets, externalPositionProxy = _ref3.externalPositionProxy;
1193
+ actionArgs = aaveDebtPositionClaimRewardsArgs({
1194
+ assets: assets
1195
+ });
1196
+ return _context3.abrupt("return", callOnExternalPosition({
1197
+ actionArgs: actionArgs,
1198
+ actionId: AaveDebtPositionActionId.ClaimRewards,
1199
+ comptrollerProxy: comptrollerProxy,
1200
+ externalPositionManager: externalPositionManager,
1201
+ externalPositionProxy: externalPositionProxy,
1202
+ signer: signer
1203
+ }));
1204
+
1205
+ case 3:
1206
+ case "end":
1207
+ return _context3.stop();
1208
+ }
1209
+ }
1210
+ }, _callee3);
1211
+ }));
1212
+ return _aaveDebtPositionClaimRewards.apply(this, arguments);
1213
+ }
1214
+
1215
+ function aaveDebtPositionRemoveCollateral(_x4) {
1216
+ return _aaveDebtPositionRemoveCollateral.apply(this, arguments);
1217
+ }
1218
+
1219
+ function _aaveDebtPositionRemoveCollateral() {
1220
+ _aaveDebtPositionRemoveCollateral = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
1221
+ var comptrollerProxy, externalPositionManager, signer, aTokens, amounts, externalPositionProxy, actionArgs;
1222
+ return _regeneratorRuntime.wrap(function _callee4$(_context4) {
1223
+ while (1) {
1224
+ switch (_context4.prev = _context4.next) {
1225
+ case 0:
1226
+ comptrollerProxy = _ref4.comptrollerProxy, externalPositionManager = _ref4.externalPositionManager, signer = _ref4.signer, aTokens = _ref4.aTokens, amounts = _ref4.amounts, externalPositionProxy = _ref4.externalPositionProxy;
1227
+ actionArgs = aaveDebtPositionRemoveCollateralArgs({
1228
+ aTokens: aTokens,
1229
+ amounts: amounts
1230
+ });
1231
+ return _context4.abrupt("return", callOnExternalPosition({
1232
+ actionArgs: actionArgs,
1233
+ actionId: AaveDebtPositionActionId.RemoveCollateralAssets,
1234
+ comptrollerProxy: comptrollerProxy,
1235
+ externalPositionManager: externalPositionManager,
1236
+ externalPositionProxy: externalPositionProxy,
1237
+ signer: signer
1238
+ }));
1239
+
1240
+ case 3:
1241
+ case "end":
1242
+ return _context4.stop();
1243
+ }
1244
+ }
1245
+ }, _callee4);
1246
+ }));
1247
+ return _aaveDebtPositionRemoveCollateral.apply(this, arguments);
1248
+ }
1249
+
1250
+ function aaveDebtPositionRepayBorrow(_x5) {
1251
+ return _aaveDebtPositionRepayBorrow.apply(this, arguments);
1252
+ }
1253
+
1254
+ function _aaveDebtPositionRepayBorrow() {
1255
+ _aaveDebtPositionRepayBorrow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref5) {
1256
+ var comptrollerProxy, externalPositionManager, signer, tokens, amounts, externalPositionProxy, actionArgs;
1257
+ return _regeneratorRuntime.wrap(function _callee5$(_context5) {
1258
+ while (1) {
1259
+ switch (_context5.prev = _context5.next) {
1260
+ case 0:
1261
+ comptrollerProxy = _ref5.comptrollerProxy, externalPositionManager = _ref5.externalPositionManager, signer = _ref5.signer, tokens = _ref5.tokens, amounts = _ref5.amounts, externalPositionProxy = _ref5.externalPositionProxy;
1262
+ actionArgs = aaveDebtPositionRepayBorrowArgs({
1263
+ amounts: amounts,
1264
+ tokens: tokens
1265
+ });
1266
+ return _context5.abrupt("return", callOnExternalPosition({
1267
+ actionArgs: actionArgs,
1268
+ actionId: AaveDebtPositionActionId.RepayBorrowedAssets,
1269
+ comptrollerProxy: comptrollerProxy,
1270
+ externalPositionManager: externalPositionManager,
1271
+ externalPositionProxy: externalPositionProxy,
1272
+ signer: signer
1273
+ }));
1274
+
1275
+ case 3:
1276
+ case "end":
1277
+ return _context5.stop();
1278
+ }
1279
+ }
1280
+ }, _callee5);
1281
+ }));
1282
+ return _aaveDebtPositionRepayBorrow.apply(this, arguments);
1283
+ }
1284
+
1285
+ function createAaveDebtPosition(_x6) {
1286
+ return _createAaveDebtPosition.apply(this, arguments);
1287
+ }
1288
+
1289
+ function _createAaveDebtPosition() {
1290
+ _createAaveDebtPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref6) {
1291
+ var signer, comptrollerProxy, externalPositionManager;
1292
+ return _regeneratorRuntime.wrap(function _callee6$(_context6) {
1293
+ while (1) {
1294
+ switch (_context6.prev = _context6.next) {
1295
+ case 0:
1296
+ signer = _ref6.signer, comptrollerProxy = _ref6.comptrollerProxy, externalPositionManager = _ref6.externalPositionManager;
1297
+ return _context6.abrupt("return", createExternalPosition({
1298
+ comptrollerProxy: comptrollerProxy,
1299
+ externalPositionManager: externalPositionManager,
1300
+ externalPositionTypeId: ExternalPositionType.AaveDebtPosition,
1301
+ signer: signer
1302
+ }));
1303
+
1304
+ case 2:
1305
+ case "end":
1306
+ return _context6.stop();
1307
+ }
1308
+ }
1309
+ }, _callee6);
1310
+ }));
1311
+ return _createAaveDebtPosition.apply(this, arguments);
1312
+ }
1313
+
1113
1314
  var _templateObject$3;
1114
1315
  var UniswapV3FeeAmount;
1115
1316
 
@@ -2050,7 +2251,7 @@ function _curveUnstake() {
2050
2251
 
2051
2252
  function curveUnstakeAndRedeem(_x7) {
2052
2253
  return _curveUnstakeAndRedeem.apply(this, arguments);
2053
- } // aave pool
2254
+ }
2054
2255
 
2055
2256
  function _curveUnstakeAndRedeem() {
2056
2257
  _curveUnstakeAndRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref8) {
@@ -2084,411 +2285,6 @@ function _curveUnstakeAndRedeem() {
2084
2285
  return _curveUnstakeAndRedeem.apply(this, arguments);
2085
2286
  }
2086
2287
 
2087
- function curveAaveClaimRewards(_ref9) {
2088
- var comptrollerProxy = _ref9.comptrollerProxy,
2089
- integrationManager = _ref9.integrationManager,
2090
- fundOwner = _ref9.fundOwner,
2091
- curveLiquidityAaveAdapter = _ref9.curveLiquidityAaveAdapter;
2092
- var callArgs = callOnIntegrationArgs({
2093
- adapter: curveLiquidityAaveAdapter,
2094
- encodedCallArgs: constants.HashZero,
2095
- selector: claimRewardsSelector
2096
- });
2097
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2098
- }
2099
- function curveAaveLend(_ref10) {
2100
- var comptrollerProxy = _ref10.comptrollerProxy,
2101
- integrationManager = _ref10.integrationManager,
2102
- fundOwner = _ref10.fundOwner,
2103
- curveLiquidityAaveAdapter = _ref10.curveLiquidityAaveAdapter,
2104
- _ref10$outgoingAaveDa = _ref10.outgoingAaveDaiAmount,
2105
- outgoingAaveDaiAmount = _ref10$outgoingAaveDa === void 0 ? BigNumber.from(0) : _ref10$outgoingAaveDa,
2106
- _ref10$outgoingAaveUs = _ref10.outgoingAaveUsdcAmount,
2107
- outgoingAaveUsdcAmount = _ref10$outgoingAaveUs === void 0 ? BigNumber.from(0) : _ref10$outgoingAaveUs,
2108
- _ref10$outgoingAaveUs2 = _ref10.outgoingAaveUsdtAmount,
2109
- outgoingAaveUsdtAmount = _ref10$outgoingAaveUs2 === void 0 ? BigNumber.from(0) : _ref10$outgoingAaveUs2,
2110
- _ref10$minIncomingLPT = _ref10.minIncomingLPTokenAmount,
2111
- minIncomingLPTokenAmount = _ref10$minIncomingLPT === void 0 ? BigNumber.from(1) : _ref10$minIncomingLPT,
2112
- _ref10$useUnderlyings = _ref10.useUnderlyings,
2113
- useUnderlyings = _ref10$useUnderlyings === void 0 ? false : _ref10$useUnderlyings;
2114
- var callArgs = callOnIntegrationArgs({
2115
- adapter: curveLiquidityAaveAdapter,
2116
- encodedCallArgs: curveAaveLendArgs({
2117
- minIncomingLPTokenAmount: minIncomingLPTokenAmount,
2118
- outgoingAaveDaiAmount: outgoingAaveDaiAmount,
2119
- outgoingAaveUsdcAmount: outgoingAaveUsdcAmount,
2120
- outgoingAaveUsdtAmount: outgoingAaveUsdtAmount,
2121
- useUnderlyings: useUnderlyings
2122
- }),
2123
- selector: lendSelector
2124
- });
2125
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2126
- }
2127
- function curveAaveLendAndStake(_ref11) {
2128
- var comptrollerProxy = _ref11.comptrollerProxy,
2129
- integrationManager = _ref11.integrationManager,
2130
- fundOwner = _ref11.fundOwner,
2131
- curveLiquidityAaveAdapter = _ref11.curveLiquidityAaveAdapter,
2132
- _ref11$outgoingAaveDa = _ref11.outgoingAaveDaiAmount,
2133
- outgoingAaveDaiAmount = _ref11$outgoingAaveDa === void 0 ? BigNumber.from(0) : _ref11$outgoingAaveDa,
2134
- _ref11$outgoingAaveUs = _ref11.outgoingAaveUsdcAmount,
2135
- outgoingAaveUsdcAmount = _ref11$outgoingAaveUs === void 0 ? BigNumber.from(0) : _ref11$outgoingAaveUs,
2136
- _ref11$outgoingAaveUs2 = _ref11.outgoingAaveUsdtAmount,
2137
- outgoingAaveUsdtAmount = _ref11$outgoingAaveUs2 === void 0 ? BigNumber.from(0) : _ref11$outgoingAaveUs2,
2138
- _ref11$minIncomingLiq = _ref11.minIncomingLiquidityGaugeTokenAmount,
2139
- minIncomingLiquidityGaugeTokenAmount = _ref11$minIncomingLiq === void 0 ? BigNumber.from(1) : _ref11$minIncomingLiq,
2140
- _ref11$useUnderlyings = _ref11.useUnderlyings,
2141
- useUnderlyings = _ref11$useUnderlyings === void 0 ? false : _ref11$useUnderlyings;
2142
- var callArgs = callOnIntegrationArgs({
2143
- adapter: curveLiquidityAaveAdapter,
2144
- encodedCallArgs: curveAaveLendAndStakeArgs({
2145
- minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
2146
- outgoingAaveDaiAmount: outgoingAaveDaiAmount,
2147
- outgoingAaveUsdcAmount: outgoingAaveUsdcAmount,
2148
- outgoingAaveUsdtAmount: outgoingAaveUsdtAmount,
2149
- useUnderlyings: useUnderlyings
2150
- }),
2151
- selector: lendAndStakeSelector
2152
- });
2153
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2154
- }
2155
- function curveAaveRedeem(_ref12) {
2156
- var comptrollerProxy = _ref12.comptrollerProxy,
2157
- integrationManager = _ref12.integrationManager,
2158
- fundOwner = _ref12.fundOwner,
2159
- curveLiquidityAaveAdapter = _ref12.curveLiquidityAaveAdapter,
2160
- outgoingLPTokenAmount = _ref12.outgoingLPTokenAmount,
2161
- _ref12$minIncomingAav = _ref12.minIncomingAaveDaiAmount,
2162
- minIncomingAaveDaiAmount = _ref12$minIncomingAav === void 0 ? BigNumber.from(1) : _ref12$minIncomingAav,
2163
- _ref12$minIncomingAav2 = _ref12.minIncomingAaveUsdcAmount,
2164
- minIncomingAaveUsdcAmount = _ref12$minIncomingAav2 === void 0 ? BigNumber.from(1) : _ref12$minIncomingAav2,
2165
- _ref12$minIncomingAav3 = _ref12.minIncomingAaveUsdtAmount,
2166
- minIncomingAaveUsdtAmount = _ref12$minIncomingAav3 === void 0 ? BigNumber.from(1) : _ref12$minIncomingAav3,
2167
- _ref12$receiveSingleA = _ref12.receiveSingleAsset,
2168
- receiveSingleAsset = _ref12$receiveSingleA === void 0 ? false : _ref12$receiveSingleA,
2169
- _ref12$useUnderlyings = _ref12.useUnderlyings,
2170
- useUnderlyings = _ref12$useUnderlyings === void 0 ? false : _ref12$useUnderlyings;
2171
- var callArgs = callOnIntegrationArgs({
2172
- adapter: curveLiquidityAaveAdapter,
2173
- encodedCallArgs: curveAaveRedeemArgs({
2174
- minIncomingAaveDaiAmount: minIncomingAaveDaiAmount,
2175
- minIncomingAaveUsdcAmount: minIncomingAaveUsdcAmount,
2176
- minIncomingAaveUsdtAmount: minIncomingAaveUsdtAmount,
2177
- outgoingLPTokenAmount: outgoingLPTokenAmount,
2178
- receiveSingleAsset: receiveSingleAsset,
2179
- useUnderlyings: useUnderlyings
2180
- }),
2181
- selector: redeemSelector
2182
- });
2183
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2184
- }
2185
- function curveAaveStake(_ref13) {
2186
- var comptrollerProxy = _ref13.comptrollerProxy,
2187
- integrationManager = _ref13.integrationManager,
2188
- fundOwner = _ref13.fundOwner,
2189
- curveLiquidityAaveAdapter = _ref13.curveLiquidityAaveAdapter,
2190
- outgoingLPTokenAmount = _ref13.outgoingLPTokenAmount;
2191
- var callArgs = callOnIntegrationArgs({
2192
- adapter: curveLiquidityAaveAdapter,
2193
- encodedCallArgs: curveAaveStakeArgs({
2194
- outgoingLPTokenAmount: outgoingLPTokenAmount
2195
- }),
2196
- selector: stakeSelector
2197
- });
2198
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2199
- }
2200
- function curveAaveUnstakeAndRedeem(_ref14) {
2201
- var comptrollerProxy = _ref14.comptrollerProxy,
2202
- integrationManager = _ref14.integrationManager,
2203
- fundOwner = _ref14.fundOwner,
2204
- curveLiquidityAaveAdapter = _ref14.curveLiquidityAaveAdapter,
2205
- outgoingLiquidityGaugeTokenAmount = _ref14.outgoingLiquidityGaugeTokenAmount,
2206
- _ref14$minIncomingAav = _ref14.minIncomingAaveDaiAmount,
2207
- minIncomingAaveDaiAmount = _ref14$minIncomingAav === void 0 ? BigNumber.from(1) : _ref14$minIncomingAav,
2208
- _ref14$minIncomingAav2 = _ref14.minIncomingAaveUsdcAmount,
2209
- minIncomingAaveUsdcAmount = _ref14$minIncomingAav2 === void 0 ? BigNumber.from(1) : _ref14$minIncomingAav2,
2210
- _ref14$minIncomingAav3 = _ref14.minIncomingAaveUsdtAmount,
2211
- minIncomingAaveUsdtAmount = _ref14$minIncomingAav3 === void 0 ? BigNumber.from(1) : _ref14$minIncomingAav3,
2212
- _ref14$receiveSingleA = _ref14.receiveSingleAsset,
2213
- receiveSingleAsset = _ref14$receiveSingleA === void 0 ? false : _ref14$receiveSingleA,
2214
- _ref14$useUnderlyings = _ref14.useUnderlyings,
2215
- useUnderlyings = _ref14$useUnderlyings === void 0 ? false : _ref14$useUnderlyings;
2216
- var callArgs = callOnIntegrationArgs({
2217
- adapter: curveLiquidityAaveAdapter,
2218
- encodedCallArgs: curveAaveUnstakeAndRedeemArgs({
2219
- minIncomingAaveDaiAmount: minIncomingAaveDaiAmount,
2220
- minIncomingAaveUsdcAmount: minIncomingAaveUsdcAmount,
2221
- minIncomingAaveUsdtAmount: minIncomingAaveUsdtAmount,
2222
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
2223
- receiveSingleAsset: receiveSingleAsset,
2224
- useUnderlyings: useUnderlyings
2225
- }),
2226
- selector: unstakeAndRedeemSelector
2227
- });
2228
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2229
- }
2230
- function curveAaveUnstake(_ref15) {
2231
- var comptrollerProxy = _ref15.comptrollerProxy,
2232
- integrationManager = _ref15.integrationManager,
2233
- fundOwner = _ref15.fundOwner,
2234
- curveLiquidityAaveAdapter = _ref15.curveLiquidityAaveAdapter,
2235
- outgoingLiquidityGaugeTokenAmount = _ref15.outgoingLiquidityGaugeTokenAmount;
2236
- var callArgs = callOnIntegrationArgs({
2237
- adapter: curveLiquidityAaveAdapter,
2238
- encodedCallArgs: curveAaveUnstakeArgs({
2239
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
2240
- }),
2241
- selector: unstakeSelector
2242
- });
2243
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2244
- } // sETH pool
2245
-
2246
- function curveSethClaimRewards(_ref16) {
2247
- var comptrollerProxy = _ref16.comptrollerProxy,
2248
- integrationManager = _ref16.integrationManager,
2249
- fundOwner = _ref16.fundOwner,
2250
- curveLiquiditySethAdapter = _ref16.curveLiquiditySethAdapter;
2251
- var callArgs = callOnIntegrationArgs({
2252
- adapter: curveLiquiditySethAdapter,
2253
- encodedCallArgs: constants.HashZero,
2254
- selector: claimRewardsSelector
2255
- });
2256
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2257
- }
2258
- function curveSethLend(_ref17) {
2259
- var comptrollerProxy = _ref17.comptrollerProxy,
2260
- integrationManager = _ref17.integrationManager,
2261
- fundOwner = _ref17.fundOwner,
2262
- curveLiquiditySethAdapter = _ref17.curveLiquiditySethAdapter,
2263
- outgoingWethAmount = _ref17.outgoingWethAmount,
2264
- outgoingSethAmount = _ref17.outgoingSethAmount,
2265
- minIncomingLPTokenAmount = _ref17.minIncomingLPTokenAmount;
2266
- var callArgs = callOnIntegrationArgs({
2267
- adapter: curveLiquiditySethAdapter,
2268
- encodedCallArgs: curveSethLendArgs({
2269
- minIncomingLPTokenAmount: minIncomingLPTokenAmount,
2270
- outgoingSethAmount: outgoingSethAmount,
2271
- outgoingWethAmount: outgoingWethAmount
2272
- }),
2273
- selector: lendSelector
2274
- });
2275
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2276
- }
2277
- function curveSethLendAndStake(_ref18) {
2278
- var comptrollerProxy = _ref18.comptrollerProxy,
2279
- integrationManager = _ref18.integrationManager,
2280
- fundOwner = _ref18.fundOwner,
2281
- curveLiquiditySethAdapter = _ref18.curveLiquiditySethAdapter,
2282
- outgoingWethAmount = _ref18.outgoingWethAmount,
2283
- outgoingSethAmount = _ref18.outgoingSethAmount,
2284
- minIncomingLiquidityGaugeTokenAmount = _ref18.minIncomingLiquidityGaugeTokenAmount;
2285
- var callArgs = callOnIntegrationArgs({
2286
- adapter: curveLiquiditySethAdapter,
2287
- encodedCallArgs: curveSethLendAndStakeArgs({
2288
- minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
2289
- outgoingSethAmount: outgoingSethAmount,
2290
- outgoingWethAmount: outgoingWethAmount
2291
- }),
2292
- selector: lendAndStakeSelector
2293
- });
2294
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2295
- }
2296
- function curveSethRedeem(_ref19) {
2297
- var comptrollerProxy = _ref19.comptrollerProxy,
2298
- integrationManager = _ref19.integrationManager,
2299
- fundOwner = _ref19.fundOwner,
2300
- curveLiquiditySethAdapter = _ref19.curveLiquiditySethAdapter,
2301
- outgoingLPTokenAmount = _ref19.outgoingLPTokenAmount,
2302
- minIncomingWethAmount = _ref19.minIncomingWethAmount,
2303
- minIncomingSethAmount = _ref19.minIncomingSethAmount,
2304
- receiveSingleAsset = _ref19.receiveSingleAsset;
2305
- var callArgs = callOnIntegrationArgs({
2306
- adapter: curveLiquiditySethAdapter,
2307
- encodedCallArgs: curveSethRedeemArgs({
2308
- minIncomingSethAmount: minIncomingSethAmount,
2309
- minIncomingWethAmount: minIncomingWethAmount,
2310
- outgoingLPTokenAmount: outgoingLPTokenAmount,
2311
- receiveSingleAsset: receiveSingleAsset
2312
- }),
2313
- selector: redeemSelector
2314
- });
2315
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2316
- }
2317
- function curveSethStake(_ref20) {
2318
- var comptrollerProxy = _ref20.comptrollerProxy,
2319
- integrationManager = _ref20.integrationManager,
2320
- fundOwner = _ref20.fundOwner,
2321
- curveLiquiditySethAdapter = _ref20.curveLiquiditySethAdapter,
2322
- outgoingLPTokenAmount = _ref20.outgoingLPTokenAmount;
2323
- var callArgs = callOnIntegrationArgs({
2324
- adapter: curveLiquiditySethAdapter,
2325
- encodedCallArgs: curveSethStakeArgs({
2326
- outgoingLPTokenAmount: outgoingLPTokenAmount
2327
- }),
2328
- selector: stakeSelector
2329
- });
2330
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2331
- }
2332
- function curveSethUnstakeAndRedeem(_ref21) {
2333
- var comptrollerProxy = _ref21.comptrollerProxy,
2334
- integrationManager = _ref21.integrationManager,
2335
- fundOwner = _ref21.fundOwner,
2336
- curveLiquiditySethAdapter = _ref21.curveLiquiditySethAdapter,
2337
- outgoingLiquidityGaugeTokenAmount = _ref21.outgoingLiquidityGaugeTokenAmount,
2338
- minIncomingWethAmount = _ref21.minIncomingWethAmount,
2339
- minIncomingSethAmount = _ref21.minIncomingSethAmount,
2340
- receiveSingleAsset = _ref21.receiveSingleAsset;
2341
- var callArgs = callOnIntegrationArgs({
2342
- adapter: curveLiquiditySethAdapter,
2343
- encodedCallArgs: curveSethUnstakeAndRedeemArgs({
2344
- minIncomingSethAmount: minIncomingSethAmount,
2345
- minIncomingWethAmount: minIncomingWethAmount,
2346
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
2347
- receiveSingleAsset: receiveSingleAsset
2348
- }),
2349
- selector: unstakeAndRedeemSelector
2350
- });
2351
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2352
- }
2353
- function curveSethUnstake(_ref22) {
2354
- var comptrollerProxy = _ref22.comptrollerProxy,
2355
- integrationManager = _ref22.integrationManager,
2356
- fundOwner = _ref22.fundOwner,
2357
- curveLiquiditySethAdapter = _ref22.curveLiquiditySethAdapter,
2358
- outgoingLiquidityGaugeTokenAmount = _ref22.outgoingLiquidityGaugeTokenAmount;
2359
- var callArgs = callOnIntegrationArgs({
2360
- adapter: curveLiquiditySethAdapter,
2361
- encodedCallArgs: curveSethUnstakeArgs({
2362
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
2363
- }),
2364
- selector: unstakeSelector
2365
- });
2366
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2367
- } // stETH pool
2368
-
2369
- function curveStethClaimRewards(_ref23) {
2370
- var comptrollerProxy = _ref23.comptrollerProxy,
2371
- integrationManager = _ref23.integrationManager,
2372
- fundOwner = _ref23.fundOwner,
2373
- curveLiquidityStethAdapter = _ref23.curveLiquidityStethAdapter;
2374
- var callArgs = callOnIntegrationArgs({
2375
- adapter: curveLiquidityStethAdapter,
2376
- encodedCallArgs: constants.HashZero,
2377
- selector: claimRewardsSelector
2378
- });
2379
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2380
- }
2381
- function curveStethLend(_ref24) {
2382
- var comptrollerProxy = _ref24.comptrollerProxy,
2383
- integrationManager = _ref24.integrationManager,
2384
- fundOwner = _ref24.fundOwner,
2385
- curveLiquidityStethAdapter = _ref24.curveLiquidityStethAdapter,
2386
- outgoingWethAmount = _ref24.outgoingWethAmount,
2387
- outgoingStethAmount = _ref24.outgoingStethAmount,
2388
- minIncomingLPTokenAmount = _ref24.minIncomingLPTokenAmount;
2389
- var callArgs = callOnIntegrationArgs({
2390
- adapter: curveLiquidityStethAdapter,
2391
- encodedCallArgs: curveStethLendArgs({
2392
- minIncomingLPTokenAmount: minIncomingLPTokenAmount,
2393
- outgoingStethAmount: outgoingStethAmount,
2394
- outgoingWethAmount: outgoingWethAmount
2395
- }),
2396
- selector: lendSelector
2397
- });
2398
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2399
- }
2400
- function curveStethLendAndStake(_ref25) {
2401
- var comptrollerProxy = _ref25.comptrollerProxy,
2402
- integrationManager = _ref25.integrationManager,
2403
- fundOwner = _ref25.fundOwner,
2404
- curveLiquidityStethAdapter = _ref25.curveLiquidityStethAdapter,
2405
- outgoingWethAmount = _ref25.outgoingWethAmount,
2406
- outgoingStethAmount = _ref25.outgoingStethAmount,
2407
- minIncomingLiquidityGaugeTokenAmount = _ref25.minIncomingLiquidityGaugeTokenAmount;
2408
- var callArgs = callOnIntegrationArgs({
2409
- adapter: curveLiquidityStethAdapter,
2410
- encodedCallArgs: curveStethLendAndStakeArgs({
2411
- minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
2412
- outgoingStethAmount: outgoingStethAmount,
2413
- outgoingWethAmount: outgoingWethAmount
2414
- }),
2415
- selector: lendAndStakeSelector
2416
- });
2417
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2418
- }
2419
- function curveStethRedeem(_ref26) {
2420
- var comptrollerProxy = _ref26.comptrollerProxy,
2421
- integrationManager = _ref26.integrationManager,
2422
- fundOwner = _ref26.fundOwner,
2423
- curveLiquidityStethAdapter = _ref26.curveLiquidityStethAdapter,
2424
- outgoingLPTokenAmount = _ref26.outgoingLPTokenAmount,
2425
- minIncomingWethAmount = _ref26.minIncomingWethAmount,
2426
- minIncomingStethAmount = _ref26.minIncomingStethAmount,
2427
- receiveSingleAsset = _ref26.receiveSingleAsset;
2428
- var callArgs = callOnIntegrationArgs({
2429
- adapter: curveLiquidityStethAdapter,
2430
- encodedCallArgs: curveStethRedeemArgs({
2431
- minIncomingStethAmount: minIncomingStethAmount,
2432
- minIncomingWethAmount: minIncomingWethAmount,
2433
- outgoingLPTokenAmount: outgoingLPTokenAmount,
2434
- receiveSingleAsset: receiveSingleAsset
2435
- }),
2436
- selector: redeemSelector
2437
- });
2438
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2439
- }
2440
- function curveStethStake(_ref27) {
2441
- var comptrollerProxy = _ref27.comptrollerProxy,
2442
- integrationManager = _ref27.integrationManager,
2443
- fundOwner = _ref27.fundOwner,
2444
- curveLiquidityStethAdapter = _ref27.curveLiquidityStethAdapter,
2445
- outgoingLPTokenAmount = _ref27.outgoingLPTokenAmount;
2446
- var callArgs = callOnIntegrationArgs({
2447
- adapter: curveLiquidityStethAdapter,
2448
- encodedCallArgs: curveStethStakeArgs({
2449
- outgoingLPTokenAmount: outgoingLPTokenAmount
2450
- }),
2451
- selector: stakeSelector
2452
- });
2453
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2454
- }
2455
- function curveStethUnstakeAndRedeem(_ref28) {
2456
- var comptrollerProxy = _ref28.comptrollerProxy,
2457
- integrationManager = _ref28.integrationManager,
2458
- fundOwner = _ref28.fundOwner,
2459
- curveLiquidityStethAdapter = _ref28.curveLiquidityStethAdapter,
2460
- outgoingLiquidityGaugeTokenAmount = _ref28.outgoingLiquidityGaugeTokenAmount,
2461
- minIncomingWethAmount = _ref28.minIncomingWethAmount,
2462
- minIncomingStethAmount = _ref28.minIncomingStethAmount,
2463
- receiveSingleAsset = _ref28.receiveSingleAsset;
2464
- var callArgs = callOnIntegrationArgs({
2465
- adapter: curveLiquidityStethAdapter,
2466
- encodedCallArgs: curveStethUnstakeAndRedeemArgs({
2467
- minIncomingStethAmount: minIncomingStethAmount,
2468
- minIncomingWethAmount: minIncomingWethAmount,
2469
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
2470
- receiveSingleAsset: receiveSingleAsset
2471
- }),
2472
- selector: unstakeAndRedeemSelector
2473
- });
2474
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2475
- }
2476
- function curveStethUnstake(_ref29) {
2477
- var comptrollerProxy = _ref29.comptrollerProxy,
2478
- integrationManager = _ref29.integrationManager,
2479
- fundOwner = _ref29.fundOwner,
2480
- curveLiquidityStethAdapter = _ref29.curveLiquidityStethAdapter,
2481
- outgoingLiquidityGaugeTokenAmount = _ref29.outgoingLiquidityGaugeTokenAmount;
2482
- var callArgs = callOnIntegrationArgs({
2483
- adapter: curveLiquidityStethAdapter,
2484
- encodedCallArgs: curveStethUnstakeArgs({
2485
- outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
2486
- }),
2487
- selector: unstakeSelector
2488
- });
2489
- return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs);
2490
- }
2491
-
2492
2288
  function idleClaimRewards(_x) {
2493
2289
  return _idleClaimRewards.apply(this, arguments);
2494
2290
  }
@@ -2740,55 +2536,6 @@ function _olympusV2Unstake() {
2740
2536
  return _olympusV2Unstake.apply(this, arguments);
2741
2537
  }
2742
2538
 
2743
- function paraSwapV4GenerateDummyPaths(_ref) {
2744
- var toTokens = _ref.toTokens;
2745
- return toTokens.map(function (toToken) {
2746
- return {
2747
- // Not supported in our protocol
2748
- routes: [],
2749
- to: toToken,
2750
- totalNetworkFee: 0 // Can ignore this param in the dummy
2751
-
2752
- };
2753
- });
2754
- }
2755
- function paraSwapV4TakeOrder(_x) {
2756
- return _paraSwapV4TakeOrder.apply(this, arguments);
2757
- }
2758
-
2759
- function _paraSwapV4TakeOrder() {
2760
- _paraSwapV4TakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
2761
- var comptrollerProxy, integrationManager, fundOwner, paraSwapV4Adapter, outgoingAsset, _ref2$outgoingAssetAm, outgoingAssetAmount, _ref2$minIncomingAsse, minIncomingAssetAmount, _ref2$expectedIncomin, expectedIncomingAssetAmount, paths, takeOrderArgs, callArgs;
2762
-
2763
- return _regeneratorRuntime.wrap(function _callee$(_context) {
2764
- while (1) {
2765
- switch (_context.prev = _context.next) {
2766
- case 0:
2767
- comptrollerProxy = _ref2.comptrollerProxy, integrationManager = _ref2.integrationManager, fundOwner = _ref2.fundOwner, paraSwapV4Adapter = _ref2.paraSwapV4Adapter, outgoingAsset = _ref2.outgoingAsset, _ref2$outgoingAssetAm = _ref2.outgoingAssetAmount, outgoingAssetAmount = _ref2$outgoingAssetAm === void 0 ? utils.parseEther('1') : _ref2$outgoingAssetAm, _ref2$minIncomingAsse = _ref2.minIncomingAssetAmount, minIncomingAssetAmount = _ref2$minIncomingAsse === void 0 ? 1 : _ref2$minIncomingAsse, _ref2$expectedIncomin = _ref2.expectedIncomingAssetAmount, expectedIncomingAssetAmount = _ref2$expectedIncomin === void 0 ? minIncomingAssetAmount : _ref2$expectedIncomin, paths = _ref2.paths;
2768
- takeOrderArgs = paraSwapV4TakeOrderArgs({
2769
- expectedIncomingAssetAmount: expectedIncomingAssetAmount,
2770
- minIncomingAssetAmount: minIncomingAssetAmount,
2771
- outgoingAsset: outgoingAsset,
2772
- outgoingAssetAmount: outgoingAssetAmount,
2773
- paths: paths
2774
- });
2775
- callArgs = callOnIntegrationArgs({
2776
- adapter: paraSwapV4Adapter,
2777
- encodedCallArgs: takeOrderArgs,
2778
- selector: takeOrderSelector
2779
- });
2780
- return _context.abrupt("return", comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, IntegrationManagerActionId.CallOnIntegration, callArgs));
2781
-
2782
- case 4:
2783
- case "end":
2784
- return _context.stop();
2785
- }
2786
- }
2787
- }, _callee);
2788
- }));
2789
- return _paraSwapV4TakeOrder.apply(this, arguments);
2790
- }
2791
-
2792
2539
  function paraSwapV5GenerateDummyPaths(_ref) {
2793
2540
  var toTokens = _ref.toTokens;
2794
2541
  return toTokens.map(function (toToken) {
@@ -4278,4 +4025,4 @@ function assertPaymasterDidRejectForReason(receipt, reason) {
4278
4025
  expect(utils.toUtf8String('0x' + params.reason.substr(138))).toMatch(reason);
4279
4026
  }
4280
4027
 
4281
- export { CurveLiquidityGaugeV2, CurveMinter, CurveRegistry, CurveSwaps, ICompoundComptroller, IUniswapV3NonFungibleTokenManager, UniswapV2Factory, UniswapV3FeeAmount, aaveLend, aaveRedeem, addNewAssetsToFund, addTrackedAssetsToVault, assertCompoundLend, assertCompoundRedeem, assertDidRelay, assertDidRelaySuccessfully, assertDidRelayWithCharge, assertDidRelayWithError, assertEvent, assertNoEvent, assertPaymasterDidReject, assertPaymasterDidRejectForReason, buyShares, buySharesFunction, calcMlnValueAndBurnAmountForSharesBuyback, callOnExtension, callOnExternalPosition, compoundClaim, compoundDebtPositionAddCollateral, compoundDebtPositionBorrow, compoundDebtPositionClaimComp, compoundDebtPositionRemoveCollateral, compoundDebtPositionRepayBorrow, compoundLend, compoundRedeem, createCompoundDebtPosition, createComptrollerProxy, createExternalPosition, createFundDeployer, createMigrationRequest, createMockExternalPosition, createNewFund, createReconfigurationRequest, createUniswapV3LiquidityPosition, createVaultProxy, curveAaveClaimRewards, curveAaveLend, curveAaveLendAndStake, curveAaveRedeem, curveAaveStake, curveAaveUnstake, curveAaveUnstakeAndRedeem, curveClaimRewards, curveLend, curveLendAndStake, curveRedeem, curveSethClaimRewards, curveSethLend, curveSethLendAndStake, curveSethRedeem, curveSethStake, curveSethUnstake, curveSethUnstakeAndRedeem, curveStake, curveStethClaimRewards, curveStethLend, curveStethLendAndStake, curveStethRedeem, curveStethStake, curveStethUnstake, curveStethUnstakeAndRedeem, curveTakeOrder, curveUnstake, curveUnstakeAndRedeem, deployProtocolFixture, generateFeeManagerConfigWithMockFees, generateMockFees, generateMockPolicies, generatePolicyManagerConfigWithMockPolicies, getAssetBalances, getAssetUnit, getNamedSigner, getUnnamedSigners, idleClaimRewards, idleLend, idleRedeem, mockExternalPositionAddDebtAssets, mockExternalPositionAddManagedAssets, mockExternalPositionRemoveDebtAssets, mockExternalPositionRemoveManagedAssets, mockGenericRemoveOnlySelector, mockGenericSwap, mockGenericSwapASelector, mockGenericSwapArgs, mockGenericSwapBSelector, mockGenericSwapDirectFromVaultSelector, mockGenericSwapViaApprovalSelector, olympusV2Stake, olympusV2Unstake, paraSwapV4GenerateDummyPaths, paraSwapV4TakeOrder, paraSwapV5GenerateDummyPaths, paraSwapV5TakeOrder, poolTogetherV4ClaimRewards, poolTogetherV4Lend, poolTogetherV4Redeem, reactivateExternalPosition, redeemSharesForSpecificAssets, redeemSharesInKind, relayTransaction, removeExternalPosition, removeTrackedAssetsFromVault, setupGasRelayerPaymaster, synthetixAssignExchangeDelegate, synthetixRedeem, synthetixTakeOrder, transactionTimestamp, uniswapV2Lend, uniswapV2Redeem, uniswapV2TakeOrder, uniswapV3LiquidityPositionAddLiquidity, uniswapV3LiquidityPositionCollect, uniswapV3LiquidityPositionGetMaxTick, uniswapV3LiquidityPositionGetMinTick, uniswapV3LiquidityPositionMint, uniswapV3LiquidityPositionPurge, uniswapV3LiquidityPositionRemoveLiquidity, uniswapV3OrderTokenPair, uniswapV3TakeOrder, unlockAllWhales, unlockWhale, unlockWhales, updateChainlinkAggregator, vaultCallCreateNewList, vaultCallCurveMinterMint, vaultCallCurveMinterMintMany, vaultCallCurveMinterToggleApproveMint, vaultCallStartAssetBypassTimelock, yearnVaultV2Lend, yearnVaultV2Redeem, zeroExV2TakeOrder };
4028
+ export { CurveLiquidityGaugeV2, CurveMinter, CurveRegistry, CurveSwaps, ICompoundComptroller, IUniswapV3NonFungibleTokenManager, UniswapV2Factory, UniswapV3FeeAmount, aaveDebtPositionAddCollateral, aaveDebtPositionBorrow, aaveDebtPositionClaimRewards, aaveDebtPositionRemoveCollateral, aaveDebtPositionRepayBorrow, aaveLend, aaveRedeem, addNewAssetsToFund, addTrackedAssetsToVault, assertCompoundLend, assertCompoundRedeem, assertDidRelay, assertDidRelaySuccessfully, assertDidRelayWithCharge, assertDidRelayWithError, assertEvent, assertNoEvent, assertPaymasterDidReject, assertPaymasterDidRejectForReason, buyShares, buySharesFunction, calcMlnValueAndBurnAmountForSharesBuyback, callOnExtension, callOnExternalPosition, compoundClaim, compoundDebtPositionAddCollateral, compoundDebtPositionBorrow, compoundDebtPositionClaimComp, compoundDebtPositionRemoveCollateral, compoundDebtPositionRepayBorrow, compoundLend, compoundRedeem, createAaveDebtPosition, createCompoundDebtPosition, createComptrollerProxy, createExternalPosition, createFundDeployer, createMigrationRequest, createMockExternalPosition, createNewFund, createReconfigurationRequest, createUniswapV3LiquidityPosition, createVaultProxy, curveClaimRewards, curveLend, curveLendAndStake, curveRedeem, curveStake, curveTakeOrder, curveUnstake, curveUnstakeAndRedeem, deployProtocolFixture, generateFeeManagerConfigWithMockFees, generateMockFees, generateMockPolicies, generatePolicyManagerConfigWithMockPolicies, getAssetBalances, getAssetUnit, getNamedSigner, getUnnamedSigners, idleClaimRewards, idleLend, idleRedeem, mockExternalPositionAddDebtAssets, mockExternalPositionAddManagedAssets, mockExternalPositionRemoveDebtAssets, mockExternalPositionRemoveManagedAssets, mockGenericRemoveOnlySelector, mockGenericSwap, mockGenericSwapASelector, mockGenericSwapArgs, mockGenericSwapBSelector, mockGenericSwapDirectFromVaultSelector, mockGenericSwapViaApprovalSelector, olympusV2Stake, olympusV2Unstake, paraSwapV5GenerateDummyPaths, paraSwapV5TakeOrder, poolTogetherV4ClaimRewards, poolTogetherV4Lend, poolTogetherV4Redeem, reactivateExternalPosition, redeemSharesForSpecificAssets, redeemSharesInKind, relayTransaction, removeExternalPosition, removeTrackedAssetsFromVault, setupGasRelayerPaymaster, synthetixAssignExchangeDelegate, synthetixRedeem, synthetixTakeOrder, transactionTimestamp, uniswapV2Lend, uniswapV2Redeem, uniswapV2TakeOrder, uniswapV3LiquidityPositionAddLiquidity, uniswapV3LiquidityPositionCollect, uniswapV3LiquidityPositionGetMaxTick, uniswapV3LiquidityPositionGetMinTick, uniswapV3LiquidityPositionMint, uniswapV3LiquidityPositionPurge, uniswapV3LiquidityPositionRemoveLiquidity, uniswapV3OrderTokenPair, uniswapV3TakeOrder, unlockAllWhales, unlockWhale, unlockWhales, updateChainlinkAggregator, vaultCallCreateNewList, vaultCallCurveMinterMint, vaultCallCurveMinterMintMany, vaultCallCurveMinterToggleApproveMint, vaultCallStartAssetBypassTimelock, yearnVaultV2Lend, yearnVaultV2Redeem, zeroExV2TakeOrder };