How to Deploy Smart Contracts Using Thirdweb CLI on Conflux eSpace Testnet
In this tutorial, we’ll walk through how to deploy a smart contract using the Thirdweb CLI on the Conflux eSpace Testnet. We’ll use the PongT Community Board smart contract, which allows users to create and submit bounties. Based on their submissions, users can be rewarded—making it an ideal structure for decentralized collaboration.
What You’ll Learn
- Overview of the Community Board Smart Contract
- How to set up your project for Conflux eSpace Testnet
- Deploying contracts using Thirdweb CLI
- Viewing contract events on the explorer
What is the Community Board Contract?
The PongT Community Board is a smart contract that enables users to:
- Create bounties
- Submit their work for review
- Get rewarded upon valid submissions
This is useful for DAOs, open-source projects, and communities that want to reward contributors transparently.
Project Structure
Your project will include the following files:
-
CommunityBountyBoard.sol
: The main smart contract -
deploy.js
: The deployment script -
hardhat.config.js
: Configuration for the Conflux eSpace Testnet
Make sure your contract is compiled and ready before moving to deployment.
Deployment Process
To deploy your smart contract using Thirdweb CLI, follow these steps:
1. Run the Deployment Command
Start the deployment process by running the following command in your terminal:
npx thirdweb deploy -k secretkey
This command does the following:
Compiles your smart contract
Processes and uploads the contract metadata to Thirdweb
Generates a deployment link
2. Open the Deployment Link
After running the deploy command, you’ll receive a link in your terminal. Open this link in your browser.
You’ll be taken to the Thirdweb dashboard where:
Your contract name and metadata will be displayed
You can select the target network
Select “Conflux eSpace Testnet” from the network dropdown.
3. Deploy the Contract
Once the network is selected, click on the Deploy button. This action will prompt your MetaMask wallet to open.
Confirm the transaction in MetaMask to proceed with the deployment.
4. Confirm Deployment
After confirming the transaction:
-
The contract will be deployed on the Conflux eSpace Testnet
-
You’ll see a success message with the deployed contract address
-
The dashboard will show all the events defined in your smart contract
Example:
-
Contract Deployed Successfully
-
Contract Address:
0xYourDeployedContractAddress
-
Events:
BountyCreated
,BountySubmitted
,RewardClaimed
, etc.
Want to See It in Action?
Watch the Full Deployment Walkthrough on YouTube
Summary
Deploying smart contracts with Thirdweb CLI is:
-
Simple to use
-
Fast and efficient
-
Compatible with multiple chains like Conflux eSpace
Whether you’re building a DAO, bounty board, or Web3 community tool, Thirdweb offers an excellent developer experience.