Deploy with thirdweb

Thirdweb provides tools, SDKs, and smart contract templates that simplify building and deploying blockchain apps.

Thirdweb provides their services for most EVM-based chains, including Chiliz Chain Mainnet as well as Spicy Testnet.

There are two ways of deploying a contract to Chiliz Chain using thirdweb's tools:

  • Use their web-based Explore library, if you just want a standard contract.

  • Use their CLI-centric tool, if you want to deploy a custom contract.

We'll explore both here.

Note: The thirdweb team built a great video about this very topic:

Deploy a smart contract using thirdweb's Explore

Thirdweb provides Explore, a library of audited EVM smart contracts, along with an online tool that allows anyone to deploy a standard contract to any EVM chain.

  1. Click the "Token" contract.

Chiliz's Fan Tokens are CAP20 tokens, which are a Chiliz Chain-specific extension of the Ethereum ERC20 token standard.

The contract page opens. We advise you to fully read the information it displays.

  1. Click the "Deploy Now" button (top right of the screen).

A form opens:

  1. Fill in the various form fields, starting with the "Contract Metadata" section.

The rest of the sections can be left to be auto-filled by Explore, but we advise you to pay attention to each, most importantly:

  • Recipient address: If you are logged with your wallet (such as MetaMask), this field should already display your wallet's address. Make sure it is indeed yours!

  • Deploy options: This is where you choose the chain where you want to deploy this contract. Make sure to choose Chiliz Chain (or Spicy Testnet, depending on your need)!

  1. Click on "Deploy Now" to deploy your own Token on Chiliz Chain.

You will have transactions to sign from your wallet, the number of which can vary.

  1. Click on "View Now" to access your thirdweb dashboard and see the deployed contract.

Deploy a smart contract using thirdweb's CLI tool

thirdweb's deploy tool simplifies smart contract deployment to any EVM chain (including Chiliz Chain) with a single command, handling complex technical details automatically.

This is the recommended way if you want to use a non-standard contract (for instance, a customized OpenZeppelin contract).

Installing thirdweb CLI

To use the thirdweb deploy tool, you need:

  • a local installation of Node.js and its npm tool.

  • a local installation of the thirdweb CLI tool.

To install Node.js and npm, follow the instructions here.

Then you can install thirdweb CLI by running the following command in the terminal:

npm i -g @thirdweb-dev/cli

The thirdweb team has created a deep-dive video for thirdweb CLI, which you should definitly check out!

Deploying a contract using thirdweb CLI

Once you have installed the CLI, you can use it to deploy your smart contracts.

  1. From the terminal, navigate to the root of your smart contract repository.

  2. Run the deploy command:

npx thirdweb deploy

This will then guide you through the process of deploying your contract:

  1. It will connect to your thirdweb dashboard by opening a browser window.

  2. From the dashboard, you will need to authorize your device. This will require you to sign a transaction using the wallet that you use with thirdweb.

Check out the demo from the thirdweb team:

Last updated

Was this helpful?