Skip to main content

Release

Use the CLI, to publish a new version of your smart contract to our on-chain registry, where anyone can view and deploy it from the explore page.

npx thirdweb release

Release A Contract

From the same directory as your smart contract(s), run the following command to:

  • Compile your smart contract.
  • Upload the contract source code (ABI) to IPFS.
  • Open the release flow in the dashboard.
npx thirdweb@latest release

Open the generated URL in your browser and follow the steps below to release your contract.

Configure Contract Metadata

From the dashboard, provide metadata about your smart contract such as a name, image, description and more.

This information is what users will see when they visit your smart contract from the explore page.

Enter Contract Metadata

Add A Version

Use semantic versioning to incrementally release new versions of your smart contract; ideal for when you want to make changes to your smart contract but don't want to break existing integrations.

Each version of your smart contract is stored on-chain and can be deployed by anyone, and can optionally include release notes to describe the changes you've made between versions.

Versioned Releases

Describe Constructor Parameters

Help users trying to deploy your smart contract by providing a description of each constructor parameter.

Describe Constructor Parameters

Create Release

Finally, click the "Create Release" button to publish your smart contract to the on-chain registry.

Release

Releasing your contract on thirdweb is the best way to get your protocol in front of 60k+ web3 developers.

Contact Us to apply to have your contract featured on the explore page.

Advanced Features

EIP-1967 Proxy contracts

When releasing 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.

This feature has a requirement however, the "main" contract, referred to as the "implementation" needs to be deployed on chain already.

Here's the step-by-step flow to create a release with proxy deploys enabled:

  1. Your contract needs to implement the upgradeable pattern, generally means it has an "initialize" function instead of a regular constructo
  2. Run npx thirdweb release from your project
  3. On the create release page, check "Deployable via proxy"
  4. This will reveal a new section, where you can deploy your implementations on any supported chain in one click.
  5. Deploy your implementations on your desired chains (addresses are saved automatically)
  6. Create your release

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

Factory deploys

Another way to let users deploy your contracts is by using a factory contract. This allows you to not only provide cheap deployments, but also to add extra logic that will be executed when others deploy your contracts.

To enable factory deploys, you will need to deploy a factory contract that implements the IContractFactory interface. This is a simple interface with one function that you can implement to add deploy contracts any way you like, and add your custom logic on top. This is extremely useful when deploying a contract requires multiple steps, having the factory take care of the heavy lifting.

Here's the step-by-step flow to create a release with factory deploys enabled:

  1. Follow steps 1 to 5
  2. Check "Deployable via factory"
  3. Fill in the addresses of your factory contracts on each chain
  4. Create your release

That's it, now when people click deploy from your release page, your factory will be invoked instead.