I am sending transactions using the Solana web3js library:
sendRawTransaction
confirmTransaction
w/ "confirmed" commitment.
Although, how would I check that the tx was actually successful?
All I had to do was check for the return value of the confirmTransaction
const result = await connection.confirmTransaction(...);
if (result.value.err) { /* log err due to failed tx */}
you can check the transaction status like this
First, get the transactionId
let txid = await sendRawTransaction(transaction, connection);
Then go to this URL in Solana Explorer and check the status(pending and confirmed)
console.log(
Transaction submitted: https://explorer.solana.com/tx/${txid}?cluster=devnet
);
Specify the cluster in URL as you want devnet Mainnet etc.