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

Fix parsing of transactions #44

Open
wants to merge 94 commits into
base: main
Choose a base branch
from
Open

Conversation

serejke
Copy link
Contributor

@serejke serejke commented Sep 4, 2024

Overview

This PR fixes parsing for some corner cases.

The PR updates the Jupiter IDL to the latest version fetched from https://solscan.io/account/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4#anchorProgramIdl

The new IDL version contains new instructions (like CreateTokenAccount), which were not recognized before. This transaction couldn't be parsed because the EventParser did not recognize the new Jupiter's instruction.

Separately, the fee parser now properly recognizes and ignores the memo instruction. The memo has a different parsed data (for this example transaction):

{
              "parsed": "TFe: 0, 0",
              "program": "spl-memo",
              "programId": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr",
              "stackHeight": 3
            }

which led to null-pointer error in this line (since the data.destination field is not there):

const destination = innerInstruction.parsed.info.destination;

jokrsec and others added 25 commits July 11, 2024 15:24
Fix extracting swaps for inner jupiter routing instructions
@serejke
Copy link
Contributor Author

serejke commented Sep 4, 2024

This PR fixes #32

@serejke
Copy link
Contributor Author

serejke commented Sep 5, 2024

Additionally, the parser now throws an error with the unknown instruction name

Also added support of the Jupiter Labs Perpetuals program's V2 instruction.

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 this pull request may close these issues.

3 participants