<p>Using <code>--change-address</code> 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.</p>
<p>Yes, you need <code>--alonzo-era</code>.</p>
<p>There are some mistakes in your build command. You are missing following options.</p>
<p><code>--tx-in-collateral</code> before the first <code>--tx-out</code></p>
<p><code>--mint-redeemer-value</code> or <code>--mint-redeemer-file</code> after <code>--mint-script-file</code></p>
<p><code>--mint-script-file</code>, not <code>--minting-script-file</code></p>

CC BY-SA 4.0
2022-01-31T17:21:58.323Z
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
CC BY-SA 4.0
2022-01-31T16:01:26.480Z
2022-01-31T16:01:26.480Z
Tuvshintsenguun
<p>i have seen in forum.cardano someone giving the parameter --change-address and explaing that we dont have to calculate the fee.</p>
<p>does anyone can verify this for mainnet and this current moment, if that works?</p>
<p>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)</p>
<p>for the example below, we see a mint Token. can we use --change-address for any transaction? also only to send ADA?</p>
<p>cardano-cli transaction build <br />
--mainnet <br />
--alonzo-era <br />
--tx-in $txhash#$txix <br />
--tx-out $address+$output+&quot;$tokenamount $policyid.$tokenname&quot; <br />
--change-address $address <br />
--mint=&quot;$tokenamount $policyid.$tokenname&quot; <br />
--minting-script-file $script <br />
--metadata-json-file metadata.json  <br />
--invalid-hereafter $slotnumber <br />
--witness-override 2 <br />
--out-file matx.raw</p>
<p>do we need also the &quot;--alonzo-era &quot; ?</p>

<transaction><token><cardano-address>
build transaction without giving fee, is it possible? --change-address
# build transaction without giving fee, is it possible? --change-address

(Asked by: username_0 on 2022-01-31)

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 " ?

**Tags:** transaction, token, cardano-address

---

## 1 answers

### Answer by username_1 on 2022-01-31. Score: 1 | Accepted answer

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`

> **Comments:**
> **username_0**: 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  

---

