Chapter 45 ERC20 contract source code (including token lock, regular release and other functions)

1. Additional implementation functions include functions such as token ICO, lock-up of tokens, and regular release of
locked-up tokens ; 2. It is recommended that users use the SafeMath library to prevent bugs caused by calculation overflow;
3. This contract is normally compiled in remix And deploy normally in the alliance chain;

1. Contract source code

Note: 1. This contract is compiled normally in remix without any error or warning ;

           2. The deployment of this contract in the alliance chain is normal, and the function tests are normal;

           3. The contract version is older and the safeMath library should be introduced; based on this, the contract source code is for reference only;

    pragma solidity ^0.4.11;

    /**
     * ERC 20 token
     *
     * https://github.com/ethereum/EIPs/issues/20
     */
    contract DABToken  {
        string public constant name = "DAB Token";
        string public constant symbol = "DABT";
        uint public constant decimals = 18;
        uint256 _totalSupply = 600000000 * 10**decimals;

        function totalSupply() constant returns (uint

Guess you like

Origin blog.csdn.net/wonderBlock/article/details/111494563