2. Transfer signetcoin paying fees in signetcoin

Now let’s generate a second address and try sending signetcoin for the first time. The transaction fee will be subtracted from the amount, therefore you will pay the fee in signetcoin directly

With the following commands, we first generate a new address (let’s refer to it as GENERATED_ADDRESS_2) and then we send 50.0 signetcoin to this address. We can then check our history of received assets using the getreceivedbyaddress command.

.\elements-cli getnewaddress
.\elements-cli -named sendtoaddress address=<GENERATED_ADDRESS_2> amount=50.0 subtractfeefromamount=true

Although the transaction is correct, if you check the balance of the new address now, it will still be zero. That is because your transaction still needs to be confirmed in a block. So, create a new Sequentia block by using the command:

.\elements-cli generatetoaddress 1 <GENERATED_ADDRESS>
  1. Now check that the 50 signetcoin have been sent to the new address

.\elements-cli getreceivedbyaddress <GENERATED_ADDRESS_2>

If everything is correct, your command prompt will look similar to this:

.\elements-cli getreceivedbyaddress ert1qspt937gpfmeghshpaucar2d94g4hftq4m5zfg4
{
"signetcoin": 49.99999645
}

Showing that the fee has been paid in signetcoin and has been subtracted from the amount sent (50.0)

Last updated