Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Txbuilder

jack edited this page Jul 11, 2018 · 1 revision

Txbuilder helps the user to build the transaction and sign them.

Before building a transaction :
  1. Account modular
  2. Transaction Model

In Sync, we set a default value for below parameters:

  • Expiration(blocks) - 720
  • GasPriceCoef - 128
  • BlockRef - best Block

Single Transaction

Allow user to transfer VET or VTHO .

VET Transfer sendVET

VTHO Transfer sendVTHO

Multi-Transaction

Allows a single transaction to carry out multiple tasks.Since the tasks are contained in a single transaction, their executions can be considered as an atomic operation, meaning that, they either all succeed, or all fail. Multi-Transaction

Contract Deployment

Deploy a contract on VeChainThor

ContractDeployment

Once the transaction is sent, Sync will return the txID so that you can query it in Insights, if the transaction is successfully deployed, you can find the contract address in Transaction Receipt

Parameters

parameter description remark
from Transaction sender Select an address from account
to  Recipient’s address -
value Amount transferred to the recipient Unit : VET( 10^18 ) or VTHO( 10^18 )
expiration The transaction expires Block Number ∈[blockRef.number , BlockRef.number + expiration]
gas The amount of gas to use for the transaction In fact, the VTHO transaction need more gas due to it goes through Prototype
Clone this wiki locally