GithubHelp home page GithubHelp logo

kaneki-ken03 / erc20deflationary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sheldenshi/erc20deflationary

0.0 0.0 0.0 1015 KB

An ERC20 Token that is designed to be deflationary.

JavaScript 10.28% Solidity 89.72%

erc20deflationary's Introduction

ERC20Deflationary

If you find this useful, I accept donation of your token :) my ERC-20 wallet address: 0x09224bC4a1Ea9ce55E953bFab083A055eC4d19B7

** Reward, reflect, and distribute are used interchangeably in code comments.

An ERC20 Token that charges a + b + c % of transaction fees.

  • a% of a transaction will be automatically added to the liquidity pool and locked.
  • b% of a transaction will be redistribute(reflected) to all holders.
  • c% of a transaction will be burnt.

Currently supports static reward (automatically redistribute b% of each transactions) and burn c% of transactions.

Feel free to submit an issue or pull request :)

How to use:

Clone this git repo and import ERC20Deflationary.sol

Example:

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";
import "./ERC20Deflationary.sol";

contract ExampleToken is Context, ERC20Deflationary {

    string private name_ = "ExampleToken";
    string private symbol_ = "EXT";
    uint8 private decimal_ = 9;
    uint256 private tokenSupply_ = 10 ** 12;
    uint8 private taxBurn_ = 10;
    uint8 private taxReward_ = 10;
    uint8 private taxLiquify_ = 10;
    uint8 private taxDecimals_ = 0;
    uint256 private minTokensBeforeSwap_ = (10 ** 6) * (10 ** decimal_);
    address private routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;

    constructor () ERC20Deflationary(name_, symbol_, decimal_, tokenSupply_) {
        enableAutoBurn(taxBurn_, taxDecimals_);
        enableReward(taxReward_, taxDecimals_);
        enableAutoSwapAndLiquify(taxLiquify_, taxDecimals_, routerAddress, minTokensBeforeSwap_);
    }

}

How to run test:

In the terminal

truffle test

Deploy

truffle migrate --network testnet

Verify

truffle run verify ExampleToken --network testnet

erc20deflationary's People

Contributors

sheldenshi avatar aress31 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.