wormhole-explorer/analytics/cmd
agodnic 598db1b876
Persist symbol and price for VAAs (#384)
### 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"
}
```
2023-06-07 12:18:38 -03:00
..
metrics Fix vaa-count metric backfiller and Influx query for x-chain-activity endpoint (#382) 2023-06-05 16:33:52 -03:00
prices Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
service Persist symbol and price for VAAs (#384) 2023-06-07 12:18:38 -03:00
token_fetcher Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00
main.go Fix and refactor of analytics (#376) 2023-06-01 16:32:00 -03:00