Error when trying to mint NFT via cardano-cli

Hey guys I have the current utxos in my address

[edit begin]

6a722b717bce64d0d14a163be9aaa50618cb755ca8c97f573572101560cc3cd6     0        998065741 lovelace + TxOutDatumNone
6a722b717bce64d0d14a163be9aaa50618cb755ca8c97f573572101560cc3cd6     1        1569993 lovelace + 1 3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe.62616c6c612d6e6674697469 + TxOutDatumNone

[edit end]

and I am trying to mint an NFT on to that same address

cardano-cli transaction build \
--testnet-magic 1097911063 \
--alonzo-era \
--tx-in 6a722b717bce64d0d14a163be9aaa50618cb755ca8c97f573572101560cc3cd6#0 \
--tx-out addr_test1vrkzyhl6tq7yz5pq9f54r6lm02xd58smkuka3yf46yg2xzstw0h9j+1379280+"1 3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe.62616c6c612d6e6674697469" \
--change-address addr_test1vrkzyhl6tq7yz5pq9f54r6lm02xd58smkuka3yf46yg2xzstw0h9j \
--mint="1 3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe.62616c6c612d6e6674697469" \
--minting-script-file policy/policy.script \
--metadata-json-file metadata.json  \
--invalid-hereafter 66497789 \
--witness-override 2 \
--out-file matx.raw

when I run this i get

Estimated transaction fee: Lovelace 193353

and then I try to submit it using

cardano-cli transaction submit --tx-file matx.signed --testnet-magic 1097911063

and I keep getting this error


Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 0 (fromList [(PolicyID {policyID = ScriptHash "3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe"},fromList [("balla-nftiti",1)])])) (Value 999826447 (fromList [(PolicyID {policyID = ScriptHash "3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe"},fromList [("balla-nftiti",1)])]))))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (BadInputsUTxO (fromList [TxIn (TxId {_unTxId = SafeHash "cf7593072d546cf6681a526a208aa35483c982fdcae079c861a3842b204118c6"}) 0]))))])

What am I doing wrong ?

First thing that stands out: Your --tx-in is not from the UTxOs you cite. Where does it come from?

1 Like

Thank you for your reply. Ooops, I made a mistake, copied the output from the wrong terminal.

it is supposed to be

6a722b717bce64d0d14a163be9aaa50618cb755ca8c97f573572101560cc3cd6     0        998065741 lovelace + TxOutDatumNone
6a722b717bce64d0d14a163be9aaa50618cb755ca8c97f573572101560cc3cd6     1        1569993 lovelace + 1 3d8760eaa266553a9328d2cbf421b0b629aa2f99b3dd596662d479fe.62616c6c612d6e6674697469 + TxOutDatumNone

btw there a place a document or something that explains what exactly cardano-cli errors mean?

Thanks to one of your other posts at

I figured I was not signing the tx before submitting it, so I was submitting the previously signed tx. Haiyoo.

Appreciate the help.

1 Like

Glad that you fixed it.

Not that I know of, unfortunately.

After a while, you get used to parsing them to the inside until you find the real error, which is mostly quite readable (“ValueNotConserved”, “WitnessMissing”, etc.).

yep, I was able to.