Git Product home page Git Product logo

mcrequirement_05's Introduction

MyERC20Token

This repository contains a simple ERC-20 token contract written in Solidity.

Contract Details

  • Token Name: MyTokenName
  • Token Symbol: MTK
  • Decimals: 22
  • Initial Supply: Specified during contract deployment

Usage

To run the program, you can use Remix, an online Solidity IDE to get started. Here's the step-by-step instruction on how to make this work:

  1. Open Remix (https://remix.etherum.org)
  2. Copy the main.sol in the text editor inside remix
  3. Compile the code with compiler set to 0.8.9+
  4. Deploy and Run The Code

Testing

After deploying the code, you should be able to Deploy & Run Transactions using the contract. Click the Deploy button and you'll see under Deployed/Unpin Contract your deployed contract. You can then proceed to test the code there using the UI they provide for testing how it works.

You can test most of the function specified at [Public Function](###Public Function)

Functions

Public Functions

  • totalSupply: Returns the total supply of the tokens.
  • balanceOf: Returns the token balance of a given account.
  • transfer: Transfers a specified amount of tokens to a recipient.
  • allowance: Returns the remaining number of tokens that the spender is allowed to spend on behalf of the owner.
  • approve: Approves a spender to spend a specified amount of tokens on behalf of the message sender.
  • transferFrom: Transfers a specified amount of tokens from one account to another, given the sender has been approved to spend the amount.

Owner-Only Functions

  • updateOwner: Updates the owner of the contract.
  • mint: Mints new tokens to the owner's account.
  • burn: Burns a specified amount of tokens from the owner's account.

Internal Functions

  • _transfer: Handles the transfer of tokens between accounts.
  • _approve: Handles the approval of a spender to spend a specified amount of tokens on behalf of the owner.
  • _mint: Handles the minting of new tokens.
  • _burn: Handles the burning of tokens.

Events

  • Transfer: Emitted when tokens are transferred from one account to another.
  • Approval: Emitted when an account approves a spender to spend tokens on its behalf.

Deployment

To deploy the contract, provide an initial supply value. The contract deployer will be assigned as the owner of the contract.

Author

Renz Angelo Aguirre

License

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

mcrequirement_05's People

Contributors

beepboopbit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.