* 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>
### Summary
Context: https://github.com/wormhole-foundation/wormhole-explorer/issues/154
This PR modifies all endpoints that receive an emitter/guardian address to accept a wider range of formats.
After this pull request, all of these are equivalent:
* `0x000000000000000000000000f890982f9310df57d00f659cf4fd87e65aded8d7`
* `000000000000000000000000f890982f9310df57d00f659cf4fd87e65aded8d7`
* `0xf890982f9310df57d00f659cf4fd87e65aded8d7`
* `f890982f9310df57d00f659cf4fd87e65aded8d7`
### Testing plan
* Added unit tests for the parsing code.
* Tested manually a few of the affected endpoints.
### Summary
* Swagger: remove `sortOrder` query parameter from several endpoints in which it didn't make sense.
* Swagger: remove query params `page` and `pageSize` from endpoints that return a single object.
* Sort the output of `GET /api/v1/governor/config` by ascending id.
* Refactor: remove duplicated code, format code for readability.
The API's swagger documentation exposes a route
`GET /api/v1/governor/max_available/:chain`,
but instead it should be
`GET /api/v1/governor/notional/max_available/:chain`.
### Summary
Changes to `GET /api/v1/governor/limit`:
* Fix the behavior of the parameters `page` and `pageSize` (which previously were being ignored).
* When no results are found, return an HTTP status code of 200 and set the response to an empty array.
* Remove the `sortOrder` query parameter.
The rationale for removing the `sortOrder` parameter is that sorting chains by ascending/descending chain ID doesn't seem to be a useful operation.
### Summary
In some cases, the query parameters for a MongoDB aggregation pipeline were not being initialized.
This led to errors in `GET /api/v1/vaas/{chain}/{emitter}/{seq}`.
Other endpoints could also have been affected.
Previously, when calling `GET /api/v1/governor/enqueued_vaas`, it returned a status code of 404 when there were no enqueued VAAs.
Now, the endpoint returns a status code of 200, and the response body contains an empty array.
### Summary
* On all endpoints, fix the behavior of the `page` parameter (which was previously being ignored).
* On `GET /api/v1/vaas`, fix the behavior of the `sortBy` parameter (which wasn't working when `parsedPayload=true`).
* For all endpoints, validate the query parameters `page`, `pageNumber` and `sortOrder`.
* Return descriptive errors when pagination-related parameters happen to be invalid (`page`, `pageSize`, `sortOrder`).
* Validate guardian addresses in query params.
### Testing plan
All parameters involved were manually tested.
### 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.
### 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.
* add vaaId and txHash relation in vaaIdTxHash collection
* add txHash in vaas collection
* add txHash in response vaa and as filter in find vaas endpoints
* Add pipeline to parse vaa
* Add parser repository and start building pipeline publisher
* Add queue sqs and in-memory to pipeline
* Add ses publisher and queue sqs/memory
* Fix watcher query
* Fix type to marshall/unsmarshall chainID and emitterAddress
* Fix js execution is run many times
* Add comments
* Add comments and improvements
* Change VAA Parser implementation
* Fix and change integration-test vaa-payload-parser
* fix appID mongo field name
* Fix guardianSet version 3, add xlabs to position 8
Co-authored-by: Agustin Pazos <agpazos85@gmail.com>
* 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>