Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bubble up returndata from reverted Create2 deployments #5052

Merged
Merged
Prev Previous commit
Next Next commit
Update Create2.sol
  • Loading branch information
Amxx authored May 23, 2024
commit f31d3ccf7b7ba05432035616c1983e8e52866a2f
2 changes: 0 additions & 2 deletions contracts/utils/Create2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ library Create2 {
if (bytecode.length == 0) {
revert Create2EmptyBytecode();
}

/// @solidity memory-safe-assembly
assembly {
addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
Expand All @@ -51,7 +50,6 @@ library Create2 {
revert(0, returndatasize())
}
}

if (addr == address(0)) {
revert Errors.FailedDeployment();
}
Expand Down
Loading