Skip to main content

Proxy Contracts

When publishing a contract, you can choose to let others deploy a "proxy" of a pre-deployed contract. Since proxies are much lighter weight than the actual full contract, they are much cheaper to deploy. Proxy deploys only requiring a fraction of the gas of a normal deploy.

Publishing proxy contracts

This feature has a requirement. The "main" contract, referred to as the "implementation", needs to be deployed on chain already. You can not publish normal contracts as proxies, they need to be written as per the EIP-1967 spec.

To publish a proxy contract, your contract needs to implement the upgradeable pattern, generally means it has an "initialize" function instead of a regular constructor.

If you haven't already deployed your implementation contracts, you can do so using the UI. Just click on the 🚀 button next to the desired network.

Proxy Contract Addresses Form

Click the "Next" button and and customize your initializer parameters. This is what will be shown to users when they try to deploy your contract.

Describe Constructor Parameters

Finally, publish your Proxy contract(s) by clicking the "Publish Contract" button.

Publish Proxy Contract

Now anyone can deploy proxies of your contract simply by clicking "Deploy" on your published contract page.