0

I created transfer function with blockfrost.js and cardano-serialization-lib.

I refered following code. https://github.com/blockfrost/blockfrost-js/tree/master/examples/simple-transaction

When I try to transfer with above code, I am getting following error.

"transaction submit error ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 2663366 (fromList []))))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash \"***\"}) (TxIx 1)]))))])"

Interesting thing is, transaction is success also, I can see success transaction in cardano explorer.

Can I ignore above error? Or how can I fix above error?

1
  • I think this error means you are spending a UTxO that is no longer available. Commented Dec 6, 2022 at 19:04

1 Answer 1

2

This probably means that you are trying to spend an UTxO that is already spent.

This can mean few things, but most probably that you are submitting the transaction for the second time.

If you are using Blockfrost, check the /mempool endpoint to see if you transaction is in the mempool or /txs if it is already on-chain.

6
  • It is on on-chain. So, what can I know from it? Can I ignore this error?
    – Heindrick
    Commented Dec 6, 2022 at 21:04
  • Depending on your use case. Why are you getting this error in the first place? Are you trying to retry the transaction more times? Commented Dec 6, 2022 at 21:21
  • Yes. you are correct.
    – Heindrick
    Commented Dec 6, 2022 at 21:23
  • In that case you can ignore the error. :) Commented Dec 6, 2022 at 21:31
  • 1
    The error just says that the utxo you are trying to spend is already spend, so you cannot do it again. Ideally, you would submit transaction once and check if it is in the mempool or txs and only if it is not there, you would resubmit ti again. Commented Dec 6, 2022 at 21:34

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.