2

I am trying to fetch only the successful transactions on Solana. For this I use 2 functions under different scenarios, to fetch signatures and txns:

1. connection.getParsedTransaction(tx_signature, {commitment:'confirmed'}); 2. connection.getSignaturesForAddress(address, {before: before_tx_signature, limit: tx_num || 10}, 'confirmed'); 

Even after using commitment as both finalized and confirmed, I still get failed transactions from the Solana blockchain. Is there a way to fetch only signatures and transactions that have been successful in Solana and not get the data for failed ones?

1 Answer 1

1

A transaction gets confirmed and finalized, whether it's a success or a failure, since the whole network needs to run it to be sure that it fails.

There is no way to only filter by success or failure at the JSON RPC level, so you have to fetch all transactions and filter out the failed transactions.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.