Legal Evidence

Introduction to Zetrix Development

Zetrix Chain is a next-generation public blockchain tailored for commercial use. It serves as a global Internet infrastructure for value exchange, built on innovative core technologies such as Gas Firework, Gas Orbits, Gas Canal, and developer-centric smart contracts (Gas CodeMach).

To support global development, Zetrix offers:

  • Comprehensive technical documentation

  • Robust development tools

  • A clear guide to its technical architecture and ecosystem

These resources aim to enhance developer productivity and simplify integration with Zetrix’s ecosystem. The platform invites talented developers, industry professionals, and thought leaders worldwide to become part of the Zetrix developer community, forming the foundation of its global ecosystem expansion.

This document serves as a practical guide for developers to:

  • Access the Zetrix public blockchain

  • Create blockchain accounts

  • Issue digital assets

  • Enable free asset movement within the Zetrix network.

The following uses Java development as an example.

Instantiating the SDK

Note: Complete the basic configuration of the SDK before using it, such as setting the node for the SDK to access.

The example is as follows:

Creating Accounts

Note: You can create an account with the development toolkit provided by the development kit.

Example code:

Return value:

Note:

  • An account created in this mode is inactive (not yet written to the blockchain) and therefore cannot be located or queried on the Zetrix blockchain until it becomes active through a transaction.

  • An account refers to a randomly generated digital identity of a user, item, institution, house, file, asset issuer account, etc. based on a cryptographic algorithm, usually called a blockchain account (public-private pair and blockchain account address). It is not controlled by any centralized organization and is completely controlled by the account owner.

Activating Accounts

Note:

  1. An inactive account requires an account on the chain (an account that can be queried in Zetrix) to activate it.

  2. Gas is a built-in token on Zetrix, and the transaction on the chain needs to consume Gas.

  3. If you transfer the Gas of an account who is activated to target the account who is not activated, the target account will be activated.

Example code:

Recording Evidence Information

Note: The evidence information on the blockchain will be permanently stored

Obtaining the Account Nonce Value

Note: Each account maintains its own serial number, which starts from 1 and is incremented. A serial number marks a transaction for the account.

Example code:

Return value:

Assembling the Operation for Storing Evidence

Example code:

Serializing Transactions

Note: Serialize transactions for network transmission.

Example code:

Return value:

Signing Transactions

Note: After the transaction is serialized, the transaction initiator needs to identify the transaction data (sign with the private key), usually called the signature of the data. The signature results include signature data and a public key.

Example code:

Return value:

Submitting Transactions

Note:

  1. After the transaction data is signed, the transaction metadata (transactionBlob) and signatures (transaction broadcast) need to be submitted (transaction broadcast) to the blockchain network.

  2. When the transaction involves multiple parties (multiple signature accounts), multiple signatures must be submitted to the Zetrix network when submitting the transaction.

Example code:

Return value:

Note:

  1. When a transaction involves multiple parties (multiple signature accounts), multiple signatures must be submitted to the Zetrix network when submitting the transaction.

  2. After submitting the transaction (broadcast transaction), the final result of the transaction can be obtained in about 10 seconds. The developer can query the final status by using the query interface of transaction status.

Querying Transaction Status

Note: The final state of the query transaction can be queried through this interface. Usually, the final result of the transaction can be obtained 10 seconds after the transaction is submitted.

Example code:

Return value: 0

Error code
Description

0

Successful operation

1

Inner service defect

2

Parameters error

3

Objects already exist, such as repeated transactions***

4

Objects do not exist, such as null account, transactions and blocks etc.

5

Transactions expired. It means the transaction has been removed from the buffer, but it still has probability to be executed.

7

Math calculation is overflown

20

The expression returns false. It means the TX failed to be executed currently, but it still has probability to be executed in the following blocks .

21

The syntax of the expression returns are false. It means that the TX must fail.

90

Invalid public key

91

Invalid private key

92

Invalid assets

93

The weight of the signature does not match the threshold of the operation.

94

Invalid address

97

Absent operation of TX

98

Over 100 operations in a single transaction

99

Invalid sequence or nonce of TX

100

Low reserve in the account

101

Sender and receiver accounts are the same

102

The target account already exists

103

Accounts do not exist

104

Low reserve in the account

105

Amount of assets exceeds the limitation*** ( int64 )

106

Insufficient initial reserve for account creation

111

Low transaction fee

114

TX buffer is full

120

Invalid weight

121

Invalid threshold

144

Invalid data version of metadata

146

Exceeds upper limitation

151

Failure in contract execution

152

Failure in syntax analysis

153

The depth of contract recursion exceeds upper limitation

154

The TX submitted from the contract exceeds upper limitation

155

Contract expired

160

Fail to insert the TX into buffer

11060

BlockNumber must be bigger than 0

11007

Failed to connect to the network

12001

Request parameter cannot be null

20000

System error

Last updated