The Mint Token (MTOK) is an ERC20 token implemented as a Solidity smart contract. It provides a simple implementation of an ERC20 token with the ability to mint tokens by the contract owner, transfer tokens between addresses, and burn tokens.
The Mint Token smart contract is based on the ERC20 token standard, which defines a set of rules and functions that an Ethereum token contract should implement. It also includes the Ownable contract from OpenZeppelin for owner-based access control.
-
Minting Tokens: The contract owner can mint new tokens and send them to a specified address.
-
Transferring Tokens: Users can transfer tokens between addresses, accounting for the token's decimal precision.
-
Burning Tokens: Users can burn (destroy) their own tokens.
To deploy and interact with the Mint Token contract, you'll need the following:
- An Ethereum development environment (e.g., Remix, Hardhat, Truffle)
- Ether for contract deployment and transactions
- Knowledge of Solidity and Ethereum smart contracts
-
Deploy the
MintToken.sol
smart contract to your chosen Ethereum development environment. -
Once deployed, the contract owner will be able to mint an initial supply of tokens to their address.
- clone the repository or download it as zip and unzip it from [github][https://github.com/Ifeanyi-Ani/token-management.git].
- Go to [remix][https://remix.ethereum.org].
- Make sure you are on the contract folder and click upload folder. Upload the cloned token-management folder in your local mechine to remix.
- Open the token-management folder and open the MintToken.sol file in it
- Deploy the contract.
- To mint new tokens, the contract owner should call the
mint
function, specifying the recipient's address and the amount of tokens to mint. - Users can transfer tokens by calling the
transfer
function, providing the recipient's address and the amount of tokens to send. The function accounts for the token's decimal precision. - Users can burn (destroy) their own tokens by calling the
burn
function and specifying the amount of tokens to burn.