# 4. Pay transaction fees in the newly issued asset

We will now spend the new asset whilst paying transaction fees directly in this new asset.

Let’s send the asset we created to a new address (GENERATED\_ADDRESS\_3)

```
.\elements-cli getnewaddress
```

In the following commands, replace GENERATED\_ADDRESS\_3 and ASSET, submit the transactions and create a new block as shown below:

{% code overflow="wrap" %}

```
.\elements-cli -named sendtoaddress address=<GENERATED_ADDRESS_3> amount=100.0 assetlabel=<ASSET> subtractfeefromamount=true
```

{% endcode %}

Take note of the transaction ID (txid), which is the string that the interface will show you when you run the sendtoaddress command (if it’s executed correctly). This txid will also be used later for another test in the next section (Replace By Fee).

You can also transfer TEST while paying fees in the newly issued asset. To do so, use TEST as the assetlabel, set subtractfeefromamount=false and then add fee\_asset\_label=\<ASSET> with the label or asset id of the newly issued asset. For example:

{% code overflow="wrap" %}

```
.\elements-cli -named sendtoaddress address=<ANY ADDRESS> amount=1 assetlabel=TEST subtractfeefromamount=false fee_asset_label=<ANY ASSET IN YOUR WALLET>
```

{% endcode %}

Then, create a block:

```
.\elements-cli generatetoaddress 1 <GENERATED_ADDRESS>
```

Since we set “subtractfeefromamount=true” the payment used the new asset that is transferred with the payment to also pay for transaction fees

```
.\elements-cli getreceivedbyaddress <GENERATED_ADDRESS_3>
```

If you sent 100 tokens in the Asset you issued to GENERATED\_ADDRESS\_3, given the fee paid subtracted from the amount, you will see an amount transferred of about 99.99999864.

We have now demonstrated how the node handles payments using two different assets, TEST and a new asset you issued, as transaction fees.

\
Let’s move forward with something even more interesting!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sequentia.io/testnet/demo-the-no-coin-feature/4.-pay-transaction-fees-in-the-newly-issued-asset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
