ThirdWeb
Last updated
Last updated
Pre-built contracts are proxy contracts created by the thirdweb team to cover most common use cases and patterns for smart contracts. Contracts cover various use cases across NFTs, airdrops, staking, marketplaces, memberships, and more.
Set the max base fee as 0.05 GWei and the max priority fee as 0.05 GWei at Metamask for BEVM Canary (Chain ID: 1501)
ThirdWeb provides a very convenient graphical interface, allowing the deployment of commonly used contracts with just a few clicks and inputs. It offers a user-friendly experience.
Go to the thirdweb Explore page: https://thirdweb.com/explore
Choose the type of contract you want to deploy from the available options: NFTs, tokens, and more.
Follow the on-screen prompts to configure and deploy your contract.
For more information on different contracts available on Explore, check out thirdweb’s documentation.
Ensure that you have the latest version of Node.js installed.
Sufficient funds in the wallet for contract deployment gas fees.
Basic knowledge of Solidity.
API Key is required to access the thirdweb infrastracture such as RPC Endpoint
Creating contract
To create a new smart contract using thirdweb CLI, follow these steps:
In your CLI run the following command:
Input your preferences for the command line prompts:
Give your project a name
Choose your preferred framework: Hardhat or Foundry
Name your smart contract
Add any desired extensions
Once created, navigate to your project’s directory and open in your preferred code editor.
If you open the contracts
folder, you will find your smart contract; this is your smart contract written in Solidity.
The following is code for an ERC721Base contract without specified extensions. It implements all of the logic inside the ERC721Base.sol
contract; which implements the ERC721A
standard.
This contract inherits the functionality of ERC721Base through the following steps:
Importing the ERC721Base contract
Inheriting the contract by declaring that our contract is an ERC721Base contract
Implementing any required methods, such as the constructor.
After modifying your contract with your desired custom logic, you may deploy it to BEVM using Deploy.
Deploying contract
Set the max base fee as 0.05 GWei and the max priority fee as 0.05 GWei at Metamask for BEVM Canary (Chain ID: 1501)
Deploy allows you to deploy a smart contract to any EVM compatible network without configuring RPC URLs, exposing your private keys, writing scripts, and other additional setup such as verifying your contract.
To deploy your smart contract using deploy, navigate to the root directory of your project and execute the following command:
Executing this command will trigger the following actions(automatical):
Compiling all the contracts in the current directory.
Providing the option to select which contract(s) you wish to deploy.
Uploading your contract source code (ABI) to IPFS.
When it is completed, it will open a dashboard interface to finish filling out the parameters.
_royaltyRecipient
: wallet address to receive royalties from secondary sales
_royaltyBps
: basis points (bps) that will be given to the royalty recipient for each secondary sale, e.g. 500 = 5%
_name
: contract name
_symbol
: symbol or "ticker"
Connect wallet
Select BEVM as the network
Adjust additional settings on your contract's dashboard as required, including tasks like uploading NFTs, configuring permissions, and more
For additional information on Deploy, please reference thirdweb’s documentation.
If you have any additional questions or face any challenges throughout the process, feel free to reach out to thirdweb support.