@enzymefinance/testutils 4.0.0-next.6 → 4.0.0-next.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/declarations/src/deployment.d.ts +19 -16
- 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/actions.d.ts +2 -1
- 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 +13 -71
- package/dist/declarations/src/scaffolding/extensions/integrations/idle.d.ts +3 -3
- package/dist/declarations/src/scaffolding/extensions/integrations/olympusV2.d.ts +2 -2
- 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 +6 -3
- package/dist/enzymefinance-testutils.browser.cjs.js +403 -344
- package/dist/enzymefinance-testutils.browser.esm.js +402 -338
- package/dist/enzymefinance-testutils.cjs.dev.js +403 -344
- package/dist/enzymefinance-testutils.cjs.prod.js +403 -344
- package/dist/enzymefinance-testutils.esm.js +402 -338
- package/package.json +6 -6
- package/src/deployment.ts +19 -15
- package/src/scaffolding/core.ts +1 -9
- package/src/scaffolding/extensions/external-positions/actions.ts +6 -1
- 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 +21 -238
- package/src/scaffolding/extensions/integrations/synthetix.ts +6 -25
- package/src/types.d.ts +1 -0
- package/src/whales.ts +8 -3
|
@@ -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
|
|
|
@@ -120,17 +121,18 @@ function _deployProtocolFixture() {
|
|
|
120
121
|
allowedDepositRecipientsPolicy: new protocol.AllowedDepositRecipientsPolicy(fixture['AllowedDepositRecipientsPolicy'].address, deployer),
|
|
121
122
|
allowedExternalPositionTypesPolicy: new protocol.AllowedExternalPositionTypesPolicy(fixture['AllowedExternalPositionTypesPolicy'].address, deployer),
|
|
122
123
|
allowedSharesTransferRecipientsPolicy: new protocol.AllowedSharesTransferRecipientsPolicy(fixture['AllowedSharesTransferRecipientsPolicy'].address, deployer),
|
|
123
|
-
assetFinalityResolver: new protocol.AssetFinalityResolver(fixture['AssetFinalityResolver'].address, deployer),
|
|
124
124
|
compoundAdapter: new protocol.CompoundAdapter(fixture['CompoundAdapter'].address, deployer),
|
|
125
125
|
compoundDebtPositionLib: new protocol.CompoundDebtPositionLib(fixture['CompoundDebtPositionLib'].address, deployer),
|
|
126
126
|
compoundDebtPositionParser: new protocol.CompoundDebtPositionParser(fixture['CompoundDebtPositionParser'].address, deployer),
|
|
127
127
|
compoundPriceFeed: new protocol.CompoundPriceFeed(fixture['CompoundPriceFeed'].address, deployer),
|
|
128
128
|
comptrollerLib: new protocol.ComptrollerLib(fixture['ComptrollerLib'].address, deployer),
|
|
129
|
+
convexCurveLpStakingAdapter: new protocol.ConvexCurveLpStakingAdapter(fixture['ConvexCurveLpStakingAdapter'].address, deployer),
|
|
130
|
+
convexCurveLpStakingWrapperFactory: new protocol.ConvexCurveLpStakingWrapperFactory(fixture['ConvexCurveLpStakingWrapperFactory'].address, deployer),
|
|
131
|
+
convexCurveLpStakingWrapperPriceFeed: new protocol.ConvexCurveLpStakingWrapperPriceFeed(fixture['ConvexCurveLpStakingWrapperPriceFeed'].address, deployer),
|
|
129
132
|
cumulativeSlippageTolerancePolicy: new protocol.CumulativeSlippageTolerancePolicy(fixture['CumulativeSlippageTolerancePolicy'].address, deployer),
|
|
130
133
|
curveExchangeAdapter: new protocol.CurveExchangeAdapter(fixture['CurveExchangeAdapter'].address, deployer),
|
|
131
134
|
curveLiquidityAaveAdapter: new protocol.CurveLiquidityAaveAdapter(fixture['CurveLiquidityAaveAdapter'].address, deployer),
|
|
132
135
|
curveLiquidityAdapter: new protocol.CurveLiquidityAdapter(fixture['CurveLiquidityAdapter'].address, deployer),
|
|
133
|
-
curveLiquidityEursAdapter: new protocol.CurveLiquidityEursAdapter(fixture['CurveLiquidityEursAdapter'].address, deployer),
|
|
134
136
|
curveLiquiditySethAdapter: new protocol.CurveLiquiditySethAdapter(fixture['CurveLiquiditySethAdapter'].address, deployer),
|
|
135
137
|
curveLiquidityStethAdapter: new protocol.CurveLiquidityStethAdapter(fixture['CurveLiquidityStethAdapter'].address, deployer),
|
|
136
138
|
curvePriceFeed: new protocol.CurvePriceFeed(fixture['CurvePriceFeed'].address, deployer),
|
|
@@ -147,8 +149,9 @@ function _deployProtocolFixture() {
|
|
|
147
149
|
fundValueCalculator: new protocol.FundValueCalculator(fixture['FundValueCalculator'].address, deployer),
|
|
148
150
|
fundValueCalculatorRouter: new protocol.FundValueCalculatorRouter(fixture['FundValueCalculatorRouter'].address, deployer),
|
|
149
151
|
fundValueCalculatorUsdWrapper: new protocol.FundValueCalculatorUsdWrapper(fixture['FundValueCalculatorUsdWrapper'].address, deployer),
|
|
152
|
+
fuseAdapter: new protocol.FuseAdapter(fixture['FuseAdapter'].address, deployer),
|
|
153
|
+
fusePriceFeed: new protocol.FusePriceFeed(fixture['FusePriceFeed'].address, deployer),
|
|
150
154
|
gasRelayPaymasterFactory: new protocol.GasRelayPaymasterFactory(fixture['GasRelayPaymasterFactory'].address, deployer),
|
|
151
|
-
guaranteedRedemptionPolicy: new protocol.GuaranteedRedemptionPolicy(fixture['GuaranteedRedemptionPolicy'].address, deployer),
|
|
152
155
|
idleAdapter: new protocol.IdleAdapter(fixture['IdleAdapter'].address, deployer),
|
|
153
156
|
idlePriceFeed: new protocol.IdlePriceFeed(fixture['IdlePriceFeed'].address, deployer),
|
|
154
157
|
integrationManager: new protocol.IntegrationManager(fixture['IntegrationManager'].address, deployer),
|
|
@@ -171,7 +174,6 @@ function _deployProtocolFixture() {
|
|
|
171
174
|
revertingPriceFeed: new protocol.RevertingPriceFeed(fixture['RevertingPriceFeed'].address, deployer),
|
|
172
175
|
stakehoundEthPriceFeed: new protocol.StakehoundEthPriceFeed(fixture['StakehoundEthPriceFeed'].address, deployer),
|
|
173
176
|
synthetixAdapter: new protocol.SynthetixAdapter(fixture['SynthetixAdapter'].address, deployer),
|
|
174
|
-
synthetixPriceFeed: new protocol.SynthetixPriceFeed(fixture['SynthetixPriceFeed'].address, deployer),
|
|
175
177
|
uniswapV2ExchangeAdapter: new protocol.UniswapV2ExchangeAdapter(fixture['UniswapV2ExchangeAdapter'].address, deployer),
|
|
176
178
|
uniswapV2LiquidityAdapter: new protocol.UniswapV2LiquidityAdapter(fixture['UniswapV2LiquidityAdapter'].address, deployer),
|
|
177
179
|
uniswapV2PoolPriceFeed: new protocol.UniswapV2PoolPriceFeed(fixture['UniswapV2PoolPriceFeed'].address, deployer),
|
|
@@ -389,13 +391,13 @@ function createFundDeployer(_x) {
|
|
|
389
391
|
|
|
390
392
|
function _createFundDeployer() {
|
|
391
393
|
_createFundDeployer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
|
392
|
-
var deployer,
|
|
394
|
+
var deployer, externalPositionManager, dispatcher, gasRelayPaymasterFactory, valueInterpreter, vaultLib, _ref$setOnDispatcher, setOnDispatcher, _ref$setReleaseLive, setReleaseLive, mlnToken, wethToken, protocolFeeReserve, nextFundDeployer, nextPolicyManager, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextComptrollerLib, nextProtocolFeeTracker, nextVaultLib;
|
|
393
395
|
|
|
394
396
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
395
397
|
while (1) {
|
|
396
398
|
switch (_context.prev = _context.next) {
|
|
397
399
|
case 0:
|
|
398
|
-
deployer = _ref.deployer,
|
|
400
|
+
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;
|
|
399
401
|
_context.next = 3;
|
|
400
402
|
return vaultLib.getMlnToken();
|
|
401
403
|
|
|
@@ -446,7 +448,7 @@ function _createFundDeployer() {
|
|
|
446
448
|
case 31:
|
|
447
449
|
nextIntegrationManager = _context.sent;
|
|
448
450
|
_context.next = 34;
|
|
449
|
-
return protocol.ComptrollerLib.deploy(deployer, dispatcher, protocolFeeReserve, nextFundDeployer, valueInterpreter, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextPolicyManager,
|
|
451
|
+
return protocol.ComptrollerLib.deploy(deployer, dispatcher, protocolFeeReserve, nextFundDeployer, valueInterpreter, nextExternalPositionManager, nextFeeManager, nextIntegrationManager, nextPolicyManager, gasRelayPaymasterFactory, mlnToken, wethToken);
|
|
450
452
|
|
|
451
453
|
case 34:
|
|
452
454
|
nextComptrollerLib = _context.sent;
|
|
@@ -607,15 +609,15 @@ function createExternalPosition(_x2) {
|
|
|
607
609
|
|
|
608
610
|
function _createExternalPosition() {
|
|
609
611
|
_createExternalPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
|
610
|
-
var signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, _ref2$initializationD, initializationData, receipt, event, externalPositionProxy;
|
|
612
|
+
var signer, comptrollerProxy, externalPositionManager, externalPositionTypeId, _ref2$initializationD, initializationData, _ref2$callOnExternalP, callOnExternalPositionData, receipt, event, externalPositionProxy;
|
|
611
613
|
|
|
612
614
|
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
613
615
|
while (1) {
|
|
614
616
|
switch (_context2.prev = _context2.next) {
|
|
615
617
|
case 0:
|
|
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;
|
|
618
|
+
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;
|
|
617
619
|
_context2.next = 3;
|
|
618
|
-
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes'], [externalPositionTypeId, initializationData]));
|
|
620
|
+
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes', 'bytes'], [externalPositionTypeId, initializationData, callOnExternalPositionData]));
|
|
619
621
|
|
|
620
622
|
case 3:
|
|
621
623
|
receipt = _context2.sent;
|
|
@@ -944,7 +946,12 @@ function _createMockExternalPosition() {
|
|
|
944
946
|
|
|
945
947
|
case 21:
|
|
946
948
|
_context.next = 23;
|
|
947
|
-
return
|
|
949
|
+
return createExternalPosition({
|
|
950
|
+
comptrollerProxy: comptrollerProxy,
|
|
951
|
+
externalPositionManager: externalPositionManager,
|
|
952
|
+
externalPositionTypeId: typeId,
|
|
953
|
+
signer: fundOwner
|
|
954
|
+
});
|
|
948
955
|
|
|
949
956
|
case 23:
|
|
950
957
|
receipt = _context.sent;
|
|
@@ -1133,41 +1140,32 @@ function createUniswapV3LiquidityPosition(_x) {
|
|
|
1133
1140
|
|
|
1134
1141
|
function _createUniswapV3LiquidityPosition() {
|
|
1135
1142
|
_createUniswapV3LiquidityPosition = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
|
1136
|
-
var signer, comptrollerProxy, externalPositionManager,
|
|
1143
|
+
var signer, comptrollerProxy, externalPositionManager, _ref$callOnExternalPo, callOnExternalPositionData, _yield$createExternal, externalPositionProxyContract, receipt;
|
|
1144
|
+
|
|
1137
1145
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
1138
1146
|
while (1) {
|
|
1139
1147
|
switch (_context.prev = _context.next) {
|
|
1140
1148
|
case 0:
|
|
1141
|
-
signer = _ref.signer, comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager,
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1149
|
+
signer = _ref.signer, comptrollerProxy = _ref.comptrollerProxy, externalPositionManager = _ref.externalPositionManager, _ref$callOnExternalPo = _ref.callOnExternalPositionData, callOnExternalPositionData = _ref$callOnExternalPo === void 0 ? '0x' : _ref$callOnExternalPo;
|
|
1150
|
+
_context.next = 3;
|
|
1151
|
+
return createExternalPosition({
|
|
1152
|
+
callOnExternalPositionData: callOnExternalPositionData,
|
|
1153
|
+
comptrollerProxy: comptrollerProxy,
|
|
1154
|
+
externalPositionManager: externalPositionManager,
|
|
1155
|
+
externalPositionTypeId: protocol.ExternalPositionType.UniswapV3LiquidityPosition,
|
|
1156
|
+
signer: signer
|
|
1145
1157
|
});
|
|
1146
|
-
_context.next = 4;
|
|
1147
|
-
return comptrollerProxy.connect(signer).callOnExtension(externalPositionManager, protocol.ExternalPositionManagerActionId.CreateExternalPosition, protocol.encodeArgs(['uint256', 'bytes'], [protocol.ExternalPositionType.UniswapV3LiquidityPosition, initArgs]));
|
|
1148
|
-
|
|
1149
|
-
case 4:
|
|
1150
|
-
receipt = _context.sent;
|
|
1151
|
-
_context.t0 = protocol.VaultLib;
|
|
1152
|
-
_context.next = 8;
|
|
1153
|
-
return comptrollerProxy.getVaultProxy();
|
|
1154
1158
|
|
|
1155
|
-
case
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
_context.next = 13;
|
|
1160
|
-
return vaultProxy.getActiveExternalPositions.call();
|
|
1161
|
-
|
|
1162
|
-
case 13:
|
|
1163
|
-
externalPositions = _context.sent;
|
|
1164
|
-
externalPositionProxyAddress = externalPositions[externalPositions.length - 1];
|
|
1159
|
+
case 3:
|
|
1160
|
+
_yield$createExternal = _context.sent;
|
|
1161
|
+
externalPositionProxyContract = _yield$createExternal.externalPositionProxy;
|
|
1162
|
+
receipt = _yield$createExternal.receipt;
|
|
1165
1163
|
return _context.abrupt("return", {
|
|
1166
|
-
externalPositionProxyAddress:
|
|
1164
|
+
externalPositionProxyAddress: externalPositionProxyContract.address,
|
|
1167
1165
|
receipt: receipt
|
|
1168
1166
|
});
|
|
1169
1167
|
|
|
1170
|
-
case
|
|
1168
|
+
case 7:
|
|
1171
1169
|
case "end":
|
|
1172
1170
|
return _context.stop();
|
|
1173
1171
|
}
|
|
@@ -1252,13 +1250,13 @@ function uniswapV3LiquidityPositionMint(_x4) {
|
|
|
1252
1250
|
|
|
1253
1251
|
function _uniswapV3LiquidityPositionMint() {
|
|
1254
1252
|
_uniswapV3LiquidityPositionMint = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref4) {
|
|
1255
|
-
var signer, comptrollerProxy, externalPositionManager, externalPositionProxy, fee, tickLower, tickUpper, amount0Desired, amount1Desired, _ref4$amount0Min, amount0Min, _ref4$amount1Min, amount1Min, actionArgs, callArgs, receipt, externalPosition, nftId;
|
|
1253
|
+
var signer, comptrollerProxy, externalPositionManager, externalPositionProxy, token0, token1, fee, tickLower, tickUpper, amount0Desired, amount1Desired, _ref4$amount0Min, amount0Min, _ref4$amount1Min, amount1Min, actionArgs, callArgs, receipt, externalPosition, nftId;
|
|
1256
1254
|
|
|
1257
1255
|
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
1258
1256
|
while (1) {
|
|
1259
1257
|
switch (_context4.prev = _context4.next) {
|
|
1260
1258
|
case 0:
|
|
1261
|
-
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;
|
|
1259
|
+
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;
|
|
1262
1260
|
actionArgs = protocol.uniswapV3LiquidityPositionMintArgs({
|
|
1263
1261
|
amount0Desired: amount0Desired,
|
|
1264
1262
|
amount0Min: amount0Min,
|
|
@@ -1266,7 +1264,9 @@ function _uniswapV3LiquidityPositionMint() {
|
|
|
1266
1264
|
amount1Min: amount1Min,
|
|
1267
1265
|
fee: fee,
|
|
1268
1266
|
tickLower: tickLower,
|
|
1269
|
-
tickUpper: tickUpper
|
|
1267
|
+
tickUpper: tickUpper,
|
|
1268
|
+
token0: token0,
|
|
1269
|
+
token1: token1
|
|
1270
1270
|
});
|
|
1271
1271
|
callArgs = protocol.callOnExternalPositionArgs({
|
|
1272
1272
|
actionArgs: actionArgs,
|
|
@@ -1538,19 +1538,234 @@ function _aaveRedeem() {
|
|
|
1538
1538
|
|
|
1539
1539
|
var _templateObject$2;
|
|
1540
1540
|
var ICompoundComptroller = ethers$1.contract()(_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n function claimComp(address)\n"])));
|
|
1541
|
-
function
|
|
1542
|
-
return
|
|
1541
|
+
function assertCompoundLend(_x) {
|
|
1542
|
+
return _assertCompoundLend.apply(this, arguments);
|
|
1543
1543
|
}
|
|
1544
1544
|
|
|
1545
|
-
function
|
|
1546
|
-
|
|
1547
|
-
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter,
|
|
1545
|
+
function _assertCompoundLend() {
|
|
1546
|
+
_assertCompoundLend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
|
1547
|
+
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;
|
|
1548
1548
|
|
|
1549
1549
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
1550
1550
|
while (1) {
|
|
1551
1551
|
switch (_context.prev = _context.next) {
|
|
1552
1552
|
case 0:
|
|
1553
|
-
comptrollerProxy = _ref.comptrollerProxy,
|
|
1553
|
+
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;
|
|
1554
|
+
_context.t0 = protocol.StandardToken;
|
|
1555
|
+
_context.next = 4;
|
|
1556
|
+
return compoundPriceFeed.getTokenFromCToken.args(cToken).call();
|
|
1557
|
+
|
|
1558
|
+
case 4:
|
|
1559
|
+
_context.t1 = _context.sent;
|
|
1560
|
+
_context.t2 = tokenWhale;
|
|
1561
|
+
token = new _context.t0(_context.t1, _context.t2);
|
|
1562
|
+
_context.next = 9;
|
|
1563
|
+
return token.connect(tokenWhale).transfer(vaultProxy, tokenAmount);
|
|
1564
|
+
|
|
1565
|
+
case 9:
|
|
1566
|
+
_context.next = 11;
|
|
1567
|
+
return cToken.exchangeRateStored.call();
|
|
1568
|
+
|
|
1569
|
+
case 11:
|
|
1570
|
+
rateBefore = _context.sent;
|
|
1571
|
+
// Exchange rate stored can have a small deviation from exchangeRateStored
|
|
1572
|
+
minIncomingCTokenAmount = tokenAmount.mul(ethers.utils.parseEther('1')).div(rateBefore).mul(ethers.BigNumber.from('999')).div(ethers.BigNumber.from('1000'));
|
|
1573
|
+
_context.next = 15;
|
|
1574
|
+
return getAssetBalances({
|
|
1575
|
+
account: vaultProxy,
|
|
1576
|
+
assets: [cToken, token]
|
|
1577
|
+
});
|
|
1578
|
+
|
|
1579
|
+
case 15:
|
|
1580
|
+
_yield$getAssetBalanc = _context.sent;
|
|
1581
|
+
_yield$getAssetBalanc2 = _slicedToArray(_yield$getAssetBalanc, 2);
|
|
1582
|
+
preTxIncomingAssetBalance = _yield$getAssetBalanc2[0];
|
|
1583
|
+
preTxOutgoingAssetBalance = _yield$getAssetBalanc2[1];
|
|
1584
|
+
_context.next = 21;
|
|
1585
|
+
return compoundLend({
|
|
1586
|
+
cToken: cToken,
|
|
1587
|
+
cTokenAmount: minIncomingCTokenAmount,
|
|
1588
|
+
compoundAdapter: compoundAdapter,
|
|
1589
|
+
comptrollerProxy: comptrollerProxy,
|
|
1590
|
+
fundOwner: fundOwner,
|
|
1591
|
+
integrationManager: integrationManager,
|
|
1592
|
+
tokenAmount: tokenAmount
|
|
1593
|
+
});
|
|
1594
|
+
|
|
1595
|
+
case 21:
|
|
1596
|
+
lendReceipt = _context.sent;
|
|
1597
|
+
_context.next = 24;
|
|
1598
|
+
return cToken.exchangeRateStored();
|
|
1599
|
+
|
|
1600
|
+
case 24:
|
|
1601
|
+
rate = _context.sent;
|
|
1602
|
+
_context.next = 27;
|
|
1603
|
+
return getAssetBalances({
|
|
1604
|
+
account: vaultProxy,
|
|
1605
|
+
assets: [cToken, token]
|
|
1606
|
+
});
|
|
1607
|
+
|
|
1608
|
+
case 27:
|
|
1609
|
+
_yield$getAssetBalanc3 = _context.sent;
|
|
1610
|
+
_yield$getAssetBalanc4 = _slicedToArray(_yield$getAssetBalanc3, 2);
|
|
1611
|
+
postTxIncomingAssetBalance = _yield$getAssetBalanc4[0];
|
|
1612
|
+
postTxOutgoingAssetBalance = _yield$getAssetBalanc4[1];
|
|
1613
|
+
expectedCTokenAmount = tokenAmount.mul(ethers.utils.parseEther('1')).div(rate);
|
|
1614
|
+
expect(postTxIncomingAssetBalance).toEqBigNumber(preTxIncomingAssetBalance.add(expectedCTokenAmount));
|
|
1615
|
+
expect(postTxOutgoingAssetBalance).toEqBigNumber(preTxOutgoingAssetBalance.sub(tokenAmount));
|
|
1616
|
+
return _context.abrupt("return", lendReceipt);
|
|
1617
|
+
|
|
1618
|
+
case 35:
|
|
1619
|
+
case "end":
|
|
1620
|
+
return _context.stop();
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
}, _callee);
|
|
1624
|
+
}));
|
|
1625
|
+
return _assertCompoundLend.apply(this, arguments);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
function assertCompoundRedeem(_x2) {
|
|
1629
|
+
return _assertCompoundRedeem.apply(this, arguments);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
function _assertCompoundRedeem() {
|
|
1633
|
+
_assertCompoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
|
1634
|
+
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;
|
|
1635
|
+
|
|
1636
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
1637
|
+
while (1) {
|
|
1638
|
+
switch (_context2.prev = _context2.next) {
|
|
1639
|
+
case 0:
|
|
1640
|
+
comptrollerProxy = _ref2.comptrollerProxy, vaultProxy = _ref2.vaultProxy, integrationManager = _ref2.integrationManager, fundOwner = _ref2.fundOwner, compoundAdapter = _ref2.compoundAdapter, cToken = _ref2.cToken, compoundPriceFeed = _ref2.compoundPriceFeed;
|
|
1641
|
+
_context2.t0 = ethers.utils;
|
|
1642
|
+
_context2.next = 4;
|
|
1643
|
+
return cToken.decimals();
|
|
1644
|
+
|
|
1645
|
+
case 4:
|
|
1646
|
+
_context2.t1 = _context2.sent;
|
|
1647
|
+
cTokenAmount = _context2.t0.parseUnits.call(_context2.t0, '1', _context2.t1);
|
|
1648
|
+
_context2.next = 8;
|
|
1649
|
+
return cToken.transfer(vaultProxy, cTokenAmount);
|
|
1650
|
+
|
|
1651
|
+
case 8:
|
|
1652
|
+
_context2.t2 = protocol.StandardToken;
|
|
1653
|
+
_context2.next = 11;
|
|
1654
|
+
return compoundPriceFeed.getTokenFromCToken.args(cToken).call();
|
|
1655
|
+
|
|
1656
|
+
case 11:
|
|
1657
|
+
_context2.t3 = _context2.sent;
|
|
1658
|
+
_context2.t4 = provider;
|
|
1659
|
+
token = new _context2.t2(_context2.t3, _context2.t4);
|
|
1660
|
+
_context2.next = 16;
|
|
1661
|
+
return getAssetBalances({
|
|
1662
|
+
account: vaultProxy,
|
|
1663
|
+
assets: [token, cToken]
|
|
1664
|
+
});
|
|
1665
|
+
|
|
1666
|
+
case 16:
|
|
1667
|
+
_yield$getAssetBalanc5 = _context2.sent;
|
|
1668
|
+
_yield$getAssetBalanc6 = _slicedToArray(_yield$getAssetBalanc5, 2);
|
|
1669
|
+
preTxIncomingAssetBalance = _yield$getAssetBalanc6[0];
|
|
1670
|
+
preTxOutgoingAssetBalance = _yield$getAssetBalanc6[1];
|
|
1671
|
+
_context2.next = 22;
|
|
1672
|
+
return cToken.exchangeRateStored();
|
|
1673
|
+
|
|
1674
|
+
case 22:
|
|
1675
|
+
rateBefore = _context2.sent;
|
|
1676
|
+
minIncomingTokenAmount = cTokenAmount.mul(rateBefore).div(ethers.utils.parseEther('1'));
|
|
1677
|
+
_context2.next = 26;
|
|
1678
|
+
return compoundRedeem({
|
|
1679
|
+
cToken: cToken,
|
|
1680
|
+
cTokenAmount: cTokenAmount,
|
|
1681
|
+
compoundAdapter: compoundAdapter,
|
|
1682
|
+
comptrollerProxy: comptrollerProxy,
|
|
1683
|
+
fundOwner: fundOwner,
|
|
1684
|
+
integrationManager: integrationManager,
|
|
1685
|
+
tokenAmount: minIncomingTokenAmount,
|
|
1686
|
+
vaultProxy: vaultProxy
|
|
1687
|
+
});
|
|
1688
|
+
|
|
1689
|
+
case 26:
|
|
1690
|
+
redeemReceipt = _context2.sent;
|
|
1691
|
+
_context2.next = 29;
|
|
1692
|
+
return getAssetBalances({
|
|
1693
|
+
account: vaultProxy,
|
|
1694
|
+
assets: [token, cToken]
|
|
1695
|
+
});
|
|
1696
|
+
|
|
1697
|
+
case 29:
|
|
1698
|
+
_yield$getAssetBalanc7 = _context2.sent;
|
|
1699
|
+
_yield$getAssetBalanc8 = _slicedToArray(_yield$getAssetBalanc7, 2);
|
|
1700
|
+
postTxIncomingAssetBalance = _yield$getAssetBalanc8[0];
|
|
1701
|
+
postTxOutgoingAssetBalance = _yield$getAssetBalanc8[1];
|
|
1702
|
+
_context2.next = 35;
|
|
1703
|
+
return cToken.exchangeRateStored();
|
|
1704
|
+
|
|
1705
|
+
case 35:
|
|
1706
|
+
rate = _context2.sent;
|
|
1707
|
+
expectedTokenAmount = cTokenAmount.mul(rate).div(ethers.utils.parseEther('1'));
|
|
1708
|
+
expect(postTxIncomingAssetBalance).toEqBigNumber(preTxIncomingAssetBalance.add(expectedTokenAmount));
|
|
1709
|
+
expect(postTxOutgoingAssetBalance).toEqBigNumber(preTxOutgoingAssetBalance.sub(cTokenAmount));
|
|
1710
|
+
return _context2.abrupt("return", redeemReceipt);
|
|
1711
|
+
|
|
1712
|
+
case 40:
|
|
1713
|
+
case "end":
|
|
1714
|
+
return _context2.stop();
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}, _callee2);
|
|
1718
|
+
}));
|
|
1719
|
+
return _assertCompoundRedeem.apply(this, arguments);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
function compoundClaim(_x3) {
|
|
1723
|
+
return _compoundClaim.apply(this, arguments);
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
function _compoundClaim() {
|
|
1727
|
+
_compoundClaim = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
|
1728
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, compoundComptroller, cTokens, claimArgs, callArgs, claimRewardsTx;
|
|
1729
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
1730
|
+
while (1) {
|
|
1731
|
+
switch (_context3.prev = _context3.next) {
|
|
1732
|
+
case 0:
|
|
1733
|
+
comptrollerProxy = _ref3.comptrollerProxy, integrationManager = _ref3.integrationManager, fundOwner = _ref3.fundOwner, compoundAdapter = _ref3.compoundAdapter, compoundComptroller = _ref3.compoundComptroller, cTokens = _ref3.cTokens;
|
|
1734
|
+
claimArgs = protocol.compoundClaimRewardsArgs({
|
|
1735
|
+
cTokens: cTokens,
|
|
1736
|
+
compoundComptroller: compoundComptroller
|
|
1737
|
+
});
|
|
1738
|
+
callArgs = protocol.callOnIntegrationArgs({
|
|
1739
|
+
adapter: compoundAdapter,
|
|
1740
|
+
encodedCallArgs: claimArgs,
|
|
1741
|
+
selector: protocol.claimRewardsSelector
|
|
1742
|
+
});
|
|
1743
|
+
claimRewardsTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
1744
|
+
return _context3.abrupt("return", claimRewardsTx);
|
|
1745
|
+
|
|
1746
|
+
case 5:
|
|
1747
|
+
case "end":
|
|
1748
|
+
return _context3.stop();
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
}, _callee3);
|
|
1752
|
+
}));
|
|
1753
|
+
return _compoundClaim.apply(this, arguments);
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
function compoundLend(_x4) {
|
|
1757
|
+
return _compoundLend.apply(this, arguments);
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
function _compoundLend() {
|
|
1761
|
+
_compoundLend = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee4(_ref4) {
|
|
1762
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken, _ref4$tokenAmount, tokenAmount, _ref4$cTokenAmount, cTokenAmount, lendArgs, callArgs, lendTx;
|
|
1763
|
+
|
|
1764
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee4$(_context4) {
|
|
1765
|
+
while (1) {
|
|
1766
|
+
switch (_context4.prev = _context4.next) {
|
|
1767
|
+
case 0:
|
|
1768
|
+
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;
|
|
1554
1769
|
lendArgs = protocol.compoundArgs({
|
|
1555
1770
|
cToken: cToken,
|
|
1556
1771
|
minIncomingAssetAmount: cTokenAmount,
|
|
@@ -1562,31 +1777,31 @@ function _compoundLend() {
|
|
|
1562
1777
|
selector: protocol.lendSelector
|
|
1563
1778
|
});
|
|
1564
1779
|
lendTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
1565
|
-
return
|
|
1780
|
+
return _context4.abrupt("return", lendTx);
|
|
1566
1781
|
|
|
1567
1782
|
case 5:
|
|
1568
1783
|
case "end":
|
|
1569
|
-
return
|
|
1784
|
+
return _context4.stop();
|
|
1570
1785
|
}
|
|
1571
1786
|
}
|
|
1572
|
-
},
|
|
1787
|
+
}, _callee4);
|
|
1573
1788
|
}));
|
|
1574
1789
|
return _compoundLend.apply(this, arguments);
|
|
1575
1790
|
}
|
|
1576
1791
|
|
|
1577
|
-
function compoundRedeem(
|
|
1792
|
+
function compoundRedeem(_x5) {
|
|
1578
1793
|
return _compoundRedeem.apply(this, arguments);
|
|
1579
1794
|
}
|
|
1580
1795
|
|
|
1581
1796
|
function _compoundRedeem() {
|
|
1582
|
-
_compoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
1583
|
-
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken,
|
|
1797
|
+
_compoundRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(_ref5) {
|
|
1798
|
+
var comptrollerProxy, integrationManager, fundOwner, compoundAdapter, cToken, _ref5$tokenAmount, tokenAmount, _ref5$cTokenAmount, cTokenAmount, redeemArgs, callArgs, redeemTx;
|
|
1584
1799
|
|
|
1585
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
1800
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
|
1586
1801
|
while (1) {
|
|
1587
|
-
switch (
|
|
1802
|
+
switch (_context5.prev = _context5.next) {
|
|
1588
1803
|
case 0:
|
|
1589
|
-
comptrollerProxy =
|
|
1804
|
+
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;
|
|
1590
1805
|
redeemArgs = protocol.compoundArgs({
|
|
1591
1806
|
cToken: ethers$1.resolveAddress(cToken),
|
|
1592
1807
|
minIncomingAssetAmount: tokenAmount,
|
|
@@ -1598,14 +1813,14 @@ function _compoundRedeem() {
|
|
|
1598
1813
|
selector: protocol.redeemSelector
|
|
1599
1814
|
});
|
|
1600
1815
|
redeemTx = comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
1601
|
-
return
|
|
1816
|
+
return _context5.abrupt("return", redeemTx);
|
|
1602
1817
|
|
|
1603
1818
|
case 5:
|
|
1604
1819
|
case "end":
|
|
1605
|
-
return
|
|
1820
|
+
return _context5.stop();
|
|
1606
1821
|
}
|
|
1607
1822
|
}
|
|
1608
|
-
},
|
|
1823
|
+
}, _callee5);
|
|
1609
1824
|
}));
|
|
1610
1825
|
return _compoundRedeem.apply(this, arguments);
|
|
1611
1826
|
}
|
|
@@ -1659,11 +1874,11 @@ function curveClaimRewards(_ref2) {
|
|
|
1659
1874
|
integrationManager = _ref2.integrationManager,
|
|
1660
1875
|
fundOwner = _ref2.fundOwner,
|
|
1661
1876
|
curveLiquidityAdapter = _ref2.curveLiquidityAdapter,
|
|
1662
|
-
|
|
1877
|
+
stakingToken = _ref2.stakingToken;
|
|
1663
1878
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
1664
1879
|
adapter: curveLiquidityAdapter,
|
|
1665
1880
|
encodedCallArgs: protocol.curveClaimRewardsArgs({
|
|
1666
|
-
|
|
1881
|
+
stakingToken: stakingToken
|
|
1667
1882
|
}),
|
|
1668
1883
|
selector: protocol.claimRewardsSelector
|
|
1669
1884
|
});
|
|
@@ -1710,18 +1925,18 @@ function curveLendAndStake(_x3) {
|
|
|
1710
1925
|
|
|
1711
1926
|
function _curveLendAndStake() {
|
|
1712
1927
|
_curveLendAndStake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref4) {
|
|
1713
|
-
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, orderedOutgoingAssetAmounts,
|
|
1928
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, orderedOutgoingAssetAmounts, incomingStakingToken, _ref4$minIncomingStak, minIncomingStakingTokenAmount, useUnderlyings, callArgs;
|
|
1714
1929
|
|
|
1715
1930
|
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
1716
1931
|
while (1) {
|
|
1717
1932
|
switch (_context3.prev = _context3.next) {
|
|
1718
1933
|
case 0:
|
|
1719
|
-
comptrollerProxy = _ref4.comptrollerProxy, integrationManager = _ref4.integrationManager, signer = _ref4.signer, curveLiquidityAdapter = _ref4.curveLiquidityAdapter, pool = _ref4.pool, orderedOutgoingAssetAmounts = _ref4.orderedOutgoingAssetAmounts,
|
|
1934
|
+
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;
|
|
1720
1935
|
callArgs = protocol.callOnIntegrationArgs({
|
|
1721
1936
|
adapter: curveLiquidityAdapter,
|
|
1722
1937
|
encodedCallArgs: protocol.curveLendAndStakeArgs({
|
|
1723
|
-
|
|
1724
|
-
|
|
1938
|
+
incomingStakingToken: incomingStakingToken,
|
|
1939
|
+
minIncomingStakingTokenAmount: minIncomingStakingTokenAmount,
|
|
1725
1940
|
orderedOutgoingAssetAmounts: orderedOutgoingAssetAmounts,
|
|
1726
1941
|
pool: pool,
|
|
1727
1942
|
useUnderlyings: useUnderlyings
|
|
@@ -1781,17 +1996,17 @@ function curveStake(_x5) {
|
|
|
1781
1996
|
|
|
1782
1997
|
function _curveStake() {
|
|
1783
1998
|
_curveStake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee5(_ref6) {
|
|
1784
|
-
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool,
|
|
1999
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, incomingStakingToken, amount, callArgs;
|
|
1785
2000
|
return _regeneratorRuntime__default['default'].wrap(function _callee5$(_context5) {
|
|
1786
2001
|
while (1) {
|
|
1787
2002
|
switch (_context5.prev = _context5.next) {
|
|
1788
2003
|
case 0:
|
|
1789
|
-
comptrollerProxy = _ref6.comptrollerProxy, integrationManager = _ref6.integrationManager, signer = _ref6.signer, curveLiquidityAdapter = _ref6.curveLiquidityAdapter, pool = _ref6.pool,
|
|
2004
|
+
comptrollerProxy = _ref6.comptrollerProxy, integrationManager = _ref6.integrationManager, signer = _ref6.signer, curveLiquidityAdapter = _ref6.curveLiquidityAdapter, pool = _ref6.pool, incomingStakingToken = _ref6.incomingStakingToken, amount = _ref6.amount;
|
|
1790
2005
|
callArgs = protocol.callOnIntegrationArgs({
|
|
1791
2006
|
adapter: curveLiquidityAdapter,
|
|
1792
2007
|
encodedCallArgs: protocol.curveStakeArgs({
|
|
1793
2008
|
amount: amount,
|
|
1794
|
-
|
|
2009
|
+
incomingStakingToken: incomingStakingToken,
|
|
1795
2010
|
pool: pool
|
|
1796
2011
|
}),
|
|
1797
2012
|
selector: protocol.stakeSelector
|
|
@@ -1814,17 +2029,17 @@ function curveUnstake(_x6) {
|
|
|
1814
2029
|
|
|
1815
2030
|
function _curveUnstake() {
|
|
1816
2031
|
_curveUnstake = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee6(_ref7) {
|
|
1817
|
-
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool,
|
|
2032
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, outgoingStakingToken, amount, callArgs;
|
|
1818
2033
|
return _regeneratorRuntime__default['default'].wrap(function _callee6$(_context6) {
|
|
1819
2034
|
while (1) {
|
|
1820
2035
|
switch (_context6.prev = _context6.next) {
|
|
1821
2036
|
case 0:
|
|
1822
|
-
comptrollerProxy = _ref7.comptrollerProxy, integrationManager = _ref7.integrationManager, signer = _ref7.signer, curveLiquidityAdapter = _ref7.curveLiquidityAdapter, pool = _ref7.pool,
|
|
2037
|
+
comptrollerProxy = _ref7.comptrollerProxy, integrationManager = _ref7.integrationManager, signer = _ref7.signer, curveLiquidityAdapter = _ref7.curveLiquidityAdapter, pool = _ref7.pool, outgoingStakingToken = _ref7.outgoingStakingToken, amount = _ref7.amount;
|
|
1823
2038
|
callArgs = protocol.callOnIntegrationArgs({
|
|
1824
2039
|
adapter: curveLiquidityAdapter,
|
|
1825
2040
|
encodedCallArgs: protocol.curveUnstakeArgs({
|
|
1826
2041
|
amount: amount,
|
|
1827
|
-
|
|
2042
|
+
outgoingStakingToken: outgoingStakingToken,
|
|
1828
2043
|
pool: pool
|
|
1829
2044
|
}),
|
|
1830
2045
|
selector: protocol.unstakeSelector
|
|
@@ -1847,18 +2062,18 @@ function curveUnstakeAndRedeem(_x7) {
|
|
|
1847
2062
|
|
|
1848
2063
|
function _curveUnstakeAndRedeem() {
|
|
1849
2064
|
_curveUnstakeAndRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee7(_ref8) {
|
|
1850
|
-
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool,
|
|
2065
|
+
var comptrollerProxy, integrationManager, signer, curveLiquidityAdapter, pool, outgoingStakingToken, outgoingStakingTokenAmount, useUnderlyings, redeemType, incomingAssetData, callArgs;
|
|
1851
2066
|
return _regeneratorRuntime__default['default'].wrap(function _callee7$(_context7) {
|
|
1852
2067
|
while (1) {
|
|
1853
2068
|
switch (_context7.prev = _context7.next) {
|
|
1854
2069
|
case 0:
|
|
1855
|
-
comptrollerProxy = _ref8.comptrollerProxy, integrationManager = _ref8.integrationManager, signer = _ref8.signer, curveLiquidityAdapter = _ref8.curveLiquidityAdapter, pool = _ref8.pool,
|
|
2070
|
+
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;
|
|
1856
2071
|
callArgs = protocol.callOnIntegrationArgs({
|
|
1857
2072
|
adapter: curveLiquidityAdapter,
|
|
1858
2073
|
encodedCallArgs: protocol.curveUnstakeAndRedeemArgs({
|
|
1859
2074
|
incomingAssetData: incomingAssetData,
|
|
1860
|
-
|
|
1861
|
-
|
|
2075
|
+
outgoingStakingToken: outgoingStakingToken,
|
|
2076
|
+
outgoingStakingTokenAmount: outgoingStakingTokenAmount,
|
|
1862
2077
|
pool: pool,
|
|
1863
2078
|
redeemType: redeemType,
|
|
1864
2079
|
useUnderlyings: useUnderlyings
|
|
@@ -2034,72 +2249,72 @@ function curveAaveUnstake(_ref15) {
|
|
|
2034
2249
|
selector: protocol.unstakeSelector
|
|
2035
2250
|
});
|
|
2036
2251
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2037
|
-
} //
|
|
2252
|
+
} // sETH pool
|
|
2038
2253
|
|
|
2039
|
-
function
|
|
2254
|
+
function curveSethClaimRewards(_ref16) {
|
|
2040
2255
|
var comptrollerProxy = _ref16.comptrollerProxy,
|
|
2041
2256
|
integrationManager = _ref16.integrationManager,
|
|
2042
2257
|
fundOwner = _ref16.fundOwner,
|
|
2043
|
-
|
|
2258
|
+
curveLiquiditySethAdapter = _ref16.curveLiquiditySethAdapter;
|
|
2044
2259
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2045
|
-
adapter:
|
|
2260
|
+
adapter: curveLiquiditySethAdapter,
|
|
2046
2261
|
encodedCallArgs: ethers.constants.HashZero,
|
|
2047
2262
|
selector: protocol.claimRewardsSelector
|
|
2048
2263
|
});
|
|
2049
2264
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2050
2265
|
}
|
|
2051
|
-
function
|
|
2266
|
+
function curveSethLend(_ref17) {
|
|
2052
2267
|
var comptrollerProxy = _ref17.comptrollerProxy,
|
|
2053
2268
|
integrationManager = _ref17.integrationManager,
|
|
2054
2269
|
fundOwner = _ref17.fundOwner,
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2270
|
+
curveLiquiditySethAdapter = _ref17.curveLiquiditySethAdapter,
|
|
2271
|
+
outgoingWethAmount = _ref17.outgoingWethAmount,
|
|
2272
|
+
outgoingSethAmount = _ref17.outgoingSethAmount,
|
|
2058
2273
|
minIncomingLPTokenAmount = _ref17.minIncomingLPTokenAmount;
|
|
2059
2274
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2060
|
-
adapter:
|
|
2061
|
-
encodedCallArgs: protocol.
|
|
2275
|
+
adapter: curveLiquiditySethAdapter,
|
|
2276
|
+
encodedCallArgs: protocol.curveSethLendArgs({
|
|
2062
2277
|
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
|
2063
|
-
|
|
2064
|
-
|
|
2278
|
+
outgoingSethAmount: outgoingSethAmount,
|
|
2279
|
+
outgoingWethAmount: outgoingWethAmount
|
|
2065
2280
|
}),
|
|
2066
2281
|
selector: protocol.lendSelector
|
|
2067
2282
|
});
|
|
2068
2283
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2069
2284
|
}
|
|
2070
|
-
function
|
|
2285
|
+
function curveSethLendAndStake(_ref18) {
|
|
2071
2286
|
var comptrollerProxy = _ref18.comptrollerProxy,
|
|
2072
2287
|
integrationManager = _ref18.integrationManager,
|
|
2073
2288
|
fundOwner = _ref18.fundOwner,
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2289
|
+
curveLiquiditySethAdapter = _ref18.curveLiquiditySethAdapter,
|
|
2290
|
+
outgoingWethAmount = _ref18.outgoingWethAmount,
|
|
2291
|
+
outgoingSethAmount = _ref18.outgoingSethAmount,
|
|
2077
2292
|
minIncomingLiquidityGaugeTokenAmount = _ref18.minIncomingLiquidityGaugeTokenAmount;
|
|
2078
2293
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2079
|
-
adapter:
|
|
2080
|
-
encodedCallArgs: protocol.
|
|
2294
|
+
adapter: curveLiquiditySethAdapter,
|
|
2295
|
+
encodedCallArgs: protocol.curveSethLendAndStakeArgs({
|
|
2081
2296
|
minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
|
|
2082
|
-
|
|
2083
|
-
|
|
2297
|
+
outgoingSethAmount: outgoingSethAmount,
|
|
2298
|
+
outgoingWethAmount: outgoingWethAmount
|
|
2084
2299
|
}),
|
|
2085
2300
|
selector: protocol.lendAndStakeSelector
|
|
2086
2301
|
});
|
|
2087
2302
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2088
2303
|
}
|
|
2089
|
-
function
|
|
2304
|
+
function curveSethRedeem(_ref19) {
|
|
2090
2305
|
var comptrollerProxy = _ref19.comptrollerProxy,
|
|
2091
2306
|
integrationManager = _ref19.integrationManager,
|
|
2092
2307
|
fundOwner = _ref19.fundOwner,
|
|
2093
|
-
|
|
2308
|
+
curveLiquiditySethAdapter = _ref19.curveLiquiditySethAdapter,
|
|
2094
2309
|
outgoingLPTokenAmount = _ref19.outgoingLPTokenAmount,
|
|
2095
|
-
|
|
2096
|
-
|
|
2310
|
+
minIncomingWethAmount = _ref19.minIncomingWethAmount,
|
|
2311
|
+
minIncomingSethAmount = _ref19.minIncomingSethAmount,
|
|
2097
2312
|
receiveSingleAsset = _ref19.receiveSingleAsset;
|
|
2098
2313
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2099
|
-
adapter:
|
|
2100
|
-
encodedCallArgs: protocol.
|
|
2101
|
-
|
|
2102
|
-
|
|
2314
|
+
adapter: curveLiquiditySethAdapter,
|
|
2315
|
+
encodedCallArgs: protocol.curveSethRedeemArgs({
|
|
2316
|
+
minIncomingSethAmount: minIncomingSethAmount,
|
|
2317
|
+
minIncomingWethAmount: minIncomingWethAmount,
|
|
2103
2318
|
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
|
2104
2319
|
receiveSingleAsset: receiveSingleAsset
|
|
2105
2320
|
}),
|
|
@@ -2107,35 +2322,35 @@ function curveEursRedeem(_ref19) {
|
|
|
2107
2322
|
});
|
|
2108
2323
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2109
2324
|
}
|
|
2110
|
-
function
|
|
2325
|
+
function curveSethStake(_ref20) {
|
|
2111
2326
|
var comptrollerProxy = _ref20.comptrollerProxy,
|
|
2112
2327
|
integrationManager = _ref20.integrationManager,
|
|
2113
2328
|
fundOwner = _ref20.fundOwner,
|
|
2114
|
-
|
|
2329
|
+
curveLiquiditySethAdapter = _ref20.curveLiquiditySethAdapter,
|
|
2115
2330
|
outgoingLPTokenAmount = _ref20.outgoingLPTokenAmount;
|
|
2116
2331
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2117
|
-
adapter:
|
|
2118
|
-
encodedCallArgs: protocol.
|
|
2332
|
+
adapter: curveLiquiditySethAdapter,
|
|
2333
|
+
encodedCallArgs: protocol.curveSethStakeArgs({
|
|
2119
2334
|
outgoingLPTokenAmount: outgoingLPTokenAmount
|
|
2120
2335
|
}),
|
|
2121
2336
|
selector: protocol.stakeSelector
|
|
2122
2337
|
});
|
|
2123
2338
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2124
2339
|
}
|
|
2125
|
-
function
|
|
2340
|
+
function curveSethUnstakeAndRedeem(_ref21) {
|
|
2126
2341
|
var comptrollerProxy = _ref21.comptrollerProxy,
|
|
2127
2342
|
integrationManager = _ref21.integrationManager,
|
|
2128
2343
|
fundOwner = _ref21.fundOwner,
|
|
2129
|
-
|
|
2344
|
+
curveLiquiditySethAdapter = _ref21.curveLiquiditySethAdapter,
|
|
2130
2345
|
outgoingLiquidityGaugeTokenAmount = _ref21.outgoingLiquidityGaugeTokenAmount,
|
|
2131
|
-
|
|
2132
|
-
|
|
2346
|
+
minIncomingWethAmount = _ref21.minIncomingWethAmount,
|
|
2347
|
+
minIncomingSethAmount = _ref21.minIncomingSethAmount,
|
|
2133
2348
|
receiveSingleAsset = _ref21.receiveSingleAsset;
|
|
2134
2349
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2135
|
-
adapter:
|
|
2136
|
-
encodedCallArgs: protocol.
|
|
2137
|
-
|
|
2138
|
-
|
|
2350
|
+
adapter: curveLiquiditySethAdapter,
|
|
2351
|
+
encodedCallArgs: protocol.curveSethUnstakeAndRedeemArgs({
|
|
2352
|
+
minIncomingSethAmount: minIncomingSethAmount,
|
|
2353
|
+
minIncomingWethAmount: minIncomingWethAmount,
|
|
2139
2354
|
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
|
2140
2355
|
receiveSingleAsset: receiveSingleAsset
|
|
2141
2356
|
}),
|
|
@@ -2143,85 +2358,85 @@ function curveEursUnstakeAndRedeem(_ref21) {
|
|
|
2143
2358
|
});
|
|
2144
2359
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2145
2360
|
}
|
|
2146
|
-
function
|
|
2361
|
+
function curveSethUnstake(_ref22) {
|
|
2147
2362
|
var comptrollerProxy = _ref22.comptrollerProxy,
|
|
2148
2363
|
integrationManager = _ref22.integrationManager,
|
|
2149
2364
|
fundOwner = _ref22.fundOwner,
|
|
2150
|
-
|
|
2365
|
+
curveLiquiditySethAdapter = _ref22.curveLiquiditySethAdapter,
|
|
2151
2366
|
outgoingLiquidityGaugeTokenAmount = _ref22.outgoingLiquidityGaugeTokenAmount;
|
|
2152
2367
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2153
|
-
adapter:
|
|
2154
|
-
encodedCallArgs: protocol.
|
|
2368
|
+
adapter: curveLiquiditySethAdapter,
|
|
2369
|
+
encodedCallArgs: protocol.curveSethUnstakeArgs({
|
|
2155
2370
|
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
|
|
2156
2371
|
}),
|
|
2157
2372
|
selector: protocol.unstakeSelector
|
|
2158
2373
|
});
|
|
2159
2374
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2160
|
-
} //
|
|
2375
|
+
} // stETH pool
|
|
2161
2376
|
|
|
2162
|
-
function
|
|
2377
|
+
function curveStethClaimRewards(_ref23) {
|
|
2163
2378
|
var comptrollerProxy = _ref23.comptrollerProxy,
|
|
2164
2379
|
integrationManager = _ref23.integrationManager,
|
|
2165
2380
|
fundOwner = _ref23.fundOwner,
|
|
2166
|
-
|
|
2381
|
+
curveLiquidityStethAdapter = _ref23.curveLiquidityStethAdapter;
|
|
2167
2382
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2168
|
-
adapter:
|
|
2383
|
+
adapter: curveLiquidityStethAdapter,
|
|
2169
2384
|
encodedCallArgs: ethers.constants.HashZero,
|
|
2170
2385
|
selector: protocol.claimRewardsSelector
|
|
2171
2386
|
});
|
|
2172
2387
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2173
2388
|
}
|
|
2174
|
-
function
|
|
2389
|
+
function curveStethLend(_ref24) {
|
|
2175
2390
|
var comptrollerProxy = _ref24.comptrollerProxy,
|
|
2176
2391
|
integrationManager = _ref24.integrationManager,
|
|
2177
2392
|
fundOwner = _ref24.fundOwner,
|
|
2178
|
-
|
|
2393
|
+
curveLiquidityStethAdapter = _ref24.curveLiquidityStethAdapter,
|
|
2179
2394
|
outgoingWethAmount = _ref24.outgoingWethAmount,
|
|
2180
|
-
|
|
2395
|
+
outgoingStethAmount = _ref24.outgoingStethAmount,
|
|
2181
2396
|
minIncomingLPTokenAmount = _ref24.minIncomingLPTokenAmount;
|
|
2182
2397
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2183
|
-
adapter:
|
|
2184
|
-
encodedCallArgs: protocol.
|
|
2398
|
+
adapter: curveLiquidityStethAdapter,
|
|
2399
|
+
encodedCallArgs: protocol.curveStethLendArgs({
|
|
2185
2400
|
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
|
2186
|
-
|
|
2401
|
+
outgoingStethAmount: outgoingStethAmount,
|
|
2187
2402
|
outgoingWethAmount: outgoingWethAmount
|
|
2188
2403
|
}),
|
|
2189
2404
|
selector: protocol.lendSelector
|
|
2190
2405
|
});
|
|
2191
2406
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2192
2407
|
}
|
|
2193
|
-
function
|
|
2408
|
+
function curveStethLendAndStake(_ref25) {
|
|
2194
2409
|
var comptrollerProxy = _ref25.comptrollerProxy,
|
|
2195
2410
|
integrationManager = _ref25.integrationManager,
|
|
2196
2411
|
fundOwner = _ref25.fundOwner,
|
|
2197
|
-
|
|
2412
|
+
curveLiquidityStethAdapter = _ref25.curveLiquidityStethAdapter,
|
|
2198
2413
|
outgoingWethAmount = _ref25.outgoingWethAmount,
|
|
2199
|
-
|
|
2414
|
+
outgoingStethAmount = _ref25.outgoingStethAmount,
|
|
2200
2415
|
minIncomingLiquidityGaugeTokenAmount = _ref25.minIncomingLiquidityGaugeTokenAmount;
|
|
2201
2416
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2202
|
-
adapter:
|
|
2203
|
-
encodedCallArgs: protocol.
|
|
2417
|
+
adapter: curveLiquidityStethAdapter,
|
|
2418
|
+
encodedCallArgs: protocol.curveStethLendAndStakeArgs({
|
|
2204
2419
|
minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
|
|
2205
|
-
|
|
2420
|
+
outgoingStethAmount: outgoingStethAmount,
|
|
2206
2421
|
outgoingWethAmount: outgoingWethAmount
|
|
2207
2422
|
}),
|
|
2208
2423
|
selector: protocol.lendAndStakeSelector
|
|
2209
2424
|
});
|
|
2210
2425
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2211
2426
|
}
|
|
2212
|
-
function
|
|
2427
|
+
function curveStethRedeem(_ref26) {
|
|
2213
2428
|
var comptrollerProxy = _ref26.comptrollerProxy,
|
|
2214
2429
|
integrationManager = _ref26.integrationManager,
|
|
2215
2430
|
fundOwner = _ref26.fundOwner,
|
|
2216
|
-
|
|
2431
|
+
curveLiquidityStethAdapter = _ref26.curveLiquidityStethAdapter,
|
|
2217
2432
|
outgoingLPTokenAmount = _ref26.outgoingLPTokenAmount,
|
|
2218
2433
|
minIncomingWethAmount = _ref26.minIncomingWethAmount,
|
|
2219
|
-
|
|
2434
|
+
minIncomingStethAmount = _ref26.minIncomingStethAmount,
|
|
2220
2435
|
receiveSingleAsset = _ref26.receiveSingleAsset;
|
|
2221
2436
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2222
|
-
adapter:
|
|
2223
|
-
encodedCallArgs: protocol.
|
|
2224
|
-
|
|
2437
|
+
adapter: curveLiquidityStethAdapter,
|
|
2438
|
+
encodedCallArgs: protocol.curveStethRedeemArgs({
|
|
2439
|
+
minIncomingStethAmount: minIncomingStethAmount,
|
|
2225
2440
|
minIncomingWethAmount: minIncomingWethAmount,
|
|
2226
2441
|
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
|
2227
2442
|
receiveSingleAsset: receiveSingleAsset
|
|
@@ -2230,34 +2445,34 @@ function curveSethRedeem(_ref26) {
|
|
|
2230
2445
|
});
|
|
2231
2446
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2232
2447
|
}
|
|
2233
|
-
function
|
|
2448
|
+
function curveStethStake(_ref27) {
|
|
2234
2449
|
var comptrollerProxy = _ref27.comptrollerProxy,
|
|
2235
2450
|
integrationManager = _ref27.integrationManager,
|
|
2236
2451
|
fundOwner = _ref27.fundOwner,
|
|
2237
|
-
|
|
2452
|
+
curveLiquidityStethAdapter = _ref27.curveLiquidityStethAdapter,
|
|
2238
2453
|
outgoingLPTokenAmount = _ref27.outgoingLPTokenAmount;
|
|
2239
2454
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2240
|
-
adapter:
|
|
2241
|
-
encodedCallArgs: protocol.
|
|
2455
|
+
adapter: curveLiquidityStethAdapter,
|
|
2456
|
+
encodedCallArgs: protocol.curveStethStakeArgs({
|
|
2242
2457
|
outgoingLPTokenAmount: outgoingLPTokenAmount
|
|
2243
2458
|
}),
|
|
2244
2459
|
selector: protocol.stakeSelector
|
|
2245
2460
|
});
|
|
2246
2461
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2247
2462
|
}
|
|
2248
|
-
function
|
|
2463
|
+
function curveStethUnstakeAndRedeem(_ref28) {
|
|
2249
2464
|
var comptrollerProxy = _ref28.comptrollerProxy,
|
|
2250
2465
|
integrationManager = _ref28.integrationManager,
|
|
2251
2466
|
fundOwner = _ref28.fundOwner,
|
|
2252
|
-
|
|
2467
|
+
curveLiquidityStethAdapter = _ref28.curveLiquidityStethAdapter,
|
|
2253
2468
|
outgoingLiquidityGaugeTokenAmount = _ref28.outgoingLiquidityGaugeTokenAmount,
|
|
2254
2469
|
minIncomingWethAmount = _ref28.minIncomingWethAmount,
|
|
2255
|
-
|
|
2470
|
+
minIncomingStethAmount = _ref28.minIncomingStethAmount,
|
|
2256
2471
|
receiveSingleAsset = _ref28.receiveSingleAsset;
|
|
2257
2472
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2258
|
-
adapter:
|
|
2259
|
-
encodedCallArgs: protocol.
|
|
2260
|
-
|
|
2473
|
+
adapter: curveLiquidityStethAdapter,
|
|
2474
|
+
encodedCallArgs: protocol.curveStethUnstakeAndRedeemArgs({
|
|
2475
|
+
minIncomingStethAmount: minIncomingStethAmount,
|
|
2261
2476
|
minIncomingWethAmount: minIncomingWethAmount,
|
|
2262
2477
|
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
|
2263
2478
|
receiveSingleAsset: receiveSingleAsset
|
|
@@ -2266,135 +2481,12 @@ function curveSethUnstakeAndRedeem(_ref28) {
|
|
|
2266
2481
|
});
|
|
2267
2482
|
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2268
2483
|
}
|
|
2269
|
-
function
|
|
2484
|
+
function curveStethUnstake(_ref29) {
|
|
2270
2485
|
var comptrollerProxy = _ref29.comptrollerProxy,
|
|
2271
2486
|
integrationManager = _ref29.integrationManager,
|
|
2272
2487
|
fundOwner = _ref29.fundOwner,
|
|
2273
|
-
|
|
2488
|
+
curveLiquidityStethAdapter = _ref29.curveLiquidityStethAdapter,
|
|
2274
2489
|
outgoingLiquidityGaugeTokenAmount = _ref29.outgoingLiquidityGaugeTokenAmount;
|
|
2275
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2276
|
-
adapter: curveLiquiditySethAdapter,
|
|
2277
|
-
encodedCallArgs: protocol.curveSethUnstakeArgs({
|
|
2278
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount
|
|
2279
|
-
}),
|
|
2280
|
-
selector: protocol.unstakeSelector
|
|
2281
|
-
});
|
|
2282
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2283
|
-
} // stETH pool
|
|
2284
|
-
|
|
2285
|
-
function curveStethClaimRewards(_ref30) {
|
|
2286
|
-
var comptrollerProxy = _ref30.comptrollerProxy,
|
|
2287
|
-
integrationManager = _ref30.integrationManager,
|
|
2288
|
-
fundOwner = _ref30.fundOwner,
|
|
2289
|
-
curveLiquidityStethAdapter = _ref30.curveLiquidityStethAdapter;
|
|
2290
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2291
|
-
adapter: curveLiquidityStethAdapter,
|
|
2292
|
-
encodedCallArgs: ethers.constants.HashZero,
|
|
2293
|
-
selector: protocol.claimRewardsSelector
|
|
2294
|
-
});
|
|
2295
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2296
|
-
}
|
|
2297
|
-
function curveStethLend(_ref31) {
|
|
2298
|
-
var comptrollerProxy = _ref31.comptrollerProxy,
|
|
2299
|
-
integrationManager = _ref31.integrationManager,
|
|
2300
|
-
fundOwner = _ref31.fundOwner,
|
|
2301
|
-
curveLiquidityStethAdapter = _ref31.curveLiquidityStethAdapter,
|
|
2302
|
-
outgoingWethAmount = _ref31.outgoingWethAmount,
|
|
2303
|
-
outgoingStethAmount = _ref31.outgoingStethAmount,
|
|
2304
|
-
minIncomingLPTokenAmount = _ref31.minIncomingLPTokenAmount;
|
|
2305
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2306
|
-
adapter: curveLiquidityStethAdapter,
|
|
2307
|
-
encodedCallArgs: protocol.curveStethLendArgs({
|
|
2308
|
-
minIncomingLPTokenAmount: minIncomingLPTokenAmount,
|
|
2309
|
-
outgoingStethAmount: outgoingStethAmount,
|
|
2310
|
-
outgoingWethAmount: outgoingWethAmount
|
|
2311
|
-
}),
|
|
2312
|
-
selector: protocol.lendSelector
|
|
2313
|
-
});
|
|
2314
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2315
|
-
}
|
|
2316
|
-
function curveStethLendAndStake(_ref32) {
|
|
2317
|
-
var comptrollerProxy = _ref32.comptrollerProxy,
|
|
2318
|
-
integrationManager = _ref32.integrationManager,
|
|
2319
|
-
fundOwner = _ref32.fundOwner,
|
|
2320
|
-
curveLiquidityStethAdapter = _ref32.curveLiquidityStethAdapter,
|
|
2321
|
-
outgoingWethAmount = _ref32.outgoingWethAmount,
|
|
2322
|
-
outgoingStethAmount = _ref32.outgoingStethAmount,
|
|
2323
|
-
minIncomingLiquidityGaugeTokenAmount = _ref32.minIncomingLiquidityGaugeTokenAmount;
|
|
2324
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2325
|
-
adapter: curveLiquidityStethAdapter,
|
|
2326
|
-
encodedCallArgs: protocol.curveStethLendAndStakeArgs({
|
|
2327
|
-
minIncomingLiquidityGaugeTokenAmount: minIncomingLiquidityGaugeTokenAmount,
|
|
2328
|
-
outgoingStethAmount: outgoingStethAmount,
|
|
2329
|
-
outgoingWethAmount: outgoingWethAmount
|
|
2330
|
-
}),
|
|
2331
|
-
selector: protocol.lendAndStakeSelector
|
|
2332
|
-
});
|
|
2333
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2334
|
-
}
|
|
2335
|
-
function curveStethRedeem(_ref33) {
|
|
2336
|
-
var comptrollerProxy = _ref33.comptrollerProxy,
|
|
2337
|
-
integrationManager = _ref33.integrationManager,
|
|
2338
|
-
fundOwner = _ref33.fundOwner,
|
|
2339
|
-
curveLiquidityStethAdapter = _ref33.curveLiquidityStethAdapter,
|
|
2340
|
-
outgoingLPTokenAmount = _ref33.outgoingLPTokenAmount,
|
|
2341
|
-
minIncomingWethAmount = _ref33.minIncomingWethAmount,
|
|
2342
|
-
minIncomingStethAmount = _ref33.minIncomingStethAmount,
|
|
2343
|
-
receiveSingleAsset = _ref33.receiveSingleAsset;
|
|
2344
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2345
|
-
adapter: curveLiquidityStethAdapter,
|
|
2346
|
-
encodedCallArgs: protocol.curveStethRedeemArgs({
|
|
2347
|
-
minIncomingStethAmount: minIncomingStethAmount,
|
|
2348
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
|
2349
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount,
|
|
2350
|
-
receiveSingleAsset: receiveSingleAsset
|
|
2351
|
-
}),
|
|
2352
|
-
selector: protocol.redeemSelector
|
|
2353
|
-
});
|
|
2354
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2355
|
-
}
|
|
2356
|
-
function curveStethStake(_ref34) {
|
|
2357
|
-
var comptrollerProxy = _ref34.comptrollerProxy,
|
|
2358
|
-
integrationManager = _ref34.integrationManager,
|
|
2359
|
-
fundOwner = _ref34.fundOwner,
|
|
2360
|
-
curveLiquidityStethAdapter = _ref34.curveLiquidityStethAdapter,
|
|
2361
|
-
outgoingLPTokenAmount = _ref34.outgoingLPTokenAmount;
|
|
2362
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2363
|
-
adapter: curveLiquidityStethAdapter,
|
|
2364
|
-
encodedCallArgs: protocol.curveStethStakeArgs({
|
|
2365
|
-
outgoingLPTokenAmount: outgoingLPTokenAmount
|
|
2366
|
-
}),
|
|
2367
|
-
selector: protocol.stakeSelector
|
|
2368
|
-
});
|
|
2369
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2370
|
-
}
|
|
2371
|
-
function curveStethUnstakeAndRedeem(_ref35) {
|
|
2372
|
-
var comptrollerProxy = _ref35.comptrollerProxy,
|
|
2373
|
-
integrationManager = _ref35.integrationManager,
|
|
2374
|
-
fundOwner = _ref35.fundOwner,
|
|
2375
|
-
curveLiquidityStethAdapter = _ref35.curveLiquidityStethAdapter,
|
|
2376
|
-
outgoingLiquidityGaugeTokenAmount = _ref35.outgoingLiquidityGaugeTokenAmount,
|
|
2377
|
-
minIncomingWethAmount = _ref35.minIncomingWethAmount,
|
|
2378
|
-
minIncomingStethAmount = _ref35.minIncomingStethAmount,
|
|
2379
|
-
receiveSingleAsset = _ref35.receiveSingleAsset;
|
|
2380
|
-
var callArgs = protocol.callOnIntegrationArgs({
|
|
2381
|
-
adapter: curveLiquidityStethAdapter,
|
|
2382
|
-
encodedCallArgs: protocol.curveStethUnstakeAndRedeemArgs({
|
|
2383
|
-
minIncomingStethAmount: minIncomingStethAmount,
|
|
2384
|
-
minIncomingWethAmount: minIncomingWethAmount,
|
|
2385
|
-
outgoingLiquidityGaugeTokenAmount: outgoingLiquidityGaugeTokenAmount,
|
|
2386
|
-
receiveSingleAsset: receiveSingleAsset
|
|
2387
|
-
}),
|
|
2388
|
-
selector: protocol.unstakeAndRedeemSelector
|
|
2389
|
-
});
|
|
2390
|
-
return comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs);
|
|
2391
|
-
}
|
|
2392
|
-
function curveStethUnstake(_ref36) {
|
|
2393
|
-
var comptrollerProxy = _ref36.comptrollerProxy,
|
|
2394
|
-
integrationManager = _ref36.integrationManager,
|
|
2395
|
-
fundOwner = _ref36.fundOwner,
|
|
2396
|
-
curveLiquidityStethAdapter = _ref36.curveLiquidityStethAdapter,
|
|
2397
|
-
outgoingLiquidityGaugeTokenAmount = _ref36.outgoingLiquidityGaugeTokenAmount;
|
|
2398
2490
|
var callArgs = protocol.callOnIntegrationArgs({
|
|
2399
2491
|
adapter: curveLiquidityStethAdapter,
|
|
2400
2492
|
encodedCallArgs: protocol.curveStethUnstakeArgs({
|
|
@@ -2866,24 +2958,16 @@ function synthetixAssignExchangeDelegate(_x) {
|
|
|
2866
2958
|
|
|
2867
2959
|
function _synthetixAssignExchangeDelegate() {
|
|
2868
2960
|
_synthetixAssignExchangeDelegate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee(_ref) {
|
|
2869
|
-
var comptrollerProxy,
|
|
2961
|
+
var comptrollerProxy, synthetixDelegateApprovals, fundOwner, delegate;
|
|
2870
2962
|
return _regeneratorRuntime__default['default'].wrap(function _callee$(_context) {
|
|
2871
2963
|
while (1) {
|
|
2872
2964
|
switch (_context.prev = _context.next) {
|
|
2873
2965
|
case 0:
|
|
2874
|
-
comptrollerProxy = _ref.comptrollerProxy,
|
|
2966
|
+
comptrollerProxy = _ref.comptrollerProxy, synthetixDelegateApprovals = _ref.synthetixDelegateApprovals, fundOwner = _ref.fundOwner, delegate = _ref.delegate;
|
|
2875
2967
|
_context.next = 3;
|
|
2876
|
-
return
|
|
2877
|
-
addressResolver: addressResolver,
|
|
2878
|
-
name: 'DelegateApprovals'
|
|
2879
|
-
});
|
|
2968
|
+
return comptrollerProxy.connect(fundOwner).vaultCallOnContract(synthetixDelegateApprovals, protocol.synthetixAssignExchangeDelegateSelector, protocol.encodeArgs(['address'], [delegate]));
|
|
2880
2969
|
|
|
2881
2970
|
case 3:
|
|
2882
|
-
delegateApprovals = _context.sent;
|
|
2883
|
-
_context.next = 6;
|
|
2884
|
-
return comptrollerProxy.connect(fundOwner).vaultCallOnContract(delegateApprovals, protocol.synthetixAssignExchangeDelegateSelector, protocol.encodeArgs(['address'], [delegate]));
|
|
2885
|
-
|
|
2886
|
-
case 6:
|
|
2887
2971
|
case "end":
|
|
2888
2972
|
return _context.stop();
|
|
2889
2973
|
}
|
|
@@ -2893,42 +2977,18 @@ function _synthetixAssignExchangeDelegate() {
|
|
|
2893
2977
|
return _synthetixAssignExchangeDelegate.apply(this, arguments);
|
|
2894
2978
|
}
|
|
2895
2979
|
|
|
2896
|
-
function
|
|
2897
|
-
return _synthetixResolveAddress.apply(this, arguments);
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
function _synthetixResolveAddress() {
|
|
2901
|
-
_synthetixResolveAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
|
2902
|
-
var addressResolver, name;
|
|
2903
|
-
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
2904
|
-
while (1) {
|
|
2905
|
-
switch (_context2.prev = _context2.next) {
|
|
2906
|
-
case 0:
|
|
2907
|
-
addressResolver = _ref2.addressResolver, name = _ref2.name;
|
|
2908
|
-
return _context2.abrupt("return", addressResolver.requireAndGetAddress(ethers.utils.formatBytes32String(name), "Missing ".concat(name)));
|
|
2909
|
-
|
|
2910
|
-
case 2:
|
|
2911
|
-
case "end":
|
|
2912
|
-
return _context2.stop();
|
|
2913
|
-
}
|
|
2914
|
-
}
|
|
2915
|
-
}, _callee2);
|
|
2916
|
-
}));
|
|
2917
|
-
return _synthetixResolveAddress.apply(this, arguments);
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
function synthetixRedeem(_x3) {
|
|
2980
|
+
function synthetixRedeem(_x2) {
|
|
2921
2981
|
return _synthetixRedeem.apply(this, arguments);
|
|
2922
2982
|
}
|
|
2923
2983
|
|
|
2924
2984
|
function _synthetixRedeem() {
|
|
2925
|
-
_synthetixRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2985
|
+
_synthetixRedeem = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee2(_ref2) {
|
|
2926
2986
|
var comptrollerProxy, integrationManager, signer, synthetixAdapter, synths, redeemArgs, callArgs;
|
|
2927
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
2987
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee2$(_context2) {
|
|
2928
2988
|
while (1) {
|
|
2929
|
-
switch (
|
|
2989
|
+
switch (_context2.prev = _context2.next) {
|
|
2930
2990
|
case 0:
|
|
2931
|
-
comptrollerProxy =
|
|
2991
|
+
comptrollerProxy = _ref2.comptrollerProxy, integrationManager = _ref2.integrationManager, signer = _ref2.signer, synthetixAdapter = _ref2.synthetixAdapter, synths = _ref2.synths;
|
|
2932
2992
|
redeemArgs = protocol.synthetixRedeemArgs({
|
|
2933
2993
|
synths: synths
|
|
2934
2994
|
});
|
|
@@ -2937,48 +2997,47 @@ function _synthetixRedeem() {
|
|
|
2937
2997
|
encodedCallArgs: redeemArgs,
|
|
2938
2998
|
selector: protocol.redeemSelector
|
|
2939
2999
|
});
|
|
2940
|
-
return
|
|
3000
|
+
return _context2.abrupt("return", comptrollerProxy.connect(signer).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
|
2941
3001
|
|
|
2942
3002
|
case 4:
|
|
2943
3003
|
case "end":
|
|
2944
|
-
return
|
|
3004
|
+
return _context2.stop();
|
|
2945
3005
|
}
|
|
2946
3006
|
}
|
|
2947
|
-
},
|
|
3007
|
+
}, _callee2);
|
|
2948
3008
|
}));
|
|
2949
3009
|
return _synthetixRedeem.apply(this, arguments);
|
|
2950
3010
|
}
|
|
2951
3011
|
|
|
2952
|
-
function synthetixTakeOrder(
|
|
3012
|
+
function synthetixTakeOrder(_x3) {
|
|
2953
3013
|
return _synthetixTakeOrder.apply(this, arguments);
|
|
2954
3014
|
}
|
|
2955
3015
|
|
|
2956
3016
|
function _synthetixTakeOrder() {
|
|
2957
|
-
_synthetixTakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function
|
|
2958
|
-
var comptrollerProxy, vaultProxy, integrationManager, fundOwner, synthetixAdapter, outgoingAsset,
|
|
3017
|
+
_synthetixTakeOrder = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default['default'].mark(function _callee3(_ref3) {
|
|
3018
|
+
var comptrollerProxy, vaultProxy, integrationManager, fundOwner, synthetixAdapter, outgoingAsset, _ref3$outgoingAssetAm, outgoingAssetAmount, _ref3$minIncomingSusd, minIncomingSusdAmount, _ref3$seedFund, seedFund, takeOrderArgs, callArgs;
|
|
2959
3019
|
|
|
2960
|
-
return _regeneratorRuntime__default['default'].wrap(function
|
|
3020
|
+
return _regeneratorRuntime__default['default'].wrap(function _callee3$(_context3) {
|
|
2961
3021
|
while (1) {
|
|
2962
|
-
switch (
|
|
3022
|
+
switch (_context3.prev = _context3.next) {
|
|
2963
3023
|
case 0:
|
|
2964
|
-
comptrollerProxy =
|
|
3024
|
+
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;
|
|
2965
3025
|
|
|
2966
3026
|
if (!seedFund) {
|
|
2967
|
-
|
|
3027
|
+
_context3.next = 4;
|
|
2968
3028
|
break;
|
|
2969
3029
|
}
|
|
2970
3030
|
|
|
2971
|
-
|
|
3031
|
+
_context3.next = 4;
|
|
2972
3032
|
return outgoingAsset.transfer(vaultProxy, outgoingAssetAmount);
|
|
2973
3033
|
|
|
2974
3034
|
case 4:
|
|
2975
3035
|
takeOrderArgs = protocol.synthetixTakeOrderArgs({
|
|
2976
|
-
|
|
2977
|
-
minIncomingAssetAmount: minIncomingAssetAmount,
|
|
3036
|
+
minIncomingSusdAmount: minIncomingSusdAmount,
|
|
2978
3037
|
outgoingAsset: outgoingAsset,
|
|
2979
3038
|
outgoingAssetAmount: outgoingAssetAmount
|
|
2980
3039
|
});
|
|
2981
|
-
|
|
3040
|
+
_context3.next = 7;
|
|
2982
3041
|
return protocol.callOnIntegrationArgs({
|
|
2983
3042
|
adapter: synthetixAdapter,
|
|
2984
3043
|
encodedCallArgs: takeOrderArgs,
|
|
@@ -2986,15 +3045,15 @@ function _synthetixTakeOrder() {
|
|
|
2986
3045
|
});
|
|
2987
3046
|
|
|
2988
3047
|
case 7:
|
|
2989
|
-
callArgs =
|
|
2990
|
-
return
|
|
3048
|
+
callArgs = _context3.sent;
|
|
3049
|
+
return _context3.abrupt("return", comptrollerProxy.connect(fundOwner).callOnExtension(integrationManager, protocol.IntegrationManagerActionId.CallOnIntegration, callArgs));
|
|
2991
3050
|
|
|
2992
3051
|
case 9:
|
|
2993
3052
|
case "end":
|
|
2994
|
-
return
|
|
3053
|
+
return _context3.stop();
|
|
2995
3054
|
}
|
|
2996
3055
|
}
|
|
2997
|
-
},
|
|
3056
|
+
}, _callee3);
|
|
2998
3057
|
}));
|
|
2999
3058
|
return _synthetixTakeOrder.apply(this, arguments);
|
|
3000
3059
|
}
|
|
@@ -3978,17 +4037,22 @@ var whales = {
|
|
|
3978
4037
|
ceth: '0x8aceab8167c80cb8b3de7fa6228b889bb1130ee8',
|
|
3979
4038
|
cuni: '0x39d8014b4f40d2cbc441137011d32023f4f1fd87',
|
|
3980
4039
|
cusdc: '0xe1ed4da4284924ddaf69983b4d813fb1be58c380',
|
|
4040
|
+
// fTokens
|
|
4041
|
+
fdai7: '0x88884e35d7006ae84efef09ee6bc6a43dd8e2bb8',
|
|
4042
|
+
feth7: '0xcd2ba6a4d50745b0b4096186f925115387852c15',
|
|
4043
|
+
fdai8: '0x93f3f612a525a59523e91cc5552f718df9fc0746',
|
|
4044
|
+
ftribe8: '0xdb5ac83c137321da29a59a7592232bc4ed461730',
|
|
3981
4045
|
// ptTokens
|
|
3982
4046
|
ptUsdc: '0xd18236cd213f39d078177b6f6908f0e44e88e4aa',
|
|
3983
|
-
// synths
|
|
4047
|
+
// synths (unsupported)
|
|
3984
4048
|
seth: '0xc34a7c65aa08cb36744bda8eeec7b8e9891e147c',
|
|
3985
|
-
seur: '0xc3f2f91723b16b95bef0619b2504c049075d5b0b',
|
|
3986
4049
|
sxag: '0x40d68c490bf7262ec40048099aec23535f734be2',
|
|
3987
4050
|
sxau: '0x92eb453b7b5b8d41edb44e2c8b8b53eb70a482c7',
|
|
3988
4051
|
// misc
|
|
3989
4052
|
lidoSteth: '0x31f644e2dd5d74f5c8d6d9de89dd517474d51800',
|
|
3990
|
-
|
|
3991
|
-
|
|
4053
|
+
ust: '0xf584f8728b874a6a5c7a8d4d387c9aae9172d621',
|
|
4054
|
+
// Curve steth pool related
|
|
4055
|
+
stecrv: '0x56c915758ad3f76fd287fff7563ee313142fb663'
|
|
3992
4056
|
};
|
|
3993
4057
|
/* eslint-enable sort-keys-fix/sort-keys-fix */
|
|
3994
4058
|
|
|
@@ -4233,6 +4297,8 @@ exports.aaveLend = aaveLend;
|
|
|
4233
4297
|
exports.aaveRedeem = aaveRedeem;
|
|
4234
4298
|
exports.addNewAssetsToFund = addNewAssetsToFund;
|
|
4235
4299
|
exports.addTrackedAssetsToVault = addTrackedAssetsToVault;
|
|
4300
|
+
exports.assertCompoundLend = assertCompoundLend;
|
|
4301
|
+
exports.assertCompoundRedeem = assertCompoundRedeem;
|
|
4236
4302
|
exports.assertDidRelay = assertDidRelay;
|
|
4237
4303
|
exports.assertDidRelaySuccessfully = assertDidRelaySuccessfully;
|
|
4238
4304
|
exports.assertDidRelayWithCharge = assertDidRelayWithCharge;
|
|
@@ -4246,6 +4312,7 @@ exports.buySharesFunction = buySharesFunction;
|
|
|
4246
4312
|
exports.calcMlnValueAndBurnAmountForSharesBuyback = calcMlnValueAndBurnAmountForSharesBuyback;
|
|
4247
4313
|
exports.callOnExtension = callOnExtension;
|
|
4248
4314
|
exports.callOnExternalPosition = callOnExternalPosition;
|
|
4315
|
+
exports.compoundClaim = compoundClaim;
|
|
4249
4316
|
exports.compoundDebtPositionAddCollateral = compoundDebtPositionAddCollateral;
|
|
4250
4317
|
exports.compoundDebtPositionBorrow = compoundDebtPositionBorrow;
|
|
4251
4318
|
exports.compoundDebtPositionClaimComp = compoundDebtPositionClaimComp;
|
|
@@ -4271,13 +4338,6 @@ exports.curveAaveStake = curveAaveStake;
|
|
|
4271
4338
|
exports.curveAaveUnstake = curveAaveUnstake;
|
|
4272
4339
|
exports.curveAaveUnstakeAndRedeem = curveAaveUnstakeAndRedeem;
|
|
4273
4340
|
exports.curveClaimRewards = curveClaimRewards;
|
|
4274
|
-
exports.curveEursClaimRewards = curveEursClaimRewards;
|
|
4275
|
-
exports.curveEursLend = curveEursLend;
|
|
4276
|
-
exports.curveEursLendAndStake = curveEursLendAndStake;
|
|
4277
|
-
exports.curveEursRedeem = curveEursRedeem;
|
|
4278
|
-
exports.curveEursStake = curveEursStake;
|
|
4279
|
-
exports.curveEursUnstake = curveEursUnstake;
|
|
4280
|
-
exports.curveEursUnstakeAndRedeem = curveEursUnstakeAndRedeem;
|
|
4281
4341
|
exports.curveLend = curveLend;
|
|
4282
4342
|
exports.curveLendAndStake = curveLendAndStake;
|
|
4283
4343
|
exports.curveRedeem = curveRedeem;
|
|
@@ -4340,7 +4400,6 @@ exports.removeTrackedAssetsFromVault = removeTrackedAssetsFromVault;
|
|
|
4340
4400
|
exports.setupGasRelayerPaymaster = setupGasRelayerPaymaster;
|
|
4341
4401
|
exports.synthetixAssignExchangeDelegate = synthetixAssignExchangeDelegate;
|
|
4342
4402
|
exports.synthetixRedeem = synthetixRedeem;
|
|
4343
|
-
exports.synthetixResolveAddress = synthetixResolveAddress;
|
|
4344
4403
|
exports.synthetixTakeOrder = synthetixTakeOrder;
|
|
4345
4404
|
exports.transactionTimestamp = transactionTimestamp;
|
|
4346
4405
|
exports.uniswapV2Lend = uniswapV2Lend;
|