-
Notifications
You must be signed in to change notification settings - Fork 2
Advanced Transaction
Advanced transaction is also a type of transaction,so it's consist of one or more input and one or more output and need transaction fee.
Advanced transaction support a flexible combination of input and output, you can take multi-assets as input in one transaction , you can send the assets to many people and you can retire some assets. It can do many things depends on your business.
Advanced transaction contain four type of actions
Action | Explain | Input |
---|---|---|
Issue | issue some assets(the assets must be defined in your wallet) | assets,amount |
Spend from account | spend some assets from your account,regard as a input | account,assets,amount |
Control with address | specify the owner of the assets,regard as an output | address,assets,amount |
Retire | destroy the assets | assets,amount |
notice that four type of actions are Independent and relevant,we will introduce some usage below.
if you want to register your assets to Bytom blockchain,advanced transaction will help you to achieve this goal.
first of all, you must create a new assets type.
go to the asset page in Bytom wallet,press the "new" button.
fill in the alias,definition and key, submit the assets,and then you will find a new assets in your assets page.
but now it has no balance, you must issue the assets.
go to the transaction page and create a new transaction,choose advanced transaction.
add an "issue" action(if you want to issue more,add more "issue" action)
like the picture below,I issue 1000 "MYassets"
add a "Control with address" action
fill in the control address(the owner of the assets),the assets and amount,the amount of the assets must equal to the amount when you issue the assets(if more than one address control the assets,the sum must equal to issue assets amount).
add a "Spend by account" action
this action is used for paying transaction fee,advanced transaction is known as a special transaction.the BTM fee is relevant to the volume of the input,more input more BTM.wallet version 1.0.2 don't support automatic calculation of transaction fee,so you may estimate the fee, the suggested price is 0.1 btm, if you fail you have to raise it .
now we complete the action and submit the transaction,wait for miner confirm.
after the transaction confirmed,you can see your assets in your balance page.
you can send several assetss to several addresses in one transaction by using advanced transaction.for example, I will send 0.1 BTM and 500 MYassets to more than one addresses.
new transaction,choose advanced transaction.
create two "Spend from account" actions:
create two "Control with address" actions notice that the sum of output action must equal to the input amount(the sum must 0.1BTM and 500 MYassets)
Don't forget transaction fee
create a "Spend by account" action,fill in the BTM amount
submit the transaction and wait for confirming
if the assets has finished its misson(mainnet launch and destrory ERC20 token),Bytom wallet has support destrorying assets.
new transaction,choose advanced transaction
create a "Spend from account" action, fill in the assets you want to destrory
create a "retire" action,choose what you want to destrory. the amount must equal to the input amount
also don't forget to pay the fee
we have introduced four actions of advanced transaction and three use scenarios, It is convenient and flexible.
but notice that it is just an ability, the assetss you regiestered are not certified by a professional institution,also have no legal effect, and no one will receive it if he can't trust you.so we must wait for professional application in Bytom blockchain.