Giter Club home page Giter Club logo

eth-avax-mod3's Introduction

Arya Token (ARCH) Smart Contract

Overview

Arya Token (ARCH) is an Ethereum-based ERC-20 token smart contract that provides basic functionalities for minting, burning, and transferring tokens. The contract owner has the exclusive right to mint new tokens.

Contract Details

  • Name: Arya Token
  • Symbol: ARCH
  • Decimals: 18
  • Total Supply: Tracks the total supply of the token.

Smart Contract Functionalities

Minting

The contract owner can mint new tokens using the mint function. Only the contract owner has the authority to mint tokens, providing a secure way to manage the token supply.

solidity function mint(address to, uint256 amount) public { require(msg.sender == owner, "Only the contract owner can mint tokens."); require(amount > 0, "Amount must be greater than 0.");

balances[to] += amount;
totalSupply += amount;

}

Burning

Tokens can be burned using the burn function. The owner can reduce the token supply by burning a specified amount of tokens from a particular address.

function burn(address from, uint256 amount) public { require(amount <= balances[from], "Amount exceeds balance.");

balances[from] -= amount;
totalSupply -= amount;

}

Transferring

The contract supports the standard ERC-20 token transfer functionality through the transfer function. Users can transfer tokens to another address, provided they have a sufficient balance. function transfer(address to, uint256 amount) public { require(amount <= balances[msg.sender], "Amount exceeds balance."); require(to != address(0), "Cannot transfer to the zero address.");

balances[msg.sender] -= amount;
balances[to] += amount;

}

Deployment

To deploy this contract, compile it using a Solidity compiler version compatible with ^0.8.18. After compilation, deploy the contract on an Ethereum-compatible blockchain network.

License

This smart contract is released under the MIT License. See the LICENSE file for more details.

eth-avax-mod3's People

Contributors

suraj-aayush 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.