Invoke script transaction binary format

Learn more about invoke script transaction

Transaction version 1

Field order number Field JSON field name Field type Field size in bytes Comment
1 Version flag Byte 1 Indicates the transaction version is version 2 or higher.
Value must be 0
2 Transaction type ID type Byte 1 Value must be 16
3 Transaction version version Byte 1 Value must be 1
4 Chain ID Byte 1 84 for test network, 87 for main network
5 Public key of the transaction sender senderPublicKey Array[Byte] 32
6 Address or alias dApp Array[Byte] 26 Address or alias of the dApp whose script should be invoked
7 Address or alias flag Byte 1 1 — address is used to identify the sender.
2 — alias is used to identify the sender
8 Chain ID Byte 1 Duplicates the network byte mentioned above
9 Hash of the address Array[Byte] 20
10 Address checksum Array[Byte] 4
11 Alias length Short 2
12 Alias name Array[Byte] From 4 to 30 bytes
13.1 Function presence flag Byte 1 0 — default function should be invoked in the dApp.
1 — function from the current transaction should be invoked in the dApp
13.2 Function call ID Byte 1 Constant. The value must be 9
13.3 Function type ID Byte 1 Constant. The value must be 1
13.4 Function name function String Up to 255
13.5.1 Amount of arguments of the function Integer 4
13.5.2 ID of argument 1 type type Byte 1 0 — argument type is long.
1 — argument type is an array of bytes.
2 — argument type is a string.
6 — argument type is logical True.
7 — argument type is logical False
13.5.3 Argument 1 value - Long
- Array[Byte]
- String
- Logical True
- Logical False
S S = 8, if argument type is long.
If the argument type is an array of bytes or a string, then there is no limit on the size of the field. The amount of data stored in the field should not exceed 5 kilobytes.
S = 1, if argument type is logical True or False
13.5.4 ID of argument 2 type type Byte 1 0 — argument type is long.
1 — argument type is an array of bytes.
2 — argument type is a string.
6 — argument type is logical True.
7 — argument type is logical False
13.5.5 Argument 2 value - Long
- Array[Byte]
- String
- Logical True
- Logical False
S S = 8, if argument type is long.
If the argument type is an array of bytes or a string, then there is no limit on the size of the field. The amount of data stored in the field should not exceed 5 kilobytes.
S = 1, if argument type is logical True or False
... ... ... ... ... ...
13.5.[2 × N] ID of argument N type type Byte 1 0 — argument type is long.
1 — argument type is an array of bytes.
2 — argument type is a string.
6 — argument type is logical True.
7 — argument type is logical False
13.5.[2 × N + 1] Argument N value - Long
- Array[Byte]
- String
- Logical True
- Logical False
S S = 8, if argument type is long.
If the argument type is an array of bytes or a string, then there is no limit on the size of the field. The amount of data stored in the field should not exceed 5 kilobytes.
S = 1, if argument type is logical True or False
14.1 Amount of payments Long 8
14.2 Amount of token in payment 1 amount Long 8
14.3 ID of payment 1 token assetId Array[Byte] 32
14.4 Flag of payment 1 token Byte 1 0 — WAVES.
1 — other token
14.5 ID of payment 1 token Array[Byte] 32 Field is applicable if the token is not WAVES
14.6 Amount of token in payment 2 amount Long 8
14.7 ID of payment 2 token assetId Array[Byte] 32
14.8 Flag of payment 2 token Byte 1 0 — WAVES.
1 — other token
14.9 ID of payment 2 token Array[Byte] 32 Field is applicable if the token is not WAVES
... ... ... ... ... ...
14.[4 × N + 2] Amount of token in payment N amount Long 8
14.[4 × N + 3] ID of payment N token assetId Array[Byte] 32
14.[4 × N + 4] Flag of payment N token Byte 1 0 — WAVES.
1 — other token
14.[4 × N + 5] ID of payment N token Array[Byte] 32 Field is applicable if the token is not WAVES
15 Transaction fee fee Long 8
16 Fee asset ID feeAssetId Array[Byte] S S = 0, if token is WAVES.
S = 32, if it is other token
17 Transaction timestamp timestamp Long 8
18 Transaction proofs proofs Proofs S If the array is empty, then S = 3.
If the array is not empty, then S = 3 + 2 × N + (P1 + P2 + ... + Pn),
where
N is the number of proofs in the array,
Pn is the size on N-th proof in bytes.
The maximum number of proofs in the array is 8. The maximum size of each proof is 64 bytes

JSON representation of the transaction

See the example in Node API.

results matching ""

    No results matching ""