Cardano-CLI

What’s this option for on cardano-cli transaction -h

add-change Add a change address to a transaction

Good question would appreciate a technical answer. For now lets assume it’s to make changes in the input or output transaction before finalizing and sending it to the Blockchain. If this is true I’ll be lazy and use the “destroy” command instead.

It looks like it is mean to be for transaction construction.

SUBCOMMANDS:
    add-change      Add a change address to a transaction
    add-input       Add an input to a transaction
    add-output      Add an output to a transaction

Add a change address
this is the address that will be used to send the left over Ada when finalizing the transaction.

You would think that, but apparently not. There are videos on YT where they create a transaction and they use add-output for the change.

If it doesn’t work, they should really remove it, as they are now claiming Cardano-CLI is “live” and people might actually use it and lose coins.

Yep they use add-output instead in the video

I tried it with add-change, it burned my ADA, there’s a post on this forum somewhere.

I concur he did use ‘add-output’ I wonder why?

For others reading this and interested in using Cardano-cli be careful it’s not an official release.

I think, cos a change address, at the moment, is nothing else but an output address for the change.
If you do not specify an output change and you do not set any amount of it, that means all the rest of your money will be burned. See the “actual fee” at the 07:46.

I thought that this money is going to some specific IOHK’s address (default change address) in default but it seems not the case. Anyway, I have not dig deep into this, but will when I have some time. It would make sense to have some default change address instead of burning it.

2 Likes

Yes, it “warns” you. The actual fee is what you will pay.

It would make sense. And that is what makes this so deceptive. Maybe comment it out until the functionality is added? @lei.hao

1 Like

Have someone encountered this error? :

ERROR 2018… : cardano_cli::wallet::state::state: This UTxO was already in the UTxOs collection Ae....... (0.0.0) received xxx.000000Ada in transaction id…05c0b86…02979…’’
thread ‘main’ panicked at ‘The Wallet LOG file seems corrupted’, src/wallet/state/state.rs:32:25

1 Like

Yes! I got this error just now, from a build of the code-base a couple of days old.

How did this occur? If you can recreate, we can raise a bug on the github “issues” tab.

Seems like the wallet’s LOG file holds UTxOs. On Ubuntu file is:

/home/ubuntu/.local/share/cardano-cli/wallets/my_magic_wallet/LOG

Somehow this file ends up with a duplicate, upon reading wallet state from the LOG, duplicate is detected and panic.

I detached then reattached the wallet (which removed the LOG file) I then synced the wallet. However, upon completion of the sync, the LOG file looks correct, i.e. no duplicate UTxO… so I don’t know what put it into a bad state. hmmm.

I send a transaction then blockchain pull and a wallet sync.

Sent the transaction to a Daedalus wallet. Used the Attach and detach wallet options it went back to normal. However right after pull and sync it returned the error.

Absolutely. If you sync it again, the last UTxO in the LOG file gets duplicated… how could this ever have worked?

Does the affected wallet have funds in it?

Yes. This screw up only happens if funds have been sent to wallet, otherwise there would be no UTxO to duplicate.

But no coins have been lost, if that is your question.

1 Like

I had a primary wallet with funds then transferred everything to a second wallet. The first wallet doesn’t give the error now. I’m still clueless. However i’m trying something I will see.