Cardano cli transaction error

I am having this issue when trying to submit a transaction in the cli. Does anyone know what this means please and what I’m doing wrong.


Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (BabbageOutputTooSmallUTxO [((Addr Testnet (KeyHashObj (KeyHash "83183887eafd125cfb2002f977ea0967df37b98bdcc65500797caef0")) (StakeRefBase (KeyHashObj (KeyHash "154610e30b81988257fc98babb1f854dfb3d3910135f0847f993d6de"))),Value 902189 (fromList []),NoDatum,SNothing),Coin 978370)])),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (ValueNotConservedUTxO (Value 1073190 (fromList [(PolicyID {policyID = ScriptHash "9c8e9da7f81e3ca90485f32ebefc98137c8ac260a072a00c4aaf142d"},fromList [(4d657368546f6b656e,1000000)])])) (Value 1073190 (fromList [])))))])

Hi,

What amount are u trying to send? Its to small

Hello @Alexd1985 thank you for your response, I am trying to mint an nft with a script that queries the utxo every 15 seconds and as soon as the correct amount is sent to the receiving address then it attempts to mint the nft and send it to the paying wallet

And what is the amount set to be sent together with nft? Perhaps u didn’t calculated well the necessary amount… put 1.5 ada to be sure + nft/asset

here is the transaction information that was saved in the mongodb

_id: ObjectId('63dc9b610b6e5ffe7f19921c')
utxo: "a8af6208e0e421a4e9201e7294354ca0d10282f5e1e73c4ca7bcd88cf9cfdc5f"
txid:"0"
amount_in_lovelace: "50000000"
status:"minted"
amount_in_ada: "50.000000"
metadata_pathname: "Fatduck1.json"
hashed_token_name: "4661746475636b31"
sender_address:"addr_test1qzp3swy8at73yh8myqp0jal2p9na7dae30wvv4gq0972auq4gcgwxzupnzp9…"
created_at: 2023-02-03T05:27:44.543+00:00
__v: 0

What is with this amount? What is represent? Or maybe you receive another amount and because of this the script doesn’t mint the nft? You must also set the script to send back any wrong amount received

hmmm I honestly don’t know what that amount represents and yes I have a part in the script that refunds the wrong amount

_id: ObjectId('63dc4d9a72835b75493b1ff1')
utxo: "2d30e396e5785dc87e1607a2d3c52a85cd86c26b6dcad10243657028b5b8af28"
txid: "0"
amount_in_lovelace: "1073190"
status: "refund"
sender_address: "addr_test1qzp3swy8at73yh8myqp0jal2p9na7dae30wvv4gq0972auq4gcgwxzupnzp9…"
created_at: 2023-02-02T23:55:55.434+00:00
__v: 0

Its look like a wrong amount… and can’t be sent back because min amount required is 1 ADA and from here 1073190 - fee = less than 1 ADA

Did u test with this wrong amount?

Its the 3rd transaction

Yeah the first 4 transactions were tests to make sure that the wallet was set up correctly

I hadn’t had the nft mint script set up properly then

Then, before to start to run the script… send all funds (ada) out from the wallet, the balance should be 0 when u start the script.
And set the script to ignore, not refund small amounts… I mean if someone will send 1-1.17 ADA… u will always have this error (1.15 - fee (~0,17-0.20) = less than 1 ADA)

Ok I tried to send all funds out of the wallet and I get this error

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 2946578 (fromList []))))),UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash "a8aee1922a07592941da9c04de801b7b4324846665215b57b91fa240c95d3639"}) (TxIx 0)]))))])

its saying value 0?

I used this command earlier on to send 1.5ADA out of the wallet and it worked. How can I convert this to get it to send everything out of the wallet?

cardano-cli transaction build --testnet-magic 1 \
--tx-in a8aee1922a07592941da9c04de801b7b4324846665215b57b91fa240c95d3639#0 \
--tx-in a8af6208e0e421a4e9201e7294354ca0d10282f5e1e73c4ca7bcd88cf9cfdc5f#0 \
--tx-out addr_test1qzp3swy8at73yh8myqp0jal2p9na7dae30wvv4gq0972auq4gcgwxzupnzp90lych2a3lp2dlv7njyqntuyy07vn6m0q0mr7rm+1500000 \
--change-address addr_test1vqr8s3zxjy3rphluynzyvsra6l3f533zm60azw6ays8w50g374zzk \
--out-file ./_account/tx.unsigned
1 Like

first check all utxos for this wallet then add each one with tx-out (line by line)… I see u have also an asset on this wallet

Is this the address?
addr_test1vqr8s3zxjy3rphluynzyvsra6l3f533zm60azw6ays8w50g374zzk

yeah that’s the address

This is the balance of the wallet

yeah and can you see the transaction of 12 ADA was refunded back to my other wallet which means the refund function works so I don’t understand why the mint function doesn’t work

Here is the utxo query

                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
1b87abbe6bc0373c6f56ed27e80f1c371289a2acb6ebcc4d176f399f9a79f39c     0        50000000 lovelace + TxOutDatumNone
2d30e396e5785dc87e1607a2d3c52a85cd86c26b6dcad10243657028b5b8af28     0        1073190 lovelace + 1000000 9c8e9da7f81e3ca90485f32ebefc98137c8ac260a072a00c4aaf142d.4d657368546f6b656e + TxOutDatumNone
a8af6208e0e421a4e9201e7294354ca0d10282f5e1e73c4ca7bcd88cf9cfdc5f     0        50000000 lovelace + TxOutDatumNone

Do I have to add the address each time I add another txout line?

this is your problem, create a transaction just for this UTXO and send out