Moving here a conversation started on Twitter to further discuss before going into opening an EIP.
The idea behind this EIP is adding a precompile that executes a CREATE2 with whatever data is sent to it and a fixed salt. The rationale for it being a precompile is not performance, but rather being available at the same address across all networks. This allows any contract deployed through this factory to also have the same address across all networks where it’s deployed.
The aim is to provide a more robust alternative to Nick’s method, used for example in the deployment of the 1820 registry. Nick’s method requires hardcoding the gas price of the deployment tx, which may be reasonable for a chain at a certain time, but not so much in other chains which use a different currency altogether.
With the proliferation of EVM-compatible sidechains and L2s, it’s critical to have consistent addresses across chains for well-known contracts that provide global services, such as EIP3074 invoker contracts.
I’m curious to hear others’ thoughts about this idea, before turning it into a full-fledged EIP.