BIO
  • Introduction
    • Overview
    • Concepts
      • Decentralized Science
      • Bio Protocol
      • BioDAOs
        • Operations
        • Deal Flow Process
      • BioAgents
      • IP-Tokens
    • Bio Protocol V1
      • Launchpad
        • Curation
        • Funding
          • Auction
          • Bonding Curve
      • Liquidity Engine
      • bio/acc Rewards
      • BioAgents
    • BIO Token
  • Quick Start Guides
    • Join BioDAO Launches
      • Curate
      • Fund
      • Bridge BIO
      • Provide Liquidity
    • Start a BioDAO
    • Run BioAgents
  • Developers
    • DAO Setup
      • EVM Contracts
        • Token Contract
        • Vesting Contracts
        • Airdrop Contracts
      • Solana Programs
    • Launchpad
      • EVM Contracts
      • Solana Programs
    • Utils
      • TokenLists
      • Scripts
    • Audits
  • Resources
    • Media Kit
      • Bio Media
      • Network Media
    • Terms & Conditions
      • Airdrop: Terms & Conditions
      • BIO Genesis: Terms & Conditions
      • Launchpad: Terms & Conditions
  • Audits
Powered by GitBook
On this page
  • Key Features
  • Token Contract
  1. Developers
  2. DAO Setup
  3. EVM Contracts

Token Contract

PreviousEVM ContractsNextVesting Contracts

Last updated 1 month ago

Key Features

  • Token Minting: Controlled minting via MINTER_ROLE with no supply cap.

  • Transfer Restriction: Token transfers are initially disabled. Only addresses with TRANSFER_ROLE, the owner, or mint operations can transfer tokens before transfers are enabled. Transfers can be permanently enabled via the admin using enableTransfers().

  • Access Control Management: Role-based access control using OpenZeppelin's AccessControlDefaultAdminRules

    • Default Admin: Grants the ability to enable transfers and manage roles.

    • Transfer Role: Addresses assigned TRANSFER_ROLE can execute transfers even when transfers are disabled.

    • Minter Role: Addresses assigned MINTER_ROLE are authorized to mint new tokens.

Token Contract

Features

  • Role-Based Access Control: Implements OpenZeppelin's AccessControlDefaultAdminRules

    • DEFAULT_ADMIN_ROLE: Can enable transfers and manage other roles

    • MINTER_ROLE: Can mint new tokens

    • TRANSFER_ROLE: Can transfer tokens before transfers are enabled

  • Controlled Token Transfers:

    • Transfers are initially disabled

    • Only addresses with TRANSFER_ROLE, the owner, or minting operations can transfer tokens when transfers are disabled

    • Transfers can be enabled by admin (one-way operation - cannot be disabled once enabled)

  • Token Minting:

    • Controlled minting through MINTER_ROLE

    • No maximum supply cap

Inheritance

  • OpenZeppelin's ERC20

  • OpenZeppelin's ERC20Burnable

  • OpenZeppelin's AccessControlDefaultAdminRules

Key Functions

  • mint(address to, uint256 amount): Allows MINTER_ROLE to mint new tokens

  • enableTransfers(): Allows admin to enable transfers for all holders

  • burn(uint256 amount): Allows token holders to burn their tokens (inherited from ERC20Burnable)

GitHub - bio-xyz/token-contractsGitHub
Logo