Git Product home page Git Product logo

mcrequirement_02's Introduction

Simple Contract

This program is a simple contract that tries to mint and burn supplies

Description

This program is a simple contract that contains mint and burn functionalities for supplies

Getting Started

Executing program

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 code below:
contract MyToken {

   // public variables here
   string public tokenName = "TempName";
   string public tokenAbbrv = "TN";
   uint public totalSupply = 0;

   // mapping variable here
   mapping (address => uint) public balances;

   // mint function
   function mint (address _address, uint _value) public {
      totalSupply += _value;
      balances[_address] += _value;

   }

   // burn function
   function burn (address _address, uint _value) public {
       if (balances[_address] >= _value) {
           totalSupply -= _value;
           balances[_address] -= _value;
       }
   }
}

the mint and burn function services as the methods that we'll be using for doing test in our program 3. Compile the code with compiler set to 0.8.9+ 4. Deploy and Run The Code

Testing the Code

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.

Changing the code.

If you want to change how minting works in the code, you can do so by changing the mint function you can see in the main.sol

Interacting with the code

To test your program, you can just go to the Deploy & Run Transactions section at the left navigation.

Authors

Renz Angelo Aguirre

License

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

mcrequirement_02'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.