Transaction submit failures

Yes, I saw and shortly answered it. Yes, it is --metadata-json-file metadata.json. And you would, of course, need to create that metadata.json file beforehand. The relevant standard, how that should look like, is: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0025

They are in that address. It tells you with the values after the +s. First is always ADA/tADA/Lovelace and the rest are other tokens.

A wallet app would decode the base16-encoded token names after the .s for you.

On the one hand, that’s why I included the targetaddr= part in my process. I like to send them immediately to my wallet during minting to safe that extra transaction.

On the other hand:

txhash="ab83c7b35e91e81f511897c667d923fb7bbb0c4d79bb71098a7b5c4849adf55e"
txix="0"
targetaddr="<whereever you want to send>"
output=0
cardano-cli transaction build \
--testnet-magic 1097911063 \
--alonzo-era \
--tx-in $txhash#$txix \
--tx-out $targetaddr+$output+$amount\ $policyid.$tokenbase16 \
--change-address $paymentaddr \
--out-file send.raw
# Should fail again, because output is zero, but tell you what to set output to.
output=<whatever it tells you>
cardano-cli transaction build \
--testnet-magic 1097911063 \
--alonzo-era \
--tx-in $txhash#$txix \
--tx-out $targetaddr+$output+$amount\ $policyid.$tokenbase16 \
--change-address $paymentaddr \
--out-file send.raw
cardano-cli transaction sign  \
--testnet-magic 1097911063 \
--signing-key-file payment.skey  \
--tx-body-file send.raw  \
--out-file send.signed
cardano-cli transaction submit --testnet-magic 1097911063 --tx-file send.signed

This is just the same, but without the minting. So we don’t need --mint, --minting-script-file and --witness-override and we only sign with payment.skey, but not with policy.skey anymore.

If you want to send multiple times, you will have to look at cardano-cli query utxo before every send. The UTXOs change when sending.