B² Network
  • B² Network
    • Overview
  • Airdrop Guide
  • Zero-Knowledge Proof Verification Commitment for ZK-Rollup on Bitcoin
  • A Decentralized Signal-Driven Network for Modular and Agentic Artificial Intelligence
  • Tech Architecture
    • Rollup Layer
    • DA Layer
      • Decentralized Storage
      • B² Nodes
      • B² Inscription
      • B² Commitment
      • Bitcoin Network
  • For Users
    • Connecting to B² Mainnet
    • Set Gas Price
    • Join B² Network Discovery
    • Bridge to B² Mainnet
    • Transfer BlockHeadz NFT
    • Add B2 token on BNB Chain
  • For Developers
    • Basic information
    • Write a contract
    • Deploy a contract with Hardhat
    • Verify contract code with Hardhat in Explorer
    • Verify contract code with Hardhat in Blockscout
    • Integrate Particle Account Abstraction
    • Integrate Oracle Services
    • Deploy a rollup node
    • Deploy a rollup archive node
  • Tokenomics
  • Press-Kit
Powered by GitBook
On this page
  • Getting started
  • Writing an NFT contract
  1. For Developers

Write a contract

PreviousBasic informationNextDeploy a contract with Hardhat

Last updated 1 year ago

This section explains how to automatically write a smart contract using the OpenZeppelin Wizard. The resulting smart contract code can either be integrated with Remix by Clicking the Open in Remix button, or copied to a clipboard and pasted in the user’s intended IDE.

Getting started

Navigate to the in your browser. First thing to notice is the Solidity Wizard and Cairo Wizard buttons.

One can choose any of the following tabs to begin creating an out-of-box smart contract code in either Solidity (for EVM chains) or Cairo (useful for Starknet). These are:

  • ERC20 for writing an ERC-20 token smart contract.

  • ERC721 for writing an NFT token smart contract.

  • ERC1155 for writing an ERC-1155 token smart contract.

  • Governor for creating a DAO.

  • Custom for writing a customized smart contract.

Writing an NFT contract

For illustration purposes, we will be creating a NFT smart contract.

Suppose you wanted to create a Mintable, Burnable ERC721 token and specify an appropriate license for it.

  1. Select the ERC721 tab.

  2. Give your NFT a name and a symbol by filling the Name and Symbol fields.

  3. Use the check-boxes on the left to select features of your token.

  4. Put a tick on the Mintable check-box.

  5. Put a tick on the Auto Increment Ids check-box, this ensures uniqueness of each minted NFT.

  6. Put a tick on the Burnable check-box.

  7. Either leave the default MIT license or type the license of your choice.

Notice that new lines of code are automatically written each time a feature is selected.

OpenZeppelin Wizard