valorem-labs-inc / clear-subgraph

The Clear Subgraph indexes data on the Valorem Clear smart contracts using a GraphQL interface. It updates data in response to contract ABI function calls and events. The Subgraph can be used to power frontend apps and integration use cases.
https://valorem.xyz/docs/clear-subgraph/
MIT License
1 stars 1 forks source link

Revise and update mappings #45

Closed nickadamson closed 1 year ago

nickadamson commented 1 year ago

This pull request updates the Subgraph's mappings & handlers to use the new schema introduced in #44.

I have documented most of the existing functions to the best of my understanding and the new ones entirely.

The biggest change is how the subgraph handles metrics. The logic of this function should be reviewed by a few of us in a meeting to ensure there are no errors.

There is a nightly deployment of this subgraph live and emitting logs with how the metrics change on a transactional basis on the Graph.

There is also a preview deployment of the frontend using this nightly subgraph's as the data source.

There are a few testnet related lines that should be deleted for mainnet release. They are being tracked in #34