Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Dec 10, 2024
1 parent 9797495 commit ef71b77
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/utils/Lifebuoy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ contract Lifebuoy {
uint256 deployer = uint160(_lifebuoyDefaultDeployer());
/// @solidity memory-safe-assembly
assembly {
if iszero(deployer) {
deployer := caller()
if extcodesize(caller()) { deployer := origin() }
}
if iszero(deployer) { deployer := origin() }
mstore(0x00, address())
mstore(0x20, deployer)
hash := keccak256(0x00, 0x40)
Expand All @@ -119,7 +116,6 @@ contract Lifebuoy {
}

/// @dev Override to return a non-zero address if you want to set it as the deployer.
/// Otherwise, the deployer will be set to `msg.sender` if it does not have any code.
/// Otherwise, the deployer will be set to `tx.origin`.
///
/// Note: If you are deploying via a untrusted `tx.origin` (e.g. ERC4337 bundler)
Expand Down

0 comments on commit ef71b77

Please sign in to comment.