abstract contract TokenProviderRole is Context {
    using Roles for Roles.Role;

    event TokenProviderAdded(address indexed account);
    event TokenProviderRemoved(address indexed account);

    Roles.Role private _providers;

    constructor () {

    }

    /**
     * @dev Makes function callable only if sender is an token provider.
     */
    modifier onlyTokenProvider() {
        require(isTokenProvider(_msgSender()), "TokenProviderRole: caller does not have the Token Provider role");
        _;
    }

    /**
     * @dev Checks if the address is an token provider.
     */
    function isTokenProvider(address account) public view returns (bool) {
        return _providers.has(account);
    }

    function _addTokenProvider(address account) internal {
        _providers.add(account);
        emit TokenProviderAdded(account);
    }

    function _removeTokenProvider(address account) internal {
        _providers.remove(account);
        emit TokenProviderRemoved(account);
    }
}
/**
 * @title TokenProviderRole
 * @dev An operator role contract.
 */
function isTokenProvider(address account) public view returns (bool) {
    return _providers.has(account);
}

/**
 * @dev Checks if the address is an token provider.
 */