Commit Graph

30 Commits

Author SHA1 Message Date
ftocal 9d280f7d5f
Add W token for ethereum, arbitrum, optimism and base (#1358)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-04-25 17:06:14 -03:00
ftocal 688a0d0f71
Store duplicate vaas on a secondary collection (#1308)
* Add support to scroll in tx-tracker

* Handle duplicated vaa in fly

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Modify tx-tracker and pipeline to support duplicated vaas
Co-authored-by: ftocal <fert1335@gmail.com>

* Add isDuplicated flag in vaas and operations endpoints
Add new endpoint to find duplicated vaas by vaa id
Co-authored-by: walker-16 <agpazos85@gmail.com>

* Add metrics for duplicated vaas

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Update node dependencies in spy

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Fix promethes metrics for missing tx-hash in tx-tracker

Co-authored-by: walker-16 <agpazos85@gmail.com>

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2024-04-22 14:26:07 -03:00
ftocal 36e6c0a715
Add api key for coingecko api in notional jobs (#1259)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-27 14:42:04 -03:00
ftocal b19bc16dfb
Update list of available tokens (#1246)
* Update list of available tokens

Co-authored-by: walker-16 <agpazos85@gmail.com>

* Handle too many requests in notional jobs

---------

Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-03-25 15:17:26 -03:00
Mariano faa8e38b2e
[ISSUE-1213] Refactor of top-contributors stats and activity job (#1215)
* start refactor of stats and activity job

 change approach for collecting stats and activity metrics

 multiple stuff

fix unfinished merging conflicts

 changes

 update

Delete .run/wormhole-explorer-api.run.xml

 add unit-tesdt

 add unit-test for mayan and allbrdige

add protocols-stats-1h job

 add new job

 change stats query

fix query

 start refactor of stats and activity job

 change approach for collecting stats and activity metrics

 multiple stuff

fix unfinished merging conflicts

 changes

 update

Delete .run/wormhole-explorer-api.run.xml

 add unit-tesdt

 add unit-test for mayan and allbrdige

add protocols-stats-1h job

 add new job

 change stats query

fix query

* remove temp backfiller

* fix unit-tests

* remove useless dbconsts

* remove useless consts

* fix some renaming

* fix unit-tests

* fix tvl portal_token_bridge
2024-03-18 10:21:42 -03:00
Mariano 6bbfa7bf23
Add cache to protocols stats endpoints (/protocols/stats) (#1149)
* add cache to protocols stats endpoint

 add mock for cache

add unit test case for cache miss

 change from to current

* add configs

* add missing config for api-service.yaml

* add cache ttl for staging-mainnet
2024-03-04 15:55:53 -03:00
ftocal 3dba12b1f5
Fix aws-sdk dependencies (#1162)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2024-02-28 16:33:30 -03:00
ftocal a882355c05
Add transfer prices backfiller in analytics (#1153)
* Add transfer prices backfiller in analytics
Save notional prices in s3 bucket

* Code review updates
2024-02-27 15:17:59 -03:00
Mariano 175abbb11a
[Issue:1052] Create job for fetching contributor stats and storing in db (#1144)
* [Issue:1052] Create job for fetching contributor stats and storing in db

revert unnecessary changes on api/handlers/stats

revert changes in go.mod and go.sum

revert change in go.work

add schedule for contributors stats job

change response parsing order

changes due to draft-pr review

 move on with contributors activity implementation

change to every hour

fix typo

 change contributor stats implementation to do a single write transaction

 normalize to UTC contributors activity timestamp

 add cronjob schedule for contributors

[Issue:1052][Part 2] Create endpoint to expose contributors stats and activities  (#1123)

* add endpoint for retrieving stats and activity

* remove model.go file and move types to service file

* add unit tests to contributors service

* integrate new contributors controller

* fix more stuff

 fix unit-tests

 changes due to pr review

 fix query

 fix unit-tests

fix total_value_secure

 move constantes to common pkg

remove extra changes

rename contributor to protocols

 finish renames

Changes for deployment

adjust different response types from different protocols contributors

 fix controller test

 big refactor in activty job and stats job since protocols are returning different formats

api responding fine

 remove uneccessary generics

 target dbconsts

 fix

Delete deploy/common/env/staging-mainnet.env

undo unwanted changes

 readd staging-mainnet.env

 fix unit-tests

add missing protocols_stats/activity_version

 remove property protocols_json

fix JOB_ID env var in protocols-activity.yaml

fix typos in env vars configs

 change tu numbers

 changes due to own review

 add new line

* add swagger docs
2024-02-22 14:58:45 -03:00
ftocal e7b7f358b5
Add new fields in the transfer report (#1124) 2024-02-14 14:35:52 -03:00
ftocal 278cd50dcb
Fix txHash in solana with job (#1076)
* Remove filter solanas and aptos from method getVaasToMigrate

* Fix origin tx in solana
Add k8s service for tx-tracker

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2024-01-31 19:41:41 -03:00
walker-16 fb0573c160
migrate vaa to globaltransaction origintx (#940)
* migrate vaa to globaltransaction origintx

* Add deploy configuration for job to migrate vaas to originTx

* Add option to run migration process by range of date

* Update go dependencies for jobs

* Fix kind of job in deployment

---------

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2024-01-30 12:19:31 -03:00
ftocal d7391f6ba1
Create api notional with historical prices (#931)
Add historical prices job
Change transfer report job
2024-01-02 10:38:03 -03:00
ftocal 695fd0dcd4
Add supported tokens for testnet (#810)
Update supported tokens for mainnet
2023-11-28 10:16:40 -03:00
ftocal d45addcd59
Fix csv transfer report (#764) 2023-10-24 17:11:37 -03:00
ftocal 28fc5198b0
New job for transfer report (#756)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-10-20 18:30:34 -03:00
ftocal 420d342612
Use token id as unique key in cache for prices (#701)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-09-22 16:14:02 -03:00
gipsh 3fa1804c1a
add redis prefix to communication channel (#651) 2023-08-22 15:24:14 -03:00
walker-16 1e5aeedfd9
Fix notional error with coingecko and add endpoint to push metrics in… (#551)
Fix notional error with coingecko and add endpoint to push metrics in analytics
Co-authored-by: ftocal <fert1335@gmail.com>
2023-07-18 11:33:17 -03:00
walker-16 520997f6d7
Fix environment env var in jobs component (#547) 2023-07-17 11:17:05 -03:00
ftocal 1440fa3741
Minor changes for production deployment (#541)
Co-authored-by: walker-16 <agpazos85@gmail.com>
2023-07-14 14:20:42 -03:00
gipsh c77ce3bcb4
fix separator (#481) 2023-06-29 18:35:31 -03:00
gipsh 2306d103d8
321 replace redis to elasticcache (#467)
* redis prefix support for caches

* fly support for prefix

* unit tests

* redis prefix for notional cache updater

* fix test

* fix tests

* use redis-prfix from config map
2023-06-28 15:04:36 -03:00
agodnic 0ec1cb86e2
Use decimals instead of floats in price cache (#362)
## Description

Previously, the notional cache was using the `float64` type to manipulate price data. Since floating point types can't represent price data accurately, this commit changes the codebase to use a lossless representation (i.e.: `decimal.Decimal`).
2023-05-31 16:24:40 -03:00
agodnic 37d6d42c19
Remove duplicated code in token database (#356)
### Summary

Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/344

Before this pull request, there were two separate token databases (one being used by the InfluxDB backfiller, and another one in the `common/` module being used by the analytics service).

Having two different token databases resulted in inconsistencies, due to each of these databases containing different tokens.

This PR unifies those two databases into a single one, under the `common/` module.
2023-05-30 11:14:19 -03:00
agodnic c25ebcb6fc
New endpoint: top chain pairs by number of transfers (#307)
### Summary

Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/275

This pull request implements the endpoint `GET /api/v1/top-chain-pairs-by-num-transfers`, which returns the chain pairs that have the most transfers.Internally, the endpoint uses data summarized daily to speed up query execution times.

This endpoint has a mandatory query parameter named timerange, which must be set to `7d`, `15d` or `30d`.
2023-05-12 13:05:18 -03:00
agodnic a31d59822d
Add definitions to token dictionary (#292)
### Summary

In order to compute volume metrics for each token, we need metadata about the token that is not present in the VAAs (e.g.: decimals, symbol).

That information is statically defined in `common/domain/tokenbridge.go`. This pull request adds the most relevant tokens (i.e.: the tokens that contribute the most volume) to the existing definitions. It is very likely that more token definitions will be added in the future as needed.

The token metadata that was previously defined in the `notional` package (symbols, coingecko IDs) was also moved to `common/domain/tokenbridge.go`. 

Tracking issue https://github.com/wormhole-foundation/wormhole-explorer/issues/281
2023-05-08 17:51:18 -03:00
agodnic d9d49ec919
Add 24h volume to scorecards (#274)
### Summary

This pull request adds volume metrics to influxdb. Also, it adds the 24h volume metric to `GET /api/v1/scorecards`.

Tracking issues: https://github.com/wormhole-foundation/wormhole-explorer/issues/221, https://github.com/wormhole-foundation/wormhole-explorer/issues/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.
2023-05-04 20:17:03 -03:00
walker-16 ffeb5927f8
Add notional cache client (#241)
* Add notional cache client

* gracefull shutdown pubsub and distributed cache
2023-04-20 17:02:25 -03:00
ftocal 4f438ae188
Add notional asset lookup (#239)
* Add notional job

* fix coingecko integration

* Add deployment for notional jobs

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2023-04-18 12:09:31 -03:00