Clarified usage of CREATE

CREATE was originally intended for gas savings. While one sketch did move to
CREATE2, the security concerns around address collisions (requiring all init
codes not be malleable to achieve security) continue to justify this.

To resolve the gas estimation concerns raised in the prior commit, the
createAddress function has been made constant-gas.
This commit is contained in:
Luke Parker
2025-01-27 07:22:40 -05:00
parent a9625364df
commit ea00ba9ff8
5 changed files with 131 additions and 104 deletions

View File

@@ -5,7 +5,7 @@ import "Router.sol";
// Wrap the Router with a contract which exposes the address
contract CreateAddress is Router {
constructor() Router(bytes32(uint256(1))) {}
constructor() Router(bytes32(uint256(1))) { }
function createAddressForSelf(uint256 nonce) external returns (address) {
return Router.createAddress(nonce);