Coder Social home page Coder Social logo

degenerc's Introduction

DegenERC Token

Overview

DegenERC is a simple ERC20 token implementation intended as a training project. It covers the basics of the ERC20 standard, including minting and burning tokens, managing allowances, and transferring tokens between accounts.

Features

  • ERC20 Standard Compliance: Implements the basic functions required by the ERC20 standard.
  • Minting: Allows the owner to mint new tokens to specific addresses.
  • Burning: Allows approved addresses to burn tokens.
  • Allowances: Supports the approval and transfer of tokens on behalf of another address.

Contract Details

The degenERC contract extends the ERC20 standard and adds functionalities to handle minting and burning with whitelists.

Constructor

The constructor initializes the token with a name, symbol, decimals, minting allowance for the owner, and total supply.

Functions

  • name(): Returns the name of the token.
  • symbol(): Returns the symbol of the token.
  • decimals(): Returns the number of decimals the token uses.
  • totalSupply(): Returns the total supply of the token.
  • balanceOf(address account): Returns the balance of a specified address.
  • allowance(address owner, address spender): Returns the remaining number of tokens that spender is allowed to spend on behalf of owner.
  • transfer(address to, uint256 value): Transfers value tokens to the address to.
  • transferFrom(address from, address to, uint256 value): Transfers value tokens from the address from to the address to.
  • approve(address spender, uint256 value): Approves spender to spend value tokens on behalf of the caller.
  • mint(address to, uint256 value): Mints value tokens to the address to.
  • burn(address to, uint256 value): Burns value tokens from the address to.
  • _updateMintWhitelist(address to, uint256 value): Updates the mint allowance for a specific address.
  • _updateBurnWhitelist(address to, uint256 value): Updates the burn allowance for a specific address.
       _                            _ _   
__   _| | __ _ ___    _   _ ___  __| | |_ 
\ \ / / |/ _` / __|  | | | / __|/ _` | __|
 \ V /| | (_| \__ \  | |_| \__ \ (_| | |_ 
  \_/ |_|\__,_|___/___\__,_|___/\__,_|\__|
                 |_____|                  

degenerc's People

Contributors

choyv 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.