0

i have seen in forum.cardano someone giving the parameter --change-address and explaing that we dont have to calculate the fee.

does anyone can verify this for mainnet and this current moment, if that works?

also my understanding is, we will give input, then the output to the recipient(s) and the rest goes to my address (in --change-address)

for the example below, we see a mint Token. can we use --change-address for any transaction? also only to send ADA?

cardano-cli transaction build
--mainnet
--alonzo-era
--tx-in $txhash#$txix
--tx-out $address+$output+"$tokenamount $policyid.$tokenname"
--change-address $address
--mint="$tokenamount $policyid.$tokenname"
--minting-script-file $script
--metadata-json-file metadata.json
--invalid-hereafter $slotnumber
--witness-override 2
--out-file matx.raw

do we need also the "--alonzo-era " ?

1 Answer 1

1

Using --change-address will send all the remaining balances to the specified address. It also includes tokens other than adas. Just keep in mind that there is a min amount of ada required for each utxo.

Yes, you need --alonzo-era.

There are some mistakes in your build command. You are missing following options.

--tx-in-collateral before the first --tx-out

--mint-redeemer-value or --mint-redeemer-file after --mint-script-file

--mint-script-file, not --minting-script-file

1
  • great, thank you so much for your quick respond, that give me amazing flexibility in script i write, and i had issue for some TxHashes, for specific cases. For the mistakes i had in my build commands, was taken from guild operators, where they give only one specific case. i will check your option and testing before using :) thank you so much, and continue the amazing work mate. TTS
    – TTS17
    Jan 31, 2022 at 17:21

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.