EnterCoin
  • EnterCoin Documentation
  • 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 Objects
    • Postman
  • Tutorials
    • Setup MetaMask (Mainnet)
    • 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 Variable-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
  • 5. You can use the _mint function to create additional units of the token
  1. Tutorials

Create a Variable-cap Asset

PreviousCreate a Fixed-cap AssetNextCreate an NFT-based Game

Last updated 3 years ago

Create the Asset

1. Write the token smart contract

Functions

  • 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 Variable-cap Asset by sending your code in a transaction to the Enter network

5. You can use the _mint function to create additional units of the token

This 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.

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

_mint
ERC20 Presets
ERC20PresetMinterPauser
the explorer
openzeppelin-contracts/ERC20.sol at master · OpenZeppelin/openzeppelin-contractsGitHub
Logo