Function getProtocolBySubgraph

Finds a protocol by its subgraph URL.

const protocol = getProtocolBySubgraph('https://api.thegraph.com/...', 'api-key');
  • Parameters

    • subgraphUrl: string

      The subgraph URL to search for

    • theGraphApiKey: string

      The Graph API key for accessing protocol data

    Returns undefined | Protocol

    The protocol name if found, undefined otherwise