Skip to content

An ERC20 Token that is burnable, mintable and has a max supply. Based on OpenZeppelin contracts and can be deployed using Remix IDE

Notifications You must be signed in to change notification settings

hamood1337/ERC20Token

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

ERC20 Token

Status License


An ERC20 Token based on OpenZeppelin contracts

📝 Table of Contents

🧐 About

An ERC20 Token that is mintable, burnable, and has a max supply of 21M tokens. The premint is set at 1M tokens. This project was made possible using openzeppelin contracts.

🏁 Getting Started

Remix IDE

Go to http://remix.ethereum.org and create a new workspace. Under the folder contracts, create a file called "MyToken.sol" and import the code

🔧 Configuring Your Token

Set Max Supply

Set the max supply of your token by modifying the variable _maxSupply on line 20

    uint256 private _maxSupply = 21000000 * 10 ** decimals();

The max supply is set at 21000000 (21M) coins, change this accordingly to fit your needs. The max supply of tokens will never change after deployment as it will be hard-coded into the contract.

Name Your Coin

Change the name of your token by going to line 22 and changing the text inside the quotation.

    constructor() ERC20("Maharmeh", "MRM") {

The first quotation "Maharmeh" is the coin name. The second quotation "MRM" is the symbol of the coin. Change these according to your needs.

PreMint Amount

Change the premint amount by going to line 26 and changing the number

     _mint(msg.sender, 1000000 * 10 ** decimals());

Change 1000000 to however many tokens you would like to premint when the contract is deployed. This function is only ran once at deployment. Make sure this doesn't exceed the max supply.

🎈 Usage

Compile the code on Remix IDE using the 0.8.2 Solidity Compiler.

🚀 Deployment

Deploy your contract using Remix IDE. Ensure you have enough for gas fees and that you are connected to the correct network.

⛏️ Built Using

✍️ Authors

🎉 Acknowledgements

  • OpenZeppelin Team

About

An ERC20 Token that is burnable, mintable and has a max supply. Based on OpenZeppelin contracts and can be deployed using Remix IDE

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published