Technical description of the platform

Description of transactions

The Waves Enterprise blockchain platform supports 28 types of transactions. Each of them contains its own set of data to be sent into the blockchain.

The format of responses returned by a node via the gRPC interface is defined in t he protobuf filed (see gRPC tools).

Hint

In case you have protected the keypair of your node with a password while generating the account, set the password of your keypair in the password field of a transaction.

1. Genesis Transaction

First transaction of a new blockchain which performs first attachment of balance to addresses of created nodes.

This transaction does not require signing, that is why it is only broadcasted.

Transaction data structure:

Field

Data type

Description

type

Byte

Transaction number (1)

id

Byte

Transaction identifier

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds)

signature

ByteStr

Genesis block signature

recipient

ByteStr

Address of recipient of distributed tokens

amount

Long

Amount of tokens

height

Int

Height of transaction execution. For the first transaction - 1

3. Issue Transaction

A transaction initiating issue of tokens.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (3)

version

Byte

Transaction version

name

Array[byte]

An arbitrary name of transaction

quantity

Long

Number of tokens to be issued

description

Array[byte]

An arbitrary description of a transaction (in base58 format)

sender

ByteStr

Address of sender of distributed tokens

password

String

Keypair password in the node keystore, optional field

decimals

Byte

Digit capacity of a token in use (WEST - 8)

reissuable

Boolean

Re-issuability of a token

fee

Long

WE Mainnet transaction fee

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number

id

Byte

Transaction identifier

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs

version

Byte

Transaction version

assetId

Byte

Identifier of an asset to be issued

name

Array[byte]

An arbitrary name of transaction

quantity

Long

Number of tokens to be issued

reissuable

Boolean

Re-issuability of a token

decimals

Byte

Digit capacity of a token in use (WEST - 8)

description

Array[byte]

An arbitrary description of a transaction

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

script

Array[Byte]

Script for validation of a transaction, an optional field

height

Int

Height of transaction execution

4. Transfer Transaction

A transaction of transfer of tokens from one address to another.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (4)

version

Byte

Transaction version

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

recipient

ByteStr

Address of recipient of tokens

amount

Long

Amount of tokens

fee

Long

WE Mainnet transaction fee

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

amount

Long

Amount of tokens

fee

Long

WE Mainnet transaction fee

type

Byte

Transaction number (4)

version

Byte

Transaction version

attachment

Byte

Comment to a transaction (in base58 format), optional field

sender

ByteStr

Address of a transaction sender

feeAssetId

Byte

Identifier of a token for fee payment, optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

assetId

Byte

ID of a token to be transferred, optional field

recipient

ByteStr

Address of recipient of tokens

id

Byte

Transaction identifier

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

5. Reissue Transaction

Transaction for token re-issue.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (5)

version

Byte

Transaction version

quantity

Long

Amount of tokens to be re-issued

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

assetId

Byte

ID of a token to be re-issued, optional field

reissuable

Boolean

Re-issuability of a token

fee

Long

WE Mainnet transaction fee

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

quantity

Long

Amount of tokens to be re-issued

sender

ByteStr

Address of a transaction sender

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

assetId

Byte

ID of a token to be re-issued, optional field

fee

Long

WE Mainnet transaction fee

id

Byte

Transaction identifier

type

Byte

Transaction number (5)

version

Byte

Transaction version

reissuable

Boolean

Re-issuability of a token

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

height

Int

Height of transaction execution

6. Burn Transaction

Transaction for burning of tokens: decreases amount of tokens at the sender address, and, with this, decreases a total amount of tokens in the blockchain. The burned tokens cannot be restored.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (6)

version

Byte

Transaction version

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

assetId

Byte

ID of a token to be burnt, optional field

quantity

Long

Number of tokens to be burnt

fee

Long

WE Mainnet transaction fee

attachment

Byte

Comment to a transaction (in base58 format), optional field

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

amount

Long

Number of tokens to be burnt

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

assetId

Byte

ID of a token to be burnt, optional field

fee

Long

WE Mainnet transaction fee

id

Byte

Transaction identifier

type

Byte

Transaction number (6)

version

Byte

Transaction version

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

height

Int

Height of transaction execution

8. Lease Transaction

Leasing of tokens to another address. The tokens in leasing are taken into account in a generating balance of a recipient after 1000 blocks.

Leasing of tokens can be carried out for increasing of probability of node appointment as a next round miner. As a rule, a recipient shares his revenue for block generation with an address which has granted him tokens for leasing.

Tokens in leasing remain blocked at a sender address. Leasing can be cancelled with the use of leasing cancel transaction.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (8)

version

Byte

Transaction version

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

recipient

ByteStr

Address of recipient of tokens

amount

Long

Number of tokens for leasing

fee

Long

WE Mainnet transaction fee

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

amount

Long

Number of tokens for leasing

sender

ByteStr

Address of a transaction sender

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

fee

Long

WE Mainnet transaction fee

recipient

ByteStr

Address of recipient of tokens

id

Byte

Transaction identifier

type

Byte

Transaction number (8)

version

Byte

Transaction version

height

Int

Height of transaction execution

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

9. LeaseCancel Transaction

Cancelling of leasing of tokens that have been leased with the use of a transaction with a definite ID. The lease structure of this transaction is not filled: the node fills it automatically upon obtaining of transaction data.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (9)

version

Byte

Transaction version

fee

Long

WE Mainnet transaction fee

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

txId

Byte

ID of a leasing transaction

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

leaseId

Byte

ID of a leasing transaction

sender

ByteStr

Address of a transaction sender

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

fee

Long

WE Mainnet transaction fee

id

Byte

ID of a leasing cancel transaction

type

Byte

Transaction number (9)

version

Byte

Transaction version

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

height

Int

Height of transaction execution

10. CreateAlias Transaction

Creation of an alias for a sender address. An alias can be used in transactions as a recipient identifier.

Data structure of a query for transaction signing:

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (10)

id

Byte

ID of a CreateAlias transaction

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

alias

Byte

An arbitrary alias

height

Byte

Height of transaction execution

11. MassTransfer Transaction

Transfer of tokens to several recipients (1 - 100 addresses). A transaction fee depends on a number of addresses.

Data structure of a query for transaction signing:

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

type

Byte

Transaction number (11)

transferCount

Byte

Number of recipient addresses

version

Byte

Transaction version

totalAmount

Byte

Total number of tokens to be transferred

attachment

Byte

Comment to a transaction (in base58 format), optional field

sender

ByteStr

Address of a transaction sender

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

assetId

Byte

ID of a token to be transferred, optional field

id

Byte

ID of a token transfer transaction

transfers

List

List of recipients with fields recipient`: ` and ``amount separated with a comma

transfers.recipient

ByteStr

Address of recipient of tokens

transfers.amount

Long

Number of tokens to be transferred to an address

height

Byte

Height of transaction execution

Example of the transfers field:

"transfers":
[
    { "recipient": "3MtHszoTn399NfsH3v5foeEXRRrchEVtTRB", "amount": 100000 },
    { "recipient": "3N7BA6J9VUBfBRutuMyjF4yKTUEtrRFfHMc", "amount": 100000 }
]

12. Data Transaction

Transaction for adding, editing and removing of entries in an address data storage. An address data storage contains data in the ‘key:value’ format.

The size of the address data repository is unlimited, but up to 100 new “key:value” pairs can be added with a single data transaction. Also the byte representation of the transaction after signing must not exceed 150 kilobytes.

If the data author (the address in the author field) matches the transaction sender (the address in the sender field), the senderPublicKey parameter is not required when signing the transaction.

Data structure of a query for transaction signing:

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

senderPublicKey

PublicKeyAccount

Data author public key

data

List

Data list with ``key: `` ``type: `` and ``value: `` fields separated by commas

data.key

Byte

Record key

data.type

Byte

Record data type. Possible values: binary bool integer string and null (record deletion by its key)

data.value

Byte

Record value

sender

ByteStr

Address of a transaction sender

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

author

Byte

Author address for data to be entered

fee

Long

WE Mainnet transaction fee

id

Byte

Data transaction ID

type

Byte

Transaction number (12)

version

Byte

Transaction version

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

Example of the data field:

"data": [
      {
       "key": "objectId",
       "type": "string",
       "value": "obj:123:1234"
      }, {...}
     ]

13. SetScript Transaction

A transaction to bind the script to an account or delete the script. An account with a script tied to it is called a smart account.

The script allows you to verify transactions transmitted on behalf of an account without using the blockchain transaction verification mechanism.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (13)

version

Byte

Transaction version

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

fee

Long

WE Mainnet transaction fee

name

Array[Byte]

Script name

script

Array[Byte]

The compiled script is in base64 format. If you leave this field empty (null), the script will be detached from the account

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (13)

id

Byte

ID of a script setting transaction

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

version

Byte

Transaction version

script

Array[Byte]

Compiled script in base64 format - optional field

name

Array[Byte]

Script name

description

Byte

Comment to a transaction (in base58 format), optional field

height

Byte

Height of transaction execution

14. Sponsorship Transaction

A transaction that establishes or cancels a sponsorship.

The sponsoring mechanism allows addresses to pay fees for script call transactions and transfer transactions in the sponsor asset, replacing WEST.

Data structure of a query for transaction signing:

Field

Data type

Description

sender

ByteStr

Address of a transaction sender

assetId

Byte

Sponsorship asset (token) ID - optional field

fee

Long

WE Mainnet transaction fee

isEnabled

Bool

Set the sponsorship (true) or cancel it (false)

type

Byte

Transaction number (14)

password

String

Keypair password in the node keystore, optional field

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (14)

id

Byte

Sponsorship transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

assetId

Byte

Sponsorship asset (token) ID - optional field

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

version

Byte

Transaction version

isEnabled

Bool

Set the sponsorship (true) or cancel it (false)

height

Byte

Height of transaction execution

15. SetAssetScript Transaction

A transaction to install or remove an asset script for an address. Asset script allows to verify transactions involving this or that asset (token) without using the blockchain transaction verification mechanism.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (15)

version

Byte

Asset script transaction version

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

fee

Long

WE Mainnet transaction fee

script

Array[Byte]

Compiled script in base64 format - optional field

assetId

Byte

Sponsorship asset (token) ID - optional field

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (15)

id

Byte

Asset script transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

chainId

Byte

Identifying byte of the network (Mainnet - 87, or V)

assetId

Byte

Sponsorship asset (token) ID - optional field

script

Array[Byte]

The compiled script is in base64 format. If you leave this field empty (null), the script will be detached from the account

height

Byte

Height of transaction execution

101. GenesisPermission Transaction

A transaction to assign the first network administrator who distributes permissions to other participants.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (101)

id

Byte

Transaction identifier

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

signature

ByteStr

Transaction signature (in base58 format)

target

ByteStr

Address of a first administrator to be appointed

role

String

A permission to be assigned (for an administrator - permissioner)

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (101)

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

target

ByteStr

Address of a first administrator to be appointed

role

String

A permission to be assigned (for an administrator - permissioner)

102. Permission Transaction

Issuing or revoking a participant’s role. Only a participant with the permissioner permission can send 102 transactions to the blockchain.

Possible permissions for the role field:

  • permissioner

  • sender

  • blacklister

  • miner

  • issuer

  • contract_developer

  • connection_manager

  • banned

For a description of the permissions, see the article Permissions.

Data structure of a query for transaction signing:

Field

Data type

Description

type

Byte

Transaction number (102)

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

target

ByteStr

Participant’s address for the permission assignment

opType

String

Type of operation: add - add a permission; remove - remove a permission

dueTimestamp

Long

Role Unix Timestamp (in milliseconds) - optional field

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

role

String

A permission to be assigned (for an administrator - permissioner)

sender

ByteStr

Address of a transaction sender

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

fee

Long

WE Mainnet transaction fee

opType

String

Type of operation: add - add a permission; remove - remove a permission

id

Byte

ID of a transaction for permission adding or removing

type

Byte

Transaction number (102)

dueTimestamp

Long

Role Unix Timestamp (in milliseconds) - optional field

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

target

ByteStr

Address of a first administrator to be appointed

103. CreateContract Transaction

Creating a smart contract. The byte representation of this transaction after it is signed must not exceed 150 kilobytes.

The feeAssetId field of this transaction is optional and is only used for gRPC-enabled smart contracts. The value of the version field for this type of smart contracts is 2.

Transaction 103 can only be signed by a user with the role contract_developer.

Data structure for transaction signing request:

Field

Data type

Description

fee

Long

WE Mainnet transaction fee

image

Array[Bytes]

Smart contract Docker image name

imageHash

Array[Bytes]

Smart contract Docker image hash

contractName

Array[Bytes]

Smart contract name (if downloaded from a pre-installed repository) or its full address (if the smart contract repository is not specified in the node configuration file)

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

params

List[DataEntry[_]]

Input and output data of a smart contract. Entered using the fields type value and key separated with a comma - optional field

params.key

Byte

Parameter key

params.type

Byte

Parameter type. Possible values: binary bool integer string

params.value

Byte

Parameter value

type

Byte

Transaction number (103)

version

Byte

Transaction version

apiVersion

Byte

API version for gRPC methods of the smart contract (see gRPC services used by smart contracts).

validationPolicy.type

String

Smart contract validation policy type.

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (103)

id

Byte

ID of a CreateContract transaction

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

image

Array[Bytes]

Smart contract name (if downloaded from a pre-installed repository) or its full address (if the smart contract repository is not specified in the node configuration file)

imageHash

Array[Bytes]

Smart contract Docker image hash

contractName

Array[Bytes]

Smart contract name

params

List[DataEntry[_]]

Input and output data of a smart contract. Entered using the fields type value and key separated with a comma - optional field

params.key

Byte

Parameter key

params.type

Byte

Parameter type. Possible values: binary bool integer string

params.value

Byte

Parameter value

height

Byte

Height of transaction execution

apiVersion

Byte

API version for gRPC methods of the smart contract (see gRPC services used by smart contracts).

validationPolicy.type

String

Smart contract validation policy type.

The 4th version of this transaction configures validation of the execution results of the updated smart contract using the validationPolicy.type field (see section Validation of smart contracts). Variants of validation policies:

  • any - the general validation policy is kept in the network: to mine the updated smart contract, the miner signs the corresponding 105 transaction. Also, this parameter is set if there are no registered validators in the network.

  • majority - a transaction is considered valid if it is confirmed by the majority of validators: 2/3 of the total number of registered addresses with the contract_validator permission.

  • majorityWithOneOf(List[Address]) - the transaction is considered valid if the majority of validators is collected, among which there is at least one of the addresses included in the parameter list. The addresses included in the list must have a valid contract_validator permission.

Warning

In case of using the majorityWithOneOf(List[Address]) validation policy, fill the address list, passing an empty list is not allowed.

In private networks, the 103 transaction allows to install Docker images of smart contracts not only from repositories stated in the docker-engine section of the node configuration file. If you need to install a smart contract from a registry not included in the list of the configuration file, type the full address of a smart contract in the registry you have created in the name field of the 103 transaction.

An example of a request to broadcast a smart contract from a not installed repository:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "image": "customregistry.com:5000/stateful-increment-contract:latest",
  "fee" : 100000000,
  "imageHash" : "ad6d0f8a61222794da15571749bc9db08e76b6a120fc1db90e393fc0ee9540d8",
  "type" : 103,
  "params" : [ {
    "type" : "string",
    "value" : "Value_here",
    "key" : "data"
  }, {
    "type" : "integer",
    "value" : 500,
    "key" : "length"
  } ],
  "version" : 4,
  "atomicBadge" : null,
  "apiVersion" : "1.0",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : null,
  "proofs" : [ "L521YncSMJDPqwBjQyS7m7Q6tseAw51nYE8iiPChEALx7S2WvpSosCVtWkXxh2ZqJ6LHkCvjVjRVuVs793kzjw8" ],
  "contractName" : "grpc_validatable_statefull here_often",
  "id" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "validationPolicy" : {
    "type" : "any"
  },
  "timestamp" : 1625732696641,
  "height" : 1028130
}

104. CallContract Transaction

Calling a smart contract for execution. The byte representation of this transaction after it is signed must not exceed 150 kilobytes.

Signing of the transaction is performed by the initiator of the contract execution.

The contractVersion field of the transaction specifies the contract version:

  • 1 - for a new contract;

  • 2 - for an updated contract.

This field is only available for the second version of the transaction: if the version field of the smart contract creation transaction is set to 2. The contract is updated using the transaction 107. When a contract is created, transaction 104 is automatically created, which calls the contract to verify it.

If the contract is not executed or is executed with an error, then transactions 103 and 104 are deleted and do not enter the block.

Data structure for transaction signing request:

Field

Data type

Description

contractId

ByteStr

Smart contract ID

fee

Long

WE Mainnet transaction fee

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

type

Byte

Transaction number (104)

params

List[DataEntry[_]]

Input and output data of a smart contract. Entered using the fields type value and key separated with a comma - optional field

params.key

Byte

Parameter key

params.type

Byte

Parameter type. Possible values: binary bool integer string

params.value

Byte

Parameter value

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (104)

id

Byte

Smart contract call transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

contractId

ByteStr

Smart contract ID

params

List[DataEntry[_]]

Input and output data of a smart contract. Entered using the fields type value and key separated with a comma - optional field

params.key

Byte

Parameter key

params.type

Byte

Parameter type. Possible values: binary bool integer string

params.value

Byte

Parameter value

105. ExecutedContract Transaction

Writing of the result of smart contract execution to its state. The byte representation of this transaction after signing must not exceed 150 kilobytes.

Transaction 105 contains all fields (body) of transaction 103 or 104 of the smart contract whose execution result must be written to its state (the tx field). The result of the smart contract’s execution is entered into its stack from the corresponding parameters of the params field of transaction 103 or 104.

The transaction is signed by the node that forms the block after sending the request to publish the transaction.

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (105)

id

Byte

ExecutedContract transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

password

String

Keypair password in the node keystore, optional field

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

tx

Array

Body of transaction 103 or 104 of an executed smart contract

results

List[DataEntry[_]]

A list of possible results of smart contract execution

height

Byte

Height of transaction execution

106. DisableContract Transaction

Disabling of a smart contract. The byte representation of this transaction after it is signed must not exceed 150 kilobytes.

Transaction 106 can only be signed by a user with the role contract_developer.

Data structure for transaction signing request:

Field

Data type

Description

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

contractId

ByteStr

Smart contract ID

fee

Long

WE Mainnet transaction fee

type

Byte

Transaction number (106)

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (106)

id

Byte

DisableContract transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

contractId

ByteStr

Smart contract ID

height

Byte

Height of transaction execution

107. UpdateContract Transaction

Updating of a smart contract code. The byte representation of this transaction after it is signed must not exceed 150 kilobytes.

Transaction 107 signing as well as smart contract updating can only be done by the user with the contract_developer permission.

Data structure for transaction signing request:

Field

Data type

Description

image

Array[Bytes]

Smart contract Docker image name

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

fee

Long

WE Mainnet transaction fee

contractId

ByteStr

Smart contract ID

imageHash

Array[Bytes]

Smart contract Docker image hash

type

Byte

Transaction number (107)

version

Byte

Transaction version

apiVersion

Byte

API version for gRPC methods of the smart contract (see gRPC services used by smart contracts).

validationPolicy.type

String

Smart contract validation policy type.

Data structure of a query for transaction broadcasting:

The 4th version of this transaction configures validation of the execution results of the updated smart contract using the validationPolicy.type field (see section Validation of smart contracts).

Variants of validation policies:

  • any - the general validation policy is kept in the network: to mine the updated smart contract, the miner signs the corresponding 105 transaction. Also, this parameter is set if there are no registered validators in the network.

  • majority - a transaction is considered valid if it is confirmed by the majority of validators: 2/3 of the total number of registered addresses with the contract_validator permission.

  • majorityWithOneOf(List[Address]) - the transaction is considered valid if the majority of validators is collected, among which there is at least one of the addresses included in the parameter list. The addresses included in the list must have a valid contract_validator permission.

Warning

In case of using the majorityWithOneOf(List[Address]) validation policy, fill the address list, passing an empty list is not allowed.

110. GenesisRegisterNode Transaction

Registration of a node in a network genesis block while starting the blockchain.

This transaction does not require signing.

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (110)

id

Byte

GenesisRegisterNode transaction ID

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

signature

ByteStr

Transaction signature (in base58 format)

version

Byte

Transaction version

targetPubKey

Byte

Public key of a node to be registered

height

Byte

Height of transaction execution

111. RegisterNode Transaction

Registration of a new node in the blockchain or its deletion.

Data structure for transaction signing request:

Field

Data type

Description

type

Byte

Transaction number (111)

opType

String

Type of operation: add - add a node; remove - remove a node

sender

ByteStr

Address of a transaction sender

password

String

Keypair password in the node keystore, optional field

targetPubKey

Byte

Public key of a node to be removed

NodeName

Byte

Name of a node

fee

Long

WE Mainnet transaction fee

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (111)

id

Byte

RegisterNode transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

targetPubKey

Byte

Public key of a node to be removed

NodeName

Byte

Name of a node

opType

String

Type of operation: add - add a node; remove - remove a node

height

Byte

Height of transaction execution

password

String

Keypair password in the node keystore, optional field

112. CreatePolicy Transaction

Creation of a confidential data group consisting of addresses stated in a transaction.

Data structure for transaction signing request:

Field

Data type

Description

sender

ByteStr

Address of a transaction sender

policyName

String

Name of an access group to be created

password

String

Keypair password in the node keystore, optional field

recipients

Aray[Bytes]

Array of addresses of a group participants separated by commas

fee

Long

WE Mainnet transaction fee

description

Array[byte]

An arbitrary description of a transaction (in base58 format)

owners

Aray[Bytes]

Array of addresses of group administrators separated by commas: administrators are entitled to change an access group

type

Byte

Transaction number (112)

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (112)

id

Byte

CreatePolicy transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

policyName

String

Name of an access group to be created

recipients

Aray[Bytes]

Array of addresses of a group participants separated by commas

owners

Aray[Bytes]

Array of addresses of group administrators separated by commas: administrators are entitled to change an access group

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

height

Byte

Height of transaction execution

description

Array[byte]

An arbitrary description of a transaction (in base58 format)

version

Byte

Transaction version

113. UpdatePolicy Transaction

Updating of a confidential data group

Data structure for transaction signing request:

Field

Data type

Description

policyId

String

Confidential data group identifier

password

String

Keypair password in the node keystore, optional field

sender

ByteStr

Address of a transaction sender

recipients

Aray[Bytes]

Array of addresses of a group participants separated by commas

fee

Long

WE Mainnet transaction fee

opType

String

Type of operation: add - add participants; remove - remove participants

owners

Aray[Bytes]

Array of addresses of group administrators separated by commas: administrators are entitled to change an access group

type

Byte

Transaction number (113)

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (113)

id

Byte

UpdatePolicy transaction ID

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

policyId

String

Confidential data group identifier

recipients

Aray[Bytes]

Array of addresses for adding or removing of group participants separated by commas

owners

Aray[Bytes]

Array of addresses of group administrators separated by commas: administrators are entitled to change an access group

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

height

Byte

Height of transaction execution

opType

String

Type of operation: add - add a permission; remove - remove a permission

description

Array[byte]

An arbitrary description of a transaction (in base58 format)

version

Byte

Transaction version

114. PolicyDataHash Transaction

Sending of a confidential data hash into the network. This transaction is created automatically while sending confidential data into the network with the use of the POST /privacy/sendData REST API method.

This transaction does not require signing.

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (114)

id

Byte

Transaction identifier

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

policyId

String

Name of an access group to be created

dataHash

String

Confidential data hash to be sent

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

height

Byte

Height of transaction execution

version

Byte

Transaction version

120. AtomicTransaction

Atomic transaction: sets other transactions in a container for their atomic execution. This transaction can be executed only in full (no transactions have been declined), in other cases it will not be executed.

Atomic transaction support 2 and more transactions of the following types:

An atomic transaction itself does not require a fee: its total fee is summed up from fee of transactions included into it.

Learn more about atomic transactions: Atomic transactions

Data structure for transaction signing request:

Field

Data type

Description

type

Byte

Transaction number (120)

sender

ByteStr

Address of a transaction sender

transactions

Array

Full bodies of transactions to be included

password

String

Keypair password in the node keystore, optional field

fee

Long

WE Mainnet transaction fee

version

Byte

Transaction version

Data structure of a query for transaction broadcasting:

Field

Data type

Description

type

Byte

Transaction number (114)

id

Byte

Transaction identifier

sender

ByteStr

Address of a transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The**Unix Timestamp** of a transaction (in milliseconds), optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

height

Byte

Height of transaction execution

transactions

Array

Full bodies of transactions to be included

miner

String

Block miner public key; filled during a mining round

password

String

Keypair password in the node keystore, optional field

version

Byte

Transaction version