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

Create Peggy Subgraph #41

Closed
8 tasks done
albertchon opened this issue Jul 18, 2021 · 0 comments · Fixed by #43
Closed
8 tasks done

Create Peggy Subgraph #41

albertchon opened this issue Jul 18, 2021 · 0 comments · Fixed by #43
Assignees
Labels
enhancement New feature or request

Comments

@albertchon
Copy link
Member

albertchon commented Jul 18, 2021

The current bridge UI is rather simple and does not provide users any visual indication of the progress of one's transfers.

We can use The Graph as a general purpose backend API for use by client-facing services as well as internal monitoring/alerting.

injective-station

The station (and possibly also DEX) can use this API to show historical cross-chain deposits/withdrawals as well as real-time estimates for pending deposits.

  • obtaining historical ERC-20 deposits from Ethereum -> Injective (by scanning SendToCosmosEvent)
  • obtaining a historical ERC-20 withdrawals from Injective -> Ethereum (by using CallHandlers on the submitBatch)

internal monitoring

Although this won't be used by any mission critical services, having this nice GraphQL API can easily allow us to make sure Peggy is functioning properly. With this API, we can create monitoring bots or even a future analytics site which uses this API as well.

  • tracking the last updated Validator set & powers (also by using CallHandlers on the updateValset function)
  • tracking all of the Deployed ERC-20's (by scanning ERC20DeployedEvent)
  • tracking the up-to-date state variables for convenience

Implementation Checklist

  • Define GraphQL Schema
  • Implement event and call handler mappings
  • Deploy on The Graph's hosted Ethereum Subgraph service
@albertchon albertchon added the enhancement New feature or request label Jul 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants