1

I am working on solana transactions, i already do a decode instructions using IDL. How to determine the main instruction of a transaction?

I am curious about the third party API like shyft/helius. How they determined it? they have transaction->type on the root of object, and sometimes they don't include all of the instruction on their transaction->actions field.

1 Answer 1

2

There is no "main instruction" in a Solana transaction. All instructions in the transaction get executed atomically(if one fails, all fail).

A Solana transaction consists of the signatures and a transaction message. The instructions for a transaction can be found in the transaction message.

read more about transactions here: https://solana.com/docs/core/transactions

Third-party RPC providers parse and do more computation to present the transaction data in a more readable format compared to using the getTransaction.

1
  • 1
    Thanks for the reply. it's clear now. Commented Aug 28 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.