wormhole-explorer/api
Mariano e06057acfd
[ISSUE-1220] Add filters to /operations endpoint (#1262)
* start

 add search by chain

 change chainId query param handling

 change condition

 only from chain

change query

 add filter by appId

 add payload type for operations query

add logs

 add log for error in mongodb call

 add more logs and recover to find possible panic

change type to float64

add more logs for troubleshooting

 add more logs for troubleshooting payloadType query param

add another defer

* change query

* add exclusiveAppId,sourceChain and targetChain

* unify search criteria

* change queryies

* combine query params filters

* change implementation of sourceChain and targetChain

* insert filtering by chain and by appid as stages in aggregation pipeline

* fix appIds matching condition

* move query to a separate pipeline which starts from parsedVAA

* adjust query by appId

* add matching also for standardizedProperties

* change

* try using  instead of

* simplify query

* add queryLoggging and remove other parts of the query to troubleshooting

* working

* add index creation

* update swagger docs

* tweak index performance and fix timestamp on parsedVaa collection

* start

 add search by chain

 change chainId query param handling

 change condition

 only from chain

change query

 add filter by appId

 add payload type for operations query

add logs

 add log for error in mongodb call

 add more logs and recover to find possible panic

change type to float64

add more logs for troubleshooting

 add more logs for troubleshooting payloadType query param

add another defer

* change query

* add exclusiveAppId,sourceChain and targetChain

* unify search criteria

* change queryies

* combine query params filters

* change implementation of sourceChain and targetChain

* insert filtering by chain and by appid as stages in aggregation pipeline

* fix appIds matching condition

* move query to a separate pipeline which starts from parsedVAA

* adjust query by appId

* add matching also for standardizedProperties

* change

* try using  instead of

* simplify query

* add queryLoggging and remove other parts of the query to troubleshooting

* working

* add index creation

* update swagger docs

* tweak index performance and fix timestamp on parsedVaa collection

* add lookup for globaltransactions
2024-04-09 09:57:08 -03:00
..
cacheable
docs [ISSUE-1220] Add filters to /operations endpoint (#1262) 2024-04-09 09:57:08 -03:00
handlers [ISSUE-1220] Add filters to /operations endpoint (#1262) 2024-04-09 09:57:08 -03:00
internal [ISSUE-1213] Refactor of top-contributors stats and activity job (#1215) 2024-03-18 10:21:42 -03:00
middleware [ISSUE-1220] Add filters to /operations endpoint (#1262) 2024-04-09 09:57:08 -03:00
response
routes [ISSUE-1220] Add filters to /operations endpoint (#1262) 2024-04-09 09:57:08 -03:00
rpc
.gitignore
Dockerfile
Makefile
README.md
go.mod Changes to support ci/cd workflow in staging environment (#1166) 2024-02-29 11:14:31 -03:00
go.sum Changes to support ci/cd workflow in staging environment (#1166) 2024-02-29 11:14:31 -03:00
main.go Add cache to governor endpoints (#1271) 2024-04-03 14:58:04 -03:00

README.md

API

How to build

make build

Config

You will need to set some env variables with the prefix WORMSCAN

  • WORMSCAN_DB_MONGO
  • WORMSCAN_DB_NAME
  • WORMSCAN_PORT

for example:

WORMSCAN_DB_URL=mongodb://localhost:27017/wormhole WORMSCAN_DB_NAME=wormhole WORMSCAN_PORT=5555 WORMSCAN_RUNMODE=DEVELOPMENT ./api

API Documentation

Documentation is automagically generated via swaggo using annotations on code and placed inside doc/ folder.

To install swag tool run this

go install github.com/swaggo/swag/cmd/swag@latest

To generate or update the doc run:

make doc