Discussion on OpenZeppelin Contracts 2.5 Create2.sol

OpenZeppelin Contracts 2.5 includes Create2.sol

I created this topic for feedback on Create2.sol library.

@k06a made the following Pull Request:

  1. Rename argument from bytecodeHash to bytecode
  2. Add new method for precomputed bytecode hash argument

Also: Maybe it is worth to replace bytes with bytes32 completely, since it is not a big deal to wrap argument with keccak256 call, but it could be cached in smart contract.

@k06a suggested on Telegram: To return address payable from both functions?

Feel free to add your feedback and experiences using Create2.sol library here.

I created a guide to using Create2.sol library to deploy a vault contract:

Consider adding support for including value in the create2 call.


Consider require(bytecode.length > 0, "useful error message") rather than just letting the creation fail with 0 bytes and a non-helpful message.


Thanks @MicahZoltu! I opened an issue for those.

1 Like