Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Accept Solana hashes when filtering VAAs by txHash #212

Closed
agodnic opened this issue Mar 28, 2023 · 0 comments
Closed

[api] Accept Solana hashes when filtering VAAs by txHash #212

agodnic opened this issue Mar 28, 2023 · 0 comments
Assignees

Comments

@agodnic
Copy link
Contributor

agodnic commented Mar 28, 2023

Summary

Currently, we're only accepting searches in hex format i.e.: GET /api/v1/vaas?txHash=4d72d6d109ca9e124b3d2e96a9774ab3b9da75023d607811663c844af5a3a249

We should upgrade the API so that it can search for transactions using the Solana format, i.e.: GET /api/v1/vaas?txHash=5J6BU3FqpDBzdqfEnz8SndAh93nB5ReM4ATmuA2tB2AfJ3Xdhdx8NQocHCHiipDqeb369MV5S5rnqeZR3WPe6ymN

@agodnic agodnic self-assigned this Mar 28, 2023
agodnic added a commit that referenced this issue Apr 5, 2023
### Summary
This pull request adds the functionality to search for VAAs using Solana tx hashes, e.g.:

`GET /api/v1/vaas?txHash=2qnNNBQQQ152sGkQ1Rnq2Kdr48LvdN4oXwnTWyEmJqYYWFusLWxbwhpGS5KTXH1bKKx9gg9BLZMKd3g1cXiy7QMz`.

Also, the VAA objects returned by the API now have a new field `nativeTxHash`, which contains the tx hash that generated the VAA in the native format of the emitter chain.

Tracking issues: #212, #214

### Testing guidelines

Endpoints affected:
* `GET /api/v1/vaas` now supports Solana tx hashes by using the `?txHash=` query parameter. This search is limited to VAAs created by the portal token bridge.
* Some VAAs returned by the API should have a new field `nativeTxHash`. All VAAs related to the portal token bridge should have this field set.
*  An internal refactoring affected pretty much all routes under `GET /api/v1/vaas*`, which should be re-tested.
* In the response of `/api/v1/global-tx/`, the field `originTx.signer` has been renamed to `originTx.from`
@agodnic agodnic closed this as completed Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant