Error trying to mint multiple native assets with multiple tx-outs


I’m trying to mint multiple different native assets with multiple different tx-outs, using cardano-cli transaction build.

When I try with just one tx-out, therefore also one token, it goes everything all right. However, when I try to do what I described with multiple different mintings and different tx-outs, I get the following error:

Invalid option `--mint=...

(note: as we should do with multiple tx-outs, I also repeated the flag --mint the number of native assets being minted)

--mint <asset_1>
--mint <asset_2>

I tried to remove the --mint flag but then I got MISSING: --mint value

What am I doing wrong? I imagine that I should use another flag rather than --mint when having multiple tokens being minted and multiple tx-outs maybe?

You need to us --mint only once and add all the minted assets to that line, and create a separate --tx-out for each wallet address where you want to send one or more assets. You will also have to combine the metadata for all assets in one json.

1 Like

Thank you so much, this was exactly what I needed.

I was passing one --mint flag for each asset, now I tried one --mint flag for all the assets, it worked!

Thx again!

1 Like