Content
@
https://opensea.io/collection/evm-6
0 reply
0 recast
2 reactions
spengrah.eth
@spengrah.eth
Is anybody aware of an existing generic create2 factory that serves as the create2 msg.sender? I believe that would allow for deployment to deterministic address agnostic of who is actually initiating the deploy, which would be quite nice for enabling a team to deploy as needed across networks.
4 replies
0 recast
2 reactions
horsefacts
@horsefacts.eth
@nick.eth's deterministic deployment proxy (the forge script default) and @0age's ImmutableCreate2Factory (my personal preference) both work like this: the factory contract is the CREATE2 sender, not the deployer EOA address. They're useful for exactly the reason you describe.
1 reply
0 recast
2 reactions
horsefacts
@horsefacts.eth
You do have to be careful about anything that uses msg.sender as an implicit default, like OZ Ownable. If you deploy using a CREATE2 factory in production, make sure you also do it in your tests—If you're not careful, the factory may end up as the owner of your contract.
1 reply
0 recast
2 reactions