Add cctp and portal_token_bridge stats to protocols-stats endpoint
changes
indent
more changes on the script
new working approach on influx task
indent script
tested insert
add 2 versions of the script
multiple changes
add 1day task
add logic to retrieve internal protocols
remove unecessary code
readd empty script
fix unit-tests and measurement namings
fix queries
fix alignment
rename function task
fix names
improvements on influx task
add .run config to gitignore
add .run to gitignore
fix task and rename
working api
multiple things
Delete .run/wormscan api.run.xml
Delete analytics/scripts/test_query.flux
wip
multiple fixes
fix test
wip
fix queries
fix unit-test due to query changes
### Description
This pull request removes duplicated code related to MongoDB connection/disconnection attempts. This code was copied across all 8 microservices.
The functionality is now unified under the `common/dbutil` package.
### Description
Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/535.
This pull request fixes an inconsistency between the endpoints `GET /api/v1/x-chain-activity` and `GET /api/v1/top-chain-pairs-by-num-transfers`.
The inconsistency arose because the endpoints computed the data in slightly different ways.
It was resolved by modifying the `GET /api/v1/top-chain-pairs-by-num-transfers` endpoint to use the same data source as `GET /api/v1/x-chain-activity`.
* Replace start_time and end_time query parameters with fixed ranges at the endpoint of the chain activity
Add InfluxDB tasks for enpdoint chain-activity for each timeSpan
Add cache for chain-activity endpoint
* Code review updates
### Description
Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/377
This pull request modifies the analytics service so that it persists price information for a VAA in MongoDB. Data is stored only for token bridge VAAs, and only if the price is cached for the symbol being used.
A new collection `transferPrices` has been created, with the following document model:
```
{
"_id": "22/0000000000000000000000000000000000000000000000000000000000000001/18087",
"price": "0.999684",
"symbol": "USDC",
"timestamp": 2023-06-06T14:04:47.000+00:00
"tokenAmount": "0.1",
"usdAmount": "0.0999684"
}
```
### Summary
Often times, the analytics service fails to start due to connectivity issues with other services (specifically redis).
Previously, no log information was being emitted, which made it hard to troubleshoot the exact reason for the service failing to start.
This pull request adds log messages when the service starts to make those cases easier to debug.