Skip to content

Commit

Permalink
coverage increase for deployers (#992)
Browse files Browse the repository at this point in the history
* add return variable to increase coverage

* idk
  • Loading branch information
jrhea authored Apr 18, 2024
1 parent abd8f92 commit c2f8f0b
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ contract ERC4626HyperdriveCoreDeployer is IHyperdriveCoreDeployer {
address _target4,
bytes32 _salt
) external returns (address) {
return (
address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new ERC4626Hyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, _target0, _target1, _target2, _target3, _target4)
)
address hyperdrive = address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new ERC4626Hyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, _target0, _target1, _target2, _target3, _target4)
);
return hyperdrive;
}
}
29 changes: 14 additions & 15 deletions contracts/src/deployers/ezeth/EzETHHyperdriveCoreDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,21 @@ contract EzETHHyperdriveCoreDeployer is IHyperdriveCoreDeployer {
address target4,
bytes32 _salt
) external returns (address) {
return (
address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new EzETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(
_config,
target0,
target1,
target2,
target3,
target4,
restakeManager
)
address hyperdrive = address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new EzETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(
_config,
target0,
target1,
target2,
target3,
target4,
restakeManager
)
);
return hyperdrive;
}
}
15 changes: 7 additions & 8 deletions contracts/src/deployers/lseth/LsETHHyperdriveCoreDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ contract LsETHHyperdriveCoreDeployer is IHyperdriveCoreDeployer {
address target4,
bytes32 _salt
) external returns (address) {
return (
address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new LsETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, target0, target1, target2, target3, target4)
)
address hyperdrive = address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new LsETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, target0, target1, target2, target3, target4)
);
return hyperdrive;
}
}
15 changes: 8 additions & 7 deletions contracts/src/deployers/steth/StETHHyperdriveCoreDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ contract StETHHyperdriveCoreDeployer is IHyperdriveCoreDeployer {
address target4,
bytes32 _salt
) external returns (address) {
address hyperdrive = address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new StETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, target0, target1, target2, target3, target4)
return (
address(
// NOTE: We hash the sender with the salt to prevent the
// front-running of deployments.
new StETHHyperdrive{
salt: keccak256(abi.encode(msg.sender, _salt))
}(_config, target0, target1, target2, target3, target4)
)
);
return hyperdrive;
}
}

0 comments on commit c2f8f0b

Please sign in to comment.