Skip to content

Fix parsing of transactions#44

Open
serejke wants to merge 94 commits into
jup-ag:mainfrom
serejke:fix-parsing
Open

Fix parsing of transactions#44
serejke wants to merge 94 commits into
jup-ag:mainfrom
serejke:fix-parsing

Conversation

@serejke

@serejke serejke commented Sep 4, 2024

Copy link
Copy Markdown
Contributor

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

serejke commented Sep 4, 2024

Copy link
Copy Markdown
Contributor Author

This PR fixes #32

@serejke

serejke commented Sep 5, 2024

Copy link
Copy Markdown
Contributor Author

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