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
[API] Scorecards Endpoint #221
Comments
For TVL look at https://wormhole.com/stats/ |
agodnic
added a commit
that referenced
this issue
Apr 20, 2023
### Summary This pull request adds the `GET /api/v1/scorecards` endpoint, which is required by the wormscan frontend. Most of the fields that this endpoint should return are being omitted because the data is not currently available on the backend. Those fields will be added iteratively as the data becomes available. The current format of the response is: ```json { "total_tx_count": "1300200", "24h_tx_count": "4200" } ``` Tracking issue: #221 ## Deployment details In order to populate the `"total_tx_count"` metric, a task is needed in influxdb: ``` $ cat total-vaa-count.flux option task = { name: "Total number of emitted VAAs", every: 1m } from(bucket: "wormhole-explorer") |> range(start: 2018-01-01T00:00:00Z) |> filter(fn: (r) => r._measurement == "vaa_count") |> group(columns: ["_measurement"]) |> set(key: "_measurement", value: "total_vaa_count") |> count() |> map(fn: (r) => ({r with _time: now()})) |> map(fn: (r) => ({r with _field: "total_vaa_count"})) |> to(bucket: "wormhole-explorer", org: "xlabs") ```
Current status
|
agodnic
added a commit
that referenced
this issue
May 4, 2023
### Summary This pull request adds volume metrics to influxdb. Also, it adds the 24h volume metric to `GET /api/v1/scorecards`. Tracking issues: #221, #280 ### Changes: * The `parser` service no longer generates metrics for influxdb. All metrics-related code was removed from that service, that code was moved to the analytics service instead. * New volume metrics were added to the analytics service. * The notional cache was modified to use token names (i.e.: ticker symbols) as keys instead of chain IDs. * The notional cache reader was moved to the `common/client/cache` package. * A little bit of duplicated code between the cache reader and writer was removed. * A 24h volume metric was added to `GET /api/v1/scorecards`. * A dictionary that stores token metadata was added under `common/domain/tokenbridge.go`. More tokens will be added to it in the near future.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Create the endpoint for scorecards of the dashboard to return al the statistics.
This endpoints returns the values to render the scorecards on the UI:
This endpoint doesnt support any parameters
Lets start mocking the value we cannot implement yet and use this ticket to discuss how we calculate the values.
The text was updated successfully, but these errors were encountered: