Handle dashboard helpers and related logic.
Get the relevant kwargs from the request.
Attributes: bounty (dashboard.Bounty): The bounty object for the specified request. bounty_kwargs (dict): The relevant key/values from the request to be used for the Bounty query.
Returns: dashboard.Bounty: The Bounty object.
Determine the value of the provided denomination and amount in ETH and USD.
Raises: Http404: The exception is raised if any error is encountered.
Returns: JsonResponse: A JSON response containing ETH and USDT values.
Determine the Github issue keywords of the specified Github issue or PR URL.
Todo: * Modify the view to only use the Github API (remove BeautifulSoup). * Simplify the view logic.
Returns: JsonResponse: A JSON response containing the Github issue or PR keywords.
Args: url (str): The URL to be normalized.
Returns: str: The normalized URL.
Sync the Bounty with Web3.
Args: bounty_contract (Web3): The Web3 contract instance. url (str): The bounty URL.
Returns: tuple: A tuple of bounty change data. tuple (bool): Whether or not the Bounty changed. tuple (dashboard.models.Bounty): The first old bounty object. tuple (dashboard.models.Bounty): The new Bounty object.
Python enum class that matches up with the Standard Bounties BountyStage enum.
Attributes: Draft (int): Bounty is a draft. Active (int): Bounty is active. Dead (int): Bounty is dead.
Define unsupported schema exception handling.
Determine whether or not the Bounty has changed.
Args: bounty_id (int): The ID of the Bounty. new_bounty_details (dict): The new Bounty raw data JSON.
Returns: bool: Whether or not the Bounty has changed. QuerySet: The old bounties queryset.
Handle BountyFulfillment creation for new bounties.
Args: fulfillments (dict): The fulfillments data dictionary. new_bounty (dashboard.models.Bounty): The new Bounty object. old_bounty (dashboard.models.Bounty): The old Bounty object.
Returns: QuerySet: The BountyFulfillments queryset.
Handle new Bounty creation in the event of bounty changes.
Returns: dashboard.models.Bounty: The new Bounty object.
Args: bounty_details (dict): The Bounty details.
Raises: UnsupportedSchemaException: Exception raised if the schema is unknown or unsupported.
Get data from bounty to be saved in activity records.
Args: bounty (dashboard.models.Bounty): The Bounty object.
Returns: dict: The Bounty data represented as a dictionary.
Get data from fulfillment to be saved in activity records.
Args: fulfillment (dashboard.models.BountyFulfillment): The BountyFulfillment.
Returns: dict: The BountyFulfillment data represented as a dictionary.
Args: event_name (string): the event old_bounty (dashboard.models.Bounty): The old Bounty object. new_bounty (dashboard.models.Bounty): The new Bounty object.
Raises: Exception: Log all exceptions that occur during fulfillment checks.
Returns: dashboard.Activity: The Activity object if user_profile is present or None.
Args: event_name (str): The event to be recorded. old_bounty (Bounty): The old Bounty object. new_bounty (Bounty): The new Bounty object.
Args: old_bounty (dashboard.models.Bounty): The old Bounty object. new_bounty (dashboard.models.Bounty): The new Bounty object.