Skip to content

Commit 6461c76

Browse files
committed
Merge branch 'testnet-3' of https://github.com/lidofinance/vaults-wrapper into feature/fix-solidity-version
2 parents 496a934 + fe72b45 commit 6461c76

File tree

8 files changed

+179
-34
lines changed

8 files changed

+179
-34
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.ONESHELL:
22

3+
# TODO: get this deprecated in favour of just
4+
35
CORE_RPC_PORT ?= 9123
46
CORE_BRANCH ?= feat/vaults
57
CORE_SUBDIR ?= lido-core
@@ -296,4 +298,4 @@ deploy-all:
296298
fi; \
297299
done
298300

299-
# WRAPPER_CONFIGS=$${WRAPPER_CONFIGS:-"script/stv-pool-deploy-config-hoodi.json script/stv-steth-pool-deploy-config-hoodi.json script/stv-ggv-pool-deploy-config-hoodi.json"}; \
301+
# WRAPPER_CONFIGS=$${WRAPPER_CONFIGS:-"script/stv-pool-deploy-config-hoodi.json script/stv-steth-pool-deploy-config-hoodi.json script/stv-ggv-pool-deploy-config-hoodi.json"}; \

script/DeployPool.s.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,6 @@ contract DeployPool is Script {
287287
Factory.PoolIntermediate memory intermediate = _loadIntermediate(_intermediateJsonPath);
288288
PoolParams memory p = _loadPoolParams(_intermediateJsonPath);
289289

290-
StvPool pool = StvPool(payable(intermediate.pool));
291-
bytes32 poolType = pool.poolType();
292-
293290
vm.startBroadcast();
294291

295292
_factory.createPoolFinish(intermediate);

src/Factory.sol

Lines changed: 167 additions & 12 deletions
Large diffs are not rendered by default.

src/factories/TimelockFactory.sol

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import {TimelockController} from "@openzeppelin/contracts/governance/TimelockCon
66
contract TimelockFactory {
77
function deploy(uint256 _minDelaySeconds, address _proposer, address _executor)
88
external
9-
returns (address _timelock)
9+
returns (address timelock)
1010
{
1111
address[] memory proposers = new address[](1);
1212
proposers[0] = _proposer;
13+
1314
address[] memory executors = new address[](1);
1415
executors[0] = _executor;
15-
TimelockController tl = new TimelockController(_minDelaySeconds, proposers, executors, address(0));
16-
_timelock = address(tl);
16+
17+
timelock = address(new TimelockController(_minDelaySeconds, proposers, executors, address(0)));
1718
}
1819
}

test/Factory.test.sol

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,6 @@ contract FactoryTest is Test {
380380

381381
function test_revertFinishWithoutStart() public {
382382
// Test that calling finish without start reverts
383-
(
384-
Factory.VaultConfig memory vaultConfig,
385-
Factory.CommonPoolConfig memory commonPoolConfig,
386-
Factory.AuxiliaryPoolConfig memory auxiliaryConfig
387-
) = _buildConfigs(false, false, 0, "Deadline Test Pool", "DTP");
388-
389-
Factory.TimelockConfig memory timelockConfig = _defaultTimelockConfig();
390-
address strategyFactory = address(0);
391383

392384
// Create an intermediate struct but don't call createPoolStart
393385
Factory.PoolIntermediate memory fakeIntermediate = Factory.PoolIntermediate({

test/integration/factory.test.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ contract FactoryIntegrationTest is StvPoolHarness {
8181

8282
vm.startPrank(vaultConfig.nodeOperator);
8383
vm.expectRevert(
84-
abi.encodeWithSelector(Factory.InsufficientConnectDeposit.selector, CONNECT_DEPOSIT, CONNECT_DEPOSIT - 1)
84+
abi.encodeWithSelector(Factory.InsufficientConnectDeposit.selector, CONNECT_DEPOSIT - 1, CONNECT_DEPOSIT)
8585
);
8686
factory.createPoolStart{value: CONNECT_DEPOSIT - 1}(
8787
vaultConfig, commonPoolConfig, auxiliaryConfig, timelockConfig, strategyFactory, ""
@@ -98,7 +98,7 @@ contract FactoryIntegrationTest is StvPoolHarness {
9898
) = _buildConfigs(false, false, 0, "Factory No Mint", "FNM");
9999
address strategyFactory = address(0);
100100

101-
(Factory.PoolIntermediate memory intermediate, Factory.PoolDeployment memory deployment) =
101+
(, Factory.PoolDeployment memory deployment) =
102102
_deployThroughFactory(vaultConfig, commonPoolConfig, auxiliaryConfig, timelockConfig, strategyFactory);
103103

104104
assertEq(deployment.strategy, address(0), "strategy should not be deployed");
@@ -124,7 +124,7 @@ contract FactoryIntegrationTest is StvPoolHarness {
124124
) = _buildConfigs(false, true, 0, "Factory Mint Pool", "FMP");
125125
address strategyFactory = address(0);
126126

127-
(Factory.PoolIntermediate memory intermediate, Factory.PoolDeployment memory deployment) =
127+
(, Factory.PoolDeployment memory deployment) =
128128
_deployThroughFactory(vaultConfig, commonPoolConfig, auxiliaryConfig, timelockConfig, strategyFactory);
129129

130130
IDashboard dashboard = IDashboard(payable(deployment.dashboard));
@@ -142,7 +142,7 @@ contract FactoryIntegrationTest is StvPoolHarness {
142142
) = _buildConfigs(true, true, 500, "Factory Strategy Pool", "FSP");
143143
address strategyFactory = address(factory.GGV_STRATEGY_FACTORY());
144144

145-
(Factory.PoolIntermediate memory intermediate, Factory.PoolDeployment memory deployment) =
145+
(, Factory.PoolDeployment memory deployment) =
146146
_deployThroughFactory(vaultConfig, commonPoolConfig, auxiliaryConfig, timelockConfig, strategyFactory);
147147

148148
assertTrue(deployment.strategy != address(0), "strategy should be deployed");
@@ -234,7 +234,7 @@ contract FactoryIntegrationTest is StvPoolHarness {
234234
_deployThroughFactory(vaultConfig, commonPoolConfig, auxiliaryConfig, timelockConfig, strategyFactory);
235235

236236
Vm.Log[] memory entries = vm.getRecordedLogs();
237-
bytes32 expectedTopic = keccak256("PoolCreationStarted((address,address,address,bytes))");
237+
bytes32 expectedTopic = keccak256("PoolCreationStarted((address,address,address,bytes),uint256)");
238238

239239
bool found;
240240
for (uint256 i = 0; i < entries.length; i++) {

test/integration/timelock-upgrade.test.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ contract TimelockUpgradeIntegrationTest is Test {
1818
// Deploy a fresh Factory using core addresses discovered from the locator
1919
string memory locatorAddressStr = vm.envString("CORE_LOCATOR_ADDRESS");
2020
address locatorAddress = vm.parseAddress(locatorAddressStr);
21-
ILidoLocator locator = ILidoLocator(locatorAddress);
2221

2322
FactoryHelper helper = new FactoryHelper();
2423
factory = helper.deployMainFactory(locatorAddress);

test/unit/stv-steth-pool/ExceedingMintedSteth.test.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ contract ExceedingMintedStethTest is Test, SetupStvStETHPool {
9999
pool.depositETH{value: uint256(assets)}(address(this), address(0));
100100
}
101101

102-
uint256 maxSharesToMintOnDashboard = dashboard.remainingMintingCapacityShares(0);
103102
uint256 maxSharesToMintOnPool = pool.remainingMintingCapacitySharesOf(address(this), 0);
104103
pool.mintStethShares(maxSharesToMintOnPool);
105104

0 commit comments

Comments
 (0)