GEB Docs
  • Quick Start
  • GEB Consensus
    • Mother Consensus
    • Sub Consensus(Agere)
  • Learn
    • BitAgere Guide
      • Auditor Reference Concepts
      • Executor Reference Concepts
  • Build
    • Validator
      • Wasm Operation
      • L-BTC Validator Operation
    • BitAgere
      • RelayAgere
      • Agere Auditor
      • Agere Executor
  • Use
    • Wasm Wallet
    • Earn $GEB
      • Stake L-BTC
        • What is L-BTC?
        • Download and Run LND Desk
        • Config LND
        • Node Asset Management
          • Open Channel(Get L-BTC)
          • L-BTC ⇌ BTC (on GEB chain)
        • Stake L-BTC Earn $GEB
      • Stake GEB on Agere
    • Earn $BTC
      • Claim and Other Operations
      • Transfer BTC to EVM
    • Bridge
      • Official Bridge
        • BEVM Mainnet
        • BEVM Canary
      • Third-Party Bridge
        • BEVM Mainnet
          • Swap from EVM to BEVM Mainnet
        • BEVM Canary
          • Swap from EVM to BEVM Canary
          • Other assets
            • Bridge PCX from BEVM Canary to Chainx
      • Transfer(EVM<-->Wasm)
  • EVM Development
    • Fee Calculation
      • GEB Mainnet
      • BEVM Canary
    • Smart Contract
      • Write a Contract
        • Set Up the Metamask Configuration
        • Deploy Smart Contract on GEB Signet
        • Deploy Smart Contract on BEVM Canary
      • Foundry
        • Deploy and verify contract by Foundry
      • Contract Verification (BlockScout)
      • ThirdWeb
    • Integrations
      • Oracle
        • Supra
        • DIA
      • Indexer
        • SubQuery
      • Account Abstraction
        • Particle Network
    • Libraries
      • ethereum-list/chains
      • Wagmi
      • Multicall3
    • Canonical contracts
    • Finality
  • Tokenomics
  • The Journy of GEB
  • Audit Reports
  • Community
Powered by GitBook
On this page
  • Introduction​
  • Deploy on Website
  • Deploy by Code
  1. EVM Development
  2. Smart Contract

ThirdWeb

PreviousContract Verification (BlockScout)NextIntegrations

Last updated 1 year ago

Introduction

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.

Deploy on Website

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.

  1. Go to the thirdweb Explore page:

  1. Choose the type of contract you want to deploy from the available options: NFTs, tokens, and more.

  2. Follow the on-screen prompts to configure and deploy your contract.

Deploy by Code

  1. Ensure that you have the latest version of Node.js installed.

  2. Sufficient funds in the wallet for contract deployment gas fees.

  3. Basic knowledge of Solidity.

  4. API Key is required to access the thirdweb infrastracture such as RPC Endpoint

To create a new smart contract using thirdweb CLI, follow these steps:

  1. In your CLI run the following command:

    npx thirdweb create contract
  2. Input your preferences for the command line prompts:

    1. Give your project a name

    2. Choose your preferred framework: Hardhat or Foundry

    3. Name your smart contract

  3. Once created, navigate to your project’s directory and open in your preferred code editor.

  4. If you open the contracts folder, you will find your smart contract; this is your smart contract written in Solidity.

    // SPDX-License-Identifier: MIT
    pragma solidity ^0.8.0;
    
    import "@thirdweb-dev/contracts/base/ERC721Base.sol";
    
    contract Contract is ERC721Base {
        constructor(
            string memory _name,
            string memory _symbol,
            address _royaltyRecipient,
            uint128 _royaltyBps
        ) ERC721Base(_name, _symbol, _royaltyRecipient, _royaltyBps) {}
    }

    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.

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.

  1. To deploy your smart contract using deploy, navigate to the root directory of your project and execute the following command:

    npx thirdweb deploy

    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.

  2. 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"

  3. Connect wallet

  4. Select BEVM as the network

  5. Adjust additional settings on your contract's dashboard as required, including tasks like uploading NFTs, configuring permissions, and more

For more information on different contracts available on Explore, check out

Prerequisites

Getting started

Creating contract

Choose the type of base contract: Empty, , , or

Add any desired

The following is code for an ERC721Base contract without specified extensions. It implements all of the logic inside the contract; which implements the standard.

After modifying your contract with your desired custom logic, you may deploy it to BEVM using .

Deploying contract

For additional information on Deploy, please reference .

Learn more

If you have any additional questions or face any challenges throughout the process, feel free to .

thirdweb’s documentation.
​
​
​
ERC20
ERC721
ERC1155
extensions
ERC721Base.sol
ERC721A
Deploy
​
thirdweb’s documentation
​
reach out to thirdweb support
​
https://thirdweb.com/explore
Explore