👋
Vision Network
  • Vision Basics
    • Vision Network
    • VS and VRC
    • The GitBook editor
    • Token Issuance
    • Minting Mechanism
  • Protocol
    • Account
    • Resource Model
    • Economic model
    • Multi-Signature
    • Transaction
    • Validator
      • First Validator & Reward Mechanism
      • To be Validated Candidate
      • Proposal and Committee
  • SMART CONTRACTS
    • Introduction
    • Deployment Cost
    • DevOps Flow
    • Key considerations
    • Security considerations
    • Features
      • Protobuf
      • Function Usage
      • Contract Address
      • Different Form Ethereum
  • VIRTUAL MACHINE
    • Introduction
    • Event
    • Entropy Costs Calculation
    • VM Exception Handling
    • Features between Ethereum
  • HTTP API
  • Signature and Broadcast Steps
  • Infragrid guide
  • Vtimes chrome integration
  • Introduction
  • Getting Started
  • Group 1
    • Introduction
    • GUI and Usage
  • VISION-WEB
    • Introduction
  • VISION WALLET
    • Vtimes Chrome Plugin
    • Visionscan
    • Metamask
  • DECENTRALIZED EXCHANGES
    • Operating principle
    • Trading pairs
    • Liquidity pool
  • Others
    • Term
Powered by GitBook
On this page
  • Generating Signed Transaction
  • Creating a Transaction
  • Signing the Transaction
  • Broadcast the Transaction
  • Transaction Confirmation
  • Multi-type transactions
  1. Protocol

Transaction

Generating Signed Transaction

You can use Visionweb to complete the tasks of this section, for more details, please refer to: Visionweb Github

Here is mainly Visionweb, using freezeBalance as an example.

Creating a Transaction

Create an unsigned transaction for freezing balance. Visionweb freezeBalance

Signing the Transaction

Sign the transaction with your private key. Visionweb sign

❗️ Never use this in any web / user-facing applications, as it will expose your private key. For security reasons, please use a local full node.

Broadcast the Transaction

Broadcast the signed transaction. Visionweb Broadcast transaction

📘 The broadcasting function in Visionweb is sendrawtransaction without a 'broadcast' keyword, refer to the source code for details.

Transaction Confirmation

The mechanism of VISION's block validation is that a block is validated after this block is produced and 12 different FVs produce subsequent blocks based on this block.

When a block is confirmed, transactions inside are all confirmed. Vision provides the /walletsolidty/ interface to make it easier for users to search for confirmed transactions; the following describes how to confirm different types of transactions.

Transaction Type
Method of transaction confirmation

transferContract and transferAssetContract

As long as the transaction can query the results via walletsolidity/gettransactioninfobyid or walletsolidity/gettransactionbyid.

TriggerSmartContract

There are two ways to judge: 1. Find transactionInfo.receipt.result=success via the /walletsolidity/gettransactioninfobyid interface (It is not recommended to use transactionInfo.result to judge, because for the http interface, successful transactions do not return this field by default). 2. Via /walletsolidity/gettransactionbyid The interface found transaction.ret.contractRet =success

InternalTransaction

Query by /walletsolidity/gettransactioninfobyid. Http interface: For successful transactions, the rejected field is not returned by default. For failed transactions, rejected=true. Grpc interface: For successful transactions, rejected=false (indicating that the current internalTransaction has not been discarded), For failed transactions, rejected=true

Multi-type transactions

There are many types of transactions in VISION network: protobuf VISIONWEB.TRANSACTIONBUILDER Please read these contents for more details.

PreviousMulti-SignatureNextValidator

Last updated 3 years ago