Publish Options
The deployment options you choose will determine how users deploy your contract.
Publishing with the direct deploy option allows users to deploy a copy of your contract, including the logic and storage. Choose this option if your contract does not follow the upgradeable contract pattern.
There are no requirements. Any contract can be published with this deployment option.
Choose this option if you would like users to deploy proxies of your implementation contract using the thirdweb default factory contract or using your own pre-deployed custom factory.
Publishing your contract using the thirdweb default factory allows users to deploy a proxy contract.
- Allows users to deploy to any EVM compatible network.
- Users will deploy an EIP-1167 minimal proxy contract, containing the state, which will refer to your implementation contract for the logic. This makes the deployment cheaper for your users.
- The thirdweb default factory is open-source, permissionless, and does not alter contract ownership - contract deployers have 100% ownership.
- Your contract needs to implement the upgradeable pattern, meaning it has an "initialize" function to set the storage, instead of a constructor.
- Choose your "initialize" function - in most cases, this will be
initialize
but can be any function on your contract. - Select which networks you would like to publish to. This way, you can limit which networks your users can deploy to.
- Click "Next" and fill in the "Contract Parameters" form.
Publishing your contract using a custom factory allows users to deploy a proxy contract using your own pre-deployed custom factory. This allows you to add custom logic to the function which is invoked when a user deploys a contract.
- Be publishing your implementation contract rather than a factory.
- Have a custom factory contract pre-deployed to all networks you are publishing to.
- Enter the address(s) of your custom factory contract on each network you would like users to be able to deploy to.
- Choose your "factory function" - this will be the function that will be called when deploying a user's contract.
- Click "Next" and fill in the "Contract Parameters" form.