Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor subgraph network connector #298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xm3van
Copy link

@xm3van xm3van commented Jul 5, 2024

Description

Explain what you did and why, ser.

  • Updated the query function and subgraph URLs to use separate API endpoints for Mainnet, Arbitrum, and Optimism instead of a unified API, which due to TheGraph cancelling its hosted services is now depreciated.
  • Added new constants for Mainnet, Arbitrum, and Optimism subgraph URLs. Note an API Key is now required and should be defined in the .env file. Additional markets can be added by using the same logic: https://thegraph.com/explorer?chain=arbitrum-one&search=volume%2520curve
  • Modified the _get_subgraph_url function to return the appropriate URL based on the specified chain and environment.
  • Adjusted the convex function to utilize the updated _get_subgraph_url logic.
  • Ensured minimal changes to other parts of the code to maintain existing functionality.

Hygiene checklist

  • Changelog entry (Note sure if needed)
  • Everything public has a Numpy-style docstring
    (modules, public functions, classes, and public methods)
  • Commit history is cleaned-up with minor changes squashed together
    and descriptive commit messages following Tim Pope's style

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

… chain

- Updated the `query` function and subgraph URLs to use separate API endpoints for Mainnet, Arbitrum, and Optimism instead of a unified API, which due to TheGraph cancelling it's hosted services is now depreciated. 
- Added new constants for Mainnet, Arbitrum, and Optimism subgraph URLs. Note an API Key is now required and should be defined in the .env file. Additional markets can be added by using the same logic: https://thegraph.com/explorer?chain=arbitrum-one&search=volume%2520curve
- Modified the `_get_subgraph_url` function to return the appropriate URL based on the specified chain and environment.
- Adjusted the `convex` function to utilize the updated `_get_subgraph_url` logic.
- Ensured minimal changes to other parts of the code to maintain existing functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant