$0.01972 -2.17%
VET · 3w

MiRei | HowTo VeChain Blockchain — Part 2

What is a transaction on VeChain Thor made of?

The concept of transactions being put into a block and those blocks building a chain is now commonly know in the crypto space, but from what components is a transaction build on the VeChain blockchain?

To illustrate this, we will use the wallet created in Part 1 and send 1 VET to the genesis address 0x0000000000000000000000000000000000000000. But before that, lets take a look at the balance of the wallet — just before sending 1 VET. This wallet cointains 500 VET and 5000.05 VTHO.

VeChain wallet with 500 VET and 5000 VTHO before sending 1 VET.

After the transaction is send, the wallet contains 499 VET and 4979.05 VTHO. So the wallet has “lost” 1 VET and 21 VTHO. VTHO is the 2nd token on the VeChain network and is used to pay the gas costs for a transaction.

VeChain wallet with 499 VET and 4979.05 VTHO

Now lets look at the transaction itself. The easiest way to do so is a blockexplorer. We will use the official explorer from VeChain for Testnet (or for Mainnet).

This is the exact link to the transaction above: 0x4a84dcf307cb5a9b29bccd138b770351ea4d283234ca03314e6e7af90c956a5b

This link contains a lot of information about the transaction, but how does a transaction look befor its send to the blockchain?

VeChain transaction on testnet. Create a transaction for the VeChain blockchain from scratch

The undecoded body of a transaction to be used in the can be thought of as a JSON object. Its a human-readable data structure, that will then be encoded, signed and transmitted to be blockchain.

body = {"chainTag": 39,"blockRef": '0x00634a0c856ec1db',"expiration": 720,"clauses": [ { "to": '0x0000000000000000000000000000000000000000', "value": 1000000000000000000, "data": '0x' }],"gasPriceCoef": 0,"gas": 21000,"dependsOn": None, "nonce": 12345678 }

This code block is the equivalent to the t...

Continue on
Recent news