Commit Graph

25 Commits

Author SHA1 Message Date
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
walker-16 ce83e1c3a6
Add gracefull shutdown to explorer api (#244) 2023-04-19 14:30:46 -03:00
agodnic 6fcf8f8270
Add route `GET /api/v1/address/{address}` (#228)
### Summary

This pull request adds the new route `GET /api/v1/address/{address}`, which returns the transactions in which the given address participated.

Examples:
* https://api.staging.wormscan.io/api/v1/address/0x0000000000000000000000001ef2e0219841d1a540d99c432a6eddb75deed1b7
* 000000000040d99c432a6eddb75deed1b7
* 000000000040d99c432a6eddb75deed1b7?page=0&pageSize=2
* 000000000040d99c432a6eddb75deed1b7?page=1&pageSize=2
* https://api.staging.wormscan.io/api/v1/address/1111111111114Sd894pYPPeXjZCDN5Gv8KCzwFGN

Tracking issue: https://github.com/wormhole-foundation/wormhole-explorer/issues/222
2023-04-12 15:51:33 -03:00
ftocal e1298f54ee
logging as json (#208) 2023-03-23 15:36:50 -03:00
ftocal 824ba3c7f9
Add contract watcher component (#190)
* init contract-watcher

* Add processor and blockain watchers

* Add pagination and save last blocknumber procesed by chain

* Add processing by blocks

* Add contract-watcher deploy manifest

* Add endpoint to get globalTransactions by Id

* Add originTX to get globalTransactionById endpoint

* Add wait time for new blocks

* Add initial block for evm watcher

* Add rate limit for evm watcher

* Handle testnet environment and small fixes

* Update wormhole dependencies

* Fix api documentation for swagger

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2023-03-15 16:52:50 -03:00
ftocal 867f1c2962
[API/PARSER] Chain activity and last transaction endpoints (#175)
* Fix analytic vaa metric and close metric client

* Add analytic component manifest

* Add metrics for cross chain activity endpoint

* Feature/add endpoint get vaa count (#171)

* Add trasaction controller + service

* Init getLastTrx endpoint

* Add endpoint for chain activity

* Add configmap and secrets for influx
Change Dockerfiles to support common library

* Add vaa_count endpoint

* Add cross-chain activity endpoint

* Fix vaa_count endpoint

* Add influx to api-service manifest

* Make response and add docs for chain activity endpoint

* Fix api deploy

* Fix lasl-trx json name

* Fix chain activity endpoint

* Fix doc and endpoint route last-txs

---------

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2023-03-07 16:25:42 -03:00
walker-16 7506ff0bf5
Add pprof all components (#134)
* Fix Config pprof in fly

* Refactor pprof explorer parser component

* Add pprof to spy component

* Add pprof to api [api/v1, /v1]
2023-02-03 15:18:44 -03:00
walker-16 1c7e58a27a
Handle guardianSet by p2p enviroment in fly/api (#112) 2023-01-31 11:38:17 -03:00
agodnic e929104ed9
[API] split api/v1 and v1 routing in different files (#101)
### Summary

Split `/v1` and `/api/v1` controllers into different packages (respectively `api/routes/guardian` and `api/routes/wormscan`).

Still need to move services/repositories/models according to the new package layout.
2023-01-27 12:58:37 -03:00
walker-16 f23f9f78ab
Enabled pprof fly and enable cors at app group in explorer api (#99) 2023-01-26 14:55:27 -03:00
agodnic 2a5b4db51a
[API] Fix issues related to swaggo v1.8.10 (#96)
### Summary

Updating from swaggo v1.8.9 to v1.8.10 caused issues with the generated swagger file.

The issue was solved by moving the handler for `GET /swagger.json` outside the `/doc` directory.
2023-01-26 12:04:01 -03:00
agodnic b6266b0776
[API] Fix typo in package name (#92)
Fix typo in package name
2023-01-26 11:00:02 -03:00
agodnic 0a382a0a5c
[API] Add route `GET /swagger.json` (#91)
Expose the API's swagger spec under the route `GET /swagger.json`
2023-01-26 10:32:20 -03:00
agodnic 6022d5fd14
[API] Increase documentation coverage (#90)
Add swagger documentation for all endpoints.

This addresses https://github.com/wormhole-foundation/wormhole-explorer/issues/68
2023-01-25 16:19:14 -03:00
walker-16 5225cc13fa
Feature/add grpc support (#73)
* Add grpc web support

* Add endpoints GRPC
- GovernorGetAvailableNotionalByChain
- GovernorGetEnqueuedVAAs
- GovernorIsVAAEnqueued
- GovernorGetTokenList

* Add endpoint GRPC - GetSignedVAA, GetSignedBatchVAA, GetLastHeartbeats, GetCurrentGuardianSet

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2023-01-23 11:45:09 -03:00
Gabriel Zimmermann b5e5ce73c5
Query pythnet collection for pyth chain id in api (#57)
* Query pythnet collection for pyth chain id in api

* Delete api/vq FindForPythnet endpoint

Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
2023-01-18 12:33:26 -03:00
gipsh 811e5e6f25
remove prefix (#55)
Co-authored-by: gipsh <gipsh@gmail.com>
2023-01-12 22:42:08 -03:00
gipsh 085d5ecd03
add swagger doc, makefile and readme (#53)
Co-authored-by: gipsh <gipsh@gmail.com>
2023-01-10 12:32:07 -03:00
walker-16 7255b214ca
18 fly api cache most recent data for most frequent queries (#51)
* Add use of sequence cache in API

* Add sequence cache in fly

* Deploy for API

* Improve use cache in API

* Remove sequence cache in fly for pythnet

Co-authored-by: Fernando Torres <fert1335@gmail.com>
2023-01-05 16:40:24 -03:00
walker-16 457471f51d
Add grpc api (#40) 2023-01-03 14:42:29 -03:00
walker-16 e245d7a8b0
Add index collections and health/ready kubernetes (#37) 2022-12-05 17:41:37 -03:00
walker-16 bf8319bf10
Modify vaa count endpoint to use capped collection (#35) 2022-11-23 10:15:16 -03:00
walker-16 8ed4804d63
Feature/refactor api (#34)
* Refactor error handling and comments

* Refactor and improve error handling and logs
2022-11-23 09:06:29 -03:00
walker-16 d4f43e37d6
Adds go rest api (#29)
* Adds api in go

* renames observation import in api

* Add signed_vaa endpoint [guardian api]

* Add governor endpoints to API

* fix devnet/api.yaml to up with a fixed port

Co-authored-by: Gabriel Zimmermann <gabrielemanuel@gmail.com>
2022-11-17 12:37:29 -03:00