Skip to content

Jambox11/MetacraftersERC20

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyToken Contract Summary

Overview

MyToken is an ERC20 token contract implemented in Solidity. It provides basic functionalities such as transferring tokens, burning tokens, and minting new tokens.

Description

The MyToken contract is a standard ERC20 token implementation written in Solidity. It allows users to transfer tokens to other addresses, burn their own tokens to reduce the total supply, and enables the contract owner to mint new tokens as needed. The token's name and symbol are set during the deployment of the contract, providing flexibility in branding and identification.

Getting Started

Installing

To get started with the MyToken contract, you need to have the Solidity compiler and a development environment like Hardhat or Truffle installed.

  1. Clone the repository:
    git clone https://github.com/yourusername/mytoken.git
    cd mytoken
  2. Install Dependencies:
    npm install

Executing Program

To deploy and interact with the MyToken contract, follow these steps:

Compile the contract:

npx hardhat compile

Deploy the contract:

npx hardhat run scripts/deploy.js --network <network-name>

Transfer Tokens:

await myToken.transfer(addressTo, amount);

Burn Tokens:

await myToken.burn(amount);

Mint Tokens (only accessible to contract owner):

await myToken.mint(addressTo, amount);

Help For common issues and troubleshooting:

Ensure you have the correct network configuration in your Hardhat or Truffle setup. Verify that your wallet is connected and has sufficient funds for gas fees. For more detailed help, run:

  npx hardhat help

Authors

James Akolo

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published