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.

Requests and responses passed via the node REST API interface within the framework of each transaction, have JSON format. Requests and responses passed via the node gRPC interface, are defined by corresponding proto schemes. JSON models of transaction requests and responses are stated below.

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 has the only version.

Transaction data structures

Field

Data type

Description

type

Byte

Transaction number (1)

id

Byte

Transaction identifier

fee

Long

WE Mainnet transaction fee Mainnet

timestamp

Long

The Unix Timestamp of the 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 the issue of tokens.

Transaction data structures

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 the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number

id

Byte

Transaction identifier

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the 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 (WAVES – 8)

description

Array[byte]

An arbitrary description of the transaction

chainId

Byte

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

script

Array[Byte]

Script for validation of the transaction an – optional field

height

Int

Height of transaction execution

Important

If the reissuable field is set to False, i.e. tokens are not allowed to be reissued, then it will be impossible to change this value in the future.

JSON:

Signing:

{
   "type": 3,
   "version":2,
   "name": "Test Asset 1",
   "quantity": 100000000000,
   "description": "Some description",
   "sender": "3FSCKyfFo3566zwiJjSFLBwKvd826KXUaqR",
   "password": "",
   "decimals": 8,
   "reissuable": true,
   "fee": 100000000
}

Broadcasting:

{
    "type": 3,
    "id": "DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB",
    "sender": "3N65yEf31ojBZUvpu4LCo7n8D73juFtheUJ",
    "senderPublicKey": "C1ADP1tNGuSLTiQrfNRPhgXx59nCrwrZFRV4AHpfKBpZ",
    "fee": 100000000,
    "timestamp": 1549378509516,
    "proofs": [ "NqZGcbcQ82FZrPh6aCEjuo9nNnkPTvyhrNq329YWydaYcZTywXUwDxFAknTMEGuFrEndCjXBtrueLWaqbJhpeiG" ],
    "version": 2,
    "assetId": "DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB",
    "name": "Token Name",
    "quantity": 10000,
    "reissuable": true,
    "decimals": 2,
    "description": "SmarToken",
    "chainId": 84,
    "script": "base64:AQa3b8tH",
    "height": 60719
}

Signing:

{
  "type": 3,
  "version":3,
  "name": "Test Asset 1",
  "quantity": 100000000000,
  "description": "Some description",
  "sender": "3FSCKyfFo3566zwiJjSFLBwKvd826KXUaqR",
  "password": "",
  "decimals": 8,
  "reissuable": true,
  "fee": 100000000
  "atomicBadge":{
      "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
  }
}

Broadcasting:

{
    "type": 3,
    "id": "DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB",
    "sender": "3N65yEf31ojBZUvpu4LCo7n8D73juFtheUJ",
    "senderPublicKey": "C1ADP1tNGuSLTiQrfNRPhgXx59nCrwrZFRV4AHpfKBpZ",
    "fee": 100000000,
    "timestamp": 1549378509516,
    "proofs": [ "NqZGcbcQ82FZrPh6aCEjuo9nNnkPTvyhrNq329YWydaYcZTywXUwDxFAknTMEGuFrEndCjXBtrueLWaqbJhpeiG" ],
    "version": 3,
    "assetId": "DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB",
    "name": "Token Name",
    "quantity": 10000,
    "reissuable": true,
    "decimals": 2,
    "description": "SmarToken",
    "chainId": 84,
    "script": "base64:AQa3b8tH",
    "height": 60719
}

4. Transfer Transaction

A transaction of tokens transfer from one address to another.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (4)

version

Byte

Transaction version

sender

ByteStr

Address of the 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

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 the transaction (in base58 format) – optional field

sender

ByteStr

Address of the 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

Tokens recipient address

id

Byte

Transaction identifier

timestamp

Long

The Unix Timestamp of the transaction in milliseconds – optional field

JSON:

Signing:

{
  "type": 4,
  "version": 2,
  "sender": "3M6dRZXaJY9oMA3fJKhMALyYKt13D1aimZX",
  "password": "",
  "recipient": "3M6dRZXaJY9oMA3fJKhMALyYKt13D1aimZX",
  "amount": 40000000000,
  "fee": 100000
}

Broadcasting:

{
    "senderPublicKey": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
    "amount": 200000000,
    "fee": 100000,
    "type": 4,
    "version": 2,
    "attachment": "3uaRTtZ3taQtRSmquqeC1DniK3Dv",
    "sender": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
    "feeAssetId": null,
    "proofs": [
    "2hRxJ2876CdJ498UCpErNfDSYdt2mTK4XUnmZNgZiq63RupJs5WTrAqR46c4rLQdq4toBZk2tSYCeAQWEQyi72U6"
    ],
    "assetId": null,
    "recipient": "3GPtj5osoYqHpyfmsFv7BMiyKsVzbG1ykfL",
    "id": "757aQzJiQZRfVRuJNnP3L1d369H2oTjUEazwtYxGngCd",
    "timestamp": 1558952680800
}

Signing:

{
  "type": 4,
  "version": 3,
  "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "password": "",
  "recipient": "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
  "amount": 40000000000,
  "fee": 10000000
  "atomicBadge" : {
    "trustedSender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  },
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "amount" : 10,
  "fee" : 10000000,
  "type" : 4,
  "version" : 3,
  "atomicBadge" : {
    "trustedSender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  },
  "attachment" : "",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "2vbAJmwzQw2FCtozcewxJVfxoHxf97BTNdGuaeSATV4vEHZ3XYA4Z7nXGsSnf18aesnAWTKWCfzwM5yGpWEyGM7f" ],
  "assetId" : null,
  "recipient" : "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
  "id" : "2wCEMREFbgk318hFFaNGsgFzyjZHuCrtwSnpK35qhiw4",
  "timestamp" : 1619186861204,
  "height" : 861644
}

5. Reissue Transaction

Transaction for native token re-issue.

Transaction data structures

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 the 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

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

quantity

Long

Amount of tokens to be re-issued

sender

ByteStr

Address of the 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 the transaction (in milliseconds) – optional field

height

Int

Height of transaction execution

JSON:

Signing:

{
  "type": 5,
  "version":2,
  "quantity": 556105,
  "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "password": "",
  "assetId": "6UAMZA6RshxyPvt9W7aoWiUiB6N73yLQMMfiRQYXdWZh",
  "reissuable": true,
  "fee": 100000000
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "quantity" : 556105,
  "fee" : 100000000,
  "type" : 5,
  "version" : 2,
  "reissuable" : true,
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "chainId" : 86,
  "proofs" : [ "5ahD78wciu8YTsLoxo1XRghJWAGG7At7ePiBWTNzdkvX7cViRCKRLjjjPTGCoAH2mdGQK9i1JiY1wh18eh4h7pGy" ],
  "assetId" : "6UAMZA6RshxyPvt9W7aoWiUiB6N73yLQMMfiRQYXdWZh",
  "id" : "8T9jJUusN5KBexxDUX1XBjoDydXGP34zWH7Qvp5mnmES",
  "timestamp" : 1619187184206,
  "height" : 861645
}

Signing:

{
   "type": 5,
   "version":3,
   "quantity": 556105,
   "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
   "password": "",
   "assetId": "6UAMZA6RshxyPvt9W7aoWiUiB6N73yLQMMfiRQYXdWZh",
   "reissuable": true,
   "fee": 100000000
   "atomicBadge":{
     "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
   }
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "quantity" : 556105,
  "fee" : 100000000,
  "type" : 5,
  "version" : 3,
  "reissuable" : true,
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "chainId" : 86,
  "proofs" : [ "5ahD78wciu8YTsLoxo1XRghJWAGG7At7ePiBWTNzdkvX7cViRCKRLjjjPTGCoAH2mdGQK9i1JiY1wh18eh4h7pGy" ],
  "assetId" : "6UAMZA6RshxyPvt9W7aoWiUiB6N73yLQMMfiRQYXdWZh",
  "id" : "8T9jJUusN5KBexxDUX1XBjoDydXGP34zWH7Qvp5mnmES",
  "timestamp" : 1619187184206,
  "height" : 861645
}

Important

If the reissuable field is set to False, i.e. tokens are not allowed to be reissued, then it will be impossible to change this value in the future.

6. Burn Transaction

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

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (6)

version

Byte

Transaction version

sender

ByteStr

Address of the 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 the transaction (in base58 format) – optional field

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

amount

Long

Number of tokens to be burnt

sender

ByteStr

Address of the 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 the transaction (in milliseconds) – optional field

height

Int

Height of transaction execution

JSON:

Signing:

{
    "type": 6,
    "version": 2,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "assetId": "7bE3JPwZC3QcN9edctFrLAKYysjfMEk1SDjZx5gitSGg",
    "quantity": 1000,
    "fee": 100000,
    "attachment": "string"
}

Broadcasting:

{
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "amount": 1000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "chainId": 84,
    "proofs": [ "kzTwsNXjJkzk6dpFFZZXyeimYo6iLTVbCnCXBD4xBtyrNjysPqZfGKk9NdJUTP3xeAPhtEgU9hsdwzRVo1hKMgS" ],
    "assetId": "7bE3JPwZC3QcN9edctFrLAKYysjfMEk1SDjZx5gitSGg",
    "fee": 100000,
    "id": "3yd2HZq7sgun7GakisLH88UeKcpYMUEL4sy57aprAN5E",
    "type": 6,
    "version": 2,
    "timestamp": 1551448489758,
    "height": 1190
}

Signing:

{
    "type": 6,
    "version": 3,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "assetId": "7bE3JPwZC3QcN9edctFrLAKYysjfMEk1SDjZx5gitSGg",
    "quantity": 1000,
    "fee": 100000,
    "attachment": "string"
    "atomicBadge":{
        "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "amount": 1000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "chainId": 84,
    "proofs": [ "kzTwsNXjJkzk6dpFFZZXyeimYo6iLTVbCnCXBD4xBtyrNjysPqZfGKk9NdJUTP3xeAPhtEgU9hsdwzRVo1hKMgS" ],
    "assetId": "7bE3JPwZC3QcN9edctFrLAKYysjfMEk1SDjZx5gitSGg",
    "fee": 100000,
    "id": "3yd2HZq7sgun7GakisLH88UeKcpYMUEL4sy57aprAN5E",
    "type": 6,
    "version": 3,
    "timestamp": 1551448489758,
    "height": 1190
}

8. Lease Transaction

Leasing of tokens to another address. The tokens in leasing are taken into account in the 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.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (8)

version

Byte

Transaction version

sender

ByteStr

Address of the 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

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

amount

Long

Number of tokens for leasing

sender

ByteStr

Address of the 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

Transaction version

timestamp

Long

The Unix Timestamp of the transaction (in milliseconds) – optional field

JSON:

Signing:

{
    "type": 8,
    "version": 2,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "recipient": "3N1ksBqc6uSksdiYjCzMtvEpiHhS1JjkbPh",
    "amount": 1000,
    "fee": 100000
}

Broadcasting:

{
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "amount": 1000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "proofs": [ "5jvmWKmU89HnxXFXNAd9X41zmiB5fSGoXMirsaJ9tNeyiCAJmjm7MR48g789VucckQw2UExaVXfhsdEBuUrchvrq" ],
    "fee": 100000,
    "recipient": "3N1ksBqc6uSksdiYjCzMtvEpiHhS1JjkbPh",
    "id": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp",
    "type": 8,
    "version": 2,
    "timestamp": 1551449299545,
    "height": 1190
}

Signing:

{
    "type": 8,
    "version": 3,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "recipient": "3N1ksBqc6uSksdiYjCzMtvEpiHhS1JjkbPh",
    "amount": 1000,
    "fee": 100000
    "atomicBadge":{
        "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "amount": 1000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "proofs": [ "5jvmWKmU89HnxXFXNAd9X41zmiB5fSGoXMirsaJ9tNeyiCAJmjm7MR48g789VucckQw2UExaVXfhsdEBuUrchvrq" ],
    "fee": 100000,
    "recipient": "3N1ksBqc6uSksdiYjCzMtvEpiHhS1JjkbPh",
    "id": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp",
    "type": 8,
    "version": 3,
    "timestamp": 1551449299545,
    "height": 1190
}

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 providing the transaction data.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (9)

version

Byte

Transaction version

fee

Long

WE Mainnet transaction fee

sender

ByteStr

Address of the transaction sender

password

String

Keypair password in the node keystore – optional field

txId

Byte

ID of a leasing transaction

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

leaseId

Byte

ID of a leasing transaction

sender

ByteStr

Address of the 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 the transaction (in milliseconds) – optional field

height

Int

Height of transaction execution

JSON:

Signing:

{
    "type": 9,
    "version": 2,
    "fee": 100000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "txId": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp"
}

Broadcasting:

{
   "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "leaseId": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp",
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "chainId": 84,
    "proofs": [ "2Gns72hraH5yay3eiWeyHQEA1wTqiiAztaLjHinEYX91FEv62HFW38Hq89GnsEJFHUvo9KHYtBBrb8hgTA9wN7DM" ],
    "fee": 100000,
    "id": "9vhxB2ZDQcqiumhQbCPnAoPBLuir727qgJhFeBNmPwmu",
    "type": 9,
    "version": 2,
    "timestamp": 1551449835205,
    "height": 1190
}

Signing:

{
    "type": 9,
    "version": 3,
    "fee": 100000,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "txId": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp"
    "atomicBadge":{
       "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "leaseId": "6Tn7ir9MycHW6Gq2F2dGok2stokSwXJadPh4hW8eZ8Sp",
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "chainId": 84,
    "proofs": [ "2Gns72hraH5yay3eiWeyHQEA1wTqiiAztaLjHinEYX91FEv62HFW38Hq89GnsEJFHUvo9KHYtBBrb8hgTA9wN7DM" ],
    "fee": 100000,
    "id": "9vhxB2ZDQcqiumhQbCPnAoPBLuir727qgJhFeBNmPwmu",
    "type": 9,
    "version": 3,
    "timestamp": 1551449835205,
    "height": 1190
}

10. CreateAlias Transaction

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

The 3rd version of the transaction implemented the ability to pay fee in another token. The 4th version of the transaction features the ability to include the transaction in a atomic transaction.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (10)

version

Byte

Transaction version

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

sender

ByteStr

Address of the transaction sender

password

String

Keypair password in the node keystore – optional field

alias

Byte

An arbitrary alias

Broadcasting:

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 the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

timestamp

Long

The Unix Timestamp of the 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

JSON:

Signing:

{
    "type": 10,
    "version": 2,
    "fee": 100000000,
    "sender": "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
    "password": "",
    "alias": "1@k1_kv29"
}

Broadcasting:

{
  "senderPublicKey" : "C4eRfdUFaZMRkfUp91bYr7uMgdBRnUfAxuAjetxmK7KY",
  "sender" : "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
  "proofs" : [ "3fhJztBNnTDjppmqgi4GugAYo1aS1mzZhVhPdnNsqYqCEyLLHfzgb75psRPntHD4uBZgk8jByFP9mwwx2Ezsdg59" ],
  "fee" : 100000000,
  "alias" : "1@k1_kv29",
  "id" : "AavgVzV7avPMpERro6YqikwFESAgG2wViprtPJUtXP6F",
  "type" : 10,
  "version" : 2,
  "timestamp" : 1608737444468,
  "height" : 595942
}

Signing:

{
    "type": 10,
    "version": 3,
    "fee": 100000000,
    "feeAssetId": DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB,
    "sender": "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
    "password": "",
    "alias": "1@k1_kv29"
}

Broadcasting:

{
  "senderPublicKey" : "C4eRfdUFaZMRkfUp91bYr7uMgdBRnUfAxuAjetxmK7KY",
  "sender" : "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
  "proofs" : [ "3fhJztBNnTDjppmqgi4GugAYo1aS1mzZhVhPdnNsqYqCEyLLHfzgb75psRPntHD4uBZgk8jByFP9mwwx2Ezsdg59" ],
  "fee" : 100000000,
  "feeAssetId": DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB,
  "alias" : "1@k1_kv29",
  "id" : "AavgVzV7avPMpERro6YqikwFESAgG2wViprtPJUtXP6F",
  "type" : 10,
  "version" : 3,
  "timestamp" : 1608737444468,
  "height" : 595942
}

Signing:

{
    "type": 10,
    "version": 4,
    "fee": 100000000,
    "feeAssetId": DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB,
    "sender": "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
    "password": "",
    "alias": "1@k1_kv29"
    "atomicBadge":{
      "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
}

Broadcasting:

{
  "senderPublicKey" : "C4eRfdUFaZMRkfUp91bYr7uMgdBRnUfAxuAjetxmK7KY",
  "sender" : "3NwTvbW7TMckBc785XjtGTUfHmcesaWBe1A",
  "proofs" : [ "3fhJztBNnTDjppmqgi4GugAYo1aS1mzZhVhPdnNsqYqCEyLLHfzgb75psRPntHD4uBZgk8jByFP9mwwx2Ezsdg59" ],
  "fee" : 100000000,
  "feeAssetId": DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB,
  "alias" : "1@k1_kv29",
  "id" : "AavgVzV7avPMpERro6YqikwFESAgG2wViprtPJUtXP6F",
  "type" : 10,
  "version" : 4,
  "timestamp" : 1608737444468,
  "height" : 595942
}

11. MassTransfer Transaction

Transfer of tokens to several recipients (1 to 100 addresses). The transaction fee depends on the number of addresses.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (11)

sender

ByteStr

Address of the transaction sender

password

String

Keypair password in the node keystore – optional field

fee

Long

WE Mainnet transaction fee

version

Byte

Transaction version

transfers

List

List of recipients with recipient and amount fields separated by a comma

recipient

ByteStr

Address of recipient of tokens

amount

Long

Number of tokens to be transferred to an address

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

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 the transaction (in base58 format) – optional field

sender

ByteStr

Address of the 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 recipient and amount fields separated by 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 }
]

JSON:

Signing:

{
    "type": 11,
    "sender": "3NydXoTq3UgUW5rxsNwEMs1iwbbvVEwxoHU",
    "password": "",
    "fee": 30000000,
    "version": 2,
    "transfers":
    [
        { "recipient": "3MtHszoTn399NfsH3v5foeEXRRrchEVtTRB", "amount": 100000 },
        { "recipient": "3N7BA6J9VUBfBRutuMyjF4yKTUEtrRFfHMc", "amount": 100000 }
    ]
}

Broadcasting:

{
  "senderPublicKey" : "AMhAY8RMy5QsPqj58xeMY3fJxTZKx71QztsjDzqWprHo",
  "fee" : 30000000,
  "type" : 11,
  "transferCount" : 4,
  "version" : 2,
  "totalAmount" : 400000000,
  "attachment" : "",
  "sender" : "3NydXoTq3UgUW5rxsNwEMs1iwbbvVEwxoHU",
  "feeAssetId" : "8bec1mhqTiveMeRTHgYr6az12XdqBBtpeV3ZpXMRHfSB",
  "proofs" : [ "21hhAMmwze6nLLQ9K6AoU6scek9Sk5KabR4VggGfdTVFHonfMGwVTse6qL2f8zR8DRm7RckMaikiYRt5XxWEKWcA" ],
  "assetId" : "8bec1mhqTiveMeRTHgYr6az12XdqBBtpeV3ZpXMRHfSB",
  "transfers" : [ {
    "recipient" : "3NqEjAkFVzem9CGa3bEPhakQc1Sm2G8gAFU",
    "amount" : 100000000
  }, {
    "recipient" : "3NzkzibVRkKUzaRzjUxndpTPvoBzQ3iLng3",
    "amount" : 100000000
  }, {
    "recipient" : "3Nnx8cX3UiyfQeC3YQKVRqVr2ewSxrvaDyB",
    "amount" : 100000000
  }, {
    "recipient" : "3NzC4Ex91VBQKfJHPiGhuPEomLg48NMi2ZF",
    "amount" : 100000000
  } ],
  "id" : "EvnxFxdYhYxHgQSMhkyLaqgyUDZdnBknfAWEXyqEHt97",
  "timestamp" : 1627643861044,
  "height" : 1076874
}

Signing:

{
    "type": 11,
    "sender": "3NydXoTq3UgUW5rxsNwEMs1iwbbvVEwxoHU",
    "password": "",
    "fee": 30000000,
    "version": 3,
    "transfers":
    [
       { "recipient": "3MtHszoTn399NfsH3v5foeEXRRrchEVtTRB", "amount": 100000 },
       { "recipient": "3N7BA6J9VUBfBRutuMyjF4yKTUEtrRFfHMc", "amount": 100000 }
    ]
    "atomicBadge":{
      "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
  "senderPublicKey" : "AMhAY8RMy5QsPqj58xeMY3fJxTZKx71QztsjDzqWprHo",
  "fee" : 30000000,
  "type" : 11,
  "transferCount" : 4,
  "version" : 3,
  "totalAmount" : 400000000,
  "attachment" : "",
  "sender" : "3NydXoTq3UgUW5rxsNwEMs1iwbbvVEwxoHU",
  "feeAssetId" : "8bec1mhqTiveMeRTHgYr6az12XdqBBtpeV3ZpXMRHfSB",
  "proofs" : [ "21hhAMmwze6nLLQ9K6AoU6scek9Sk5KabR4VggGfdTVFHonfMGwVTse6qL2f8zR8DRm7RckMaikiYRt5XxWEKWcA" ],
  "assetId" : "8bec1mhqTiveMeRTHgYr6az12XdqBBtpeV3ZpXMRHfSB",
  "transfers" : [ {
    "recipient" : "3NqEjAkFVzem9CGa3bEPhakQc1Sm2G8gAFU",
    "amount" : 100000000
  }, {
    "recipient" : "3NzkzibVRkKUzaRzjUxndpTPvoBzQ3iLng3",
    "amount" : 100000000
  }, {
    "recipient" : "3Nnx8cX3UiyfQeC3YQKVRqVr2ewSxrvaDyB",
    "amount" : 100000000
  }, {
    "recipient" : "3NzC4Ex91VBQKfJHPiGhuPEomLg48NMi2ZF",
    "amount" : 100000000
  } ],
  "id" : "EvnxFxdYhYxHgQSMhkyLaqgyUDZdnBknfAWEXyqEHt97",
  "timestamp" : 1627643861044,
  "height" : 1076874
}

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:

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (12)

version

Byte

Transaction version

sender

ByteStr

Address of the transaction sender

password

String

Keypair password in the node keystore – optional field

senderPublicKey

PublicKeyAccount

Transaction sender public key

author

Byte

Author address for data to be entered

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

fee

Long

WE Mainnet transaction fee

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender 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 the 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

feeAssetId

Byte

Identifier of a token for fee payment – optional field

id

Byte

Data transaction ID

type

Byte

Transaction number (12)

version

Byte

Transaction version

timestamp

Long

The Unix Timestamp of the transaction (in milliseconds), – optional field

Example of the data field:

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

JSON:

Signing:

{
    "type": 12,
    "version": 2,
    "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
    "password": "",
    "senderPublicKey": "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
    "author": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
    "data": [
      ...
    ],
    "fee": 150000000
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "data" : [
    ...
  ],
  "author" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "fee" : 150000000,
  "type" : 12,
  "version" : 2,
  "authorPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "4wFNmn32NZqGwP4D4aAxCMyigGEVZLWftqi919pHAK7mCj3sFw7Ekf76g2rr51PZuk5sLwzjkKiZArQvWY8uEGqk" ],
  "id" : "GcDy84oTFf5NQzDtixkfUqiFNZwMaN2vfXqxsbGxumfo",
  "timestamp" : 1619187166499,
  "height" : 861644
}

Signing:

{
    "type": 12,
    "version": 3,
    "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
    "password": "",
    "senderPublicKey": "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
    "author": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
    "data": [
      ...
    ],
    "fee": 150000000
    "atomicBadge":{
       "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "data" : [
    ...
  ],
  "author" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "fee" : 150000000,
  "type" : 12,
  "version" : 3,
  "authorPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "4wFNmn32NZqGwP4D4aAxCMyigGEVZLWftqi919pHAK7mCj3sFw7Ekf76g2rr51PZuk5sLwzjkKiZArQvWY8uEGqk" ],
  "id" : "GcDy84oTFf5NQzDtixkfUqiFNZwMaN2vfXqxsbGxumfo",
  "timestamp" : 1619187166499,
  "height" : 861644
 }

13. SetScript Transaction

A transaction to attach a script to an account or detach a script from an account. An account with a script attached 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.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (13)

version

Byte

Transaction version

sender

ByteStr

Address of the 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 in base64 format. If you leave this field empty (null), the script will be detached from the account

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (13)

id

Byte

ID of a script setting transaction

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the 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 the transaction (in base58 format) – optional field

height

Byte

Height of transaction execution

JSON:

Signing:

{
    "type": 13,
    "version": 1,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "fee": 1000000,
    "name": "faucet",
    "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgG+RXSzQ=="
}

Broadcasting:

{
    "type": 13,
    "id": "HPDypnQJHJskN8kwszF8rck3E5tQiuiM1fEN42w6PLmt",
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "senderPublicKey": "Fbt5fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUopa6H3",
    "fee": 1000000,
    "timestamp": 1545986757233,
    "proofs": [ "2QiGYS2dqh8QyN7Vu2tAYaioX5WM6rTSDPGbt4zrWS7QKTzojmR2kjppvGNj4tDPsYPbcDunqBaqhaudLyMeGFgG" ],
    "chainId": 84,
    "version": 1,
    "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgG+RXSzQ==",
    "name": "faucet",
    "description": "",
    "height": 3805
}

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.

Transaction data structures

Signing:

Field

Data type

Description

sender

ByteStr

Address of the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (14)

id

Byte

Sponsorship transaction ID

sender

ByteStr

Address of the 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 the 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

JSON:

Signing:

{
    "sender": "3JWDUsqyJEkVa1aivNPP8VCAa5zGuxiwD9t",
    "assetId": "G16FvJk9vabwxjQswh9CQAhbZzn3QrwqWjwnZB3qNVox",
    "fee": 100000000,
    "isEnabled": false,
    "type": 14,
    "password": "1234",
    "version": 1
}

Broadcasting:

{
    "type": 14,
    "id": "Ht6kpnQJHJskN8kwszF8rck3E5tQiuiM1fEN42wGfdk7",
    "sender": "3JWDUsqyJEkVa1aivNPP8VCAa5zGuxiwD9t",
    "senderPublicKey": "Gt55fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUophy89",
    "fee": 100000000,
    "assetId": "G16FvJk9vabwxjQswh9CQAhbZzn3QrwqWjwnZB3qNVox",
    "timestamp": 1545986757233,
    "proofs": [ "5TfgYS2dqh8QyN7Vu2tAYaioX5WM6rTSDPGbt4zrWS7QKTzojmR2kjppvGNj4tDPsYPbcDunqBaqhaudLyMeGFh7" ],
    "chainId": 84,
    "version": 1,
    "isEnabled": false,
    "height": 3865
}

Signing:

{
    "sender": "3JWDUsqyJEkVa1aivNPP8VCAa5zGuxiwD9t",
    "assetId": "G16FvJk9vabwxjQswh9CQAhbZzn3QrwqWjwnZB3qNVox",
    "fee": 100000000,
    "isEnabled": false,
    "type": 14,
    "password": "1234",
    "version": 2,
    "atomicBadge":{
      "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
    }
}

Broadcasting:

{
    "type": 14,
    "id": "Ht6kpnQJHJskN8kwszF8rck3E5tQiuiM1fEN42wGfdk7",
    "sender": "3JWDUsqyJEkVa1aivNPP8VCAa5zGuxiwD9t",
    "senderPublicKey": "Gt55fKHesnQG2CXmsKf4TC8v9oB7bsy2AY56CUophy89",
    "fee": 100000000,
    "assetId": "G16FvJk9vabwxjQswh9CQAhbZzn3QrwqWjwnZB3qNVox",
    "timestamp": 1545986757233,
    "proofs": [ "5TfgYS2dqh8QyN7Vu2tAYaioX5WM6rTSDPGbt4zrWS7QKTzojmR2kjppvGNj4tDPsYPbcDunqBaqhaudLyMeGFh7" ],
    "chainId": 84,
    "version": 2,
    "isEnabled": false,
    "height": 3865
}

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.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (15)

version

Byte

Asset script transaction version

sender

ByteStr

Address of the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (15)

id

Byte

Asset script transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the 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

JSON:

Signing:

{
    "type": 15,
    "version": 1,
    "sender": "3N9vL3apA4j2L5PojHW8TYmfHx9Lo2ZaKPB",
    "password": "",
    "fee": 100000000,
    "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgG+RXSzQ==",
    "assetId": "7bE3JPwZC3QcN9edctFrLAKYysjfMEk1SDjZx5gitSGg"
}

Broadcasting:

{
    "type": 15,
    "id": "CQpEM9AEDvgxKfgWLH2HxE82iAzpXrtqsDDcgZGPAF9J",
    "sender": "3N65yEf31ojBZUvpu4LCo7n8D73juFtheUJ",
    "senderPublicKey": "C1ADP1tNGuSLTiQrfNRPhgXx59nCrwrZFRV4AHpfKBpZ",
    "fee": 100000000,
    "timestamp": 1549448710502,
    "proofs": [ "64eodpuXQjaKQQ4GJBaBrqiBtmkjSxseKC97gn6EwB5kZtMr18mAUHPRkZaHJeJxaDyLzGEZKqhYoUknWfNhXnkf" ],
    "version": 1,
    "chainId": 84,
    "assetId": "DnK5Xfi2wXUJx9BjK9X6ZpFdTLdq2GtWH9pWrcxcmrhB",
    "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgG+RXSzQ==",
    "height": 61895
}

101. GenesisPermission Transaction

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

Transaction data structures

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 the 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)

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (101)

timestamp

Long

The Unix Timestamp of the 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 (permission). Only a participant with the permissioner role can send 102 transactions to the blockchain.

The permissions you can specify in the role field:

  • permissioner

  • sender

  • blacklister

  • miner

  • issuer

  • contract_developer

  • connection_manager

  • contract_validator

  • banned

You can find the roles (permissions) description in the Permissions article.

The 102. Permission Transaction can be included in the atomic transaction starting from version 2.

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (102)

sender

ByteStr

Address of the 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 validity Unix Timestamp (in milliseconds) – optional field

version

Byte

Transaction version

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 the 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 validity Unix Timestamp (in milliseconds) – optional field

timestamp

Long

The Unix Timestamp of the transaction (in milliseconds), – optional field

target

ByteStr

Address of a first administrator to be appointed

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

JSON:

Signing:

{
  "type": 102,
  "sender": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
  "password": "",
  "senderPublicKey": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
  "fee": 0,
  "target": "3GPtj5osoYqHpyfmsFv7BMiyKsVzbG1ykfL",
  "opType": "add",
  "role": "contract_developer",
  "dueTimestamp": null,
  "version": 1
}

Broadcasting:

{
  "senderPublicKey": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
  "role": "contract_developer",
  "sender": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
  "proofs": [
    "5ABJCRTKGo6jmDZCRWcLQc257CCeczmcjmtfJmbBE7TP3KsVkwvisH9kEkfYPckVCzEMKZTCd3LKAPcN8o4Git3j"
  ],
  "fee": 0,
  "opType": "add",
  "id": "8zVUH7nsDCcpwyfxiq8DCTgqL7Q23FW1KWepB9EZcFG6",
  "type": 102,
  "dueTimestamp": null,
  "timestamp": 1559048837487,
  "target": "3GPtj5osoYqHpyfmsFv7BMiyKsVzbG1ykfL"
  "version": 1
}

Signing:

{
  "type": 102,
  "sender": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
  "password": "",
  "senderPublicKey": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
  "fee": 0,
  "target": "3GPtj5osoYqHpyfmsFv7BMiyKsVzbG1ykfL",
  "opType": "add",
  "role": "contract_developer",
  "dueTimestamp": null,
  "version": 2
}

Broadcasting:

{
  "senderPublicKey": "4WnvQPit2Di1iYXDgDcXnJZ5yroKW54vauNoxdNeMi2g",
  "role": "contract_developer",
  "sender": "3GLWx8yUFcNSL3DER8kZyE4TpyAyNiEYsKG",
  "proofs": [
    "5ABJCRTKGo6jmDZCRWcLQc257CCeczmcjmtfJmbBE7TP3KsVkwvisH9kEkfYPckVCzEMKZTCd3LKAPcN8o4Git3j"
  ],
  "fee": 0,
  "opType": "add",
  "id": "8zVUH7nsDCcpwyfxiq8DCTgqL7Q23FW1KWepB9EZcFG6",
  "type": 102,
  "dueTimestamp": null,
  "timestamp": 1559048837487,
  "target": "3GPtj5osoYqHpyfmsFv7BMiyKsVzbG1ykfL"
  "version": 2
  "atomicBadge": null
}

103. CreateContract Transaction

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

103 transaction can only be signed by a user with the contract_developer permission.

Transaction data structures

Signing:

Field

Data type

Description

fee

Long

Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

image

Array[Bytes]

The name of the Docker image of the Docker smart contract; the field is used up to and including version 6 of the transaction; starting with version 7, the storedContract.image field is used instead

imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used up to and including version 6 of the transaction; starting with version 7, the storedContract.imageHash field is used instead

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 the transaction sender

password

String

Keypair password in the node keystore – optional field

params

List[DataEntry[_]]

Input and output data of the smart contract; entered using the type, value and key fields separated by commas – 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 the Docker smart contract gRPC methods (see gRPC services used by Docker smart contracts); the field is used up to and including version 6 of the transaction; from version 7 onwards, the storedContract.apiVersion field is used instead

Field

Data type

Description

validationPolicy.type

String

Smart contract validation policy type

payments.amount

An integer that specifies the number of assets to be transferred to the contract; in the amount field the lower bits correspond to the fractional parts of the number of assets to be transferred, if its decimals is not zero – the field is optional

payments.assetId

The identifier of the asset transferred to the contract; the assetId field must be empty for the WEST system token to be transferred; – the field is optional

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

isConfidential

Boolean

A flag that indicates whether the contract will support operation in confidential mode

groupParticipants

Set[Address]

Addresses authorized to access confidential data

groupOwners

Set[Address]

Addresses that can modify the groupParticipants and groupOwners lists

storedContract.bytecode

Array[Byte]

WASM smart contract bytecode; the field is used starting with transaction version 7

storedContract.bytecodeHash

Array[Bytes]

WASM smart contract bytecode hash; the field is used starting with transaction version 7

storedContract.image

Array[Bytes]

The name of the Docker image of the Docker smart contract; the field is used starting with version 7 of the transaction

storedContract.imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used starting with version 7 of the transaction

storedContract.apiVersion

Byte

API version for Docker smart contract gRPC methods (see gRPC services used by Docker smart contract); the field is used starting with transaction version 7; the field is not used for WASM smart contracts

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (103)

id

Byte

ID of a CreateContract transaction

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the transaction (in milliseconds), – optional field

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

version

Byte

Transaction version

image

Array[Bytes]

Docker smart contract name (if loaded from a pre-installed repository) or its full address (if the Docker smart contract repository is not specified in the node configuration file); the field is used up to and including version 6 of the transaction; starting with version 7, the storedContract.image field is used instead

imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used up to and including version 6 of the transaction; starting with version 7, the storedContract.imageHash field is used instead

contractName

Array[Bytes]

Smart contract name

params

List[DataEntry[_]]

Input and output data of the smart contract; entered using the type, value and key fields separated by commas – 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 the Docker smart contract gRPC methods (see gRPC services used by Docker smart contracts); the field is used up to and including version 6 of the transaction; from version 7 onwards, the storedContract.apiVersion field is used instead

validationPolicy.type

String

Smart contract validation policy type

payments.amount

An integer that specifies the number of assets to be transferred to the contract; in the amount field the lower bits correspond to the fractional parts of the number of assets to be transferred, if its decimals is not zero – the field is optional

Field

Data type

Description

payments.assetId

The identifier of the asset transferred to the contract; the assetId field must be empty for the WEST system token to be transferred; – the field is optional

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

isConfidential

Boolean

A flag that indicates whether the contract will support operation in confidential mode

groupParticipants

Set[Address]

Addresses authorized to access confidential data

groupOwners

Set[Address]

Addresses that can modify the groupParticipants and groupOwners lists

storedContract.bytecode

Array[Byte]

WASM smart contract bytecode; the field is used starting with transaction version 7

storedContract.bytecodeHash

Array[Bytes]

WASM smart contract bytecode hash; the field is used starting with transaction version 7

storedContract.image

Array[Bytes]

The name of the Docker image of the Docker smart contract; the field is used starting with version 7 of the transaction

storedContract.imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used starting with version 7 of the transaction

storedContract.apiVersion

Byte

API version for Docker smart contract gRPC methods (see gRPC services used by Docker smart contract); the field is used starting with transaction version 7; the field is not used for WASM smart contracts

JSON:

Signing:

{
  "type": 103,
  "version": 2,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "password": "signing-key-password",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null
}

Broadcasting:

{
  "id": "4WVhw3QdiinpE5QXDG7QfqLiLanM7ewBw4ChX4qyGjs2",
  "type": 103,
  "version": 2,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "senderPublicKey": "YNpp7chAaudMqEtSZZPyN4GYLJ5ZTXdjCXrQdszzuRp",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "proofs": [
    "4vqLnpJRFpcDgM5vgi78DpZnVfqztsARHNb7Hbmq3mQBjS3SRnzFAiYjRvPazEVMhBM9cE4Rcp6H5K29kk75Uxyh"
  ]
}

Signing:

{
  "type": 103,
  "version": 3,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "password": "signing-key-password",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null
}

Broadcasting:

{
  "id": "4WVhw3QdiinpE5QXDG7QfqLiLanM7ewBw4ChX4qyGjs2",
  "type": 103,
  "version": 3,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "senderPublicKey": "YNpp7chAaudMqEtSZZPyN4GYLJ5ZTXdjCXrQdszzuRp",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null,
  "proofs": [
    "4vqLnpJRFpcDgM5vgi78DpZnVfqztsARHNb7Hbmq3mQBjS3SRnzFAiYjRvPazEVMhBM9cE4Rcp6H5K29kk75Uxyh"
  ]
}

Signing:

{
  "type": 103,
  "version": 4,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "password": "signing-key-password",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null,
  "validationPolicy": {
    "type": "majority"
  },
  "apiVersion": "1.0"
}

Broadcasting:

{
  "id": "4WVhw3QdiinpE5QXDG7QfqLiLanM7ewBw4ChX4qyGjs2",
  "type": 103,
  "version": 4,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "senderPublicKey": "YNpp7chAaudMqEtSZZPyN4GYLJ5ZTXdjCXrQdszzuRp",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null,
  "proofs": [
    "4vqLnpJRFpcDgM5vgi78DpZnVfqztsARHNb7Hbmq3mQBjS3SRnzFAiYjRvPazEVMhBM9cE4Rcp6H5K29kk75Uxyh"
  ]
}

Signing:

{
  "type": 103,
  "version": 5,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "password": "signing-key-password",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null,
  "validationPolicy": {
    "type": "majority"
  },
  "apiVersion": "1.0"
}

Broadcasting:

{
  "id": "4WVhw3QdiinpE5QXDG7QfqLiLanM7ewBw4ChX4qyGjs2",
  "type": 103,
  "version": 5,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "senderPublicKey": "YNpp7chAaudMqEtSZZPyN4GYLJ5ZTXdjCXrQdszzuRp",
  "contractName": "SOME_CONTRACT_NAME",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "key": "int",
      "type": "integer",
      "value": 24
    },
    {
      "key": "bool",
      "type": "boolean",
      "value": true
    },
    {
      "key": "blob",
      "type": "binary",
      "value": "base64:YWxpY2U="
    }
  ],
  "fee": 0,
  "timestamp": 1665267880,
  "feeAssetId": null,
  "atomicBadge": {
    "trustedSender": "SOME_SENDER_ACCOUNT_ADDRESS"
  },
  "proofs": [
    "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
  ],
  "validationPolicy": {
    "type": "SOME_VALIDATION_POLICY_NAME"
  },
  "apiVersion": "SOME_API_VERSION",
  "payments": [
    {
      "amount": 100
    },
    {
      "assetId": "SOME_ASSET_ID",
      "amount": 100
    }
  ]
}

Signing:

{
  "type": 103,
  "version": 6,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "password": "signing-key-password",
  "contractName": "Your contract name",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "type": "string",
      "key": "test_key",
      "value": "test_value"
    }
  ],
  "fee": 100000000,
  "timestamp": 1651487626477,
  "feeAssetId": null,
  "atomicBadge": null,
  "validationPolicy": {
    "type": "majority"
  },
  "apiVersion": "1.0"
  "isConfidential": true
  "groupParticipants" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
  "groupOwners" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"]
}

Broadcasting:

{
  "id": "4WVhw3QdiinpE5QXDG7QfqLiLanM7ewBw4ChX4qyGjs2",
  "type": 103,
  "version": 6,
  "sender": "3NpN3HyHzGj7Ny1k5F9zMMQ2n54TZg86G9D",
  "senderPublicKey": "YNpp7chAaudMqEtSZZPyN4GYLJ5ZTXdjCXrQdszzuRp",
  "contractName": "SOME_CONTRACT_NAME",
  "image": "registry.yourdomain.com/test-docker-repo/contract:v1.0.0",
  "imageHash": "573387bbf50cfdeda462054b8d85d6c24007f91044501250877392e43ff5ed50",
  "params": [
    {
      "key": "int",
      "type": "integer",
      "value": 24
    },
    {
      "key": "bool",
      "type": "boolean",
      "value": true
    },
    {
      "key": "blob",
      "type": "binary",
      "value": "base64:YWxpY2U="
    }
  ],
  "fee": 0,
  "timestamp": 1665267880,
  "feeAssetId": null,
  "atomicBadge": {
    "trustedSender": "SOME_SENDER_ACCOUNT_ADDRESS"
  },
  "proofs": [
    "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
  ],
  "validationPolicy": {
    "type": "SOME_VALIDATION_POLICY_NAME"
  },
  "apiVersion": "SOME_API_VERSION",
  "payments": [
    {
      "amount": 100
    },
    {
      "assetId": "SOME_ASSET_ID",
      "amount": 100
    }
  ]
  "isConfidential": true
  "groupParticipants" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
  "groupOwners" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"]
}

Signing:

{
  "type": 103,
  "version": 7,
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "contractName": " not world",
  "params": [
    {
     "type": "integer",
     "value": 0,
     "key": "count"
    }
  ],
  "fee": 100000000,
  "feeAssetId": null,
  "validationPolicy":
    {
      "type": "any"
    },
  "payments": [],
  "isConfidential": false,
  "groupParticipants": [],
  "groupOwners": [],
  "storedContract":
    {
      "bytecode": "AGFzbQEAAAABNwdgA39/fgF/YAADf39/YAR/f39/AX9gBH9/f38Cf35gBH9/f38Df39/YAR/f39/An9/YAF+AX8CnAEHA2VudgZtZW1vcnkCAQIQBGVudjAPc2V0X3N0b3JhZ2VfaW50AAAEZW52MA1nZXRfdHhfc2VuZGVyAAEEZW52MBJzZXRfc3RvcmFnZV9iaW5hcnkAAgRlbnYwD2dldF9zdG9yYWdlX2ludAADBGVudjASZ2V0X3N0b3JhZ2VfYmluYXJ5AAQEZW52MA1iaW5hcnlfZXF1YWxzAAUDBAMGBgYGEAN/AUEQC38AQRoLfwBBIAsHRwUMX2NvbnN0cnVjdG9yAAYHY291bnRlcgAHD3Jlc3RvcmVfY291bnRlcgAICl9fZGF0YV9lbmQDAQtfX2hlYXBfYmFzZQMCCvcBA0sBA38CQEGQgICAAEEFIAAQgICAgAAiAQ0AEIGAgIAAGiECIgENABCBgICAACEDGiIBDQBBlYCAgABBBSACIAMQgoCAgAAhAQsgAQs4AgF+AX8CQEEAQQBBkICAgABBBRCDgICAACEBIgINAEGQgICAAEEFIAEgAHwQgICAgAAhAgsgAgtwAQV/AkBBAEEAQZWAgIAAQQUQhICAgAAhAiEBIgMNABCBgICAABohBCIDDQAQgYCAgAAhBRoiAw0AIAEgAiAEIAUQhYCAgAAhASIDDQBBrAIhAyABQQFxRQ0AQZCAgIAAQQUgABCAgICAACEDCyADCwsQAQBBEAsKY291bnRvd25lcg==",
      "bytecodeHash": "083b7d0cb08b4a30f3d9f96a30ede04680623f73527432f947d5d5880e670625"
    }
}

Broadcasting:

{
  "senderPublicKey" : "5oKuxwiRmqHnr7vCAHK3VRJBhg9andjskfX11HpmJcYp8JifBXisz4KEKFD3pbRum3PWHDf4ZKkoCAgrrsLbp8HH",
  "isConfidential" : false,
  "fee" : 100000000,
  "payments" : [ ],
  "groupOwners" : [ ],
  "type" : 103,
  "params" : [ ],
  "version" : 7,
  "atomicBadge" : null,
  "groupParticipants" : [ ],
  "sender" : "3Hakpx6EE4fDb7Vd7EaWMG1HT9UJezLeVcG",
  "feeAssetId" : null,
  "storedContract" : {
    "bytecode" : "AGFzbQEAAAABJQVgBH9/f38Df39/YAN/f34Bf2AEf39/fwJ/fmAAAX9gAn9/AX8CSgQDZW52Bm1lbW9yeQIBAhAEZW52MARqb2luAAAEZW52MA9zZXRfc3RvcmFnZV9pbnQAAQRlbnYwD2dldF9zdG9yYWdlX2ludAACAwMCAwQGEAN/AUEQC38AQSALfwBBIAsHOQQMX2NvbnN0cnVjdG9yAAMLaW5jcmVtZW50XzEABApfX2RhdGFfZW5kAwELX19oZWFwX2Jhc2UDAgrXAQJwAQR/QQAhAANAAkAgAEEKRw0AQQAPCwJAQZqAgIAAQQBBmoCAgABBBhCAgICAACECIQEiAw0AIAEgAiAAQZCAgIAAakEBEICAgIAAIQIhASIDDQAgAEEBaiEAIAEgAkIAEIGAgIAAIgNFDQELCyADC2QCA38BfgJAQZqAgIAAQQBBmoCAgABBBhCAgICAACEDIQIiBA0AIAIgAyAAIAEQgICAgAAhASEAIgQNAEEAQQAgACABEIKAgIAAIQUiBA0AIAAgASAFQgF8EIGAgIAAIQQLIAQLCxYBAEEQCxAwMTIzNDU2Nzg5c2hhcmRf",
    "bytecodeHash" : "c2f116a528291d6cbcadc308edd8a1f294c4656009705916f3f0929150838388"
  },
  "contractName" : "name",
  "id" : "GQ4CaT9vyKUsK7tFrg2F7bfqEspwVeaPFtE2tpAwAtye",
  "validationPolicy" : {
    "type" : "any"
  },
  "timestamp" : 1704962852721
}

Version 4

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

If you select the majorityWithOneOf(List[Address]) validation policy, fill the address list. Passing an empty list is not allowed.

Version 5

In the version 5 of this transaction a user can transfer his assets to the balance of a contract. To do this, an array of assets and their number are specified in the payments field. Both the system WEST token and any other asset created in the network can be transferred. Version 5 of this transaction can be used starting from release 1.12 after the 1120 feature activation.

In private networks, the 103 transaction allows to install Docker images of smart contracts from repositories other than those 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 in the node configuration file, specify the full address of the smart contract in the registry you have created in the name field of the 103 transaction.

Example of a request to publish a smart contract from a repository not specified in the node configuration file:
{
  "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" : 5,
  "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
}

Version 6

Version 6 of this transaction implements support for confidential smart contracts. When registering a contract using the 6th version of the transaction, you can specify if the contract is confidential, and define a set of node addresses that have access to the smart contract confidential data. The following fields are implemented for this purpose:

Fields for working with confidential smart contracts:

The following fields are implemented for this purpose:

  • the isConfidential flag determines whether the smart contract is confidential or not;

  • the groupParticipants field specifies the group (policy) member nodes who have access to confidential smart-contract data; the maximum group size is 1024 members;

  • the groupOwners field specifies the nodes that can modify the groupParticipants and groupOwners lists using the UpdateContract transaction; no more than 1024 nodes can be specified in this field.

Important

You cannot assign true to the isConfidential field when creating a contract if the groupParticipants field contains less than three participants with the contract-validator role.

You cannot assign false to the isConfidential field when creating a contract if the groupParticipants and groupOwners fields are not empty.

You cannot assign any value to the payments field when creating a contract if the isConfidential field is set to true.

You cannot pass parameters to the params field when creating a contract if the isConfidential field is set to true.

You can use the 6 th version of this transaction starting with 1.13 release after the 1130 feature activation.

Version 7 – Create WASM Contract Transaction

In version 7 of this transaction, support for WASM smart contracts is implemented. For this purpose image, imageHash, apiVersion fields are removed and storedContract field is implemented. Depending on the type of smart contract, this field has the following structure:

  • for Docker smart contracts:

    "storedContract" : {
       "image" : <image docker> in Array[Byte]
       "imageHash": ssh256 from the image docker
       "apiVersion" : "1.10",
    }
    
  • for WASM smart contracts:

    "storedContract" : {
       "bytecode" : <bytecode contracts> in Array[Byte]
       "bytecodeHash" : "Sha256 from the <bytecode contracts>"
    }
    

You can use the version 7 of this transaction starting with release 1.14.0 after 1140 feature activation.

Important

In release 1.14.0, WASM smart contracts do not support atomic transactions and confidential smart contracts. Therefore, the following fields must have the following values for a WASM smart contract:

...
"atomicBadge" : null,
...
"isConfidential": false,
"groupParticipants": [],
"groupOwners": [],
...

104. CallContract Transaction

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 transaction of the second version and higher: if the version field of the smart contract call transaction is set to 2 or more. The contract is updated using the 107 transaction.

Prior to release 1.14.0, if a contract was not executed or was executed with an error, 103 and 104 transactions were deleted and not included into a block. Starting with release 1.14.0, execution of a smart contract in case of an error is also stored in the blockchain. For more details on the smart contract error handling algorithm, see 105. ExecutedContract Transaction – Version 5.

Transaction data structures

Signing:

Field

Data type

Description

contractId

ByteStr

Smart contract ID

fee

Long

WE Mainnet transaction fee

sender

ByteStr

Address of the 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 the smart contract; entered using the type, value and key fields separated by commas – 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

inputCommitment

Commitment

The field is used in transaction version 6 to handle confidential smart contracts. Field length is a constant equal to hash length in current cryptography

inputCommitmentOpt

Commitment

The field is used in transaction version 7 and is similar to the inputCommitment field – optional field

contractVersion

Contract version: for a new contract the value 1 is specified, for an updated contract – 2

feeAssetId

Byte

Identifier of a token for fee payment – optional field

payments.amount

An integer that specifies the number of assets to be transferred to the contract; in the amount field the lower bits correspond to the fractional parts of the number of assets to be transferred, if its decimals is not zero – the field is optional

payments.assetId

The identifier of the asset transferred to the contract; the assetId field must be empty for the WEST system token to be transferred; – the field is optional

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

callFunc

Name of contract function

contractEngine

Called contract type: docker or wasm

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (104)

id

Byte

Smart contract call transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

timestamp

Long

The Unix Timestamp of the 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 the smart contract; entered using the type, value and key fields separated by commas – optional field

params.key

Byte

Parameter key

params.type

Byte

Parameter type. Possible values: binary, bool, integer, string

params.value

Byte

Parameter value

contractVersion

Contract version: for a new contract the value 1 is specified, for an updated contract – 2

payments.amount

An integer that specifies the number of assets to be transferred to the contract; in the amount field the lower bits correspond to the fractional parts of the number of assets to be transferred, if its decimals is not zero – the field is optional

payments.assetId

The identifier of the asset transferred to the contract; the assetId field must be empty for the WEST system token to be transferred; – the field is optional

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

inputCommitment

Commitment

The field is used in transaction version 6 to handle confidential smart contracts. The field length is a constant and is equal to the hash length in the current cryptography

inputCommitmentOpt

Commitment

The field is used in transaction version 7 and is similar to the inputCommitment field – optional field

callFunc

Name of contract function

contractEngine

Called contract type: docker or wasm

JSON:

Signing:

{
    "contractId": "2sqPS2VAKmK77FoNakw1VtDTCbDSa7nqh5wTXvJeYGo2",
    "fee": 10,
    "sender": "3PKyW5FSn4fmdrLcUnDMRHVyoDBxybRgP58",
    "password": "",
    "type": 104,
    "params":
    [
        {
           "type": "integer",
           "key": "a",
           "value": 1
        },
        {
           "type": "integer",
           "key": "b",
           "value": 100

        }
    ],
    "version": 2,
    "contractVersion": 1
}

Broadcasting:

{
    "type": 104,
    "id": "9fBrL2n5TN473g1gNfoZqaAqAsAJCuHRHYxZpLexL3VP",
    "sender": "3PKyW5FSn4fmdrLcUnDMRHVyoDBxybRgP58",
    "senderPublicKey": "2YvzcVLrqLCqouVrFZynjfotEuPNV9GrdauNpgdWXLsq",
    "fee": 10,
    "timestamp": 1549365736923,
    "proofs": [ "2q4cTBhDkEDkFxr7iYaHPAv1dzaKo5rDaTxPF5VHryyYTXxTPvN9Wb3YrsDYixKiUPXBnAyXzEcnKPFRCW9xVp4v" ],
    "version": 2,
    "contractVersion": 1,
    "contractId": "2sqPS2VAKmK77FoNakw1VtDTCbDSa7nqh5wTXvJeYGo2",
    "params":
    [
        {
        "key": "a",
        "type": "integer",
        "value": 1
        },
        {
        "key": "b",
        "type": "integer",
        "value": 100
        }
    ]
}

Signing:

{
    "contractId": "Dgk1hR7xRnDT1KJreaXCVtZLrnd5LJ8uUYtoZyQrV1LJ",
    "fee": 10000000,
    "sender": "3NpkC1FSW9xNfmAMuhRSRArLgnfyGyEry7w",
    "password": "",
    "type": 104,
    "params":
    [ {
      "type" : "string",
      "value" : "value",
      "key" : "data"
    }, {
      "type" : "integer",
      "value" : 500,
      "key" : "length"
    } ],
    "version": 3,
    "contractVersion": 1,
}

Broadcasting:

{
  "senderPublicKey" : "9Kgnqqxr5MU3PNrLgf1dkZL2HH6LBktB5Pv9L1cVELi1",
  "fee" : 10000000,
  "type" : 104,
  "params" : [ {
    "type" : "string",
    "value" : "data_response",
    "key" : "action"
  }, {
    "type" : "string",
    "value" : "000008_regular_data_request_2m3SgcnQz9LXVi9ETy3CFHVGM1EyiqJi3vvRRQUM3oPp",
    "key" : "request_id"
  }, {
    "type" : "string",
    "value" : "76.33",
    "key" : "value"
  }, {
    "type" : "string",
    "value" : "1627678789267",
    "key" : "timestamp"
  } ],
  "version" : 3,
  "contractVersion" : 1,
  "sender" : "3NpkC1FSW9xNfmAMuhRSRArLgnfyGyEry7w",
  "feeAssetId" : null,
  "proofs" : [ "4aanqYjaTVNot8Fbz5ixjwKSdqS5x3DdvzxQ4WsTaPcftYdoFx99xwLC3UPN91VAtez4RTMzaYb1TECaVxHHT9AH" ],
  "contractId" : "Dgk1hR7xRnDT1KJreaXCVtZLrnd5LJ8uUYtoZyQrV1LJ",
  "id" : "55imLuEXyVpBXb1S64R5PRx9acQQHaEATPwYwUVpqjAT",
  "timestamp" : 1627678789267,
  "height" : 1076064
}

Signing:

{
    "contractId": "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
    "fee": 10000000,
    "sender": "3PKyW5FSn4fmdrLcUnDMRHVyoDBxybRgP58",
    "password": "",
    "type": 104,
    "params":
    [ {
      "type" : "string",
      "value" : "value",
      "key" : "data"
    }, {
      "type" : "integer",
      "value" : 500,
      "key" : "length"
    } ],
    "version": 4,
    "contractVersion": 3,
    "atomicBadge" : null
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "fee" : 10000000,
  "type" : 104,
  "params" : [ {
    "type" : "string",
    "value" : "value",
    "key" : "data"
  }, {
    "type" : "integer",
    "value" : 500,
    "key" : "length"
  } ],
  "version" : 4,
  "contractVersion" : 3,
  "atomicBadge" : null,
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : null,
  "proofs" : [ "2bpALen4diR7DTFhNQCrZKPueCPds2gFFPxe1KVzQwfRuGaK6QfvtpN8oqaZMsStoEHAa5DrTkKM8AuzHPYyMPVP" ],
  "contractId" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "id" : "GBfibn8VjGmDS9ex4Nd4JNRLvDyvJjj8jLUUcbYwFTCf",
  "timestamp" : 1625732766458,
  "height" : 1028132
}

Signing:

{
  "contractId": "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "fee": 10000000,
  "sender": "3PKyW5FSn4fmdrLcUnDMRHVyoDBxybRgP58",
  "password": "",
  "type": 104,
  "params": [
    {
      "type" : "string",
      "value" : "value",
      "key" : "data"
    },
    {
      "type" : "integer",
      "value" : 500,
      "key" : "length"
    }
  ],
  "version": 5,
  "contractVersion": 3,
  "atomicBadge" : null
}

Broadcasting:

{
  "senderPublicKey": "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
    "fee": 0,
    "type": 104,
    "params": [
      {
        "key": "int",
        "type": "integer",
        "value": 24
      },
      {
        "key": "bool",
        "type": "boolean",
        "value": true
      },
      {
        "key": "blob",
        "type": "binary",
        "value": "base64:YWxpY2U="
      }
    ],
    "version": 5,
    "contractVersion": "3",
    "atomicBadge": {
      "trustedSender": "SOME_SENDER_ACCOUNT_ADDRESS"
    },
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "feeAssetId": null,
    "proofs": [
      "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
    ],
    "contractId": "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
    "id": "GBfibn8VjGmDS9ex4Nd4JNRLvDyvJjj8jLUUcbYwFTCf",
    "timestamp": 1665267880,
    "payments": [
      {
        "amount": 100
      },
      {
        "assetId": "SOME_ASSET_ID",
        "amount": 100
      }
    ]
  }

Signing:

{
  "contractId": "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "fee": 10000000,
  "sender": "3PKyW5FSn4fmdrLcUnDMRHVyoDBxybRgP58",
  "password": "",
  "type": 104,
  "params": [
    {
      "type" : "string",
      "value" : "value",
      "key" : "data"
    },
    {
      "type" : "integer",
      "value" : 500,
      "key" : "length"
    }
  ],
  "version": 6,
  "contractVersion": 3,
  "atomicBadge" : null
  "inputCommitment" : "SOME_COMMITMENT"
}

Broadcasting:

{
  "senderPublicKey": "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "fee": 0,
  "type": 104,
  "params": [
    {
      "key": "int",
      "type": "integer",
      "value": 24
    },
    {
      "key": "bool",
      "type": "boolean",
      "value": true
    },
    {
      "key": "blob",
      "type": "binary",
      "value": "base64:YWxpY2U="
    }
  ],
  "version": 6,
  "contractVersion": "3",
  "atomicBadge": {
    "trustedSender": "SOME_SENDER_ACCOUNT_ADDRESS"
  },
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId": null,
  "proofs": [
    "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
  ],
  "contractId": "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "id": "GBfibn8VjGmDS9ex4Nd4JNRLvDyvJjj8jLUUcbYwFTCf",
  "timestamp": 1665267880,
  "payments": [
    {
      "amount": 100
    },
    {
      "assetId": "SOME_ASSET_ID",
      "amount": 100
    }
  ]
  "inputCommitment" : "SOME_COMMITMENT"
}

Signing:

{
  "contractId": "2TUhT1eRvpKcwxUfpUEB7BHEiXNVZnEbEMgZKnxuPXHJ",
  "fee": 10000000,
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "type": 104,
  "params": [
    {
      "type": "integer",
      "value": 7,
      "key": "count"
    }
  ],
  "version": 7,
  "contractVersion": 1,
  "feeAssetId": null,
  "payments": [],
  "callFunc": "restore_counter",
  "contractEngine": "wasm"
}

Broadcasting:

{
  "senderPublicKey" : "5oKuxwiRmqHnr7vCAHK3VRJBhg9andjskfX11HpmJcYp8JifBXisz4KEKFD3pbRum3PWHDf4ZKkoCAgrrsLbp8HH",
  "fee" : 100000000,
  "type" : 104,
  "params" : [
    {
      "type" : "boolean",
      "value" : true,
      "key" : "bool_value"
    },
    {
      "type" : "integer",
      "value" : 100000000,
      "key" : "int_value"
    },
    {
      "type" : "string",
      "value" : "Hello World",
      "key" : "string_value"
    },
    {
      "type" : "string",
      "value" : "3Hakpx6EE4fDb7Vd7EaWMG1HT9UJezLeVcG",
      "key" : "address_value"
    }
  ],
  "version" : 7,
  "contractVersion" : 1,
  "atomicBadge" : null,
  "sender" : "3Hakpx6EE4fDb7Vd7EaWMG1HT9UJezLeVcG",
  "feeAssetId" : null,
  "contractId" : "GyDvD8r2yXE1Kdu31TMkYtSW9i7F4qXXkfWpfKgkYxX",
  "id" : "3bGqThohX5KX79k9snWENduwgkmpfKDMjqtK3QGMH1me",
  "timestamp" : 1704963915571
  "payments" : [ ],
  "callFunc" : "update_storage",
  "contractEngine" : "wasm"
}

Version 5

In the version 5 of this transaction a user can transfer his assets to the balance of a contract. To do this, an array of assets and their number are specified in the payments field. Both the system WEST token and any other asset created in the network can be transferred. Version 5 of this transaction can be used starting from release 1.12 after the 1120 feature activation.

Version 6

Version 6 of this transaction implements the field required to handle confidential smart contracts.

The use of version 6 of this transaction is possible starting from release 1.13 after 1130 feature activation. After the 1130 feature activation, only version 6 of the transaction is used in the network.

Version 7

Version 7 of this transaction supports WASM smart contracts. The following fields are implemented for this purpose:

  • contractEngine – defines the type of contract to be called; available values:

    • wasm

    • docker

  • callFunc – the name of the WASM smart contract function to be called; the _constructor function cannot be specified in this field, as it is only called when the contract is created; for a Docker smart contract, the field must be left empty: callFunc: null.

    Attention

    The order and type of parameters passed to the function is important: in the params field of the JSON to be signed, the parameters must be specified exactly in the order in which the function specified in the callFunc field expects them.

You can use the version 7 of this transaction starting with release 1.14.0 after 1140 feature activation.

Important

In release 1.14.0, WASM smart contracts do not support atomic transactions and confidential smart contracts. Therefore, for a WASM smart contract, the inputCommitmentOpt field must be absent and the atomicBadge field must be absent or set to null in the JSON to be signed.

105. ExecutedContract Transaction

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

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

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 broadcast

Field

Data type

Description

type

Byte

Transaction number (105)

id

Byte

ExecutedContract transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

password

String

Keypair password in the node keystore – optional field

fee

Long

Transaction fee

timestamp

Long

The Unix Timestamp of the 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[_]]

List of possible results of smart contract execution; the field is used up to and including version 4 of the transaction; from version 5 onwards, the resultsMap field is used instead

resultsMap

Map[ByteStr, List]

A set of lists of possible results of smart contracts execution; the field is used since version 5; earlier versions use the results field instead

height

Byte

Height of the transaction execution – an optional field

assetOperations

A structured list of the smart contract actions with the assets available to it, including
  • issuing a new asset,

  • reissuing an asset,

  • burning an asset,

  • transferring an asset available to the contract to another user,

  • leasing an asset available to the contract to another user,

  • cancelling of leasing of tokens that have been leased before

The field is used up to and including version 4 of the transaction; starting with version 5, the assetOperationsMap field is used instead

assetOperations.operationType

A service field that represents the operation type. The field can take the following values:

issue, reissue, burn, transfer, lease, cancel-lease

assetOperations.version

Service field representing the object version

assetOperations.assetId

When issuing assets, the field value is calculated using the gRPC method CalculateAssetId of the ContractService.

When reissuing or burning an asset, the identifier determines which token is being reissued or burned.

When transferring an asset, the identifier determines which asset is being transferred.

In the case of sending the WEST system token, the assetId field must be omitted or equal to null.

assetOperations.name

Asset name

assetOperations.description

Asset description

assetOperations.quantity

When issuing an asset, the field specifies the total amount of the issued asset.

When reissuing an asset – the amount of the reissued asset

assetOperations.decimals

When issuing assets, the field specifies the number of decimal places of the asset being issued

assetOperations.isReissuable

The flag indicating if the asset can be reissued

assetOperations.nonce

When issuing asserts, the field value is used to calculate the assetId. It cannot be equal to 0.

The range of acceptable values is from -128 to 127.

Several assets with the same nonce cannot be released within one contract call

assetOperations.amount

When burning assets, the field specifies the amount of asset to be burned.

When transferring assets, the field specifies the amount of the transferred asset

assetOperations.recipient

When transferring assets, the field specifies the address of the user to whom the contract transfers the assets

assetOperationsMap

Map[ByteStr, List]

The field is similar to the assetOperations field, and is used since version 5 of the transaction

readings

ReadDescriptor

The field is used to handle confidential smart contracts and describes the public data reading order on the contract side

readingsHash

ByteStr

The field is used to handle confidential smart contracts and represents a hash of readings and the results of the readings. The field has a fixed length

outputCommitment

Commitment

The field is used in transaction version 4 to handle confidential smart contracts. Field length is a constant equal to hash length in current cryptography

outputCommitmentOpt

Commitment

The field is used in transaction version 5 and is similar to the outputCommitment field – optional field

statusCode

Integer

The execution status of the smart contract. The following values are available: 0, 1, 2

errorMessage

String

Error description with error code

JSON:

Broadcasting:

{
    "type": 105,
    "version": 2,
    "id": "38GmSVC5s8Sjeybzfe9RQ6p1Mb6ajb8LYJDcep8G8Umj",
    "sender": "3N3YTj1tNwn8XUJ8ptGKbPuEFNa9GFnhqew",
    "senderPublicKey": "3kW7vy6nPC59BXM67n5N56rhhAv38Dws5skqDsjMVT2M",
    "password": "",
    "fee": 500000,
    "timestamp": 1550591780234,
    "proofs": [ "5whBipAWQgFvm3myNZe6GDd9Ky8199C9qNxLBHqDNmVAUJW9gLf7t9LBQDi68CKT57dzmnPJpJkrwKh2HBSwUer6" ],
    "tx":
         {
            "type": 103,
            "id": "ULcq9R7PvUB2yPMrmBdxoTi3bcRmQPT3JDLLLZVj4Ky",
            "sender": "3N3YTj1tNwn8XUJ8ptGKbPuEFNa9GFnhqew",
            "senderPublicKey": "3kW7vy6nPC59BXM67n5N56rhhAv38Dws5skqDsjMVT2M",
            "fee": 500000,
            "timestamp": 1550591678479,
            "proofs": [ "yecRFZm9iBLyDy93bDVaNo1PR5Qkkic7196GAgUt9TNH1cnQphq4yGQQ8Fxj4BYA4TaqYVw5qxtWzGMPQyVeKYv" ],
            "version": 2,
            "image": "stateful-increment-contract:latest",
            "imageHash": "7d3b915c82930dd79591aab040657338f64e5d8b842abe2d73d5c8f828584b65",
            "contractName": "stateful-increment-contract",
            "params": [],
            "height": 1619
          },
    "results": [],
    "height": 1619,
    "atomicBadge" : null
}

Broadcasting:

{
    "type": 105,
    "version": 3,
    "id": "SOME_TX_ID",
    "sender": "3N3YTj1tNwn8XUJ8ptGKbPuEFNa9GFnhqew",
    "senderPublicKey": "3kW7vy6nPC59BXM67n5N56rhhAv38Dws5skqDsjMVT2M",
    "fee": 0,
    "timestamp": 1665267880,
    "proofs": [
    "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
    ],
    "tx": { // inner (executed) tx json-object
      "id": "SOME_INNER_TX_ID",
      // ...
          },
    "results": [
        {
          "key": "int",
          "type": "integer",
          "value": 24
        },
        {
          "key": "bool",
          "type": "boolean",
          "value": true
        },
        {
          "key": "blob",
          "type": "binary",
          "value": "base64:YWxpY2U="
        }
      ],
    "assetOperations": [
        {
          "operationType": "issue",
          "version": 1,
          "assetId": "SOME_ASSET_ID",
          "name": "Gigacoin",
          "description": "Gigacoin",
          "quantity": 10000000000,
          "decimals": 8,
          "isReissuable": true,
          "nonce": 1 // SOME_NONCE
        },
        {
          "operationType": "burn",
          "version": 1,
          "assetId": "SOME_ASSET_ID",
          "amount": 1000
        },
        {
          "operationType": "reissue",
          "version": 1,
          "assetId": "SOME_ASSET_ID",
          "quantity": 10000000000,
          "isReissuable": true
        },
        {
          "operationType": "transfer",
          "version": 1,
          "recipient": "SOME_RECIPIENT_ACCOUNT_ADDRESS",
          "assetId": "SOME_ASSET_ID",
          "amount": 1000
        }
        {
          "operationType": "lease",
          "leaseId":  "SOME_LEASE_ID",
          "nonce": 1,
          "recipient": "SOME_RECIPIENT_ACCOUNT_ADDRESS"
          "amount": 1000
        }
        {
          "operationType": "cancel-lease",
          "leaseId":  "SOME_LEASE_ID"
        }
      ]
    "resultsHash": "SOME_RESULTS_HASH",
    "validationProofs": [],
 }

Broadcasting:

{
   "type": 105,
   "version": 4,
   "id": "SOME_TX_ID",
   "sender": "3N3YTj1tNwn8XUJ8ptGKbPuEFNa9GFnhqew",
   "senderPublicKey": "3kW7vy6nPC59BXM67n5N56rhhAv38Dws5skqDsjMVT2M",
   "fee": 0,
   "timestamp": 1665267880,
   "proofs": [
   "32mNYSefBTrkVngG5REkmmGAVv69ZvNhpbegmnqDReMTmXNyYqbECPgHgXrX2UwyKGLFS45j7xDFyPXjF8jcfw94"
    ],
   "tx": { // inner (executed) tx json-object
     "id": "SOME_INNER_TX_ID",
     // ...
         },
   "results": [
       {
          "key": "int",
          "type": "integer",
          "value": 24
       },
       {
          "key": "bool",
          "type": "boolean",
          "value": true
       },
       {
         "key": "blob",
         "type": "binary",
         "value": "base64:YWxpY2U="
       }
     ],
   "assetOperations": [
       {
         "operationType": "issue",
         "version": 1,
         "assetId": "SOME_ASSET_ID",
         "name": "Gigacoin",
         "description": "Gigacoin",
         "quantity": 10000000000,
         "decimals": 8,
         "isReissuable": true,
         "nonce": 1 // SOME_NONCE
       },
       {
         "operationType": "burn",
         "version": 1,
         "assetId": "SOME_ASSET_ID",
         "amount": 1000
       },
       {
         "operationType": "reissue",
         "version": 1,
         "assetId": "SOME_ASSET_ID",
         "quantity": 10000000000,
         "isReissuable": true
       },
       {
         "operationType": "transfer",
         "version": 1,
         "recipient": "SOME_RECIPIENT_ACCOUNT_ADDRESS",
         "assetId": "SOME_ASSET_ID",
         "amount": 1000
       }
       {
         "operationType": "lease",
         "leaseId":  "SOME_LEASE_ID",
         "nonce": 1,
         "recipient": "SOME_RECIPIENT_ACCOUNT_ADDRESS"
         "amount": 1000
       }
       {
         "operationType": "cancel-lease",
         "leaseId":  "SOME_LEASE_ID"
       }
     ]
   "resultsHash": "SOME_RESULTS_HASH",
   "validationProofs": [],
   "readings": [ReadDescriptor1, ..., ReadDescriptorN],
   "readingsHash" : "SOME_READINGS_HASH",
   "outputCommitment" : "SOME_COMMITMENT"
}

Broadcasting:

{
   "type": 105,
   "version": 5,
   "id": "HydNFEUeCj5DXFfHm32CrpcohvRvTABqdoFERtosgf5a",
   "sender": "3NdJB3vGAAQm2xQc2SAEhGNqDtXpL7YCn3v",
   "senderPublicKey": "9e4poNdEc9KF1qRxRJLbhqx6hrcjieQP2YcPiBdd3fpT",
   "fee": 0,
   "timestamp": 1708355888775,
   "proofs": [
      "3VHTSQh5HKkt1KGwhZg39WhPVNbNE5GnmyAD82no92e8CbYthh1KepjECyAcXXVu8QPoduscdZnnnrPtyfHZYjSR"
   ],

   "tx":
        {
          "type": 104,
          "version": 7,
          "sender": "3Nremv58EXSYK2qa5bhMeGnm1f2pRqLnv34",
          "senderPublicKey": "4sCvMtLD9MJUaw6dQrjnzWhrM6D32nrQcgQk5ULtQUXw",
          "contractEngine": "docker",
          "callFunc": null,
          "fee": 10000000,
          "feeAssetId": null,
          "payments": [],
          "params": [
            {
              "type": "integer",
              "value": 1,
              "key": "error_code"
            }
          ],
          "contractVersion": 1,
          "atomicBadge": null,
          "proofs": [
            "emoXX9D1tknstbNjkxAdERQsVz59AM9XchH9fwfeyUYNdkwSmBEU1FRfH71gDyyPHs3t4e6hrXqNiNUTrLkQ7pc"
          ],
          "contractId": "4K6gRgAhnzzbHXaGSRbWnjtU2r4kYUw61uwPuKJq1ims",
          "id": "Ecectk1L6T6TFAtUcQH2XerXNGT4gm7tMKBf2NnNKBjK",
          "timestamp": 1708355888031
        },
   "resultsHash": "xyw95Bsby3s4mt6f4FmFDnFVpQBAeJxBFNGzu2cX4dM",
   "validationProofs": [],
   "readings": [],
   "readingsHash" : null,
   "resultsMap": {},
   "assetOperationsMap": {},
   "statusCode": 2,
   "errorMessage": "Rejected because the CircuitBreaker is in the Open state, attempting to close in 53 millis"
 }

Version 3

In the version 3 of this transaction you can pass a sequence of operations on assets, such as transferring tokens from the user balance to the contract balance, in the assetOperations field.

  • Both the WEST system token and any other asset created on the network can be transferred using the transfer operation.

  • The issue, reissue, burn operations can be performed with any token except the WEST system token.

  • The lease and cancel-lease operations work only with the WEST system token.

Important

If the isReissuable field is set to False, i.e. tokens are not allowed to be reissued, then it will be impossible to change this value in the future.

The version 3 of this transaction can be used starting with the 1.12 release after the 1120 feature activation. After the 1120 feature activation, only version 3 of this transaction is used on the network.

You can use the lease and cancel-lease operations starting from release 1.12.3 after the 1123 feature activation.

Version 4

Version 4 of this transaction implements the fields required to handle confidential smart contracts.

The use of version 4 of this transaction is possible starting from release 1.13 after 1130 feature activation. After the 1130 feature activation, only version 4 of the transaction is used in the network.

Version 5

In version 5 of this transaction, the algorithm for handling smart contract errors has been changed:

  • In case of successful execution, the node (as in the previous versions) generates and sends to the blockchain a 105 transaction, which contains the details of the change to the state within the original 103 or 104 transaction in the following format:

    "results": [
      {
        "type": "string",
        "value": "[{\"accountNumber\":\"1119810\"}]",
        "key": "accounts"
      }
    ]
    
  • In case of an error, transaction 105 is also generated, and the smart contract execution with the error is stored in the blockchain when the transaction reaches a quorum.

This version of the transaction implements the fields required to capture smart contract execution statuses:

  • statusCode – smart contract execution status; the following values are available:

    • 0 – Success – successful contract execution; the intended result was obtained;

    • 1 – Error – business logic error; the contract ended in error, but may end successfully in the future;

    • 2 – Failure – system error; a blockchain component has failed, such as in the case of a timeout.

  • errorMessage – error description; in the case of a WASM smart contract, the field contains error code; in the case of a Docker smart contract, a user-defined error or other error is returned.

In addition, data from multiple smart contracts can now be transferred in a single transaction. Whereby the fields have changed as follows:

  • the results field has been replaced by a resultsMap field, which can pass a list of results for each of the smart contracts;

  • the assetOperations field is replaced by the assetOperationsMap field. A number of ordered lists of smart contract actions over the assets available to them can be passed in this field.

You can use version 5 of this transaction starting with release 1.14.0 after 1140 feature activation.

106. DisableContract Transaction

Disabling a smart contract.

Important

The transaction is irreversible, that is, the disabled contract cannot be used thereafter under any conditions.

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

Transaction data structures

Signing:

Field

Data type

Description

sender

ByteStr

Address of the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (106)

id

Byte

DisableContract transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

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

JSON:

Signing:

{
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "password": "",
    "contractId": "HKftkVDTcQp6kxdqVYNdzB9d4rhND4YRKxwJV1thMXcr",
    "fee": 1000000,
    "type": 106,
    "version": 1,
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "proofs" : [ "3FKPGT8YbLVun5cffZi1sHkgr9JZVxkeN7z2kUqDVLfhB5CwMtCAfyStRz1tpZuriKsR3MaBqNfReGx5sM2qey8i" ],
  "fee" : 1000000,
  "contractId" : "HKftkVDTcQp6kxdqVYNdzB9d4rhND4YRKxwJV1thMXcr",
  "id" : "5hXuHs5HVhZSfek153t76HfW6egmCLdZmi5AeFzYBFN",
  "type" : 106,
  "version" : 1,
  "timestamp" : 1625648619321,
  "height" : 1025992
}

Signing:

{
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "password": "",
    "contractId": "HKftkVDTcQp6kxdqVYNdzB9d4rhND4YRKxwJV1thMXcr",
    "fee": 1000000,
    "type": 106,
    "version": 2,
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : "7QpXWLGuaspzrMsESRaHTgksndq5mcvfbVrqBTuLbxuy",
  "proofs" : [ "3FKPGT8YbLVun5cffZi1sHkgr9JZVxkeN7z2kUqDVLfhB5CwMtCAfyStRz1tpZuriKsR3MaBqNfReGx5sM2qey8i" ],
  "fee" : 1000000,
  "contractId" : "HKftkVDTcQp6kxdqVYNdzB9d4rhND4YRKxwJV1thMXcr",
  "id" : "5hXuHs5HVhZSfek153t76HfW6egmCLdZmi5AeFzYBFN",
  "type" : 106,
  "version" : 2,
  "timestamp" : 1625648619321,
  "height" : 1025992
}

Signing:

{
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "password": "",
    "contractId": "75PumcfCVxzV3v7RAPYQUwCtSpU21hxfaWFhureCRTLM",
    "fee": 1000000,
    "type": 106,
    "version": 3,
  "atomicBadge" : {
    "trustedSender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  }
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "atomicBadge" : {
    "trustedSender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  },
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "22tK24qHhgbTDjtRmR86z3WeLLqLnqPvhUhQrz8ohfbCwQ9nrwmHESuT9aFuwABeBRJ7MfVob1FiJnqg3y2PHLSj" ],
  "fee" : 1000000,
  "contractId" : "75PumcfCVxzV3v7RAPYQUwCtSpU21hxfaWFhureCRTLM",
  "id" : "7opPrLd6x1hATRr9R5oXnEbYjYQzo5cn4Qpkiz12Mw9b",
  "type" : 106,
  "version" : 3,
  "timestamp" : 1619186857911,
  "height" : 861644
}

107. UpdateContract Transaction

Updating 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.

Transaction data structures

Signing:

Field

Data type

Description

image

Array[Bytes]

The name of the Docker image of the Docker smart contract; the field is used up to and including version 5 of the transaction; starting with version 6, the storedContract.image field is used instead

imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used up to and including version 5 of the transaction; starting with version 6, the storedContract.imageHash field is used instead

sender

ByteStr

Address of the transaction sender

password

String

Keypair password in the node keystore – optional field

fee

Long

WE Mainnet transaction fee

contractId

ByteStr

Smart contract ID

type

Byte

Transaction number (107)

version

Byte

Transaction version

feeAssetId

Byte

Identifier of a token for fee payment – optional field

apiVersion

Byte

API version for the smart contract gRPC methods (see gRPC services used by smart contracts); the field is used up to and including transaction version 5; starting with version 6, the storedContract.apiVersion field is used instead

validationPolicy.type

String

Smart contract validation policy type

groupParticipants

Set[Address]

Addresses authorized to access confidential data

groupOwners

Set[Address]

Addresses that can modify the groupParticipants and groupOwners lists

storedContract.bytecode

Array[Byte]

WASM smart contract bytecode ; the field is used starting with transaction version 6

storedContract.bytecodeHash

Array[Bytes]

WASM smart contract bytecode hash; the field is used starting with transaction version 6

storedContract.image

Array[Bytes]

Name of the smart contract Docker image; the field is used starting with version 6 of the transaction

storedContract.imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used starting with version 6 of the transaction

storedContract.apiVersion

Byte

API version for the Docker smart contract gRPC methods (see gRPC services used by smart contracts); the field is used starting with transaction version 6; the field is not used for WASM smart contracts

Broadcasting:

Field

Data type

Description

senderPublicKey

PublicKeyAccount

Transaction sender public key

tx

Array

Body of 105 transaction of an executed smart contract

fee

Long

Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

apiVersion

Byte

API version for the smart contract gRPC methods (see gRPC services used by smart contracts); the field is used up to and including transaction version 5; starting with version 6, the storedContract.apiVersion field is used instead

type

Byte

Transaction number (107)

version

Byte

Transaction version

image

Array[Bytes]

Docker Smart contract name (if downloaded from a pre-installed repository) or its full address (if the Docker smart contract repository is not specified in the node configuration file); the field is used up to and including version 5 of the transaction; starting from version 6, the storedContract.image field is used instead

imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used up to and including version 5 of the transaction; starting with version 6, the storedContract.imageHash field is used instead

sender

ByteStr

Address of the transaction sender

proofs

List(ByteStr)

Array of transaction proofs (in base58 format)

contractId

ByteStr

Smart contract ID

id

Byte

contract update transaction ID

timestamp

Long

The Unix Timestamp of the transaction (in milliseconds) – optional field

atomicBadge

Boolean

Flag that indicates whether the transaction can be included in an atomic transaction

groupParticipants

Set[Address]

Addresses authorized to access confidential data

groupOwners

Set[Address]

Addresses that can modify the groupParticipants and groupOwners lists

validationPolicy.type

String

Smart contract validation policy type

storedContract.bytecode

Array[Byte]

WASM smart contract bytecode ; the field is used starting with transaction version 6

storedContract.bytecodeHash

Array[Bytes]

WASM smart contract bytecode hash; the field is used starting with transaction version 6

storedContract.image

Array[Bytes]

Name of the smart contract Docker image; the field is used starting with version 6 of the transaction

Field

Data type

Description

storedContract.imageHash

Array[Bytes]

Docker image hash of the Docker smart contract; the field is used starting with version 6 of the transaction

storedContract.apiVersion

Byte

API version for the Docker smart contract gRPC methods (see gRPC services used by smart contracts); the field is used starting with transaction version 6; the field is not used for WASM smart contracts

JSON:

Signing:

{
  "image" : "we-sc/grpc-contract-example:2.2-test-update",
  "imageHash" : "075ad1607f193cc6fdb5e85c201f9ca3907c622718d75706bbc2a94a330de5b5",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "fee" : 100000000,
  "contractId" : "BWzX4mRBEnHKgn3HB78My5DZzDAqnCLWCCNpCuRkZrJA",
  "type" : 107,
  "version" : 2
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "image" : "we-sc/grpc-contract-example:2.2-test-update",
  "imageHash" : "075ad1607f193cc6fdb5e85c201f9ca3907c622718d75706bbc2a94a330de5b5",
  "fee" : 100000000,
  "type" : 107,
  "version" : 2,
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : null,
  "proofs" : [ "RetQwzuWZWxpSNMqwB7k7o6hSm6nhFCc49zKUpwZEedzBYcohj9NVEPwAbKLW9RzRKX168xApV7Nu2qV2jaHAMg" ],
  "contractId" : "BWzX4mRBEnHKgn3HB78My5DZzDAqnCLWCCNpCuRkZrJA",
  "id" : "6oopqcEf4AF943SCAqkBPrghyeQhmwn64TrhtCZbAn3v",
  "timestamp" : 1625649822957,
  "height" : 1026022
}

Signing:

{
  "image" : "registry.wavesenterpriseservices.com/we-sc/grpc-contract-example:2.2-test-update",
  "imageHash" : "075ad1607f193cc6fdb5e85c201f9ca3907c622718d75706bbc2a94a330de5b5",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "fee" : 100000000,
  "contractId" : "HTqdjXUPTHZqGen2KKUkEenTELAqQ8irN58LA8EcP17q",
  "type" : 107,
  "version" : 3,
  "atomicBadge" : null
}

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "image" : "registry.wavesenterpriseservices.com/we-sc/grpc-contract-example:2.2-test-update",
  "imageHash" : "075ad1607f193cc6fdb5e85c201f9ca3907c622718d75706bbc2a94a330de5b5",
  "fee" : 100000000,
  "type" : 107,
  "version" : 3,
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "3ncWfFPqBAdgh65YceCCvF2RhUWWokQc9MsnHk27YLrYmPj9gWgrbRcousymJVA7ARFSz5UJcdW4Sa62FFhR5en3" ],
  "contractId" : "HTqdjXUPTHZqGen2KKUkEenTELAqQ8irN58LA8EcP17q",
  "id" : "B7qjgCa9N6M6FwV63PbLwvtVpFo4bzB5gRZzGjwJpKJV",
  "timestamp" : 1619187337697,
  "height" : 861650
  "atomicBadge" : null,
}

Signing:

{
  "image" : "we-sc/grpc_validatable_stateless:0.1",
  "imageHash" : "bd98a7d3e55506ff936d8ea15e170a24d27662edd1b47e4fd20801d10655af8d",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "fee" : 100000000,
  "contractId" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "type" : 107,
  "version" : 4,
  "atomicBadge" : null
  "validationPolicy" : {
    "type" : "any"
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "image" : "we-sc/grpc_validatable_stateless:0.1",
  "imageHash" : "bd98a7d3e55506ff936d8ea15e170a24d27662edd1b47e4fd20801d10655af8d",
  "fee" : 100000000,
  "type" : 107,
  "version" : 4,
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : null,
  "proofs" : [ "fZr9LpqSWbPcUzArSZxFDEuygN62hR63j2Cz1GyTFxPNRrNvVwkDhTDcC8zwRp235gA1gSM8fvPps9mvPTWDQ4p" ],
  "contractId" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "id" : "HWZy7219Nx5oxj2QnK3ReEuZiqsjoULbmfdQz8YysFSz",
  "timestamp" : 1625732772746,
  "height" : 1028132,
  "atomicBadge" : null,
  "apiVersion" : "1.0",
  "validationPolicy" : {
    "type" : "any"
  },
}

Signing:

{
  "image" : "we-sc/grpc_validatable_stateless:0.1",
  "imageHash" : "bd98a7d3e55506ff936d8ea15e170a24d27662edd1b47e4fd20801d10655af8d",
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "fee" : 100000000,
  "contractId" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "type" : 107,
  "version" : 5,
  "atomicBadge" : null
  "groupParticipants" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
  "groupOwners" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
  "validationPolicy" : {
    "type" : "any"
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "image" : "we-sc/grpc_validatable_stateless:0.1",
  "imageHash" : "bd98a7d3e55506ff936d8ea15e170a24d27662edd1b47e4fd20801d10655af8d",
  "fee" : 100000000,
  "type" : 107,
  "version" : 5,
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : null,
  "proofs" : [ "fZr9LpqSWbPcUzArSZxFDEuygN62hR63j2Cz1GyTFxPNRrNvVwkDhTDcC8zwRp235gA1gSM8fvPps9mvPTWDQ4p" ],
  "contractId" : "HSLdKYqLq4LcZpq9LPki8Yv4ZRkFapVyHEYw1vZW2MoG",
  "id" : "HWZy7219Nx5oxj2QnK3ReEuZiqsjoULbmfdQz8YysFSz",
  "timestamp" : 1625732772746,
  "height" : 1028132,
  "atomicBadge" : null,
  "apiVersion" : "1.0",
  "validationPolicy" : {
    "type" : "any"
  },
  "groupParticipants" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
  "groupOwners" : [ "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ", "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY"],
}

Signing:

{
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "password": "",
  "fee": 100000000,
  "contractId": "HcJTMMpcLaMXme2hLzC7JqZ5Dn8ecfNeKkwHNYCVfdFZ",
  "type": 107,
  "version": 6,
  "feeAssetId": null,
  "groupParticipants": [],
  "groupOwners": [],
  "validationPolicy": {"type": "any"},
  "storedContract":
    {
      "bytecode": "AGFzbQEAAAABGgRgA39/fgF/YAR/f39/An9+YAABf2ABfgF/Aj4DA2VudgZtZW1vcnkCAQIQBGVudjAPc2V0X3N0b3JhZ2VfaW50AAAEZW52MA9nZXRfc3RvcmFnZV9pbnQAAQMEAwICAwYQA38BQRALfwBBFwt/AEEgCwdFBQxfY29uc3RydWN0b3IAAgtpbmNyZW1lbnRfMQADCWluY3JlbWVudAAECl9fZGF0YV9lbmQDAQtfX2hlYXBfYmFzZQMCCoYBAxIAQZCAgIAAQQdCABCAgICAAAs4AgF+AX8CQEEAQQBBkICAgABBBxCBgICAACEAIgENAEGQgICAAEEHIABCAXwQgICAgAAhAQsgAQs4AgF+AX8CQEEAQQBBkICAgABBBxCBgICAACEBIgINAEGQgICAAEEHIAEgAHwQgICAgAAhAgsgAgsLDQEAQRALB2NvdW50ZXI=",
      "bytecodeHash": "2d52876455a4d8cd599c16fa0e0ad6f028b76b8494e40f6c4651598f29066013"
    }
}

Broadcasting:

{
  "senderPublicKey" : "CgqRPcPnexY533gCh2SSvBXh5bca1qMs7KFGntawHGww",
  "fee" : 100000000,
  "type" : 107,
  "version" : 6,
  "sender" : "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "feeAssetId" : None,
  'proofs': ['5x2giusM21s5jgSzQDkZABpnRGNrPyDxpTFm2RS1znP9DSEHEuccyPMUmhpPq78U1bKksbemYeRo8mApVWuGybpb'],
  "contractId" : "HcJTMMpcLaMXme2hLzC7JqZ5Dn8ecfNeKkwHNYCVfdFZ",
  "id" : "8PrdyjiM443kYSrBpeU6BVBKkCbnTKcMmAsWHieMvW8n",
  "timestamp" : 1708435405364
  "atomicBadge" : None,
  "groupOwners" : [ ],
  "groupParticipants" : [ ],
  "validationPolicy" : {
    "type" : "any"
  },
  "storedContract" : {
    "bytecode" : "AGFzbQEAAAABLwZgA39/fwF/YAN/f34Bf2AEf39/fwF/YAJ/fwN/f39gAAN/f39gBn9+f39/fwF/ApcBBwNlbnYGbWVtb3J5AgECEARlbnYwEHNldF9zdG9yYWdlX2Jvb2wAAARlbnYwD3NldF9zdG9yYWdlX2ludAABBGVudjASc2V0X3N0b3JhZ2Vfc3RyaW5nAAIEZW52MAdiYXNlXzU4AAMEZW52MBJzZXRfc3RvcmFnZV9iaW5hcnkAAgRlbnYwDWdldF90eF9zZW5kZXIABAMDAgUFBhIDfwFBEAt/AEHBAAt/AEHQAAsHPAQMX2NvbnN0cnVjdG9yAAYOdXBkYXRlX3N0b3JhZ2UABwpfX2RhdGFfZW5kAwELX19oZWFwX2Jhc2UDAgqqAgKrAQACQEGQgICAAEEKIAAQgICAgAAiAA0AQZqAgIAAQQkgARCBgICAACIADQBBo4CAgABBDCACIAMQgoCAgAAiAA0AIAQgBRCDgICAABohAyIADQAgBCAFEIOAgIAAIQIaIgANAEGvgICAAEENIAMgAhCEgICAACIADQAQhYCAgAAaIQMiAA0AEIWAgIAAIQIaIgANAEG8gICAAEEFIAMgAhCEgICAACEACyAAC3sAAkBBkICAgABBCiAAEICAgIAAIgANAEGagICAAEEJIAEQgYCAgAAiAA0AQaOAgIAAQQwgAiADEIKAgIAAIgANACAEIAUQg4CAgAAaIQMiAA0AIAQgBRCDgICAACECGiIADQBBr4CAgABBDSADIAIQhICAgAAhAAsgAAsLNwEAQRALMWJvb2xfdmFsdWVpbnRfdmFsdWVzdHJpbmdfdmFsdWVhZGRyZXNzX3ZhbHVlb3duZXI=",
    "bytecodeHash" : "1afd57a7be47a0f762821bdbe2099c9590efd4471a716e5f0da60a06bc317ec6"
  },
}

Version 4

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).

Fields to configure smart contract validation:

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.

Version 5

Version 5 of this transaction implements the fields required to handle confidential smart contracts.

Fields for working with confidential smart contracts:
  • the groupParticipants field specifies the group (policy) member nodes who have access to confidential smart-contract data; the maximum group size is 1024 members;

  • the groupOwners field specifies the nodes that can modify the groupParticipants and groupOwners lists using the UpdateContract transaction; no more than 1024 nodes can be specified in this field.

Only the sender of the UpdateContract transaction, whose address is specified in the groupOwners field, can change the values of the groupParticipants and groupOwners fields.

The contract creator can modify the contract itself (the image, imageHash and apiVersion fields), but he must have his address listed in the groupOwners field to be able to modify the groupParticipants and groupOwners fields.

The group owner (the address listed in the groupOwners field) cannot modify the contract, that is the image, imageHash and apiVersion fields.

The groupParticipants and groupOwners fields must be empty if the isConfidential parameter was set to false when the contract was created.

Important

You cannot update a contract if its isConfidential parameter was set to true when it was created, and the groupParticipants field contains less than 3 participants with the contract-validator role.

You can use the 5 th version of this transaction starting with 1.13 release after the 1130 feature activation.

Version 6

Support for WASM smart contracts is implemented in version 6 of this transaction. For this purpose image, imageHash, apiVersion fields are removed and storedContract field is implemented:

  • for Docker smart contracts:

    "storedContract" : {
       "image" : String
       "imageHash": String
       "apiVersion" : Byte,
    }
    
  • For WASM smart contracts:

    "storedContract" : {
       "bytecode" : <bytecode contracts>
       "bytecodeHash" : "Sha256 от <bytecode contracts>"
    }
    

Important

A Docker smart contract cannot be updated to a WASM smart contract.

You can use the version 6 of this transaction starting with release 1.14.0 after 1140 feature activation.

Important

In release 1.14.0, WASM smart contracts do not support atomic transactions and confidential smart contracts. Therefore, for a WASM smart contract, the atomicBadge field must be absent from the JSON for signing, or have the value of null; also the following fields must have the following values:

...
"groupParticipants": [],
"groupOwners": [],
...

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 broadcast

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 the 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.

Transaction data structures

Signing:

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 the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (111)

id

Byte

RegisterNode transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the 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

JSON:

Signing:

{
  "type": 111,
  "opType": "add",
  "sender":"3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ",
  "password": "",
  "targetPubKey": "6caEKC1UBgRvgAe9A7L5PWcrawrnEZGxtsXynGESwSj7",
  "nodeName": "GATEs node",
  "fee": 1100000,
}

Broadcasting:

{
  "senderPublicKey" : "FWz5gZ2w2ZxXbKEiwhgEcZKT4we1Wneh9XqmCeGPsA4r",
  "nodeName" : "GATEs node",
  "fee" : 1100000,
  "opType" : "add",
  "type" : 111,
  "version" : 1,
  "target" : "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY",
  "sender" : "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ",
  "proofs" : [ "FHEexr8MqMCkdqaVRrfxv7dnQFwo1VQxQFb4rW2VKh1NkuAhjhtzftKybBQCVbpKcCD1ZTRhwATpwERF9re2Viz" ],
  "id" : "6WnDGkBDeSjg5y6QqVdy3BFHUy5nnr4QsxZCeNXZtZoq",
  "targetPubKey" : "6caEKC1UBgRvgAe9A7L5PWcrawrnEZGxtsXynGESwSj7",
  "timestamp" : 1619078302988,
  "height" : 858895
}

Signing:

{
  "type": 111,
  "version" : 2,
  "opType": "add",
  "sender":"3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ",
  "password": "",
  "targetPubKey": "6caEKC1UBgRvgAe9A7L5PWcrawrnEZGxtsXynGESwSj7",
  "nodeName": "GATEs node",
  "fee": 1100000,
  "atomicBadge":{
    "trustedSender":"3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP"
  }
}

Broadcasting:

{
  "senderPublicKey" : "FWz5gZ2w2ZxXbKEiwhgEcZKT4we1Wneh9XqmCeGPsA4r",
  "nodeName" : "GATEs node",
  "fee" : 1100000,
  "opType" : "add",
  "type" : 111,
  "version" : 2,
  "target" : "3NtieMGjVAH1nDsvnSEJ37BSW3hpJV2CneY",
  "sender" : "3NgSJRdMYu4ZbNpSbyRNZLJDX926W7e1EKQ",
  "proofs" : [ "FHEexr8MqMCkdqaVRrfxv7dnQFwo1VQxQFb4rW2VKh1NkuAhjhtzftKybBQCVbpKcCD1ZTRhwATpwERF9re2Viz" ],
  "id" : "6WnDGkBDeSjg5y6QqVdy3BFHUy5nnr4QsxZCeNXZtZoq",
  "targetPubKey" : "6caEKC1UBgRvgAe9A7L5PWcrawrnEZGxtsXynGESwSj7",
  "timestamp" : 1619078302988,
  "height" : 858895
}

112. CreatePolicy Transaction

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

Transaction data structures

Signing:

Field

Data type

Description

sender

ByteStr

Address of the transaction sender

policyName

String

Name of an access group to be created

password

String

Keypair password in the node keystore – optional field

recipients

Array[Bytes]

Array of addresses of a group participants separated by commas

fee

Long

WE Mainnet transaction fee

description

Array[byte]

An arbitrary description of the transaction (in base58 format)

owners

Array[Bytes]

Array of group administrators addresses separated by commas; administrators are entitled to change the access group

type

Byte

Transaction number (112)

version

Byte

Transaction version

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (112)

id

Byte

CreatePolicy transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

policyName

String

Name of an access group to be created

recipients

Array[Bytes]

Array of addresses of a group participants separated by commas

owners

Array[Bytes]

Array of group administrators addresses separated by commas; administrators are entitled to change the access group

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

timestamp

Long

The Unix Timestamp of the 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 the transaction (in base58 format)

version

Byte

Transaction version

JSON:

Signing:

{
   "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
   "policyName": "Policy# 7777",
   "password":"sfgKYBFCF@#$fsdf()%",
   "recipients": [
     "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
     "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
     "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
     "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
     "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
   ],
   "fee": 15000000,
   "description": "Buy bitcoin by 1c",
   "owners": [
     "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
     "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
     "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T"
   ],
   "type": 112,
   "version": 1,
}

Broadcasting:

 {
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "policyName": "Policy# 7777",
    "password":"sfgKYBFCF@#$fsdf()%",
    "recipients": [
      "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
      "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
      "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
      "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
    ],
    "fee": 15000000,
    "description": "Buy bitcoin by 1c",
    "owners": [
      "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
      "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T"
    ],
    "type": 112,
    "version": 1,
}

Signing:

{
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "policyName": "Policy# 7777",
  "password":"sfgKYBFCF@#$fsdf()%",
  "recipients": [
    "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
    "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
    "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
    "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  ],
  "fee": 15000000,
  "description": "Buy bitcoin by 1c",
  "owners": [
    "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
    "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T"
  ],
  "type": 112,
  "version": 2,
}

Broadcasting:

 {
    "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
    "policyName": "Policy# 7777",
    "password":"sfgKYBFCF@#$fsdf()%",
    "recipients": [
      "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
      "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
      "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
      "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
    ],
    "fee": 15000000,
    "feeAssetId" : null,
    "description": "Buy bitcoin by 1c",
    "owners": [
      "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
      "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn",
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T"
    ],
    "type": 112,
    "version": 2,
}

Signing:

{
  "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "policyName": "Policy_v3_for_demo_txs",
  "password":"sfgKYBFCF@#$fsdf()%",
  "recipients" : [
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
      "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
      "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
      "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
      "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn"
  ],
  "fee": 100000000,
  "description": "",
  "owners" : [
      "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
      "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
      "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx"
  ],
  "type": 112,
  "version": 3
}

Broadcasting:

{
    "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
    "policyName" : "Policy_v3_for_demo_txs",
    "fee" : 100000000,
    "description" : "",
    "owners" : [
       "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
       "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
       "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
       "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
       "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn"
    ],
    "type" : 112,
    "version" : 3,
    "atomicBadge" : null,
    "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
    "feeAssetId" : null,
    "proofs" : [  "4NccZyPCgchDjeMdMmFKu7kxyU8AFF4e9cWaPFTQVQyYU1ZCCu3QmtmkfJkrDpDwGs4eJhYUVh5TnwYvjZYKPhLp" ],
    "recipients" : [
       "3Nm84ERiJqKfuqSYxzMAhaJXdj2ugA7Ve7T",
       "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF",
       "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
       "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
       "3NotQaBygbSvYZW4ftJ2ZwLXex4rTHY1Qzn"
    ],
    "id" : "5aYtmTr1AYYG8BrYvTTSqKzfJZxfgorx1BLGVwSAhwrz",
    "timestamp" : 1619186864092,
    "height" : 861637
}

113. UpdatePolicy Transaction

Updating a confidential data group.

Transaction data structures

Signing:

Field

Data type

Description

policyId

String

Confidential data group identifier

password

String

Keypair password in the node keystore – optional field

sender

ByteStr

Address of the transaction sender

recipients

Array[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

Array[Bytes]

Array of group administrators addresses separated by commas; administrators are entitled to change the access group

type

Byte

Transaction number (113)

version

Byte

Transaction version

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (113)

id

Byte

UpdatePolicy transaction ID

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

policyId

String

Confidential data group identifier

recipients

Array[Bytes]

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

owners

Array[Bytes]

Array of group administrators addresses separated by commas; administrators are entitled to change the access group

fee

Long

WE Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

timestamp

Long

The Unix Timestamp of the 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 the transaction (in base58 format)

version

Byte

Transaction version

JSON:

Signing:

{
  "policyId": "UkvoboGXiwWpASr1GLG9M1MUbhrEMo4NBS7kquxVMw5",
  "password":"sfgKYBFCF@#$fsdf()*%",
  "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
   "fee": 50000000,
   "opType": "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type": 113,
  "version": 1
 }

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "fee" : 50000000,
  "opType" : "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type" : 113,
  "version" : 1,
  "policyId" : "UkvoboGXiwWpASr1GLG9M1MUbhrEMo4NBS7kquxVMw5",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "proofs" : [ "2CKd57kU3wbxdrHxMPNbrWHptnf5ZcydYjqxMPk46miMcUUAxgFGXcy621cjYFXC3vjpKNNrB2QcgtKe1Yx9TcLY" ],
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "id" : "6o4azRwzmMg9SqWUq6rv6GAe5gzTYJvE5ek1v9VM3Mb",
  "timestamp" : 1619004195630,
  "height" : 856970
}

Signing:

{
  "policyId": "UkvoboGXiwWpASr1GLG9M1MUbhrEMo4NBS7kquxVMw5",
  "password":"sfgKYBFCF@#$fsdf()*%",
  "sender": "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
   "fee": 50000000,
   "opType": "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type": 113,
  "version": 2
 }

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "fee" : 50000000,
  "opType" : "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type" : 113,
  "version" : 2,
  "policyId" : "UkvoboGXiwWpASr1GLG9M1MUbhrEMo4NBS7kquxVMw5",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "2CKd57kU3wbxdrHxMPNbrWHptnf5ZcydYjqxMPk46miMcUUAxgFGXcy621cjYFXC3vjpKNNrB2QcgtKe1Yx9TcLY" ],
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "id" : "6o4azRwzmMg9SqWUq6rv6GAe5gzTYJvE5ek1v9VM3Mb",
  "timestamp" : 1619004195630,
  "height" : 856970
}

Signing:

{
  "policyId": "5aYtmTr1AYYG8BrYvTTSqKzfJZxfgorx1BLGVwSAhwrz",
  "password":"sfgKYBFCF@#$fsdf()*%",
  "sender": "3NkZd8Xd4KsuPiNVsuphRNCZE3SqJycqv8d",
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
   "fee": 50000000,
   "opType": "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type": 113,
  "version": 3
 }

Broadcasting:

{
  "senderPublicKey" : "7GiFGcGaEN87ycK8v71Un6b7RUoeKBU4UvUHPYbeHaki",
  "fee" : 50000000,
  "opType" : "remove",
  "owners" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "type" : 113,
  "version" : 3,
  "atomicBadge" : null,
  "policyId" : "5aYtmTr1AYYG8BrYvTTSqKzfJZxfgorx1BLGVwSAhwrz",
  "sender" : "3NxAooHUoLsAQvxBSqjE91WK3LwWGjiiCxx",
  "feeAssetId" : null,
  "proofs" : [ "2QMGoz6rycNsDLhN3mDce2mqGRQQ8r26vDDw551pnYcAecpFBDA8j38FVqDjLTGuFHs6ScX32fsGcaemmptpCFHk" ],
  "recipients" : [ "3NtNJV44wyxRXv2jyW3yXLxjJxvY1vR88TF" ],
  "id" : "Hwqf8LgpQfEcUYX9nMNG8uU2Cw1xSuGFqYxmuACpvU1L",
  "timestamp" : 1619187450552,
  "height" : 861653
}

114. PolicyDataHash Transaction

Sending 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 broadcast

Field

Data type

Description

type

Byte

Transaction number (114)

id

Byte

Transaction identifier

sender

ByteStr

Address of the 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

Mainnet transaction fee

feeAssetId

Byte

Identifier of a token for fee payment – optional field

timestamp

Long

The Unix Timestamp of the 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

JSON:

Broadcasting:

{
  "senderPublicKey":   "4L4XEpNpesX9r6rVJ8hW1TrMiNCZ6SMvRuWPKB7T47wKfnp4D84XBUv7xsa36CGwoyK3fzfojivwonHNrsX2fLBL",
  "dataHash": "8GPtHQeLxhtt8HianM9c8otS2EeAHNVZCfpCRUmYbSFi",
  "fee": 0,
  "type": 114,
  "version": 1,
  "policyId": "75rGACZxkTE5x5seNjEzJUEe73fTzkQiBrr28hCjMMVq",
  "sender": "3M3ybNZvLG7o7rnM4F7ViRPnDTfVggdfmRX",
  "proofs": [

  "5uW8SeX4k3nb8esuMeRY27MyZ6dnWijwbGhSo53zSKY1FjjofWiE4mPfNwUhYKgqyAtHtUvwsdTMyL87LGNqwp5o"
  ],
  "id": "52zCNUhfne9HYfHr7sEYBGFHqnzHKBdkGbGnsYfCYXug",
  "timestamp": 1632916536685,
  "height": 1585580
}

Broadcasting:

{
  "senderPublicKey":   "4L4XEpNpesX9r6rVJ8hW1TrMiNCZ6SMvRuWPKB7T47wKfnp4D84XBUv7xsa36CGwoyK3fzfojivwonHNrsX2fLBL",
  "dataHash": "8GPtHQeLxhtt8HianM9c8otS2EeAHNVZCfpCRUmYbSFi",
  "fee": 0,
  "type": 114,
  "version": 2,
  "policyId": "75rGACZxkTE5x5seNjEzJUEe73fTzkQiBrr28hCjMMVq",
  "sender": "3M3ybNZvLG7o7rnM4F7ViRPnDTfVggdfmRX",
  "feeAssetId": null,
  "proofs": [

  "5uW8SeX4k3nb8esuMeRY27MyZ6dnWijwbGhSo53zSKY1FjjofWiE4mPfNwUhYKgqyAtHtUvwsdTMyL87LGNqwp5o"
  ],
  "id": "52zCNUhfne9HYfHr7sEYBGFHqnzHKBdkGbGnsYfCYXug",
  "timestamp": 1632916536685,
  "height": 1585580
}

Broadcasting:

{
  "senderPublicKey": "4L4XEpNpesX9r6rVJ8hW1TrMiNCZ6SMvRuWPKB7T47wKfnp4D84XBUv7xsa36CGwoyK3fzfojivwonHNrsX2fLBL",
  "dataHash": "8GPtHQeLxhtt8HianM9c8otS2EeAHNVZCfpCRUmYbSFi",
  "fee": 0,
  "type": 114,
  "version": 3,
  "atomicBadge": {
    "trustedSender": "3M3ybNZvLG7o7rnM4F7ViRPnDTfVggdfmRX"
  },
  "policyId": "75rGACZxkTE5x5seNjEzJUEe73fTzkQiBrr28hCjMMVq",
  "sender": "3M3ybNZvLG7o7rnM4F7ViRPnDTfVggdfmRX",
  "feeAssetId": null,
  "proofs": [

  "5uW8SeX4k3nb8esuMeRY27MyZ6dnWijwbGhSo53zSKY1FjjofWiE4mPfNwUhYKgqyAtHtUvwsdTMyL87LGNqwp5o"
  ],
  "id": "52zCNUhfne9HYfHr7sEYBGFHqnzHKBdkGbGnsYfCYXug",
  "timestamp": 1632916536685,
  "height": 1585580
}

120. Atomic Transaction

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.

You can include two or more transactions into an atomic transaction. Transaction types and versions that can be included in an atomic transaction are listed in the Atomic transactions section; this article also provides more detailed information about processing this type of transactions.

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

Transaction data structures

Signing:

Field

Data type

Description

type

Byte

Transaction number (120)

sender

ByteStr

Address of the 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

Broadcasting:

Field

Data type

Description

type

Byte

Transaction number (114)

id

Byte

Transaction identifier

sender

ByteStr

Address of the transaction sender

senderPublicKey

PublicKeyAccount

Transaction sender public key

fee

Long

WE Mainnet transaction fee

timestamp

Long

The Unix Timestamp of the 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

JSON:

Signing:

{
    "sender": sender_0,
    "transactions": [
        signed_transfer_tx,
        signed_transfer_tx2
    ],
    "type": 120,
    "version": 1,
    "password":"lskjbJJk$%^#298",
    "fee": 0,
}

Broadcasting:

{
  "sender": "3MufokZsFzaf7heTV1yreUtm1uoJXPoFzdP",
  "transactions": [
        signed_transfer_tx,
        signed_transfer_tx2
  ],
  "type": 120,
  "version": 1,
}
See also