ERC-2470: Singleton Factory

I recommend checking out GitHub - Zoltu/deterministic-deployment-proxy: An Ethereum proxy contract that can be used for deploying contracts to a deterministic address on any chain.. I (and others) have been using that for deterministic deployments of contracts for over a year now. It has the advantage of letting you just do a normal deployment transaction but set the to field on the transaction to the deployment proxy address. It also has the nice property that the deployment proxy deployment code is very tiny, so it can be inlined easily into say another EIP. :wink:

The reason I didn’t create an EIP is because I don’t think there is significant value in standardizing it. Anyone can deploy with whatever mechanisms they want. I can use my deployer and you can use your deployer and everything works just as well as if we both used the same deployer.

Something being a good idea, or a good design pattern doesn’t mean it needs to be standardized. There are many good design patterns that are not also standards, but end up widely used because they are good ideas. Generally, a standard should exist if you he a many to many relationship of actors who need to communicate with each other.

You have indicated that you plan to refer to this in other standards. The only place I can think of where this would make sense is a standard for a central registry. In such a case you can simply define the deployment process in that standard, like how EIP 1820 did, but in this case it would be a bit simpler as the steps are just “send this data to this contract address, if no contract exists at that address then send ETH to this address and then submit this transaction”.

3 Likes