abstract contract Mintable is Pausable {
    address private _minter;

    event MinterTransferred(address indexed previousMinter, address indexed newMinter);
    
    /**
     * @dev Initializes the contract setting the minter.
     */
    constructor (address minter) internal {
        _minter = minter;
        emit MinterTransferred(address(0), minter);
    }
    
    /**
     * @dev Returns the address of the current minter.
     */
    function minter() public view returns (address) {
        return _minter;
    }

    /**
     * @dev Throws if called by any account other than the minter.
     */
    modifier onlyMinter() {
        require(isMinter(), "Mintable: caller is not the minter");
        _;
    }

    /**
     * @dev Returns true if the caller is the current minter.
     */
    function isMinter() public view returns (bool) {
        return _msgSender() == _minter;
    }

    /**
     * @dev Transfers minter of the contract to a new account (`newMinter`).
     * Can only be called by the current owner.
     */
    function setNewMinter(address newMinter) public virtual onlyOwner {
        _transferMinter(newMinter);
    }

    /**
     * @dev Transfers minter of the contract to a new account (`newMinter`).
     */
    function _transferMinter(address newMinter) internal virtual {
        require(newMinter != address(0), "Mintable: new minter is the zero address");
        emit MinterTransferred(_minter, newMinter);
        _minter = newMinter;
    }
}
/**
 * @dev Contract module which allows children to implement an mechanism allows Owner to
 * mint more token.
 */
function setNewMinter(address newMinter) public virtual onlyOwner {
    _transferMinter(newMinter);
}

/**
 * @dev Transfers minter of the contract to a new account (`newMinter`).
 * Can only be called by the current owner.
 */