contract threext is ERC20, ERC20Capped, ERC20Pausable, ERC20Burnable, AccessControl, Ithreext {
    
    bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE");
    bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
    using SafeMath for uint256;
    
    constructor(address) ERC20("3X TOKEN", "3XT") ERC20Capped(1000000*10**18) public {

        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(BURNER_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());

        _mint(_msgSender(), 1000000*10**18);
        }
    
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override(ERC20, ERC20Capped, ERC20Pausable) {

        if( !(from == address(0) || to == address(0)) ) {
            require(!paused(), "ERC20Pausable: token transfer while paused");
            super._beforeTokenTransfer(from, to, amount);
        } else {
            ERC20Capped._beforeTokenTransfer(from, to, amount);
        }
    }
    
    /**
     * @dev Pauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_pause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function pause() external override {
        require(hasRole(PAUSER_ROLE, _msgSender()), "must have pauser role to pause");
        _pause();
    }

    /**
     * @dev Unpauses all token transfers.
     *
     * See {ERC20Pausable} and {Pausable-_unpause}.
     *
     * Requirements:
     *
     * - the caller must have the `PAUSER_ROLE`.
     */
    function unpause() external override {
        require(hasRole(PAUSER_ROLE, _msgSender()), "must have pauser role to unpause");
        _unpause();
    }

    /**
     * @dev Override burnFrom for deployer only.
     *
     *
     * Requirements:
     *
     * - the caller must have the `BURNER_ROLE`.
     */
    function burnFrom(address account, uint256 amount) public virtual override {
        require(hasRole(BURNER_ROLE, _msgSender()), "must have burner role to burnFrom");
        super.burnFrom(account, amount);
    }

    /**
     * @dev Grant burner role.
     *
     *
     * Requirements:
     *
     * - the caller must have the admin role.
     */
    function grantBurnerRole(address account) external override {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "sender must be an admin to grant");
        super.grantRole(BURNER_ROLE, account);
    }

    /**
     * @dev Grant pauser role.
     *
     * Requirements:
     *
     * - the caller must have the admin role.
     */
    function grantPauserRole(address account) external override {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Pauser");
        grantRole(PAUSER_ROLE, account);
    }
}
function grantBurnerRole(address account) external override {
    require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "sender must be an admin to grant");
    super.grantRole(BURNER_ROLE, account);
}

/**
 * @dev Grant burner role.
 *
 *
 * Requirements:
 *
 * - the caller must have the admin role.
 */