I am trying to build a transaction with a wallet that has 6 ADA. The transaction fee is 165721 lovelaces. So 6000000 - 165721 = 5827019
lovelaces. But when i try to send 5827019 lovelaces I get an error saying I can't build the transaction because the Minimum UTxO threshold: Lovelace 999978. Is it possible to send all my ADA or do I have have to leave a balance of at least 1 ADA?
Here is my build command
cardano-cli transaction build --alonzo-era --testnet-magic 1097911063 --change-address <change_addr> --tx-in <tx_in> --tx-out <recpt_addr>+5827019 --out-file <build_file>
cardano-cli transaction build
does have some issues, I findcardano-cli transaction build-raw
is more reliable but need some extra work. You will need to calculate fees manually and add another--tx-out
for the change.cardano-cli transaction build-raw
command, you can specify exactly thefee
amount you wish to pay, and as long as it is above the minimum (which itself is estimated by thecalculate-min-fee
subcommand), the tx will be valid. Use this if you wish to create a transaction without change.