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

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
Anton Bukov
2020-05-29 02:47:45 +03:00
committed by GitHub
parent 2a0f2a8ba8
commit d418da6b91

View File

@ -54,6 +54,6 @@ library Create2 {
bytes32 _data = keccak256(
abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash)
);
return address(bytes20(_data << 96));
return address(uint256(_data));
}
}