0

I'm using a Python library solana-py to send Solana transactions. My question is, if I use skip_confirmation=False in TxOpts for the opts for the transaction, if the tx fails, will the send_transaction() function return the transaction ID (TXID)?

opts = TxOpts(skip_confirmation=False)
resp = await solana_client.send_transaction(txn, wallet, opts=opts)
transaction_id = str(resp.value)

How will the resp.value field look if the transaction fails?

1 Answer 1

2

No. If you send a transaction with skip_confirmation as False and the transaction is not Processed, Confirmed, or Finalized (Depending on your setup) it will raise an error. If you don't want this to happen you can check the transaction status manually.

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.