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

Add subgraph for delegation history #915

Merged
merged 22 commits into from
Sep 30, 2024
Merged

Add subgraph for delegation history #915

merged 22 commits into from
Sep 30, 2024

Conversation

adamgoth
Copy link
Collaborator

@adamgoth adamgoth commented Sep 26, 2024

  • Adds subgraph configuration
  • Updates fetchDelegatedTo to use subgraph
  • Update factory contarct for new factory
  • Fix ENS fetch on wrong network and other type issues

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
governance-portal-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 8:41am

Copy link

what-the-diff bot commented Sep 26, 2024

PR Summary

  • Updated Parameter Configuration
    The voteDelegateFactory address in eth-sdk configuration file has been updated.

  • Efficient Data Retrieval
    The method for fetching delegation data has been changed to use advanced subgraph queries, which results in a more efficient data retrieval process.

  • Flexible GraphQL Requests
    A new useSubgraph parameter has been added to the GraphQL request function, allowing for dynamic switching between different data sources depending on the request context.

  • Additional Subgraph Queries
    Four new subgraph queries ( allDelegates, allDelegations, delegateHistoryArray, and delegatorHistory) have been introduced, which will enable more comprehensive and efficient data querying.

  • Expanded Network Configuration
    The network configuration has been expanded to include new subgraph URLs, which will facilitate interaction with new data sources.

  • Extended Link Generation
    The logic for generating Etherscan links has been enhanced to include the TENDERLY network, ensuring all relevant networks are supported.

@tyler17 tyler17 changed the base branch from new-vnet to p1c September 26, 2024 23:28
@adamgoth adamgoth changed the title Adding subgraph Add subgraph for delegation history Sep 27, 2024
Copy link
Collaborator

@hernandoagf hernandoagf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a question about the subgraph URL used

Comment on lines 21 to 22
export const MAINNET_SUBGRAPH_URL =
'https://query-subgraph-staging.sky.money/private/subgraphs/name/jetstreamgg/subgraph-testnet';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be /subgraph-mainnet?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Collaborator

@tyler17 tyler17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. I noticed the vote histories & last voted dates look different than prod, but it's the same thing on staging, so it must be an issue with the staging mainnet spock being behind or stuck for votes.

@tyler17 tyler17 self-requested a review September 27, 2024 22:32
Copy link
Collaborator

@tyler17 tyler17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'm noticing some issues in the history:

  1. when I click to expand a delegation, it'll throw an error
  2. it says N/A for all delegate contract expirations
  3. When I compare the history for this address: 0xf65475e74c1ed6d004d5240b06e3088724dfda5d, I don't see the delegation events for BLUE or vigilant

Edit: here's a PR to fix these issues: https://github.com/makerdao/governance-portal-v2/pull/923/files

@tyler17 tyler17 merged commit 9ea1410 into p1c Sep 30, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants