@enzymefinance/testutils 4.0.0-next.5 → 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.
- package/CHANGELOG.md +40 -0
- package/dist/declarations/src/deployment.d.ts +34 -27
- package/dist/declarations/src/scaffolding/assets.d.ts +1 -1
- package/dist/declarations/src/scaffolding/core.d.ts +2 -3
- package/dist/declarations/src/scaffolding/extensions/external-positions/aave-debt.d.ts +51 -0
- package/dist/declarations/src/scaffolding/extensions/external-positions/actions.d.ts +2 -1
- package/dist/declarations/src/scaffolding/extensions/external-positions/index.d.ts +1 -0
- package/dist/declarations/src/scaffolding/extensions/external-positions/mocks.d.ts +4 -1
- package/dist/declarations/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.d.ts +12 -11
- package/dist/declarations/src/scaffolding/extensions/fees.d.ts +3 -3
- package/dist/declarations/src/scaffolding/extensions/integrations/aave.d.ts +2 -2
- package/dist/declarations/src/scaffolding/extensions/integrations/compound.d.ts +30 -2
- package/dist/declarations/src/scaffolding/extensions/integrations/curve.d.ts +63 -229
- package/dist/declarations/src/scaffolding/extensions/integrations/idle.d.ts +3 -3
- package/dist/declarations/src/scaffolding/extensions/integrations/index.d.ts +1 -1
- package/dist/declarations/src/scaffolding/extensions/integrations/olympusV2.d.ts +17 -0
- package/dist/declarations/src/scaffolding/extensions/integrations/synthetix.d.ts +5 -10
- package/dist/declarations/src/scaffolding/extensions/integrations/yearn.d.ts +2 -2
- package/dist/declarations/src/scaffolding/extensions/integrations/zeroExV2.d.ts +1 -1
- package/dist/declarations/src/scaffolding/extensions/policies.d.ts +8 -8
- package/dist/declarations/src/whales.d.ts +12 -5
- package/dist/enzymefinance-testutils.browser.cjs.js +826 -721
- package/dist/enzymefinance-testutils.browser.esm.js +809 -692
- package/dist/enzymefinance-testutils.cjs.dev.js +826 -721
- package/dist/enzymefinance-testutils.cjs.prod.js +826 -721
- package/dist/enzymefinance-testutils.esm.js +809 -692
- package/package.json +6 -6
- package/src/deployment.ts +39 -31
- package/src/scaffolding/assets.ts +1 -1
- package/src/scaffolding/core.ts +3 -9
- package/src/scaffolding/extensions/external-positions/aave-debt.ts +179 -0
- package/src/scaffolding/extensions/external-positions/actions.ts +6 -1
- package/src/scaffolding/extensions/external-positions/index.ts +1 -0
- package/src/scaffolding/extensions/external-positions/mocks.ts +7 -10
- package/src/scaffolding/extensions/external-positions/uniswap-v3-liquidity.ts +18 -24
- package/src/scaffolding/extensions/integrations/compound.ts +163 -2
- package/src/scaffolding/extensions/integrations/curve.ts +152 -783
- package/src/scaffolding/extensions/integrations/index.ts +1 -1
- package/src/scaffolding/extensions/integrations/olympusV2.ts +71 -0
- package/src/scaffolding/extensions/integrations/synthetix.ts +6 -25
- package/src/types.d.ts +1 -0
- package/src/whales.ts +14 -5
- package/dist/declarations/src/scaffolding/extensions/integrations/paraSwapV4.d.ts +0 -23
- package/src/scaffolding/extensions/integrations/paraSwapV4.ts +0 -70
@@ -8,6 +8,7 @@ var protocol = require('@enzymefinance/protocol');
|
|
8
8
|
var ethers = require('ethers');
|
9
9
|
var ethers$1 = require('@enzymefinance/ethers');
|
10
10
|
var _taggedTemplateLiteral = require('@babel/runtime/helpers/taggedTemplateLiteral');
|
11
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
11
12
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
12
13
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
13
14
|
|
@@ -112,6 +113,8 @@ function _deployProtocolFixture() {
|
|
112
113
|
|
113
114
|
deployment = {
|
114
115
|
aaveAdapter: new protocol.AaveAdapter(fixture['AaveAdapter'].address, deployer),
|
116
|
+
aaveDebtPositionLib: new protocol.AaveDebtPositionLib(fixture['AaveDebtPositionLib'].address, deployer),
|
117
|
+
aaveDebtPositionParser: new protocol.AaveDebtPositionParser(fixture['AaveDebtPositionParser'].address, deployer),
|
115
118
|
aavePriceFeed: new protocol.AavePriceFeed(fixture['AavePriceFeed'].address, deployer),
|
116
119
|
addressListRegistry: new protocol.AddressListRegistry(fixture['AddressListRegistry'].address, deployer),
|
117
120
|
allowedAdapterIncomingAssetsPolicy: new protocol.AllowedAdapterIncomingAssetsPolicy(fixture['AllowedAdapterIncomingAssetsPolicy'].address, deployer),
|
@@ -120,18 +123,17 @@ function _deployProtocolFixture() {
|
|
120
123
|
allowedDepositRecipientsPolicy: new protocol.AllowedDepositRecipientsPolicy(fixture['AllowedDepositRecipientsPolicy'].address, deployer),
|
121
124
|
allowedExternalPositionTypesPolicy: new protocol.AllowedExternalPositionTypesPolicy(fixture['AllowedExternalPositionTypesPolicy'].address, deployer),
|
122
125
|
allowedSharesTransferRecipientsPolicy: new protocol.AllowedSharesTransferRecipientsPolicy(fixture['AllowedSharesTransferRecipientsPolicy'].address, deployer),
|
123
|
-
assetFinalityResolver: new protocol.AssetFinalityResolver(fixture['AssetFinalityResolver'].address, deployer),
|
124
126
|
compoundAdapter: new protocol.CompoundAdapter(fixture['CompoundAdapter'].address, deployer),
|
125
127
|
compoundDebtPositionLib: new protocol.CompoundDebtPositionLib(fixture['CompoundDebtPositionLib'].address, deployer),
|
126
128
|
compoundDebtPositionParser: new protocol.CompoundDebtPositionParser(fixture['CompoundDebtPositionParser'].address, deployer),
|
127
129
|
compoundPriceFeed: new protocol.CompoundPriceFeed(fixture['CompoundPriceFeed'].address, deployer),
|
128
130
|
comptrollerLib: new protocol.ComptrollerLib(fixture['ComptrollerLib'].address, deployer),
|
131
|
+
convexCurveLpStakingAdapter: new protocol.ConvexCurveLpStakingAdapter(fixture['ConvexCurveLpStakingAdapter'].address, deployer),
|
132
|
+
convexCurveLpStakingWrapperFactory: new protocol.ConvexCurveLpStakingWrapperFactory(fixture['ConvexCurveLpStakingWrapperFactory'].address, deployer),
|
133
|
+
convexCurveLpStakingWrapperPriceFeed: new protocol.ConvexCurveLpStakingWrapperPriceFeed(fixture['ConvexCurveLpStakingWrapperPriceFeed'].address, deployer),
|
129
134
|
cumulativeSlippageTolerancePolicy: new protocol.CumulativeSlippageTolerancePolicy(fixture['CumulativeSlippageTolerancePolicy'].address, deployer),
|
130
135
|
curveExchangeAdapter: new protocol.CurveExchangeAdapter(fixture['CurveExchangeAdapter'].address, deployer),
|
131
|
-
|
132
|
-
curveLiquidityEursAdapter: new protocol.CurveLiquidityEursAdapter(fixture['CurveLiquidityEursAdapter'].address, deployer),
|
133
|
-
curveLiquiditySethAdapter: new protocol.CurveLiquiditySethAdapter(fixture['CurveLiquiditySethAdapter'].address, deployer),
|
134
|
-
curveLiquidityStethAdapter: new protocol.CurveLiquidityStethAdapter(fixture['CurveLiquidityStethAdapter'].address, deployer),
|
136
|
+
curveLiquidityAdapter: new protocol.CurveLiquidityAdapter(fixture['CurveLiquidityAdapter'].address, deployer),
|
135
137
|
curvePriceFeed: new protocol.CurvePriceFeed(fixture['CurvePriceFeed'].address, deployer),
|
136
138
|
depositWrapper: new protocol.DepositWrapper(fixture['DepositWrapper'].address, deployer),
|
137
139
|
dispatcher: new protocol.Dispatcher(fixture['Dispatcher'].address, deployer),
|
@@ -146,8 +148,9 @@ function _deployProtocolFixture() {
|
|
146
148
|
fundValueCalculator: new protocol.FundValueCalculator(fixture['FundValueCalculator'].address, deployer),
|
147
149
|
fundValueCalculatorRouter: new protocol.FundValueCalculatorRouter(fixture['FundValueCalculatorRouter'].address, deployer),
|
148
150
|
fundValueCalculatorUsdWrapper: new protocol.FundValueCalculatorUsdWrapper(fixture['FundValueCalculatorUsdWrapper'].address, deployer),
|
151
|
+
fuseAdapter: new protocol.FuseAdapter(fixture['FuseAdapter'].address, deployer),
|
152
|
+
fusePriceFeed: new protocol.FusePriceFeed(fixture['FusePriceFeed'].address, deployer),
|
149
153
|
gasRelayPaymasterFactory: new protocol.GasRelayPaymasterFactory(fixture['GasRelayPaymasterFactory'].address, deployer),
|
150
|
-
guaranteedRedemptionPolicy: new protocol.GuaranteedRedemptionPolicy(fixture['GuaranteedRedemptionPolicy'].address, deployer),
|
151
154
|
idleAdapter: new protocol.IdleAdapter(fixture['IdleAdapter'].address, deployer),
|
152
155
|
idlePriceFeed: new protocol.IdlePriceFeed(fixture['IdlePriceFeed'].address, deployer),
|
153
156
|
integrationManager: new protocol.IntegrationManager(fixture['IntegrationManager'].address, deployer),
|
@@ -155,9 +158,9 @@ function _deployProtocolFixture() {
|
|
155
158
|
managementFee: new protocol.ManagementFee(fixture['ManagementFee'].address, deployer),
|
156
159
|
minAssetBalancesPostRedemptionPolicy: new protocol.MinAssetBalancesPostRedemptionPolicy(fixture['MinAssetBalancesPostRedemptionPolicy'].address, deployer),
|
157
160
|
minMaxInvestmentPolicy: new protocol.MinMaxInvestmentPolicy(fixture['MinMaxInvestmentPolicy'].address, deployer),
|
161
|
+
olympusV2Adapter: new protocol.OlympusV2Adapter(fixture['OlympusV2Adapter'].address, deployer),
|
158
162
|
onlyRemoveDustExternalPositionPolicy: new protocol.OnlyRemoveDustExternalPositionPolicy(fixture['OnlyRemoveDustExternalPositionPolicy'].address, deployer),
|
159
163
|
onlyUntrackDustOrPricelessAssetsPolicy: new protocol.OnlyUntrackDustOrPricelessAssetsPolicy(fixture['OnlyUntrackDustOrPricelessAssetsPolicy'].address, deployer),
|
160
|
-
paraSwapV4Adapter: new protocol.ParaSwapV4Adapter(fixture['ParaSwapV4Adapter'].address, deployer),
|
161
164
|
paraSwapV5Adapter: new protocol.ParaSwapV5Adapter(fixture['ParaSwapV5Adapter'].address, deployer),
|
162
165
|
performanceFee: new protocol.PerformanceFee(fixture['PerformanceFee'].address, deployer),
|
163
166
|
policyManager: new protocol.PolicyManager(fixture['PolicyManager'].address, deployer),
|
@@ -167,14 +170,13 @@ function _deployProtocolFixture() {
|
|
167
170
|
protocolFeeReserveProxy: new protocol.ProtocolFeeReserveLib(fixture['ProtocolFeeReserveProxy'].address, deployer),
|
168
171
|
protocolFeeTracker: new protocol.ProtocolFeeTracker(fixture['ProtocolFeeTracker'].address, deployer),
|
169
172
|
revertingPriceFeed: new protocol.RevertingPriceFeed(fixture['RevertingPriceFeed'].address, deployer),
|
170
|
-
stakehoundEthPriceFeed: new protocol.StakehoundEthPriceFeed(fixture['StakehoundEthPriceFeed'].address, deployer),
|
171
173
|
synthetixAdapter: new protocol.SynthetixAdapter(fixture['SynthetixAdapter'].address, deployer),
|
172
|
-
synthetixPriceFeed: new protocol.SynthetixPriceFeed(fixture['SynthetixPriceFeed'].address, deployer),
|
173
174
|
uniswapV2ExchangeAdapter: new protocol.UniswapV2ExchangeAdapter(fixture['UniswapV2ExchangeAdapter'].address, deployer),
|
174
175
|
uniswapV2LiquidityAdapter: new protocol.UniswapV2LiquidityAdapter(fixture['UniswapV2LiquidityAdapter'].address, deployer),
|
175
176
|
uniswapV2PoolPriceFeed: new protocol.UniswapV2PoolPriceFeed(fixture['UniswapV2PoolPriceFeed'].address, deployer),
|
176
177
|
uniswapV3Adapter: new protocol.UniswapV3Adapter(fixture['UniswapV3Adapter'].address, deployer),
|
177
178
|
unpermissionedActionsWrapper: new protocol.UnpermissionedActionsWrapper(fixture['UnpermissionedActionsWrapper'].address, deployer),
|
179
|
+
usdEthSimulatedAggregator: new protocol.UsdEthSimulatedAggregator(fixture['UsdEthSimulatedAggregator'].address, deployer),
|
178
180
|
valueInterpreter: new protocol.ValueInterpreter(fixture['ValueInterpreter'].address, deployer),
|
179
181
|
vaultLib: new protocol.VaultLib(fixture['VaultLib'].address, deployer),
|
180
182
|
yearnVaultV2Adapter: new protocol.YearnVaultV2Adapter(fixture['YearnVaultV2Adapter'].address, deployer),
|
@@ -230,7 +232,7 @@ function _addNewAssetsToFund() {
|
|
230
232
|
switch (_context.prev = _context.next) {
|
231
233
|
case 0:
|
232
234
|
signer = _ref.signer, comptrollerProxy = _ref.comptrollerProxy, integrationManager = _ref.integrationManager, assets = _ref.assets, _ref$amounts = _ref.amounts, amounts = _ref$amounts === void 0 ? new Array(assets.length).fill(1) : _ref$amounts;
|
233
|
-
// First, add tracked assets
|
235
|
+
// First, add tracked assets
|
234
236
|
receipt = addTrackedAssetsToVault({
|
235
237
|
assets: assets,
|
236
238
|
comptrollerProxy: comptrollerProxy,
|
@@ -387,13 +389,13 @@ function createFundDeployer(_x) {
|
|
387
389
|
|
388
390
|
function _createFundDeployer() {
|
389
391
|
_createFundDeployer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
390
|
-
var deployer,
|
392
|
+
var deployer, externalPositionManager, dispatcher, gasRelayPaymasterFactory, valueInterpreter, vaultLib, _ref$setOnDispatcher, setOnDispatcher, _ref$setReleaseLive, setReleaseLive, mlnToken, wethToken, protocolFeeReserve, nextFundDeployer, nextPolicyManager, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextComptrollerLib, nextProtocolFeeTracker, nextVaultLib;
|
391
393
|
|
392
394
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
393
395
|
while (1) {
|
394
396
|
switch (_context.prev = _context.next) {
|
395
397
|
case 0:
|
396
|
-
deployer = _ref.deployer,
|
398
|
+
deployer = _ref.deployer, externalPositionManager = _ref.externalPositionManager, dispatcher = _ref.dispatcher, gasRelayPaymasterFactory = _ref.gasRelayPaymasterFactory, valueInterpreter = _ref.valueInterpreter, vaultLib = _ref.vaultLib, _ref$setOnDispatcher = _ref.setOnDispatcher, setOnDispatcher = _ref$setOnDispatcher === void 0 ? true : _ref$setOnDispatcher, _ref$setReleaseLive = _ref.setReleaseLive, setReleaseLive = _ref$setReleaseLive === void 0 ? true : _ref$setReleaseLive;
|
397
399
|
_context.next = 3;
|
398
400
|
return vaultLib.getMlnToken();
|
399
401
|
|
@@ -444,7 +446,7 @@ function _createFundDeployer() {
|
|
444
446
|
case 31:
|
445
447
|
nextIntegrationManager = _context.sent;
|
446
448
|
_context.next = 34;
|
447
|
-
return protocol.ComptrollerLib.deploy(deployer, dispatcher, protocolFeeReserve, nextFundDeployer, valueInterpreter, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextPolicyManager,
|
449
|
+
return protocol.ComptrollerLib.deploy(deployer, dispatcher, protocolFeeReserve, nextFundDeployer, valueInterpreter, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextPolicyManager, gasRelayPaymasterFactory, mlnToken, wethToken);
|
448
450
|
|
449
451
|
case 34:
|
450
452
|
nextComptrollerLib = _context.sent;
|
@@ -481,40 +483,50 @@ function _createFundDeployer() {
|
|
481
483
|
case 54:
|
482
484
|
_context.t11 = _context.sent;
|
483
485
|
_context.next = 57;
|
484
|
-
return vaultLib.
|
486
|
+
return vaultLib.getMlnBurner();
|
485
487
|
|
486
488
|
case 57:
|
487
489
|
_context.t12 = _context.sent;
|
488
490
|
_context.next = 60;
|
489
|
-
return
|
491
|
+
return vaultLib.getWethToken();
|
490
492
|
|
491
493
|
case 60:
|
492
|
-
|
494
|
+
_context.t13 = _context.sent;
|
493
495
|
_context.next = 63;
|
494
|
-
return
|
496
|
+
return vaultLib.getPositionsLimit();
|
495
497
|
|
496
498
|
case 63:
|
499
|
+
_context.t14 = _context.sent;
|
500
|
+
_context.next = 66;
|
501
|
+
return _context.t5.deploy.call(_context.t5, _context.t6, _context.t7, _context.t8, _context.t9, _context.t10, _context.t11, _context.t12, _context.t13, _context.t14);
|
502
|
+
|
503
|
+
case 66:
|
504
|
+
nextVaultLib = _context.sent;
|
505
|
+
_context.next = 69;
|
506
|
+
return nextFundDeployer.setVaultLib(nextVaultLib);
|
507
|
+
|
508
|
+
case 69:
|
497
509
|
if (!setReleaseLive) {
|
498
|
-
_context.next =
|
510
|
+
_context.next = 72;
|
499
511
|
break;
|
500
512
|
}
|
501
513
|
|
502
|
-
_context.next =
|
514
|
+
_context.next = 72;
|
503
515
|
return nextFundDeployer.setReleaseLive();
|
504
516
|
|
505
|
-
case
|
517
|
+
case 72:
|
506
518
|
if (!setOnDispatcher) {
|
507
|
-
_context.next =
|
519
|
+
_context.next = 75;
|
508
520
|
break;
|
509
521
|
}
|
510
522
|
|
511
|
-
_context.next =
|
523
|
+
_context.next = 75;
|
512
524
|
return dispatcher.setCurrentFundDeployer(nextFundDeployer);
|
513
525
|
|
514
|
-
case
|
526
|
+
case 75:
|
515
527
|
return _context.abrupt("return", nextFundDeployer);
|
516
528
|
|
517
|
-
case
|
529
|
+
case 76:
|
518
530
|
case "end":
|
519
531
|
return _context.stop();
|
520
532
|
}
|
@@ -595,15 +607,15 @@ function createExternalPosition(_x2) {
|
|
595
607
|
|
596
608
|
function _createExternalPosition() {
|
597
609
|
_createExternalPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
598
|
-
var signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, _ref2$initializationD, initializationData, receipt, event, externalPositionProxy;
|
610
|
+
var signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, _ref2$initializationD, initializationData, _ref2$callOnExternalP, callOnExternalPositionData, receipt, event, externalPositionProxy;
|
599
611
|
|
600
612
|
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
601
613
|
while (1) {
|
602
614
|
switch (_context2.prev = _context2.next) {
|
603
615
|
case 0:
|
604
|
-
signer = _ref2.signer, comptrollerProxy = _ref2.comptrollerProxy, externalPositionManager = _ref2.externalPositionManager, externalPositionTypeId = _ref2.externalPositionTypeId, _ref2$initializationD = _ref2.initializationData, initializationData = _ref2$initializationD === void 0 ? '0x' : _ref2$initializationD;
|
616
|
+
signer = _ref2.signer, comptrollerProxy = _ref2.comptrollerProxy, externalPositionManager = _ref2.externalPositionManager, externalPositionTypeId = _ref2.externalPositionTypeId, _ref2$initializationD = _ref2.initializationData, initializationData = _ref2$initializationD === void 0 ? '0x' : _ref2$initializationD, _ref2$callOnExternalP = _ref2.callOnExternalPositionData, callOnExternalPositionData = _ref2$callOnExternalP === void 0 ? '0x' : _ref2$callOnExternalP;
|
605
617
|
_context2.next = 3;
|
606
|
-
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes'], [externalPositionTypeId, initializationData]));
|
618
|
+
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes', 'bytes'], [externalPositionTypeId, initializationData, callOnExternalPositionData]));
|
607
619
|
|
608
620
|
case 3:
|
609
621
|
receipt = _context2.sent;
|
@@ -932,7 +944,12 @@ function _createMockExternalPosition() {
|
|
932
944
|
|
933
945
|
case 21:
|
934
946
|
_context.next = 23;
|
935
|
-
return
|
947
|
+
return createExternalPosition({
|
948
|
+
comptrollerProxy: comptrollerProxy,
|
949
|
+
externalPositionManager: externalPositionManager,
|
950
|
+
externalPositionTypeId: typeId,
|
951
|
+
signer: fundOwner
|
952
|
+
});
|
936
953
|
|
937
954
|
case 23:
|
938
955
|
receipt = _context.sent;
|
@@ -1099,6 +1116,209 @@ function _mockExternalPositionRemoveManagedAssets() {
|
|
1099
1116
|
return _mockExternalPositionRemoveManagedAssets.apply(this, arguments);
|
1100
1117
|
}
|
1101
1118
|
|
1119
|
+
function aaveDebtPositionAddCollateral(_x) {
|
1120
|
+
return _aaveDebtPositionAddCollateral.apply(this, arguments);
|
1121
|
+
}
|
1122
|
+
|
1123
|
+
function _aaveDebtPositionAddCollateral() {
|
1124
|
+
_aaveDebtPositionAddCollateral = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
1125
|
+
var comptrollerProxy, externalPositionManager, signer, aTokens, amounts, externalPositionProxy, actionArgs;
|
1126
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
1127
|
+
while (1) {
|
1128
|
+
switch (_context.prev = _context.next) {
|
1129
|
+
case 0:
|
1130
|
+
comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager, signer = _ref.signer, aTokens = _ref.aTokens, amounts = _ref.amounts, externalPositionProxy = _ref.externalPositionProxy;
|
1131
|
+
actionArgs = protocol.aaveDebtPositionAddCollateralArgs({
|
1132
|
+
aTokens: aTokens,
|
1133
|
+
amounts: amounts
|
1134
|
+
});
|
1135
|
+
return _context.abrupt("return", callOnExternalPosition({
|
1136
|
+
actionArgs: actionArgs,
|
1137
|
+
actionId: protocol.AaveDebtPositionActionId.AddCollateralAssets,
|
1138
|
+
comptrollerProxy: comptrollerProxy,
|
1139
|
+
externalPositionManager: externalPositionManager,
|
1140
|
+
externalPositionProxy: externalPositionProxy,
|
1141
|
+
signer: signer
|
1142
|
+
}));
|
1143
|
+
|
1144
|
+
case 3:
|
1145
|
+
case "end":
|
1146
|
+
return _context.stop();
|
1147
|
+
}
|
1148
|
+
}
|
1149
|
+
}, _callee);
|
1150
|
+
}));
|
1151
|
+
return _aaveDebtPositionAddCollateral.apply(this, arguments);
|
1152
|
+
}
|
1153
|
+
|
1154
|
+
function aaveDebtPositionBorrow(_x2) {
|
1155
|
+
return _aaveDebtPositionBorrow.apply(this, arguments);
|
1156
|
+
}
|
1157
|
+
|
1158
|
+
function _aaveDebtPositionBorrow() {
|
1159
|
+
_aaveDebtPositionBorrow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
1160
|
+
var comptrollerProxy, externalPositionManager, signer, tokens, amounts, externalPositionProxy, actionArgs;
|
1161
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
1162
|
+
while (1) {
|
1163
|
+
switch (_context2.prev = _context2.next) {
|
1164
|
+
case 0:
|
1165
|
+
comptrollerProxy = _ref2.comptrollerProxy, externalPositionManager = _ref2.externalPositionManager, signer = _ref2.signer, tokens = _ref2.tokens, amounts = _ref2.amounts, externalPositionProxy = _ref2.externalPositionProxy;
|
1166
|
+
actionArgs = protocol.aaveDebtPositionBorrowArgs({
|
1167
|
+
amounts: amounts,
|
1168
|
+
tokens: tokens
|
1169
|
+
});
|
1170
|
+
return _context2.abrupt("return", callOnExternalPosition({
|
1171
|
+
actionArgs: actionArgs,
|
1172
|
+
actionId: protocol.AaveDebtPositionActionId.BorrowAsset,
|
1173
|
+
comptrollerProxy: comptrollerProxy,
|
1174
|
+
externalPositionManager: externalPositionManager,
|
1175
|
+
externalPositionProxy: externalPositionProxy,
|
1176
|
+
signer: signer
|
1177
|
+
}));
|
1178
|
+
|
1179
|
+
case 3:
|
1180
|
+
case "end":
|
1181
|
+
return _context2.stop();
|
1182
|
+
}
|
1183
|
+
}
|
1184
|
+
}, _callee2);
|
1185
|
+
}));
|
1186
|
+
return _aaveDebtPositionBorrow.apply(this, arguments);
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
function aaveDebtPositionClaimRewards(_x3) {
|
1190
|
+
return _aaveDebtPositionClaimRewards.apply(this, arguments);
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
function _aaveDebtPositionClaimRewards() {
|
1194
|
+
_aaveDebtPositionClaimRewards = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
1195
|
+
var comptrollerProxy, externalPositionManager, signer, assets, externalPositionProxy, actionArgs;
|
1196
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
1197
|
+
while (1) {
|
1198
|
+
switch (_context3.prev = _context3.next) {
|
1199
|
+
case 0:
|
1200
|
+
comptrollerProxy = _ref3.comptrollerProxy, externalPositionManager = _ref3.externalPositionManager, signer = _ref3.signer, assets = _ref3.assets, externalPositionProxy = _ref3.externalPositionProxy;
|
1201
|
+
actionArgs = protocol.aaveDebtPositionClaimRewardsArgs({
|
1202
|
+
assets: assets
|
1203
|
+
});
|
1204
|
+
return _context3.abrupt("return", callOnExternalPosition({
|
1205
|
+
actionArgs: actionArgs,
|
1206
|
+
actionId: protocol.AaveDebtPositionActionId.ClaimRewards,
|
1207
|
+
comptrollerProxy: comptrollerProxy,
|
1208
|
+
externalPositionManager: externalPositionManager,
|
1209
|
+
externalPositionProxy: externalPositionProxy,
|
1210
|
+
signer: signer
|
1211
|
+
}));
|
1212
|
+
|
1213
|
+
case 3:
|
1214
|
+
case "end":
|
1215
|
+
return _context3.stop();
|
1216
|
+
}
|
1217
|
+
}
|
1218
|
+
}, _callee3);
|
1219
|
+
}));
|
1220
|
+
return _aaveDebtPositionClaimRewards.apply(this, arguments);
|
1221
|
+
}
|
1222
|
+
|
1223
|
+
function aaveDebtPositionRemoveCollateral(_x4) {
|
1224
|
+
return _aaveDebtPositionRemoveCollateral.apply(this, arguments);
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
function _aaveDebtPositionRemoveCollateral() {
|
1228
|
+
_aaveDebtPositionRemoveCollateral = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref4) {
|
1229
|
+
var comptrollerProxy, externalPositionManager, signer, aTokens, amounts, externalPositionProxy, actionArgs;
|
1230
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
1231
|
+
while (1) {
|
1232
|
+
switch (_context4.prev = _context4.next) {
|
1233
|
+
case 0:
|
1234
|
+
comptrollerProxy = _ref4.comptrollerProxy, externalPositionManager = _ref4.externalPositionManager, signer = _ref4.signer, aTokens = _ref4.aTokens, amounts = _ref4.amounts, externalPositionProxy = _ref4.externalPositionProxy;
|
1235
|
+
actionArgs = protocol.aaveDebtPositionRemoveCollateralArgs({
|
1236
|
+
aTokens: aTokens,
|
1237
|
+
amounts: amounts
|
1238
|
+
});
|
1239
|
+
return _context4.abrupt("return", callOnExternalPosition({
|
1240
|
+
actionArgs: actionArgs,
|
1241
|
+
actionId: protocol.AaveDebtPositionActionId.RemoveCollateralAssets,
|
1242
|
+
comptrollerProxy: comptrollerProxy,
|
1243
|
+
externalPositionManager: externalPositionManager,
|
1244
|
+
externalPositionProxy: externalPositionProxy,
|
1245
|
+
signer: signer
|
1246
|
+
}));
|
1247
|
+
|
1248
|
+
case 3:
|
1249
|
+
case "end":
|
1250
|
+
return _context4.stop();
|
1251
|
+
}
|
1252
|
+
}
|
1253
|
+
}, _callee4);
|
1254
|
+
}));
|
1255
|
+
return _aaveDebtPositionRemoveCollateral.apply(this, arguments);
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
function aaveDebtPositionRepayBorrow(_x5) {
|
1259
|
+
return _aaveDebtPositionRepayBorrow.apply(this, arguments);
|
1260
|
+
}
|
1261
|
+
|
1262
|
+
function _aaveDebtPositionRepayBorrow() {
|
1263
|
+
_aaveDebtPositionRepayBorrow = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(_ref5) {
|
1264
|
+
var comptrollerProxy, externalPositionManager, signer, tokens, amounts, externalPositionProxy, actionArgs;
|
1265
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
1266
|
+
while (1) {
|
1267
|
+
switch (_context5.prev = _context5.next) {
|
1268
|
+
case 0:
|
1269
|
+
comptrollerProxy = _ref5.comptrollerProxy, externalPositionManager = _ref5.externalPositionManager, signer = _ref5.signer, tokens = _ref5.tokens, amounts = _ref5.amounts, externalPositionProxy = _ref5.externalPositionProxy;
|
1270
|
+
actionArgs = protocol.aaveDebtPositionRepayBorrowArgs({
|
1271
|
+
amounts: amounts,
|
1272
|
+
tokens: tokens
|
1273
|
+
});
|
1274
|
+
return _context5.abrupt("return", callOnExternalPosition({
|
1275
|
+
actionArgs: actionArgs,
|
1276
|
+
actionId: protocol.AaveDebtPositionActionId.RepayBorrowedAssets,
|
1277
|
+
comptrollerProxy: comptrollerProxy,
|
1278
|
+
externalPositionManager: externalPositionManager,
|
1279
|
+
externalPositionProxy: externalPositionProxy,
|
1280
|
+
signer: signer
|
1281
|
+
}));
|
1282
|
+
|
1283
|
+
case 3:
|
1284
|
+
case "end":
|
1285
|
+
return _context5.stop();
|
1286
|
+
}
|
1287
|
+
}
|
1288
|
+
}, _callee5);
|
1289
|
+
}));
|
1290
|
+
return _aaveDebtPositionRepayBorrow.apply(this, arguments);
|
1291
|
+
}
|
1292
|
+
|
1293
|
+
function createAaveDebtPosition(_x6) {
|
1294
|
+
return _createAaveDebtPosition.apply(this, arguments);
|
1295
|
+
}
|
1296
|
+
|
1297
|
+
function _createAaveDebtPosition() {
|
1298
|
+
_createAaveDebtPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(_ref6) {
|
1299
|
+
var signer, comptrollerProxy, externalPositionManager;
|
1300
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
|
1301
|
+
while (1) {
|
1302
|
+
switch (_context6.prev = _context6.next) {
|
1303
|
+
case 0:
|
1304
|
+
signer = _ref6.signer, comptrollerProxy = _ref6.comptrollerProxy, externalPositionManager = _ref6.externalPositionManager;
|
1305
|
+
return _context6.abrupt("return", createExternalPosition({
|
1306
|
+
comptrollerProxy: comptrollerProxy,
|
1307
|
+
externalPositionManager: externalPositionManager,
|
1308
|
+
externalPositionTypeId: protocol.ExternalPositionType.AaveDebtPosition,
|
1309
|
+
signer: signer
|
1310
|
+
}));
|
1311
|
+
|
1312
|
+
case 2:
|
1313
|
+
case "end":
|
1314
|
+
return _context6.stop();
|
1315
|
+
}
|
1316
|
+
}
|
1317
|
+
}, _callee6);
|
1318
|
+
}));
|
1319
|
+
return _createAaveDebtPosition.apply(this, arguments);
|
1320
|
+
}
|
1321
|
+
|
1102
1322
|
var _templateObject$3;
|
1103
1323
|
exports.UniswapV3FeeAmount = void 0;
|
1104
1324
|
|
@@ -1121,41 +1341,32 @@ function createUniswapV3LiquidityPosition(_x) {
|
|
1121
1341
|
|
1122
1342
|
function _createUniswapV3LiquidityPosition() {
|
1123
1343
|
_createUniswapV3LiquidityPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
1124
|
-
var signer, comptrollerProxy, externalPositionManager,
|
1344
|
+
var signer, comptrollerProxy, externalPositionManager, _ref$callOnExternalPo, callOnExternalPositionData, _yield$createExternal, externalPositionProxyContract, receipt;
|
1345
|
+
|
1125
1346
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
1126
1347
|
while (1) {
|
1127
1348
|
switch (_context.prev = _context.next) {
|
1128
1349
|
case 0:
|
1129
|
-
signer = _ref.signer, comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager,
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1350
|
+
signer = _ref.signer, comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager, _ref$callOnExternalPo = _ref.callOnExternalPositionData, callOnExternalPositionData = _ref$callOnExternalPo === void 0 ? '0x' : _ref$callOnExternalPo;
|
1351
|
+
_context.next = 3;
|
1352
|
+
return createExternalPosition({
|
1353
|
+
callOnExternalPositionData: callOnExternalPositionData,
|
1354
|
+
comptrollerProxy: comptrollerProxy,
|
1355
|
+
externalPositionManager: externalPositionManager,
|
1356
|
+
externalPositionTypeId: protocol.ExternalPositionType.UniswapV3LiquidityPosition,
|
1357
|
+
signer: signer
|
1133
1358
|
});
|
1134
|
-
_context.next = 4;
|
1135
|
-
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes'], [protocol.ExternalPositionType.UniswapV3LiquidityPosition, initArgs]));
|
1136
|
-
|
1137
|
-
case 4:
|
1138
|
-
receipt = _context.sent;
|
1139
|
-
_context.t0 = protocol.VaultLib;
|
1140
|
-
_context.next = 8;
|
1141
|
-
return comptrollerProxy.getVaultProxy();
|
1142
|
-
|
1143
|
-
case 8:
|
1144
|
-
_context.t1 = _context.sent;
|
1145
|
-
_context.t2 = signer;
|
1146
|
-
vaultProxy = new _context.t0(_context.t1, _context.t2);
|
1147
|
-
_context.next = 13;
|
1148
|
-
return vaultProxy.getActiveExternalPositions.call();
|
1149
1359
|
|
1150
|
-
case
|
1151
|
-
|
1152
|
-
|
1360
|
+
case 3:
|
1361
|
+
_yield$createExternal = _context.sent;
|
1362
|
+
externalPositionProxyContract = _yield$createExternal.externalPositionProxy;
|
1363
|
+
receipt = _yield$createExternal.receipt;
|
1153
1364
|
return _context.abrupt("return", {
|
1154
|
-
externalPositionProxyAddress:
|
1365
|
+
externalPositionProxyAddress: externalPositionProxyContract.address,
|
1155
1366
|
receipt: receipt
|
1156
1367
|
});
|
1157
1368
|
|
1158
|
-
case
|
1369
|
+
case 7:
|
1159
1370
|
case "end":
|
1160
1371
|
return _context.stop();
|
1161
1372
|
}
|
@@ -1240,13 +1451,13 @@ function uniswapV3LiquidityPositionMint(_x4) {
|
|
1240
1451
|
|
1241
1452
|
function _uniswapV3LiquidityPositionMint() {
|
1242
1453
|
_uniswapV3LiquidityPositionMint = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref4) {
|
1243
|
-
var signer, comptrollerProxy, externalPositionManager, externalPositionProxy, fee, tickLower, tickUpper, amount0Desired, amount1Desired, _ref4$amount0Min, amount0Min, _ref4$amount1Min, amount1Min, actionArgs, callArgs, receipt, externalPosition, nftId;
|
1454
|
+
var signer, comptrollerProxy, externalPositionManager, externalPositionProxy, token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, _ref4$amount0Min, amount0Min, _ref4$amount1Min, amount1Min, actionArgs, callArgs, receipt, externalPosition, nftId;
|
1244
1455
|
|
1245
1456
|
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
1246
1457
|
while (1) {
|
1247
1458
|
switch (_context4.prev = _context4.next) {
|
1248
1459
|
case 0:
|
1249
|
-
signer = _ref4.signer, comptrollerProxy = _ref4.comptrollerProxy, externalPositionManager = _ref4.externalPositionManager, externalPositionProxy = _ref4.externalPositionProxy, fee = _ref4.fee, tickLower = _ref4.tickLower, tickUpper = _ref4.tickUpper, amount0Desired = _ref4.amount0Desired, amount1Desired = _ref4.amount1Desired, _ref4$amount0Min = _ref4.amount0Min, amount0Min = _ref4$amount0Min === void 0 ? 0 : _ref4$amount0Min, _ref4$amount1Min = _ref4.amount1Min, amount1Min = _ref4$amount1Min === void 0 ? 0 : _ref4$amount1Min;
|
1460
|
+
signer = _ref4.signer, comptrollerProxy = _ref4.comptrollerProxy, externalPositionManager = _ref4.externalPositionManager, externalPositionProxy = _ref4.externalPositionProxy, token0 = _ref4.token0, token1 = _ref4.token1, fee = _ref4.fee, tickLower = _ref4.tickLower, tickUpper = _ref4.tickUpper, amount0Desired = _ref4.amount0Desired, amount1Desired = _ref4.amount1Desired, _ref4$amount0Min = _ref4.amount0Min, amount0Min = _ref4$amount0Min === void 0 ? 0 : _ref4$amount0Min, _ref4$amount1Min = _ref4.amount1Min, amount1Min = _ref4$amount1Min === void 0 ? 0 : _ref4$amount1Min;
|
1250
1461
|
actionArgs = protocol.uniswapV3LiquidityPositionMintArgs({
|
1251
1462
|
amount0Desired: amount0Desired,
|
1252
1463
|
amount0Min: amount0Min,
|
@@ -1254,7 +1465,9 @@ function _uniswapV3LiquidityPositionMint() {
|
|
1254
1465
|
amount1Min: amount1Min,
|
1255
1466
|
fee: fee,
|
1256
1467
|
tickLower: tickLower,
|
1257
|
-
tickUpper: tickUpper
|
1468
|
+
tickUpper: tickUpper,
|
1469
|
+
token0: token0,
|
1470
|
+
token1: token1
|
1258
1471
|
});
|
1259
1472
|
callArgs = protocol.callOnExternalPositionArgs({
|
1260
1473
|
actionArgs: actionArgs,
|
@@ -1526,19 +1739,234 @@ function _aaveRedeem() {
|
|
1526
1739
|
|
1527
1740
|
var _templateObject$2;
|
1528
1741
|
var ICompoundComptroller = ethers$1.contract()(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n function claimComp(address)\n"])));
|
1529
|
-
function
|
1530
|
-
return
|
1742
|
+
function assertCompoundLend(_x) {
|
1743
|
+
return _assertCompoundLend.apply(this, arguments);
|
1531
1744
|
}
|
1532
1745
|
|
1533
|
-
function
|
1534
|
-
|
1535
|
-
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter,
|
1746
|
+
function _assertCompoundLend() {
|
1747
|
+
_assertCompoundLend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
1748
|
+
var tokenWhale, comptrollerProxy, vaultProxy, integrationManager, fundOwner, compoundAdapter, _ref$tokenAmount, tokenAmount, cToken, compoundPriceFeed, token, rateBefore, minIncomingCTokenAmount, _yield$getAssetBalanc, _yield$getAssetBalanc2, preTxIncomingAssetBalance, preTxOutgoingAssetBalance, lendReceipt, rate, _yield$getAssetBalanc3, _yield$getAssetBalanc4, postTxIncomingAssetBalance, postTxOutgoingAssetBalance, expectedCTokenAmount;
|
1536
1749
|
|
1537
1750
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
1538
1751
|
while (1) {
|
1539
1752
|
switch (_context.prev = _context.next) {
|
1540
1753
|
case 0:
|
1541
|
-
comptrollerProxy = _ref.comptrollerProxy,
|
1754
|
+
tokenWhale = _ref.tokenWhale, comptrollerProxy = _ref.comptrollerProxy, vaultProxy = _ref.vaultProxy, integrationManager = _ref.integrationManager, fundOwner = _ref.fundOwner, compoundAdapter = _ref.compoundAdapter, _ref$tokenAmount = _ref.tokenAmount, tokenAmount = _ref$tokenAmount === void 0 ? ethers.utils.parseEther('1') : _ref$tokenAmount, cToken = _ref.cToken, compoundPriceFeed = _ref.compoundPriceFeed;
|
1755
|
+
_context.t0 = protocol.StandardToken;
|
1756
|
+
_context.next = 4;
|
1757
|
+
return compoundPriceFeed.getTokenFromCToken.args(cToken).call();
|
1758
|
+
|
1759
|
+
case 4:
|
1760
|
+
_context.t1 = _context.sent;
|
1761
|
+
_context.t2 = tokenWhale;
|
1762
|
+
token = new _context.t0(_context.t1, _context.t2);
|
1763
|
+
_context.next = 9;
|
1764
|
+
return token.connect(tokenWhale).transfer(vaultProxy, tokenAmount);
|
1765
|
+
|
1766
|
+
case 9:
|
1767
|
+
_context.next = 11;
|
1768
|
+
return cToken.exchangeRateStored.call();
|
1769
|
+
|
1770
|
+
case 11:
|
1771
|
+
rateBefore = _context.sent;
|
1772
|
+
// Exchange rate stored can have a small deviation from exchangeRateStored
|
1773
|
+
minIncomingCTokenAmount = tokenAmount.mul(ethers.utils.parseEther('1')).div(rateBefore).mul(ethers.BigNumber.from('999')).div(ethers.BigNumber.from('1000'));
|
1774
|
+
_context.next = 15;
|
1775
|
+
return getAssetBalances({
|
1776
|
+
account: vaultProxy,
|
1777
|
+
assets: [cToken, token]
|
1778
|
+
});
|
1779
|
+
|
1780
|
+
case 15:
|
1781
|
+
_yield$getAssetBalanc = _context.sent;
|
1782
|
+
_yield$getAssetBalanc2 = _slicedToArray(_yield$getAssetBalanc, 2);
|
1783
|
+
preTxIncomingAssetBalance = _yield$getAssetBalanc2[0];
|
1784
|
+
preTxOutgoingAssetBalance = _yield$getAssetBalanc2[1];
|
1785
|
+
_context.next = 21;
|
1786
|
+
return compoundLend({
|
1787
|
+
cToken: cToken,
|
1788
|
+
cTokenAmount: minIncomingCTokenAmount,
|
1789
|
+
compoundAdapter: compoundAdapter,
|
1790
|
+
comptrollerProxy: comptrollerProxy,
|
1791
|
+
fundOwner: fundOwner,
|
1792
|
+
integrationManager: integrationManager,
|
1793
|
+
tokenAmount: tokenAmount
|
1794
|
+
});
|
1795
|
+
|
1796
|
+
case 21:
|
1797
|
+
lendReceipt = _context.sent;
|
1798
|
+
_context.next = 24;
|
1799
|
+
return cToken.exchangeRateStored();
|
1800
|
+
|
1801
|
+
case 24:
|
1802
|
+
rate = _context.sent;
|
1803
|
+
_context.next = 27;
|
1804
|
+
return getAssetBalances({
|
1805
|
+
account: vaultProxy,
|
1806
|
+
assets: [cToken, token]
|
1807
|
+
});
|
1808
|
+
|
1809
|
+
case 27:
|
1810
|
+
_yield$getAssetBalanc3 = _context.sent;
|
1811
|
+
_yield$getAssetBalanc4 = _slicedToArray(_yield$getAssetBalanc3, 2);
|
1812
|
+
postTxIncomingAssetBalance = _yield$getAssetBalanc4[0];
|
1813
|
+
postTxOutgoingAssetBalance = _yield$getAssetBalanc4[1];
|
1814
|
+
expectedCTokenAmount = tokenAmount.mul(ethers.utils.parseEther('1')).div(rate);
|
1815
|
+
expect(postTxIncomingAssetBalance).toEqBigNumber(preTxIncomingAssetBalance.add(expectedCTokenAmount));
|
1816
|
+
expect(postTxOutgoingAssetBalance).toEqBigNumber(preTxOutgoingAssetBalance.sub(tokenAmount));
|
1817
|
+
return _context.abrupt("return", lendReceipt);
|
1818
|
+
|
1819
|
+
case 35:
|
1820
|
+
case "end":
|
1821
|
+
return _context.stop();
|
1822
|
+
}
|
1823
|
+
}
|
1824
|
+
}, _callee);
|
1825
|
+
}));
|
1826
|
+
return _assertCompoundLend.apply(this, arguments);
|
1827
|
+
}
|
1828
|
+
|
1829
|
+
function assertCompoundRedeem(_x2) {
|
1830
|
+
return _assertCompoundRedeem.apply(this, arguments);
|
1831
|
+
}
|
1832
|
+
|
1833
|
+
function _assertCompoundRedeem() {
|
1834
|
+
_assertCompoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
1835
|
+
var comptrollerProxy, vaultProxy, integrationManager, fundOwner, compoundAdapter, cToken, compoundPriceFeed, cTokenAmount, token, _yield$getAssetBalanc5, _yield$getAssetBalanc6, preTxIncomingAssetBalance, preTxOutgoingAssetBalance, rateBefore, minIncomingTokenAmount, redeemReceipt, _yield$getAssetBalanc7, _yield$getAssetBalanc8, postTxIncomingAssetBalance, postTxOutgoingAssetBalance, rate, expectedTokenAmount;
|
1836
|
+
|
1837
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
1838
|
+
while (1) {
|
1839
|
+
switch (_context2.prev = _context2.next) {
|
1840
|
+
case 0:
|
1841
|
+
comptrollerProxy = _ref2.comptrollerProxy, vaultProxy = _ref2.vaultProxy, integrationManager = _ref2.integrationManager, fundOwner = _ref2.fundOwner, compoundAdapter = _ref2.compoundAdapter, cToken = _ref2.cToken, compoundPriceFeed = _ref2.compoundPriceFeed;
|
1842
|
+
_context2.t0 = ethers.utils;
|
1843
|
+
_context2.next = 4;
|
1844
|
+
return cToken.decimals();
|
1845
|
+
|
1846
|
+
case 4:
|
1847
|
+
_context2.t1 = _context2.sent;
|
1848
|
+
cTokenAmount = _context2.t0.parseUnits.call(_context2.t0, '1', _context2.t1);
|
1849
|
+
_context2.next = 8;
|
1850
|
+
return cToken.transfer(vaultProxy, cTokenAmount);
|
1851
|
+
|
1852
|
+
case 8:
|
1853
|
+
_context2.t2 = protocol.StandardToken;
|
1854
|
+
_context2.next = 11;
|
1855
|
+
return compoundPriceFeed.getTokenFromCToken.args(cToken).call();
|
1856
|
+
|
1857
|
+
case 11:
|
1858
|
+
_context2.t3 = _context2.sent;
|
1859
|
+
_context2.t4 = provider;
|
1860
|
+
token = new _context2.t2(_context2.t3, _context2.t4);
|
1861
|
+
_context2.next = 16;
|
1862
|
+
return getAssetBalances({
|
1863
|
+
account: vaultProxy,
|
1864
|
+
assets: [token, cToken]
|
1865
|
+
});
|
1866
|
+
|
1867
|
+
case 16:
|
1868
|
+
_yield$getAssetBalanc5 = _context2.sent;
|
1869
|
+
_yield$getAssetBalanc6 = _slicedToArray(_yield$getAssetBalanc5, 2);
|
1870
|
+
preTxIncomingAssetBalance = _yield$getAssetBalanc6[0];
|
1871
|
+
preTxOutgoingAssetBalance = _yield$getAssetBalanc6[1];
|
1872
|
+
_context2.next = 22;
|
1873
|
+
return cToken.exchangeRateStored();
|
1874
|
+
|
1875
|
+
case 22:
|
1876
|
+
rateBefore = _context2.sent;
|
1877
|
+
minIncomingTokenAmount = cTokenAmount.mul(rateBefore).div(ethers.utils.parseEther('1'));
|
1878
|
+
_context2.next = 26;
|
1879
|
+
return compoundRedeem({
|
1880
|
+
cToken: cToken,
|
1881
|
+
cTokenAmount: cTokenAmount,
|
1882
|
+
compoundAdapter: compoundAdapter,
|
1883
|
+
comptrollerProxy: comptrollerProxy,
|
1884
|
+
fundOwner: fundOwner,
|
1885
|
+
integrationManager: integrationManager,
|
1886
|
+
tokenAmount: minIncomingTokenAmount,
|
1887
|
+
vaultProxy: vaultProxy
|
1888
|
+
});
|
1889
|
+
|
1890
|
+
case 26:
|
1891
|
+
redeemReceipt = _context2.sent;
|
1892
|
+
_context2.next = 29;
|
1893
|
+
return getAssetBalances({
|
1894
|
+
account: vaultProxy,
|
1895
|
+
assets: [token, cToken]
|
1896
|
+
});
|
1897
|
+
|
1898
|
+
case 29:
|
1899
|
+
_yield$getAssetBalanc7 = _context2.sent;
|
1900
|
+
_yield$getAssetBalanc8 = _slicedToArray(_yield$getAssetBalanc7, 2);
|
1901
|
+
postTxIncomingAssetBalance = _yield$getAssetBalanc8[0];
|
1902
|
+
postTxOutgoingAssetBalance = _yield$getAssetBalanc8[1];
|
1903
|
+
_context2.next = 35;
|
1904
|
+
return cToken.exchangeRateStored();
|
1905
|
+
|
1906
|
+
case 35:
|
1907
|
+
rate = _context2.sent;
|
1908
|
+
expectedTokenAmount = cTokenAmount.mul(rate).div(ethers.utils.parseEther('1'));
|
1909
|
+
expect(postTxIncomingAssetBalance).toEqBigNumber(preTxIncomingAssetBalance.add(expectedTokenAmount));
|
1910
|
+
expect(postTxOutgoingAssetBalance).toEqBigNumber(preTxOutgoingAssetBalance.sub(cTokenAmount));
|
1911
|
+
return _context2.abrupt("return", redeemReceipt);
|
1912
|
+
|
1913
|
+
case 40:
|
1914
|
+
case "end":
|
1915
|
+
return _context2.stop();
|
1916
|
+
}
|
1917
|
+
}
|
1918
|
+
}, _callee2);
|
1919
|
+
}));
|
1920
|
+
return _assertCompoundRedeem.apply(this, arguments);
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
function compoundClaim(_x3) {
|
1924
|
+
return _compoundClaim.apply(this, arguments);
|
1925
|
+
}
|
1926
|
+
|
1927
|
+
function _compoundClaim() {
|
1928
|
+
_compoundClaim = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
1929
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, compoundComptroller, cTokens, claimArgs, callArgs, claimRewardsTx;
|
1930
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
1931
|
+
while (1) {
|
1932
|
+
switch (_context3.prev = _context3.next) {
|
1933
|
+
case 0:
|
1934
|
+
comptrollerProxy = _ref3.comptrollerProxy, integrationManager = _ref3.integrationManager, fundOwner = _ref3.fundOwner, compoundAdapter = _ref3.compoundAdapter, compoundComptroller = _ref3.compoundComptroller, cTokens = _ref3.cTokens;
|
1935
|
+
claimArgs = protocol.compoundClaimRewardsArgs({
|
1936
|
+
cTokens: cTokens,
|
1937
|
+
compoundComptroller: compoundComptroller
|
1938
|
+
});
|
1939
|
+
callArgs = protocol.callOnIntegrationArgs({
|
1940
|
+
adapter: compoundAdapter,
|
1941
|
+
encodedCallArgs: claimArgs,
|
1942
|
+
selector: protocol.claimRewardsSelector
|
1943
|
+
});
|
1944
|
+
claimRewardsTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1945
|
+
return _context3.abrupt("return", claimRewardsTx);
|
1946
|
+
|
1947
|
+
case 5:
|
1948
|
+
case "end":
|
1949
|
+
return _context3.stop();
|
1950
|
+
}
|
1951
|
+
}
|
1952
|
+
}, _callee3);
|
1953
|
+
}));
|
1954
|
+
return _compoundClaim.apply(this, arguments);
|
1955
|
+
}
|
1956
|
+
|
1957
|
+
function compoundLend(_x4) {
|
1958
|
+
return _compoundLend.apply(this, arguments);
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
function _compoundLend() {
|
1962
|
+
_compoundLend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref4) {
|
1963
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken, _ref4$tokenAmount, tokenAmount, _ref4$cTokenAmount, cTokenAmount, lendArgs, callArgs, lendTx;
|
1964
|
+
|
1965
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
1966
|
+
while (1) {
|
1967
|
+
switch (_context4.prev = _context4.next) {
|
1968
|
+
case 0:
|
1969
|
+
comptrollerProxy = _ref4.comptrollerProxy, integrationManager = _ref4.integrationManager, fundOwner = _ref4.fundOwner, compoundAdapter = _ref4.compoundAdapter, cToken = _ref4.cToken, _ref4$tokenAmount = _ref4.tokenAmount, tokenAmount = _ref4$tokenAmount === void 0 ? ethers.utils.parseEther('1') : _ref4$tokenAmount, _ref4$cTokenAmount = _ref4.cTokenAmount, cTokenAmount = _ref4$cTokenAmount === void 0 ? ethers.utils.parseEther('1') : _ref4$cTokenAmount;
|
1542
1970
|
lendArgs = protocol.compoundArgs({
|
1543
1971
|
cToken: cToken,
|
1544
1972
|
minIncomingAssetAmount: cTokenAmount,
|
@@ -1550,31 +1978,31 @@ function _compoundLend() {
|
|
1550
1978
|
selector: protocol.lendSelector
|
1551
1979
|
});
|
1552
1980
|
lendTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1553
|
-
return
|
1981
|
+
return _context4.abrupt("return", lendTx);
|
1554
1982
|
|
1555
1983
|
case 5:
|
1556
1984
|
case "end":
|
1557
|
-
return
|
1985
|
+
return _context4.stop();
|
1558
1986
|
}
|
1559
1987
|
}
|
1560
|
-
},
|
1988
|
+
}, _callee4);
|
1561
1989
|
}));
|
1562
1990
|
return _compoundLend.apply(this, arguments);
|
1563
1991
|
}
|
1564
1992
|
|
1565
|
-
function compoundRedeem(
|
1993
|
+
function compoundRedeem(_x5) {
|
1566
1994
|
return _compoundRedeem.apply(this, arguments);
|
1567
1995
|
}
|
1568
1996
|
|
1569
1997
|
function _compoundRedeem() {
|
1570
|
-
_compoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
1571
|
-
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken,
|
1998
|
+
_compoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(_ref5) {
|
1999
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken, _ref5$tokenAmount, tokenAmount, _ref5$cTokenAmount, cTokenAmount, redeemArgs, callArgs, redeemTx;
|
1572
2000
|
|
1573
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
2001
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
1574
2002
|
while (1) {
|
1575
|
-
switch (
|
2003
|
+
switch (_context5.prev = _context5.next) {
|
1576
2004
|
case 0:
|
1577
|
-
comptrollerProxy =
|
2005
|
+
comptrollerProxy = _ref5.comptrollerProxy, integrationManager = _ref5.integrationManager, fundOwner = _ref5.fundOwner, compoundAdapter = _ref5.compoundAdapter, cToken = _ref5.cToken, _ref5$tokenAmount = _ref5.tokenAmount, tokenAmount = _ref5$tokenAmount === void 0 ? ethers.utils.parseEther('1') : _ref5$tokenAmount, _ref5$cTokenAmount = _ref5.cTokenAmount, cTokenAmount = _ref5$cTokenAmount === void 0 ? ethers.utils.parseEther('1') : _ref5$cTokenAmount;
|
1578
2006
|
redeemArgs = protocol.compoundArgs({
|
1579
2007
|
cToken: ethers$1.resolveAddress(cToken),
|
1580
2008
|
minIncomingAssetAmount: tokenAmount,
|
@@ -1586,27 +2014,28 @@ function _compoundRedeem() {
|
|
1586
2014
|
selector: protocol.redeemSelector
|
1587
2015
|
});
|
1588
2016
|
redeemTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1589
|
-
return
|
2017
|
+
return _context5.abrupt("return", redeemTx);
|
1590
2018
|
|
1591
2019
|
case 5:
|
1592
2020
|
case "end":
|
1593
|
-
return
|
2021
|
+
return _context5.stop();
|
1594
2022
|
}
|
1595
2023
|
}
|
1596
|
-
},
|
2024
|
+
}, _callee5);
|
1597
2025
|
}));
|
1598
2026
|
return _compoundRedeem.apply(this, arguments);
|
1599
2027
|
}
|
1600
2028
|
|
1601
|
-
var _templateObject$1, _templateObject2, _templateObject3;
|
1602
|
-
var CurveLiquidityGaugeV2 = ethers$1.contract()(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n function claim_rewards(address)\n function integrate_fraction(address) view returns (uint256)\n"])));
|
2029
|
+
var _templateObject$1, _templateObject2, _templateObject3, _templateObject4;
|
2030
|
+
var CurveLiquidityGaugeV2 = ethers$1.contract()(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n function claim_rewards(address)\n function integrate_fraction(address) view returns (uint256)\n"])));
|
2031
|
+
var CurveRegistry = ethers$1.contract()(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n function get_coins(address) view returns (address[8])\n function get_lp_token(address) view returns (address)\n"]))); // prettier-ignore
|
1603
2032
|
|
1604
|
-
var CurveSwaps = ethers$1.contract()(
|
1605
|
-
var CurveMinter = ethers$1.contract()(
|
2033
|
+
var CurveSwaps = ethers$1.contract()(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n function get_best_rate(address _from, address to, uint256 amount) view returns (address bestPool, uint256 amountReceived)\n"])));
|
2034
|
+
var CurveMinter = ethers$1.contract()(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n function mint_for(address,address)\n"]))); // exchanges
|
1606
2035
|
|
1607
2036
|
function curveTakeOrder(_x) {
|
1608
2037
|
return _curveTakeOrder.apply(this, arguments);
|
1609
|
-
} //
|
2038
|
+
} // combined liquidity
|
1610
2039
|
|
1611
2040
|
function _curveTakeOrder() {
|
1612
2041
|
_curveTakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
@@ -1631,542 +2060,237 @@ function _curveTakeOrder() {
|
|
1631
2060
|
});
|
1632
2061
|
return _context.abrupt("return", comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
1633
2062
|
|
1634
|
-
case 4:
|
1635
|
-
case "end":
|
1636
|
-
return _context.stop();
|
1637
|
-
}
|
1638
|
-
}
|
1639
|
-
}, _callee);
|
1640
|
-
}));
|
1641
|
-
return _curveTakeOrder.apply(this, arguments);
|
1642
|
-
}
|
1643
|
-
|
1644
|
-
function curveAaveClaimRewards(_ref2) {
|
1645
|
-
var comptrollerProxy = _ref2.comptrollerProxy,
|
1646
|
-
integrationManager = _ref2.integrationManager,
|
1647
|
-
fundOwner = _ref2.fundOwner,
|
1648
|
-
curveLiquidityAaveAdapter = _ref2.curveLiquidityAaveAdapter;
|
1649
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1650
|
-
adapter: curveLiquidityAaveAdapter,
|
1651
|
-
encodedCallArgs: ethers.constants.HashZero,
|
1652
|
-
selector: protocol.claimRewardsSelector
|
1653
|
-
});
|
1654
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1655
|
-
}
|
1656
|
-
function curveAaveLend(_ref3) {
|
1657
|
-
var comptrollerProxy = _ref3.comptrollerProxy,
|
1658
|
-
integrationManager = _ref3.integrationManager,
|
1659
|
-
fundOwner = _ref3.fundOwner,
|
1660
|
-
curveLiquidityAaveAdapter = _ref3.curveLiquidityAaveAdapter,
|
1661
|
-
_ref3$outgoingAaveDai = _ref3.outgoingAaveDaiAmount,
|
1662
|
-
outgoingAaveDaiAmount = _ref3$outgoingAaveDai === void 0 ? ethers.BigNumber.from(0) : _ref3$outgoingAaveDai,
|
1663
|
-
_ref3$outgoingAaveUsd = _ref3.outgoingAaveUsdcAmount,
|
1664
|
-
outgoingAaveUsdcAmount = _ref3$outgoingAaveUsd === void 0 ? ethers.BigNumber.from(0) : _ref3$outgoingAaveUsd,
|
1665
|
-
_ref3$outgoingAaveUsd2 = _ref3.outgoingAaveUsdtAmount,
|
1666
|
-
outgoingAaveUsdtAmount = _ref3$outgoingAaveUsd2 === void 0 ? ethers.BigNumber.from(0) : _ref3$outgoingAaveUsd2,
|
1667
|
-
_ref3$minIncomingLPTo = _ref3.minIncomingLPTokenAmount,
|
1668
|
-
minIncomingLPTokenAmount = _ref3$minIncomingLPTo === void 0 ? ethers.BigNumber.from(1) : _ref3$minIncomingLPTo,
|
1669
|
-
_ref3$useUnderlyings = _ref3.useUnderlyings,
|
1670
|
-
useUnderlyings = _ref3$useUnderlyings === void 0 ? false : _ref3$useUnderlyings;
|
1671
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1672
|
-
adapter: curveLiquidityAaveAdapter,
|
1673
|
-
encodedCallArgs: protocol.curveAaveLendArgs({
|
1674
|
-
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
1675
|
-
outgoingAaveDaiAmount: outgoingAaveDaiAmount,
|
1676
|
-
outgoingAaveUsdcAmount: outgoingAaveUsdcAmount,
|
1677
|
-
outgoingAaveUsdtAmount: outgoingAaveUsdtAmount,
|
1678
|
-
useUnderlyings: useUnderlyings
|
1679
|
-
}),
|
1680
|
-
selector: protocol.lendSelector
|
1681
|
-
});
|
1682
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1683
|
-
}
|
1684
|
-
function curveAaveLendAndStake(_ref4) {
|
1685
|
-
var comptrollerProxy = _ref4.comptrollerProxy,
|
1686
|
-
integrationManager = _ref4.integrationManager,
|
1687
|
-
fundOwner = _ref4.fundOwner,
|
1688
|
-
curveLiquidityAaveAdapter = _ref4.curveLiquidityAaveAdapter,
|
1689
|
-
_ref4$outgoingAaveDai = _ref4.outgoingAaveDaiAmount,
|
1690
|
-
outgoingAaveDaiAmount = _ref4$outgoingAaveDai === void 0 ? ethers.BigNumber.from(0) : _ref4$outgoingAaveDai,
|
1691
|
-
_ref4$outgoingAaveUsd = _ref4.outgoingAaveUsdcAmount,
|
1692
|
-
outgoingAaveUsdcAmount = _ref4$outgoingAaveUsd === void 0 ? ethers.BigNumber.from(0) : _ref4$outgoingAaveUsd,
|
1693
|
-
_ref4$outgoingAaveUsd2 = _ref4.outgoingAaveUsdtAmount,
|
1694
|
-
outgoingAaveUsdtAmount = _ref4$outgoingAaveUsd2 === void 0 ? ethers.BigNumber.from(0) : _ref4$outgoingAaveUsd2,
|
1695
|
-
_ref4$minIncomingLiqu = _ref4.minIncomingLiquidityGaugeTokenAmount,
|
1696
|
-
minIncomingLiquidityGaugeTokenAmount = _ref4$minIncomingLiqu === void 0 ? ethers.BigNumber.from(1) : _ref4$minIncomingLiqu,
|
1697
|
-
_ref4$useUnderlyings = _ref4.useUnderlyings,
|
1698
|
-
useUnderlyings = _ref4$useUnderlyings === void 0 ? false : _ref4$useUnderlyings;
|
1699
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1700
|
-
adapter: curveLiquidityAaveAdapter,
|
1701
|
-
encodedCallArgs: protocol.curveAaveLendAndStakeArgs({
|
1702
|
-
minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
|
1703
|
-
outgoingAaveDaiAmount: outgoingAaveDaiAmount,
|
1704
|
-
outgoingAaveUsdcAmount: outgoingAaveUsdcAmount,
|
1705
|
-
outgoingAaveUsdtAmount: outgoingAaveUsdtAmount,
|
1706
|
-
useUnderlyings: useUnderlyings
|
1707
|
-
}),
|
1708
|
-
selector: protocol.lendAndStakeSelector
|
1709
|
-
});
|
1710
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1711
|
-
}
|
1712
|
-
function curveAaveRedeem(_ref5) {
|
1713
|
-
var comptrollerProxy = _ref5.comptrollerProxy,
|
1714
|
-
integrationManager = _ref5.integrationManager,
|
1715
|
-
fundOwner = _ref5.fundOwner,
|
1716
|
-
curveLiquidityAaveAdapter = _ref5.curveLiquidityAaveAdapter,
|
1717
|
-
outgoingLPTokenAmount = _ref5.outgoingLPTokenAmount,
|
1718
|
-
_ref5$minIncomingAave = _ref5.minIncomingAaveDaiAmount,
|
1719
|
-
minIncomingAaveDaiAmount = _ref5$minIncomingAave === void 0 ? ethers.BigNumber.from(1) : _ref5$minIncomingAave,
|
1720
|
-
_ref5$minIncomingAave2 = _ref5.minIncomingAaveUsdcAmount,
|
1721
|
-
minIncomingAaveUsdcAmount = _ref5$minIncomingAave2 === void 0 ? ethers.BigNumber.from(1) : _ref5$minIncomingAave2,
|
1722
|
-
_ref5$minIncomingAave3 = _ref5.minIncomingAaveUsdtAmount,
|
1723
|
-
minIncomingAaveUsdtAmount = _ref5$minIncomingAave3 === void 0 ? ethers.BigNumber.from(1) : _ref5$minIncomingAave3,
|
1724
|
-
_ref5$receiveSingleAs = _ref5.receiveSingleAsset,
|
1725
|
-
receiveSingleAsset = _ref5$receiveSingleAs === void 0 ? false : _ref5$receiveSingleAs,
|
1726
|
-
_ref5$useUnderlyings = _ref5.useUnderlyings,
|
1727
|
-
useUnderlyings = _ref5$useUnderlyings === void 0 ? false : _ref5$useUnderlyings;
|
1728
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1729
|
-
adapter: curveLiquidityAaveAdapter,
|
1730
|
-
encodedCallArgs: protocol.curveAaveRedeemArgs({
|
1731
|
-
minIncomingAaveDaiAmount: minIncomingAaveDaiAmount,
|
1732
|
-
minIncomingAaveUsdcAmount: minIncomingAaveUsdcAmount,
|
1733
|
-
minIncomingAaveUsdtAmount: minIncomingAaveUsdtAmount,
|
1734
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
1735
|
-
receiveSingleAsset: receiveSingleAsset,
|
1736
|
-
useUnderlyings: useUnderlyings
|
1737
|
-
}),
|
1738
|
-
selector: protocol.redeemSelector
|
1739
|
-
});
|
1740
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1741
|
-
}
|
1742
|
-
function curveAaveStake(_ref6) {
|
1743
|
-
var comptrollerProxy = _ref6.comptrollerProxy,
|
1744
|
-
integrationManager = _ref6.integrationManager,
|
1745
|
-
fundOwner = _ref6.fundOwner,
|
1746
|
-
curveLiquidityAaveAdapter = _ref6.curveLiquidityAaveAdapter,
|
1747
|
-
outgoingLPTokenAmount = _ref6.outgoingLPTokenAmount;
|
1748
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1749
|
-
adapter: curveLiquidityAaveAdapter,
|
1750
|
-
encodedCallArgs: protocol.curveAaveStakeArgs({
|
1751
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount
|
1752
|
-
}),
|
1753
|
-
selector: protocol.stakeSelector
|
1754
|
-
});
|
1755
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1756
|
-
}
|
1757
|
-
function curveAaveUnstakeAndRedeem(_ref7) {
|
1758
|
-
var comptrollerProxy = _ref7.comptrollerProxy,
|
1759
|
-
integrationManager = _ref7.integrationManager,
|
1760
|
-
fundOwner = _ref7.fundOwner,
|
1761
|
-
curveLiquidityAaveAdapter = _ref7.curveLiquidityAaveAdapter,
|
1762
|
-
outgoingLiquidityGaugeTokenAmount = _ref7.outgoingLiquidityGaugeTokenAmount,
|
1763
|
-
_ref7$minIncomingAave = _ref7.minIncomingAaveDaiAmount,
|
1764
|
-
minIncomingAaveDaiAmount = _ref7$minIncomingAave === void 0 ? ethers.BigNumber.from(1) : _ref7$minIncomingAave,
|
1765
|
-
_ref7$minIncomingAave2 = _ref7.minIncomingAaveUsdcAmount,
|
1766
|
-
minIncomingAaveUsdcAmount = _ref7$minIncomingAave2 === void 0 ? ethers.BigNumber.from(1) : _ref7$minIncomingAave2,
|
1767
|
-
_ref7$minIncomingAave3 = _ref7.minIncomingAaveUsdtAmount,
|
1768
|
-
minIncomingAaveUsdtAmount = _ref7$minIncomingAave3 === void 0 ? ethers.BigNumber.from(1) : _ref7$minIncomingAave3,
|
1769
|
-
_ref7$receiveSingleAs = _ref7.receiveSingleAsset,
|
1770
|
-
receiveSingleAsset = _ref7$receiveSingleAs === void 0 ? false : _ref7$receiveSingleAs,
|
1771
|
-
_ref7$useUnderlyings = _ref7.useUnderlyings,
|
1772
|
-
useUnderlyings = _ref7$useUnderlyings === void 0 ? false : _ref7$useUnderlyings;
|
1773
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1774
|
-
adapter: curveLiquidityAaveAdapter,
|
1775
|
-
encodedCallArgs: protocol.curveAaveUnstakeAndRedeemArgs({
|
1776
|
-
minIncomingAaveDaiAmount: minIncomingAaveDaiAmount,
|
1777
|
-
minIncomingAaveUsdcAmount: minIncomingAaveUsdcAmount,
|
1778
|
-
minIncomingAaveUsdtAmount: minIncomingAaveUsdtAmount,
|
1779
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
1780
|
-
receiveSingleAsset: receiveSingleAsset,
|
1781
|
-
useUnderlyings: useUnderlyings
|
1782
|
-
}),
|
1783
|
-
selector: protocol.unstakeAndRedeemSelector
|
1784
|
-
});
|
1785
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1786
|
-
}
|
1787
|
-
function curveAaveUnstake(_ref8) {
|
1788
|
-
var comptrollerProxy = _ref8.comptrollerProxy,
|
1789
|
-
integrationManager = _ref8.integrationManager,
|
1790
|
-
fundOwner = _ref8.fundOwner,
|
1791
|
-
curveLiquidityAaveAdapter = _ref8.curveLiquidityAaveAdapter,
|
1792
|
-
outgoingLiquidityGaugeTokenAmount = _ref8.outgoingLiquidityGaugeTokenAmount;
|
1793
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1794
|
-
adapter: curveLiquidityAaveAdapter,
|
1795
|
-
encodedCallArgs: protocol.curveAaveUnstakeArgs({
|
1796
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
|
1797
|
-
}),
|
1798
|
-
selector: protocol.unstakeSelector
|
1799
|
-
});
|
1800
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1801
|
-
} // eurs pool
|
1802
|
-
|
1803
|
-
function curveEursClaimRewards(_ref9) {
|
1804
|
-
var comptrollerProxy = _ref9.comptrollerProxy,
|
1805
|
-
integrationManager = _ref9.integrationManager,
|
1806
|
-
fundOwner = _ref9.fundOwner,
|
1807
|
-
curveLiquidityEursAdapter = _ref9.curveLiquidityEursAdapter;
|
1808
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1809
|
-
adapter: curveLiquidityEursAdapter,
|
1810
|
-
encodedCallArgs: ethers.constants.HashZero,
|
1811
|
-
selector: protocol.claimRewardsSelector
|
1812
|
-
});
|
1813
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1814
|
-
}
|
1815
|
-
function curveEursLend(_ref10) {
|
1816
|
-
var comptrollerProxy = _ref10.comptrollerProxy,
|
1817
|
-
integrationManager = _ref10.integrationManager,
|
1818
|
-
fundOwner = _ref10.fundOwner,
|
1819
|
-
curveLiquidityEursAdapter = _ref10.curveLiquidityEursAdapter,
|
1820
|
-
outgoingEursAmount = _ref10.outgoingEursAmount,
|
1821
|
-
outgoingSeurAmount = _ref10.outgoingSeurAmount,
|
1822
|
-
minIncomingLPTokenAmount = _ref10.minIncomingLPTokenAmount;
|
1823
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1824
|
-
adapter: curveLiquidityEursAdapter,
|
1825
|
-
encodedCallArgs: protocol.curveEursLendArgs({
|
1826
|
-
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
1827
|
-
outgoingEursAmount: outgoingEursAmount,
|
1828
|
-
outgoingSeurAmount: outgoingSeurAmount
|
1829
|
-
}),
|
1830
|
-
selector: protocol.lendSelector
|
1831
|
-
});
|
1832
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1833
|
-
}
|
1834
|
-
function curveEursLendAndStake(_ref11) {
|
1835
|
-
var comptrollerProxy = _ref11.comptrollerProxy,
|
1836
|
-
integrationManager = _ref11.integrationManager,
|
1837
|
-
fundOwner = _ref11.fundOwner,
|
1838
|
-
curveLiquidityEursAdapter = _ref11.curveLiquidityEursAdapter,
|
1839
|
-
outgoingEursAmount = _ref11.outgoingEursAmount,
|
1840
|
-
outgoingSeurAmount = _ref11.outgoingSeurAmount,
|
1841
|
-
minIncomingLiquidityGaugeTokenAmount = _ref11.minIncomingLiquidityGaugeTokenAmount;
|
1842
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1843
|
-
adapter: curveLiquidityEursAdapter,
|
1844
|
-
encodedCallArgs: protocol.curveEursLendAndStakeArgs({
|
1845
|
-
minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
|
1846
|
-
outgoingEursAmount: outgoingEursAmount,
|
1847
|
-
outgoingSeurAmount: outgoingSeurAmount
|
1848
|
-
}),
|
1849
|
-
selector: protocol.lendAndStakeSelector
|
1850
|
-
});
|
1851
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1852
|
-
}
|
1853
|
-
function curveEursRedeem(_ref12) {
|
1854
|
-
var comptrollerProxy = _ref12.comptrollerProxy,
|
1855
|
-
integrationManager = _ref12.integrationManager,
|
1856
|
-
fundOwner = _ref12.fundOwner,
|
1857
|
-
curveLiquidityEursAdapter = _ref12.curveLiquidityEursAdapter,
|
1858
|
-
outgoingLPTokenAmount = _ref12.outgoingLPTokenAmount,
|
1859
|
-
minIncomingEursAmount = _ref12.minIncomingEursAmount,
|
1860
|
-
minIncomingSeurAmount = _ref12.minIncomingSeurAmount,
|
1861
|
-
receiveSingleAsset = _ref12.receiveSingleAsset;
|
1862
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1863
|
-
adapter: curveLiquidityEursAdapter,
|
1864
|
-
encodedCallArgs: protocol.curveEursRedeemArgs({
|
1865
|
-
minIncomingEursAmount: minIncomingEursAmount,
|
1866
|
-
minIncomingSeurAmount: minIncomingSeurAmount,
|
1867
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
1868
|
-
receiveSingleAsset: receiveSingleAsset
|
1869
|
-
}),
|
1870
|
-
selector: protocol.redeemSelector
|
1871
|
-
});
|
1872
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1873
|
-
}
|
1874
|
-
function curveEursStake(_ref13) {
|
1875
|
-
var comptrollerProxy = _ref13.comptrollerProxy,
|
1876
|
-
integrationManager = _ref13.integrationManager,
|
1877
|
-
fundOwner = _ref13.fundOwner,
|
1878
|
-
curveLiquidityEursAdapter = _ref13.curveLiquidityEursAdapter,
|
1879
|
-
outgoingLPTokenAmount = _ref13.outgoingLPTokenAmount;
|
1880
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1881
|
-
adapter: curveLiquidityEursAdapter,
|
1882
|
-
encodedCallArgs: protocol.curveEursStakeArgs({
|
1883
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount
|
1884
|
-
}),
|
1885
|
-
selector: protocol.stakeSelector
|
1886
|
-
});
|
1887
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1888
|
-
}
|
1889
|
-
function curveEursUnstakeAndRedeem(_ref14) {
|
1890
|
-
var comptrollerProxy = _ref14.comptrollerProxy,
|
1891
|
-
integrationManager = _ref14.integrationManager,
|
1892
|
-
fundOwner = _ref14.fundOwner,
|
1893
|
-
curveLiquidityEursAdapter = _ref14.curveLiquidityEursAdapter,
|
1894
|
-
outgoingLiquidityGaugeTokenAmount = _ref14.outgoingLiquidityGaugeTokenAmount,
|
1895
|
-
minIncomingEursAmount = _ref14.minIncomingEursAmount,
|
1896
|
-
minIncomingSeurAmount = _ref14.minIncomingSeurAmount,
|
1897
|
-
receiveSingleAsset = _ref14.receiveSingleAsset;
|
1898
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1899
|
-
adapter: curveLiquidityEursAdapter,
|
1900
|
-
encodedCallArgs: protocol.curveEursUnstakeAndRedeemArgs({
|
1901
|
-
minIncomingEursAmount: minIncomingEursAmount,
|
1902
|
-
minIncomingSeurAmount: minIncomingSeurAmount,
|
1903
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
1904
|
-
receiveSingleAsset: receiveSingleAsset
|
1905
|
-
}),
|
1906
|
-
selector: protocol.unstakeAndRedeemSelector
|
1907
|
-
});
|
1908
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2063
|
+
case 4:
|
2064
|
+
case "end":
|
2065
|
+
return _context.stop();
|
2066
|
+
}
|
2067
|
+
}
|
2068
|
+
}, _callee);
|
2069
|
+
}));
|
2070
|
+
return _curveTakeOrder.apply(this, arguments);
|
1909
2071
|
}
|
1910
|
-
function curveEursUnstake(_ref15) {
|
1911
|
-
var comptrollerProxy = _ref15.comptrollerProxy,
|
1912
|
-
integrationManager = _ref15.integrationManager,
|
1913
|
-
fundOwner = _ref15.fundOwner,
|
1914
|
-
curveLiquidityEursAdapter = _ref15.curveLiquidityEursAdapter,
|
1915
|
-
outgoingLiquidityGaugeTokenAmount = _ref15.outgoingLiquidityGaugeTokenAmount;
|
1916
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1917
|
-
adapter: curveLiquidityEursAdapter,
|
1918
|
-
encodedCallArgs: protocol.curveEursUnstakeArgs({
|
1919
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
|
1920
|
-
}),
|
1921
|
-
selector: protocol.unstakeSelector
|
1922
|
-
});
|
1923
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1924
|
-
} // sETH pool
|
1925
2072
|
|
1926
|
-
function
|
1927
|
-
var comptrollerProxy =
|
1928
|
-
integrationManager =
|
1929
|
-
fundOwner =
|
1930
|
-
|
2073
|
+
function curveClaimRewards(_ref2) {
|
2074
|
+
var comptrollerProxy = _ref2.comptrollerProxy,
|
2075
|
+
integrationManager = _ref2.integrationManager,
|
2076
|
+
fundOwner = _ref2.fundOwner,
|
2077
|
+
curveLiquidityAdapter = _ref2.curveLiquidityAdapter,
|
2078
|
+
stakingToken = _ref2.stakingToken;
|
1931
2079
|
var callArgs = protocol.callOnIntegrationArgs({
|
1932
|
-
adapter:
|
1933
|
-
encodedCallArgs:
|
2080
|
+
adapter: curveLiquidityAdapter,
|
2081
|
+
encodedCallArgs: protocol.curveClaimRewardsArgs({
|
2082
|
+
stakingToken: stakingToken
|
2083
|
+
}),
|
1934
2084
|
selector: protocol.claimRewardsSelector
|
1935
2085
|
});
|
1936
2086
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
1937
2087
|
}
|
1938
|
-
function
|
1939
|
-
|
1940
|
-
integrationManager = _ref17.integrationManager,
|
1941
|
-
fundOwner = _ref17.fundOwner,
|
1942
|
-
curveLiquiditySethAdapter = _ref17.curveLiquiditySethAdapter,
|
1943
|
-
outgoingWethAmount = _ref17.outgoingWethAmount,
|
1944
|
-
outgoingSethAmount = _ref17.outgoingSethAmount,
|
1945
|
-
minIncomingLPTokenAmount = _ref17.minIncomingLPTokenAmount;
|
1946
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1947
|
-
adapter: curveLiquiditySethAdapter,
|
1948
|
-
encodedCallArgs: protocol.curveSethLendArgs({
|
1949
|
-
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
1950
|
-
outgoingSethAmount: outgoingSethAmount,
|
1951
|
-
outgoingWethAmount: outgoingWethAmount
|
1952
|
-
}),
|
1953
|
-
selector: protocol.lendSelector
|
1954
|
-
});
|
1955
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2088
|
+
function curveLend(_x2) {
|
2089
|
+
return _curveLend.apply(this, arguments);
|
1956
2090
|
}
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
2091
|
+
|
2092
|
+
function _curveLend() {
|
2093
|
+
_curveLend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref3) {
|
2094
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, orderedOutgoingAssetAmounts, _ref3$minIncomingLpTo, minIncomingLpTokenAmount, useUnderlyings, callArgs;
|
2095
|
+
|
2096
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
2097
|
+
while (1) {
|
2098
|
+
switch (_context2.prev = _context2.next) {
|
2099
|
+
case 0:
|
2100
|
+
comptrollerProxy = _ref3.comptrollerProxy, integrationManager = _ref3.integrationManager, signer = _ref3.signer, curveLiquidityAdapter = _ref3.curveLiquidityAdapter, pool = _ref3.pool, orderedOutgoingAssetAmounts = _ref3.orderedOutgoingAssetAmounts, _ref3$minIncomingLpTo = _ref3.minIncomingLpTokenAmount, minIncomingLpTokenAmount = _ref3$minIncomingLpTo === void 0 ? ethers.BigNumber.from(1) : _ref3$minIncomingLpTo, useUnderlyings = _ref3.useUnderlyings;
|
2101
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2102
|
+
adapter: curveLiquidityAdapter,
|
2103
|
+
encodedCallArgs: protocol.curveLendArgs({
|
2104
|
+
minIncomingLpTokenAmount: minIncomingLpTokenAmount,
|
2105
|
+
orderedOutgoingAssetAmounts: orderedOutgoingAssetAmounts,
|
2106
|
+
pool: pool,
|
2107
|
+
useUnderlyings: useUnderlyings
|
2108
|
+
}),
|
2109
|
+
selector: protocol.lendSelector
|
2110
|
+
});
|
2111
|
+
return _context2.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2112
|
+
|
2113
|
+
case 3:
|
2114
|
+
case "end":
|
2115
|
+
return _context2.stop();
|
2116
|
+
}
|
2117
|
+
}
|
2118
|
+
}, _callee2);
|
2119
|
+
}));
|
2120
|
+
return _curveLend.apply(this, arguments);
|
1975
2121
|
}
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
fundOwner = _ref19.fundOwner,
|
1980
|
-
curveLiquiditySethAdapter = _ref19.curveLiquiditySethAdapter,
|
1981
|
-
outgoingLPTokenAmount = _ref19.outgoingLPTokenAmount,
|
1982
|
-
minIncomingWethAmount = _ref19.minIncomingWethAmount,
|
1983
|
-
minIncomingSethAmount = _ref19.minIncomingSethAmount,
|
1984
|
-
receiveSingleAsset = _ref19.receiveSingleAsset;
|
1985
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
1986
|
-
adapter: curveLiquiditySethAdapter,
|
1987
|
-
encodedCallArgs: protocol.curveSethRedeemArgs({
|
1988
|
-
minIncomingSethAmount: minIncomingSethAmount,
|
1989
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
1990
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
1991
|
-
receiveSingleAsset: receiveSingleAsset
|
1992
|
-
}),
|
1993
|
-
selector: protocol.redeemSelector
|
1994
|
-
});
|
1995
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2122
|
+
|
2123
|
+
function curveLendAndStake(_x3) {
|
2124
|
+
return _curveLendAndStake.apply(this, arguments);
|
1996
2125
|
}
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2126
|
+
|
2127
|
+
function _curveLendAndStake() {
|
2128
|
+
_curveLendAndStake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref4) {
|
2129
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, orderedOutgoingAssetAmounts, incomingStakingToken, _ref4$minIncomingStak, minIncomingStakingTokenAmount, useUnderlyings, callArgs;
|
2130
|
+
|
2131
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
2132
|
+
while (1) {
|
2133
|
+
switch (_context3.prev = _context3.next) {
|
2134
|
+
case 0:
|
2135
|
+
comptrollerProxy = _ref4.comptrollerProxy, integrationManager = _ref4.integrationManager, signer = _ref4.signer, curveLiquidityAdapter = _ref4.curveLiquidityAdapter, pool = _ref4.pool, orderedOutgoingAssetAmounts = _ref4.orderedOutgoingAssetAmounts, incomingStakingToken = _ref4.incomingStakingToken, _ref4$minIncomingStak = _ref4.minIncomingStakingTokenAmount, minIncomingStakingTokenAmount = _ref4$minIncomingStak === void 0 ? ethers.BigNumber.from(1) : _ref4$minIncomingStak, useUnderlyings = _ref4.useUnderlyings;
|
2136
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2137
|
+
adapter: curveLiquidityAdapter,
|
2138
|
+
encodedCallArgs: protocol.curveLendAndStakeArgs({
|
2139
|
+
incomingStakingToken: incomingStakingToken,
|
2140
|
+
minIncomingStakingTokenAmount: minIncomingStakingTokenAmount,
|
2141
|
+
orderedOutgoingAssetAmounts: orderedOutgoingAssetAmounts,
|
2142
|
+
pool: pool,
|
2143
|
+
useUnderlyings: useUnderlyings
|
2144
|
+
}),
|
2145
|
+
selector: protocol.lendAndStakeSelector
|
2146
|
+
});
|
2147
|
+
return _context3.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2148
|
+
|
2149
|
+
case 3:
|
2150
|
+
case "end":
|
2151
|
+
return _context3.stop();
|
2152
|
+
}
|
2153
|
+
}
|
2154
|
+
}, _callee3);
|
2155
|
+
}));
|
2156
|
+
return _curveLendAndStake.apply(this, arguments);
|
2011
2157
|
}
|
2012
|
-
|
2013
|
-
|
2014
|
-
|
2015
|
-
fundOwner = _ref21.fundOwner,
|
2016
|
-
curveLiquiditySethAdapter = _ref21.curveLiquiditySethAdapter,
|
2017
|
-
outgoingLiquidityGaugeTokenAmount = _ref21.outgoingLiquidityGaugeTokenAmount,
|
2018
|
-
minIncomingWethAmount = _ref21.minIncomingWethAmount,
|
2019
|
-
minIncomingSethAmount = _ref21.minIncomingSethAmount,
|
2020
|
-
receiveSingleAsset = _ref21.receiveSingleAsset;
|
2021
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
2022
|
-
adapter: curveLiquiditySethAdapter,
|
2023
|
-
encodedCallArgs: protocol.curveSethUnstakeAndRedeemArgs({
|
2024
|
-
minIncomingSethAmount: minIncomingSethAmount,
|
2025
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
2026
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
2027
|
-
receiveSingleAsset: receiveSingleAsset
|
2028
|
-
}),
|
2029
|
-
selector: protocol.unstakeAndRedeemSelector
|
2030
|
-
});
|
2031
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2158
|
+
|
2159
|
+
function curveRedeem(_x4) {
|
2160
|
+
return _curveRedeem.apply(this, arguments);
|
2032
2161
|
}
|
2033
|
-
function curveSethUnstake(_ref22) {
|
2034
|
-
var comptrollerProxy = _ref22.comptrollerProxy,
|
2035
|
-
integrationManager = _ref22.integrationManager,
|
2036
|
-
fundOwner = _ref22.fundOwner,
|
2037
|
-
curveLiquiditySethAdapter = _ref22.curveLiquiditySethAdapter,
|
2038
|
-
outgoingLiquidityGaugeTokenAmount = _ref22.outgoingLiquidityGaugeTokenAmount;
|
2039
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
2040
|
-
adapter: curveLiquiditySethAdapter,
|
2041
|
-
encodedCallArgs: protocol.curveSethUnstakeArgs({
|
2042
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
|
2043
|
-
}),
|
2044
|
-
selector: protocol.unstakeSelector
|
2045
|
-
});
|
2046
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2047
|
-
} // stETH pool
|
2048
2162
|
|
2049
|
-
function
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2059
|
-
|
2163
|
+
function _curveRedeem() {
|
2164
|
+
_curveRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref5) {
|
2165
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, outgoingLpTokenAmount, useUnderlyings, redeemType, incomingAssetData, callArgs;
|
2166
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
2167
|
+
while (1) {
|
2168
|
+
switch (_context4.prev = _context4.next) {
|
2169
|
+
case 0:
|
2170
|
+
comptrollerProxy = _ref5.comptrollerProxy, integrationManager = _ref5.integrationManager, signer = _ref5.signer, curveLiquidityAdapter = _ref5.curveLiquidityAdapter, pool = _ref5.pool, outgoingLpTokenAmount = _ref5.outgoingLpTokenAmount, useUnderlyings = _ref5.useUnderlyings, redeemType = _ref5.redeemType, incomingAssetData = _ref5.incomingAssetData;
|
2171
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2172
|
+
adapter: curveLiquidityAdapter,
|
2173
|
+
encodedCallArgs: protocol.curveRedeemArgs({
|
2174
|
+
incomingAssetData: incomingAssetData,
|
2175
|
+
outgoingLpTokenAmount: outgoingLpTokenAmount,
|
2176
|
+
pool: pool,
|
2177
|
+
redeemType: redeemType,
|
2178
|
+
useUnderlyings: useUnderlyings
|
2179
|
+
}),
|
2180
|
+
selector: protocol.redeemSelector
|
2181
|
+
});
|
2182
|
+
return _context4.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2183
|
+
|
2184
|
+
case 3:
|
2185
|
+
case "end":
|
2186
|
+
return _context4.stop();
|
2187
|
+
}
|
2188
|
+
}
|
2189
|
+
}, _callee4);
|
2190
|
+
}));
|
2191
|
+
return _curveRedeem.apply(this, arguments);
|
2060
2192
|
}
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
fundOwner = _ref24.fundOwner,
|
2065
|
-
curveLiquidityStethAdapter = _ref24.curveLiquidityStethAdapter,
|
2066
|
-
outgoingWethAmount = _ref24.outgoingWethAmount,
|
2067
|
-
outgoingStethAmount = _ref24.outgoingStethAmount,
|
2068
|
-
minIncomingLPTokenAmount = _ref24.minIncomingLPTokenAmount;
|
2069
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
2070
|
-
adapter: curveLiquidityStethAdapter,
|
2071
|
-
encodedCallArgs: protocol.curveStethLendArgs({
|
2072
|
-
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
2073
|
-
outgoingStethAmount: outgoingStethAmount,
|
2074
|
-
outgoingWethAmount: outgoingWethAmount
|
2075
|
-
}),
|
2076
|
-
selector: protocol.lendSelector
|
2077
|
-
});
|
2078
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2193
|
+
|
2194
|
+
function curveStake(_x5) {
|
2195
|
+
return _curveStake.apply(this, arguments);
|
2079
2196
|
}
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2197
|
+
|
2198
|
+
function _curveStake() {
|
2199
|
+
_curveStake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(_ref6) {
|
2200
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, incomingStakingToken, amount, callArgs;
|
2201
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
2202
|
+
while (1) {
|
2203
|
+
switch (_context5.prev = _context5.next) {
|
2204
|
+
case 0:
|
2205
|
+
comptrollerProxy = _ref6.comptrollerProxy, integrationManager = _ref6.integrationManager, signer = _ref6.signer, curveLiquidityAdapter = _ref6.curveLiquidityAdapter, pool = _ref6.pool, incomingStakingToken = _ref6.incomingStakingToken, amount = _ref6.amount;
|
2206
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2207
|
+
adapter: curveLiquidityAdapter,
|
2208
|
+
encodedCallArgs: protocol.curveStakeArgs({
|
2209
|
+
amount: amount,
|
2210
|
+
incomingStakingToken: incomingStakingToken,
|
2211
|
+
pool: pool
|
2212
|
+
}),
|
2213
|
+
selector: protocol.stakeSelector
|
2214
|
+
});
|
2215
|
+
return _context5.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2216
|
+
|
2217
|
+
case 3:
|
2218
|
+
case "end":
|
2219
|
+
return _context5.stop();
|
2220
|
+
}
|
2221
|
+
}
|
2222
|
+
}, _callee5);
|
2223
|
+
}));
|
2224
|
+
return _curveStake.apply(this, arguments);
|
2098
2225
|
}
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
fundOwner = _ref26.fundOwner,
|
2103
|
-
curveLiquidityStethAdapter = _ref26.curveLiquidityStethAdapter,
|
2104
|
-
outgoingLPTokenAmount = _ref26.outgoingLPTokenAmount,
|
2105
|
-
minIncomingWethAmount = _ref26.minIncomingWethAmount,
|
2106
|
-
minIncomingStethAmount = _ref26.minIncomingStethAmount,
|
2107
|
-
receiveSingleAsset = _ref26.receiveSingleAsset;
|
2108
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
2109
|
-
adapter: curveLiquidityStethAdapter,
|
2110
|
-
encodedCallArgs: protocol.curveStethRedeemArgs({
|
2111
|
-
minIncomingStethAmount: minIncomingStethAmount,
|
2112
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
2113
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
2114
|
-
receiveSingleAsset: receiveSingleAsset
|
2115
|
-
}),
|
2116
|
-
selector: protocol.redeemSelector
|
2117
|
-
});
|
2118
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2226
|
+
|
2227
|
+
function curveUnstake(_x6) {
|
2228
|
+
return _curveUnstake.apply(this, arguments);
|
2119
2229
|
}
|
2120
|
-
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2230
|
+
|
2231
|
+
function _curveUnstake() {
|
2232
|
+
_curveUnstake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(_ref7) {
|
2233
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, outgoingStakingToken, amount, callArgs;
|
2234
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
|
2235
|
+
while (1) {
|
2236
|
+
switch (_context6.prev = _context6.next) {
|
2237
|
+
case 0:
|
2238
|
+
comptrollerProxy = _ref7.comptrollerProxy, integrationManager = _ref7.integrationManager, signer = _ref7.signer, curveLiquidityAdapter = _ref7.curveLiquidityAdapter, pool = _ref7.pool, outgoingStakingToken = _ref7.outgoingStakingToken, amount = _ref7.amount;
|
2239
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2240
|
+
adapter: curveLiquidityAdapter,
|
2241
|
+
encodedCallArgs: protocol.curveUnstakeArgs({
|
2242
|
+
amount: amount,
|
2243
|
+
outgoingStakingToken: outgoingStakingToken,
|
2244
|
+
pool: pool
|
2245
|
+
}),
|
2246
|
+
selector: protocol.unstakeSelector
|
2247
|
+
});
|
2248
|
+
return _context6.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2249
|
+
|
2250
|
+
case 3:
|
2251
|
+
case "end":
|
2252
|
+
return _context6.stop();
|
2253
|
+
}
|
2254
|
+
}
|
2255
|
+
}, _callee6);
|
2256
|
+
}));
|
2257
|
+
return _curveUnstake.apply(this, arguments);
|
2134
2258
|
}
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
fundOwner = _ref28.fundOwner,
|
2139
|
-
curveLiquidityStethAdapter = _ref28.curveLiquidityStethAdapter,
|
2140
|
-
outgoingLiquidityGaugeTokenAmount = _ref28.outgoingLiquidityGaugeTokenAmount,
|
2141
|
-
minIncomingWethAmount = _ref28.minIncomingWethAmount,
|
2142
|
-
minIncomingStethAmount = _ref28.minIncomingStethAmount,
|
2143
|
-
receiveSingleAsset = _ref28.receiveSingleAsset;
|
2144
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
2145
|
-
adapter: curveLiquidityStethAdapter,
|
2146
|
-
encodedCallArgs: protocol.curveStethUnstakeAndRedeemArgs({
|
2147
|
-
minIncomingStethAmount: minIncomingStethAmount,
|
2148
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
2149
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
2150
|
-
receiveSingleAsset: receiveSingleAsset
|
2151
|
-
}),
|
2152
|
-
selector: protocol.unstakeAndRedeemSelector
|
2153
|
-
});
|
2154
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2259
|
+
|
2260
|
+
function curveUnstakeAndRedeem(_x7) {
|
2261
|
+
return _curveUnstakeAndRedeem.apply(this, arguments);
|
2155
2262
|
}
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2168
|
-
|
2169
|
-
|
2263
|
+
|
2264
|
+
function _curveUnstakeAndRedeem() {
|
2265
|
+
_curveUnstakeAndRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(_ref8) {
|
2266
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, outgoingStakingToken, outgoingStakingTokenAmount, useUnderlyings, redeemType, incomingAssetData, callArgs;
|
2267
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context7) {
|
2268
|
+
while (1) {
|
2269
|
+
switch (_context7.prev = _context7.next) {
|
2270
|
+
case 0:
|
2271
|
+
comptrollerProxy = _ref8.comptrollerProxy, integrationManager = _ref8.integrationManager, signer = _ref8.signer, curveLiquidityAdapter = _ref8.curveLiquidityAdapter, pool = _ref8.pool, outgoingStakingToken = _ref8.outgoingStakingToken, outgoingStakingTokenAmount = _ref8.outgoingStakingTokenAmount, useUnderlyings = _ref8.useUnderlyings, redeemType = _ref8.redeemType, incomingAssetData = _ref8.incomingAssetData;
|
2272
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2273
|
+
adapter: curveLiquidityAdapter,
|
2274
|
+
encodedCallArgs: protocol.curveUnstakeAndRedeemArgs({
|
2275
|
+
incomingAssetData: incomingAssetData,
|
2276
|
+
outgoingStakingToken: outgoingStakingToken,
|
2277
|
+
outgoingStakingTokenAmount: outgoingStakingTokenAmount,
|
2278
|
+
pool: pool,
|
2279
|
+
redeemType: redeemType,
|
2280
|
+
useUnderlyings: useUnderlyings
|
2281
|
+
}),
|
2282
|
+
selector: protocol.unstakeAndRedeemSelector
|
2283
|
+
});
|
2284
|
+
return _context7.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2285
|
+
|
2286
|
+
case 3:
|
2287
|
+
case "end":
|
2288
|
+
return _context7.stop();
|
2289
|
+
}
|
2290
|
+
}
|
2291
|
+
}, _callee7);
|
2292
|
+
}));
|
2293
|
+
return _curveUnstakeAndRedeem.apply(this, arguments);
|
2170
2294
|
}
|
2171
2295
|
|
2172
2296
|
function idleClaimRewards(_x) {
|
@@ -2354,53 +2478,70 @@ function _mockGenericSwap() {
|
|
2354
2478
|
return _mockGenericSwap.apply(this, arguments);
|
2355
2479
|
}
|
2356
2480
|
|
2357
|
-
function
|
2358
|
-
|
2359
|
-
return toTokens.map(function (toToken) {
|
2360
|
-
return {
|
2361
|
-
// Not supported in our protocol
|
2362
|
-
routes: [],
|
2363
|
-
to: toToken,
|
2364
|
-
totalNetworkFee: 0 // Can ignore this param in the dummy
|
2365
|
-
|
2366
|
-
};
|
2367
|
-
});
|
2368
|
-
}
|
2369
|
-
function paraSwapV4TakeOrder(_x) {
|
2370
|
-
return _paraSwapV4TakeOrder.apply(this, arguments);
|
2481
|
+
function olympusV2Stake(_x) {
|
2482
|
+
return _olympusV2Stake.apply(this, arguments);
|
2371
2483
|
}
|
2372
2484
|
|
2373
|
-
function
|
2374
|
-
|
2375
|
-
var comptrollerProxy, integrationManager,
|
2376
|
-
|
2485
|
+
function _olympusV2Stake() {
|
2486
|
+
_olympusV2Stake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
2487
|
+
var comptrollerProxy, integrationManager, signer, olympusV2Adapter, amount, stakeArgs, callArgs, stakeTx;
|
2377
2488
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
2378
2489
|
while (1) {
|
2379
2490
|
switch (_context.prev = _context.next) {
|
2380
2491
|
case 0:
|
2381
|
-
comptrollerProxy =
|
2382
|
-
|
2383
|
-
|
2384
|
-
minIncomingAssetAmount: minIncomingAssetAmount,
|
2385
|
-
outgoingAsset: outgoingAsset,
|
2386
|
-
outgoingAssetAmount: outgoingAssetAmount,
|
2387
|
-
paths: paths
|
2492
|
+
comptrollerProxy = _ref.comptrollerProxy, integrationManager = _ref.integrationManager, signer = _ref.signer, olympusV2Adapter = _ref.olympusV2Adapter, amount = _ref.amount;
|
2493
|
+
stakeArgs = protocol.olympusV2StakeArgs({
|
2494
|
+
amount: amount
|
2388
2495
|
});
|
2389
2496
|
callArgs = protocol.callOnIntegrationArgs({
|
2390
|
-
adapter:
|
2391
|
-
encodedCallArgs:
|
2392
|
-
selector: protocol.
|
2497
|
+
adapter: olympusV2Adapter,
|
2498
|
+
encodedCallArgs: stakeArgs,
|
2499
|
+
selector: protocol.stakeSelector
|
2393
2500
|
});
|
2394
|
-
|
2501
|
+
stakeTx = comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2502
|
+
return _context.abrupt("return", stakeTx);
|
2395
2503
|
|
2396
|
-
case
|
2504
|
+
case 5:
|
2397
2505
|
case "end":
|
2398
2506
|
return _context.stop();
|
2399
2507
|
}
|
2400
2508
|
}
|
2401
2509
|
}, _callee);
|
2402
2510
|
}));
|
2403
|
-
return
|
2511
|
+
return _olympusV2Stake.apply(this, arguments);
|
2512
|
+
}
|
2513
|
+
|
2514
|
+
function olympusV2Unstake(_x2) {
|
2515
|
+
return _olympusV2Unstake.apply(this, arguments);
|
2516
|
+
}
|
2517
|
+
|
2518
|
+
function _olympusV2Unstake() {
|
2519
|
+
_olympusV2Unstake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
2520
|
+
var comptrollerProxy, integrationManager, signer, olympusV2Adapter, amount, unstakeArgs, callArgs, unstakeTx;
|
2521
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
2522
|
+
while (1) {
|
2523
|
+
switch (_context2.prev = _context2.next) {
|
2524
|
+
case 0:
|
2525
|
+
comptrollerProxy = _ref2.comptrollerProxy, integrationManager = _ref2.integrationManager, signer = _ref2.signer, olympusV2Adapter = _ref2.olympusV2Adapter, amount = _ref2.amount;
|
2526
|
+
unstakeArgs = protocol.olympusV2UnstakeArgs({
|
2527
|
+
amount: amount
|
2528
|
+
});
|
2529
|
+
callArgs = protocol.callOnIntegrationArgs({
|
2530
|
+
adapter: olympusV2Adapter,
|
2531
|
+
encodedCallArgs: unstakeArgs,
|
2532
|
+
selector: protocol.unstakeSelector
|
2533
|
+
});
|
2534
|
+
unstakeTx = comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
2535
|
+
return _context2.abrupt("return", unstakeTx);
|
2536
|
+
|
2537
|
+
case 5:
|
2538
|
+
case "end":
|
2539
|
+
return _context2.stop();
|
2540
|
+
}
|
2541
|
+
}
|
2542
|
+
}, _callee2);
|
2543
|
+
}));
|
2544
|
+
return _olympusV2Unstake.apply(this, arguments);
|
2404
2545
|
}
|
2405
2546
|
|
2406
2547
|
function paraSwapV5GenerateDummyPaths(_ref) {
|
@@ -2564,24 +2705,16 @@ function synthetixAssignExchangeDelegate(_x) {
|
|
2564
2705
|
|
2565
2706
|
function _synthetixAssignExchangeDelegate() {
|
2566
2707
|
_synthetixAssignExchangeDelegate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
2567
|
-
var comptrollerProxy,
|
2708
|
+
var comptrollerProxy, synthetixDelegateApprovals, fundOwner, delegate;
|
2568
2709
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
2569
2710
|
while (1) {
|
2570
2711
|
switch (_context.prev = _context.next) {
|
2571
2712
|
case 0:
|
2572
|
-
comptrollerProxy = _ref.comptrollerProxy,
|
2713
|
+
comptrollerProxy = _ref.comptrollerProxy, synthetixDelegateApprovals = _ref.synthetixDelegateApprovals, fundOwner = _ref.fundOwner, delegate = _ref.delegate;
|
2573
2714
|
_context.next = 3;
|
2574
|
-
return
|
2575
|
-
addressResolver: addressResolver,
|
2576
|
-
name: 'DelegateApprovals'
|
2577
|
-
});
|
2715
|
+
return comptrollerProxy.connect(fundOwner).vaultCallOnContract(synthetixDelegateApprovals, protocol.synthetixAssignExchangeDelegateSelector, protocol.encodeArgs(['address'], [delegate]));
|
2578
2716
|
|
2579
2717
|
case 3:
|
2580
|
-
delegateApprovals = _context.sent;
|
2581
|
-
_context.next = 6;
|
2582
|
-
return comptrollerProxy.connect(fundOwner).vaultCallOnContract(delegateApprovals, protocol.synthetixAssignExchangeDelegateSelector, protocol.encodeArgs(['address'], [delegate]));
|
2583
|
-
|
2584
|
-
case 6:
|
2585
2718
|
case "end":
|
2586
2719
|
return _context.stop();
|
2587
2720
|
}
|
@@ -2591,42 +2724,18 @@ function _synthetixAssignExchangeDelegate() {
|
|
2591
2724
|
return _synthetixAssignExchangeDelegate.apply(this, arguments);
|
2592
2725
|
}
|
2593
2726
|
|
2594
|
-
function
|
2595
|
-
return _synthetixResolveAddress.apply(this, arguments);
|
2596
|
-
}
|
2597
|
-
|
2598
|
-
function _synthetixResolveAddress() {
|
2599
|
-
_synthetixResolveAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
2600
|
-
var addressResolver, name;
|
2601
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
2602
|
-
while (1) {
|
2603
|
-
switch (_context2.prev = _context2.next) {
|
2604
|
-
case 0:
|
2605
|
-
addressResolver = _ref2.addressResolver, name = _ref2.name;
|
2606
|
-
return _context2.abrupt("return", addressResolver.requireAndGetAddress(ethers.utils.formatBytes32String(name), "Missing ".concat(name)));
|
2607
|
-
|
2608
|
-
case 2:
|
2609
|
-
case "end":
|
2610
|
-
return _context2.stop();
|
2611
|
-
}
|
2612
|
-
}
|
2613
|
-
}, _callee2);
|
2614
|
-
}));
|
2615
|
-
return _synthetixResolveAddress.apply(this, arguments);
|
2616
|
-
}
|
2617
|
-
|
2618
|
-
function synthetixRedeem(_x3) {
|
2727
|
+
function synthetixRedeem(_x2) {
|
2619
2728
|
return _synthetixRedeem.apply(this, arguments);
|
2620
2729
|
}
|
2621
2730
|
|
2622
2731
|
function _synthetixRedeem() {
|
2623
|
-
_synthetixRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
2732
|
+
_synthetixRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
2624
2733
|
var comptrollerProxy, integrationManager, signer, synthetixAdapter, synths, redeemArgs, callArgs;
|
2625
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
2734
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
2626
2735
|
while (1) {
|
2627
|
-
switch (
|
2736
|
+
switch (_context2.prev = _context2.next) {
|
2628
2737
|
case 0:
|
2629
|
-
comptrollerProxy =
|
2738
|
+
comptrollerProxy = _ref2.comptrollerProxy, integrationManager = _ref2.integrationManager, signer = _ref2.signer, synthetixAdapter = _ref2.synthetixAdapter, synths = _ref2.synths;
|
2630
2739
|
redeemArgs = protocol.synthetixRedeemArgs({
|
2631
2740
|
synths: synths
|
2632
2741
|
});
|
@@ -2635,48 +2744,47 @@ function _synthetixRedeem() {
|
|
2635
2744
|
encodedCallArgs: redeemArgs,
|
2636
2745
|
selector: protocol.redeemSelector
|
2637
2746
|
});
|
2638
|
-
return
|
2747
|
+
return _context2.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2639
2748
|
|
2640
2749
|
case 4:
|
2641
2750
|
case "end":
|
2642
|
-
return
|
2751
|
+
return _context2.stop();
|
2643
2752
|
}
|
2644
2753
|
}
|
2645
|
-
},
|
2754
|
+
}, _callee2);
|
2646
2755
|
}));
|
2647
2756
|
return _synthetixRedeem.apply(this, arguments);
|
2648
2757
|
}
|
2649
2758
|
|
2650
|
-
function synthetixTakeOrder(
|
2759
|
+
function synthetixTakeOrder(_x3) {
|
2651
2760
|
return _synthetixTakeOrder.apply(this, arguments);
|
2652
2761
|
}
|
2653
2762
|
|
2654
2763
|
function _synthetixTakeOrder() {
|
2655
|
-
_synthetixTakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
2656
|
-
var comptrollerProxy, vaultProxy, integrationManager, fundOwner, synthetixAdapter, outgoingAsset,
|
2764
|
+
_synthetixTakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
2765
|
+
var comptrollerProxy, vaultProxy, integrationManager, fundOwner, synthetixAdapter, outgoingAsset, _ref3$outgoingAssetAm, outgoingAssetAmount, _ref3$minIncomingSusd, minIncomingSusdAmount, _ref3$seedFund, seedFund, takeOrderArgs, callArgs;
|
2657
2766
|
|
2658
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
2767
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
2659
2768
|
while (1) {
|
2660
|
-
switch (
|
2769
|
+
switch (_context3.prev = _context3.next) {
|
2661
2770
|
case 0:
|
2662
|
-
comptrollerProxy =
|
2771
|
+
comptrollerProxy = _ref3.comptrollerProxy, vaultProxy = _ref3.vaultProxy, integrationManager = _ref3.integrationManager, fundOwner = _ref3.fundOwner, synthetixAdapter = _ref3.synthetixAdapter, outgoingAsset = _ref3.outgoingAsset, _ref3$outgoingAssetAm = _ref3.outgoingAssetAmount, outgoingAssetAmount = _ref3$outgoingAssetAm === void 0 ? ethers.utils.parseEther('1') : _ref3$outgoingAssetAm, _ref3$minIncomingSusd = _ref3.minIncomingSusdAmount, minIncomingSusdAmount = _ref3$minIncomingSusd === void 0 ? ethers.utils.parseEther('1') : _ref3$minIncomingSusd, _ref3$seedFund = _ref3.seedFund, seedFund = _ref3$seedFund === void 0 ? false : _ref3$seedFund;
|
2663
2772
|
|
2664
2773
|
if (!seedFund) {
|
2665
|
-
|
2774
|
+
_context3.next = 4;
|
2666
2775
|
break;
|
2667
2776
|
}
|
2668
2777
|
|
2669
|
-
|
2778
|
+
_context3.next = 4;
|
2670
2779
|
return outgoingAsset.transfer(vaultProxy, outgoingAssetAmount);
|
2671
2780
|
|
2672
2781
|
case 4:
|
2673
2782
|
takeOrderArgs = protocol.synthetixTakeOrderArgs({
|
2674
|
-
|
2675
|
-
minIncomingAssetAmount: minIncomingAssetAmount,
|
2783
|
+
minIncomingSusdAmount: minIncomingSusdAmount,
|
2676
2784
|
outgoingAsset: outgoingAsset,
|
2677
2785
|
outgoingAssetAmount: outgoingAssetAmount
|
2678
2786
|
});
|
2679
|
-
|
2787
|
+
_context3.next = 7;
|
2680
2788
|
return protocol.callOnIntegrationArgs({
|
2681
2789
|
adapter: synthetixAdapter,
|
2682
2790
|
encodedCallArgs: takeOrderArgs,
|
@@ -2684,15 +2792,15 @@ function _synthetixTakeOrder() {
|
|
2684
2792
|
});
|
2685
2793
|
|
2686
2794
|
case 7:
|
2687
|
-
callArgs =
|
2688
|
-
return
|
2795
|
+
callArgs = _context3.sent;
|
2796
|
+
return _context3.abrupt("return", comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
2689
2797
|
|
2690
2798
|
case 9:
|
2691
2799
|
case "end":
|
2692
|
-
return
|
2800
|
+
return _context3.stop();
|
2693
2801
|
}
|
2694
2802
|
}
|
2695
|
-
},
|
2803
|
+
}, _callee3);
|
2696
2804
|
}));
|
2697
2805
|
return _synthetixTakeOrder.apply(this, arguments);
|
2698
2806
|
}
|
@@ -3653,12 +3761,15 @@ var whales = {
|
|
3653
3761
|
crv: '0x4ce799e6eD8D64536b67dD428565d52A531B3640',
|
3654
3762
|
dai: '0x47ac0fb4f2d84898e4d9e7b4dab3c24507a6d503',
|
3655
3763
|
knc: '0x09d51654bd9efbfcb56da3491989cc1444095fff',
|
3764
|
+
ldo: '0x3dba737ccc50a32a1764b493285dd51c8af6c278',
|
3656
3765
|
link: '0xbe6977e08d4479c0a6777539ae0e8fa27be4e9d6',
|
3657
3766
|
mana: '0xefb94ac00f1cee8a89d5c3f49faa799da6f03024',
|
3658
3767
|
mln: '0xd8f8a53945bcfbbc19da162aa405e662ef71c40d',
|
3768
|
+
ohm: '0x71a53aff36a699110d66d6bdfff2320caf8d2d59',
|
3659
3769
|
rep: '0xc6a043b07d33b6f30d8cb501026c391cfd25abe1',
|
3660
3770
|
ren: '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8',
|
3661
3771
|
susd: '0xa5f7a39e55d7878bc5bd754ee5d6bd7a7662355b',
|
3772
|
+
sohm: '0xf280f037cdbda99727ddf5dfede91e68fa78605c',
|
3662
3773
|
uni: '0x47173b170c64d16393a52e6c480b3ad8c302ba1e',
|
3663
3774
|
usdc: '0xae2d4617c862309a3d75a0ffb358c7a5009c673f',
|
3664
3775
|
usdt: '0x5041ed759dd4afc3a72b8192c143f72f4724081a',
|
@@ -3666,23 +3777,29 @@ var whales = {
|
|
3666
3777
|
zrx: '0x206376e8940e42538781cd94ef024df3c1e0fd43',
|
3667
3778
|
// aTokens
|
3668
3779
|
ausdc: '0x3DdfA8eC3052539b6C9549F12cEA2C295cfF5296',
|
3780
|
+
ausdt: '0x7d6149ad9a573a6e2ca6ebf7d4897c1b766841b4',
|
3669
3781
|
// cTokens
|
3670
3782
|
ccomp: '0xd74f186194ab9219fafac5c2fe4b3270169666db',
|
3671
3783
|
cdai: '0xab4ce310054a11328685ece1043211b68ba5d082',
|
3672
3784
|
ceth: '0x8aceab8167c80cb8b3de7fa6228b889bb1130ee8',
|
3673
3785
|
cuni: '0x39d8014b4f40d2cbc441137011d32023f4f1fd87',
|
3674
|
-
cusdc: '
|
3786
|
+
cusdc: '0xe1ed4da4284924ddaf69983b4d813fb1be58c380',
|
3787
|
+
// fTokens
|
3788
|
+
fdai7: '0x88884e35d7006ae84efef09ee6bc6a43dd8e2bb8',
|
3789
|
+
feth7: '0xcd2ba6a4d50745b0b4096186f925115387852c15',
|
3790
|
+
fdai8: '0x93f3f612a525a59523e91cc5552f718df9fc0746',
|
3791
|
+
ftribe8: '0xdb5ac83c137321da29a59a7592232bc4ed461730',
|
3675
3792
|
// ptTokens
|
3676
3793
|
ptUsdc: '0xd18236cd213f39d078177b6f6908f0e44e88e4aa',
|
3677
|
-
// synths
|
3794
|
+
// synths (unsupported)
|
3678
3795
|
seth: '0xc34a7c65aa08cb36744bda8eeec7b8e9891e147c',
|
3679
|
-
seur: '0xc3f2f91723b16b95bef0619b2504c049075d5b0b',
|
3680
3796
|
sxag: '0x40d68c490bf7262ec40048099aec23535f734be2',
|
3681
3797
|
sxau: '0x92eb453b7b5b8d41edb44e2c8b8b53eb70a482c7',
|
3682
3798
|
// misc
|
3683
3799
|
lidoSteth: '0x31f644e2dd5d74f5c8d6d9de89dd517474d51800',
|
3684
|
-
|
3685
|
-
|
3800
|
+
ust: '0xf584f8728b874a6a5c7a8d4d387c9aae9172d621',
|
3801
|
+
// Curve steth pool related
|
3802
|
+
stecrv: '0x56c915758ad3f76fd287fff7563ee313142fb663'
|
3686
3803
|
};
|
3687
3804
|
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
3688
3805
|
|
@@ -3918,14 +4035,22 @@ function assertPaymasterDidRejectForReason(receipt, reason) {
|
|
3918
4035
|
|
3919
4036
|
exports.CurveLiquidityGaugeV2 = CurveLiquidityGaugeV2;
|
3920
4037
|
exports.CurveMinter = CurveMinter;
|
4038
|
+
exports.CurveRegistry = CurveRegistry;
|
3921
4039
|
exports.CurveSwaps = CurveSwaps;
|
3922
4040
|
exports.ICompoundComptroller = ICompoundComptroller;
|
3923
4041
|
exports.IUniswapV3NonFungibleTokenManager = IUniswapV3NonFungibleTokenManager;
|
3924
4042
|
exports.UniswapV2Factory = UniswapV2Factory;
|
4043
|
+
exports.aaveDebtPositionAddCollateral = aaveDebtPositionAddCollateral;
|
4044
|
+
exports.aaveDebtPositionBorrow = aaveDebtPositionBorrow;
|
4045
|
+
exports.aaveDebtPositionClaimRewards = aaveDebtPositionClaimRewards;
|
4046
|
+
exports.aaveDebtPositionRemoveCollateral = aaveDebtPositionRemoveCollateral;
|
4047
|
+
exports.aaveDebtPositionRepayBorrow = aaveDebtPositionRepayBorrow;
|
3925
4048
|
exports.aaveLend = aaveLend;
|
3926
4049
|
exports.aaveRedeem = aaveRedeem;
|
3927
4050
|
exports.addNewAssetsToFund = addNewAssetsToFund;
|
3928
4051
|
exports.addTrackedAssetsToVault = addTrackedAssetsToVault;
|
4052
|
+
exports.assertCompoundLend = assertCompoundLend;
|
4053
|
+
exports.assertCompoundRedeem = assertCompoundRedeem;
|
3929
4054
|
exports.assertDidRelay = assertDidRelay;
|
3930
4055
|
exports.assertDidRelaySuccessfully = assertDidRelaySuccessfully;
|
3931
4056
|
exports.assertDidRelayWithCharge = assertDidRelayWithCharge;
|
@@ -3939,6 +4064,7 @@ exports.buySharesFunction = buySharesFunction;
|
|
3939
4064
|
exports.calcMlnValueAndBurnAmountForSharesBuyback = calcMlnValueAndBurnAmountForSharesBuyback;
|
3940
4065
|
exports.callOnExtension = callOnExtension;
|
3941
4066
|
exports.callOnExternalPosition = callOnExternalPosition;
|
4067
|
+
exports.compoundClaim = compoundClaim;
|
3942
4068
|
exports.compoundDebtPositionAddCollateral = compoundDebtPositionAddCollateral;
|
3943
4069
|
exports.compoundDebtPositionBorrow = compoundDebtPositionBorrow;
|
3944
4070
|
exports.compoundDebtPositionClaimComp = compoundDebtPositionClaimComp;
|
@@ -3946,6 +4072,7 @@ exports.compoundDebtPositionRemoveCollateral = compoundDebtPositionRemoveCollate
|
|
3946
4072
|
exports.compoundDebtPositionRepayBorrow = compoundDebtPositionRepayBorrow;
|
3947
4073
|
exports.compoundLend = compoundLend;
|
3948
4074
|
exports.compoundRedeem = compoundRedeem;
|
4075
|
+
exports.createAaveDebtPosition = createAaveDebtPosition;
|
3949
4076
|
exports.createCompoundDebtPosition = createCompoundDebtPosition;
|
3950
4077
|
exports.createComptrollerProxy = createComptrollerProxy;
|
3951
4078
|
exports.createExternalPosition = createExternalPosition;
|
@@ -3956,35 +4083,14 @@ exports.createNewFund = createNewFund;
|
|
3956
4083
|
exports.createReconfigurationRequest = createReconfigurationRequest;
|
3957
4084
|
exports.createUniswapV3LiquidityPosition = createUniswapV3LiquidityPosition;
|
3958
4085
|
exports.createVaultProxy = createVaultProxy;
|
3959
|
-
exports.
|
3960
|
-
exports.
|
3961
|
-
exports.
|
3962
|
-
exports.
|
3963
|
-
exports.
|
3964
|
-
exports.curveAaveUnstake = curveAaveUnstake;
|
3965
|
-
exports.curveAaveUnstakeAndRedeem = curveAaveUnstakeAndRedeem;
|
3966
|
-
exports.curveEursClaimRewards = curveEursClaimRewards;
|
3967
|
-
exports.curveEursLend = curveEursLend;
|
3968
|
-
exports.curveEursLendAndStake = curveEursLendAndStake;
|
3969
|
-
exports.curveEursRedeem = curveEursRedeem;
|
3970
|
-
exports.curveEursStake = curveEursStake;
|
3971
|
-
exports.curveEursUnstake = curveEursUnstake;
|
3972
|
-
exports.curveEursUnstakeAndRedeem = curveEursUnstakeAndRedeem;
|
3973
|
-
exports.curveSethClaimRewards = curveSethClaimRewards;
|
3974
|
-
exports.curveSethLend = curveSethLend;
|
3975
|
-
exports.curveSethLendAndStake = curveSethLendAndStake;
|
3976
|
-
exports.curveSethRedeem = curveSethRedeem;
|
3977
|
-
exports.curveSethStake = curveSethStake;
|
3978
|
-
exports.curveSethUnstake = curveSethUnstake;
|
3979
|
-
exports.curveSethUnstakeAndRedeem = curveSethUnstakeAndRedeem;
|
3980
|
-
exports.curveStethClaimRewards = curveStethClaimRewards;
|
3981
|
-
exports.curveStethLend = curveStethLend;
|
3982
|
-
exports.curveStethLendAndStake = curveStethLendAndStake;
|
3983
|
-
exports.curveStethRedeem = curveStethRedeem;
|
3984
|
-
exports.curveStethStake = curveStethStake;
|
3985
|
-
exports.curveStethUnstake = curveStethUnstake;
|
3986
|
-
exports.curveStethUnstakeAndRedeem = curveStethUnstakeAndRedeem;
|
4086
|
+
exports.curveClaimRewards = curveClaimRewards;
|
4087
|
+
exports.curveLend = curveLend;
|
4088
|
+
exports.curveLendAndStake = curveLendAndStake;
|
4089
|
+
exports.curveRedeem = curveRedeem;
|
4090
|
+
exports.curveStake = curveStake;
|
3987
4091
|
exports.curveTakeOrder = curveTakeOrder;
|
4092
|
+
exports.curveUnstake = curveUnstake;
|
4093
|
+
exports.curveUnstakeAndRedeem = curveUnstakeAndRedeem;
|
3988
4094
|
exports.deployProtocolFixture = deployProtocolFixture;
|
3989
4095
|
exports.generateFeeManagerConfigWithMockFees = generateFeeManagerConfigWithMockFees;
|
3990
4096
|
exports.generateMockFees = generateMockFees;
|
@@ -4008,8 +4114,8 @@ exports.mockGenericSwapArgs = mockGenericSwapArgs;
|
|
4008
4114
|
exports.mockGenericSwapBSelector = mockGenericSwapBSelector;
|
4009
4115
|
exports.mockGenericSwapDirectFromVaultSelector = mockGenericSwapDirectFromVaultSelector;
|
4010
4116
|
exports.mockGenericSwapViaApprovalSelector = mockGenericSwapViaApprovalSelector;
|
4011
|
-
exports.
|
4012
|
-
exports.
|
4117
|
+
exports.olympusV2Stake = olympusV2Stake;
|
4118
|
+
exports.olympusV2Unstake = olympusV2Unstake;
|
4013
4119
|
exports.paraSwapV5GenerateDummyPaths = paraSwapV5GenerateDummyPaths;
|
4014
4120
|
exports.paraSwapV5TakeOrder = paraSwapV5TakeOrder;
|
4015
4121
|
exports.poolTogetherV4ClaimRewards = poolTogetherV4ClaimRewards;
|
@@ -4024,7 +4130,6 @@ exports.removeTrackedAssetsFromVault = removeTrackedAssetsFromVault;
|
|
4024
4130
|
exports.setupGasRelayerPaymaster = setupGasRelayerPaymaster;
|
4025
4131
|
exports.synthetixAssignExchangeDelegate = synthetixAssignExchangeDelegate;
|
4026
4132
|
exports.synthetixRedeem = synthetixRedeem;
|
4027
|
-
exports.synthetixResolveAddress = synthetixResolveAddress;
|
4028
4133
|
exports.synthetixTakeOrder = synthetixTakeOrder;
|
4029
4134
|
exports.transactionTimestamp = transactionTimestamp;
|
4030
4135
|
exports.uniswapV2Lend = uniswapV2Lend;
|