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

Payload parser endpoint into API #585

Closed
mliu-xlabs opened this issue Jul 25, 2023 · 3 comments · Fixed by #596
Closed

Payload parser endpoint into API #585

mliu-xlabs opened this issue Jul 25, 2023 · 3 comments · Fixed by #596
Assignees

Comments

@mliu-xlabs
Copy link
Collaborator

As a blockchain developer I want to be able leverage the VAA parser so that I can understand the payload of any transfer made through wormhole.

Acceptance criteria

add VAA parser to an API endpoint
allow public to call the API endpoint and retreive data using the parser

@mliu-xlabs
Copy link
Collaborator Author

  • Identify filtering criteria

@gipsh gipsh changed the title Add VAA parser filter Payload parser endpoint into API Jul 26, 2023
@agodnic
Copy link
Contributor

agodnic commented Jul 26, 2023

Currently, the backend parses all VAAs and persists the result in a database.

Users can query the parsed data using the following endpoint:

$ curl -Ss 'https://api.wormscan.io/api/v1/vaas/4/000000000000000000000000b6f6d86a8f9879a9c87f643768d9efc38c1da6e7/260450?parsedPayload=true' | jq '.data.payload'
{
  "amount": "63087",
  "callerAppId": "OMNISWAP",
  "fee": "",
  "fromAddress": "0000000000000000000000002967e7bb9daa5711ac332caf874bd47ef99b3820",
  "parsedPayload": {
    "dstMaxGas": "732232",
    "dstMaxGasPrice": "264085680094",
    "soData": {
      "receiver": "c2c6ea6763f9e000fe05da95ddae023d2c27c4d0",
      "receivingAssetId": "0000000000000000000000000000000000000000",
      "transactionId": "3a67cef37a77c28bc7a42112e03236b70000000064c16913031de421ce04155b"
    },
    "swapDataDst": [
      {
        "approveTo": "e592427a0aece92de3edee1f18e0157c05861564",
        "callData": "wEuNWQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKAAAAAAAAAAAAAAAAApZ+e7napXEawzLK+HS9R++Zs4IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkwrqWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWJJagbHhTFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABCEc03u4b2VBlxPzBnOkgOozyCaHIAAfR86yP9a8Ct1Z5irCVXgnDP8bn2GQAB9A1QCx2OjvMeIcmdHbmmRE063xJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
        "callTo": "e592427a0aece92de3edee1f18e0157c05861564",
        "receivingAssetId": "0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
        "sendingAssetId": "11cd37bb86f65419713f30673a480ea33c826872"
      }
    ]
  },
  "payload": "BT18u6/eAwssSCA6Z87zenfCi8ekIRLgMja3AAAAAGTBaRMDHeQhzgQVWxTCxupnY/ngAP4F2pXdrgI9LCfE0BQAAAAAAAAAAAAAAAAAAAAAAAAAAAEBFOWSQnoK7Okt4+3uHxjgFXwFhhVkFBHNN7uG9lQZcT8wZzpIDqM8gmhyFA1QCx2OjvMeIcmdHbmmRE063xJwAUTAS41ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAAAAAAAAAAAAAACln57udqlcRrDMsr4dL1H75mzggAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGTCupYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYklqBseFMUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIRzTe7hvZUGXE/MGc6SA6jPIJocgAB9HzrI/1rwK3VnmKsJVeCcM/xufYZAAH0DVALHY6O8x4hyZ0duaZETTrfEnAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
  "payloadType": 3,
  "toAddress": "0000000000000000000000002967e7bb9daa5711ac332caf874bd47ef99b3820",
  "toChain": 5,
  "tokenAddress": "000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
  "tokenChain": 2
}

@walker-16
Copy link
Collaborator

I think that the goal of this task is to emulate the site https://vaa.dev/#/parse, that with a vaa bytes as a input get the parsed VAA, we can use the parsedVAA for this.

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

Successfully merging a pull request may close this issue.

3 participants