Unverified Commit d418da6b by Anton Bukov Committed by GitHub

Decrease CREATE2 address computation gas usage from 623 to 539 (#2244)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
parent 2a0f2a8b
...@@ -54,6 +54,6 @@ library Create2 { ...@@ -54,6 +54,6 @@ library Create2 {
bytes32 _data = keccak256( bytes32 _data = keccak256(
abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash) abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)
); );
return address(bytes20(_data << 96)); return address(uint256(_data));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment