Skip to content
TechPay
  • Website
  • GitHub
  • Discord
  • Twitter
Search
TechPay
  • betterdocs_homepage

Quick Start

  • Short Guide

Staking

  • Quick start
  • Overview
  • Stake on TechPay
  • Run a Validator Node
  • Run a Read-only node
  • Run a Testnet Validator
  • Testnet Faucet
  • Troubleshooting
  • Run a Full node
  • Run a Testnet read node

API

  • Public API endpoints
  • Getting Started
  • Installation
  • GraphQL Schema Basics
  • Schema Structure
  • Implementation Details and Notes
  • Covalent indexing and querying API

Tutorials

  • Set up metamask wallet
  • Deploy a Smart Contract
  • Set up Metamask (testnet)
  • Verify a Deployed Smart Contract
  • Create a Fixed-cap Asset
  • Create a Variable-cap Asset
  • Create a Local Test Network

Technology

  • Overview
  • Sirius pBFT
  • Proof of Stake
  • Transaction Fees
  • FAQ

How to use Ledger Nano with TechPay

  • Manage TechPay Assets with Ledger Nano S
  • How to Navigate techPay TPC
  • How to Check Your Account Balance
  • How to Receive TechPay Assets
  • How to Send TechPay Assets
  • Ledger FAQ
  • Home
  • Docs
  • Tutorials
  • Create a Variable-cap Asset

Create a Variable-cap Asset

Table of Contents
  • Create the Asset
  • 1 Write the token smart contract
    • Functions
  • 2 Compile your code into bytecode
  • 3 Deploy your Fixed-cap Asset by sending your code in a transaction to the TechPay 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

Variable-cap assets are fungible tokens for which additional quantities can be minted after creation.

Create the Asset #

1 Write the token smart contract #

openzeppelin-contracts/ERC20Capped.sol at master ยท OpenZeppelin/openzeppelin-contracts

This contract is designed to be unopinionated, allowing developers to access the internal functions in ERC20 (such as mint) and expose them as external functions in the way they prefer. On the other hand, ERC20 Presets (such as ERC20PresetMinterPauser) are designed using opinionated patterns to provide developers with ready to use, deployable contracts.

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 Fixed-cap Asset by sending your code in a transaction to the TechPay 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 #

What are your Feelings
Create a Fixed-cap AssetCreate a Local Test Network
Table of Contents
  • Create the Asset
  • 1 Write the token smart contract
    • Functions
  • 2 Compile your code into bytecode
  • 3 Deploy your Fixed-cap Asset by sending your code in a transaction to the TechPay 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

Copyright © 2023 TechPay