-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[API/ANALYTICS] Scorecards endpoint (#232)
### 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") ```
- Loading branch information
Showing
9 changed files
with
211 additions
and
1 deletion.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters