BCS
  • Blockchain Station™
  • Quick Start
    • Quick Guide
  • API
    • Public API endpoints
    • Getting Started
    • Installation
    • Hyperthereum Schema Basics
    • Schema Structure
    • Implementation Details and Notes
    • Covalent indexing and querying API
    • API Methods
    • API Objects
    • Postman
  • Tutorials
    • Setup MetaMask (testnet)
    • Deploy a Smart Contract
    • Create a Fixed-cap Asset
    • Create a Variable-cap Asset
    • Create an NFT-based Game
  • Technology
    • Bonsai Tries
    • HBFT
    • Rewards
    • FAQ
Powered by GitBook
On this page
  • Create the Asset
  • 1. Write the token smart contract
  • 2. Compile your code into bytecode
  • 3. Deploy your Fixed-cap Asset by sending your code in a transaction to the Enter network
  • 4. Navigate to the explorer to check that your token has been created
  1. Tutorials

Create a Fixed-cap Asset

PreviousDeploy a Smart ContractNextCreate a Variable-cap Asset

Last updated 3 years ago

Create a Fixed-cap AssetFixed-cap assets are fungible tokens for which the supply is determined at the time of asset creation. No additional quantities can be generated afterwards.

Create the Asset

1. Write the token smart contract

https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20Capped.solgithub.comExtension of ERC20 that adds a cap to the supply of tokensThis contract is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as ) and expose them as external functions in the way they prefer. On the other hand, (such as ) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.

Functions

Fixed-cap Assets

  • constructor(cap)

  • cap()

  • _beforeTokenTransfer(from, to, amount)

General

  • name()

  • symbol()

  • decimals()

  • totalSupply()

  • balanceOf(account)

  • transfer(recipient, amount)

  • allowance(owner, spender)

  • approve(spender, amount)

  • transferFrom(sender, recipient, amount)

  • increaseAllowance(spender, addedValue)

  • decreaseAllowance(spender, subtractedValue)

  • _transfer(sender, recipient, amount)

  • _mint(account, amount)

  • _burn(account, amount)

  • _approve(owner, spender, amount)

  • _setupDecimals(decimals_)

2. Compile your code into bytecode

3. Deploy your Fixed-cap Asset by sending your code in a transaction to the Enter network

4. Navigate to to check that your token has been created

_mint
ERC20 Presets
ERC20PresetMinterPauser
the explorer