Sequentia docs
  • đź’ˇINTRODUCTION
    • Introduction
  • 🖱️TESTNET
    • What to know before starting
    • Download and Installation
    • Demo the "No Coin" feature
      • 1. Set up your wallet
      • 2. Transfer TEST paying fees in TEST
      • 3. Create a new asset
      • 4. Pay transaction fees in the newly issued asset
      • 5. Replace By Fee (RBF) with different assets
  • đź“–WHITE PAPER
    • 1. The Mission
    • 2. Sequentia Overview
    • 3. Blockchain Architecture
      • 3.1. Orange pilled
      • 3.2. Open fee market
      • 3.3. Market-driven governance
      • 3.4. Bitcoin anchoring
      • 3.5. Immediate transaction finality
      • 3.6. Full node sovereignty
      • ­­­­­­­­3.7. Cross-chain consistency
      • 3.8. Escaping stall
      • 3.9. No inflation
      • 3.10. Cheap to handle
      • 3.11. Bitcoin checkpoints
    • 4. Asset tokenization
      • 4.1. Why tokenization: security tokens and stablecoins
      • 4.2. The RAS standard
      • 4.3. Lightning Network payments
      • 4.4. Peer-to-peer batching
      • 4.5. Access-Control-List
      • 4.6. Programmable Accounts
    • 5. Decentralized Exchange
      • 5.1. Atomic swap
      • 5.2. Lightning Network swap
      • 5.3. Standardized order package
      • 5.4. Distributed Hash Table (DHT)
      • 5.5. Market incentives
      • 5.6. Watchtower and Book aggregator
    • Disclaimer
  • đź”—Links
    • Sequentia Theoretical Paper
    • Sequentia Lightpaper
    • Sequentia website
    • Join on socials
Powered by GitBook
On this page
Export as PDF
  1. TESTNET
  2. Demo the "No Coin" feature

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:

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

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:

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

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!

Previous3. Create a new assetNext5. Replace By Fee (RBF) with different assets

Last updated 5 months ago

🖱️