#ver | const uint16 | - | Take operand1 and check the VM version. |
#txa1 | data type | - | Specify the data type of Args[0] for TxProvideScript and TxAcceptScript. |
#txa2 | data type | - | Specify the data type of Args[1] for TxProvideScript and TxAcceptScript. |
#txa3 | data type | - | Specify the data type of Args[2] for TxProvideScript and TxAcceptScript. |
#txa4 | data type | - | Specify the data type of Args[3] for TxProvideScript and TxAcceptScript. |
op0, push_false | - | - | Push 0 on stack. (1 byte) |
op1, push_true | - | - | Push 1 on stack (1 byte). 1 is the only TRUE value. |
op2 ~ op16 | - | - | Push 2 ~ 16 on stack (1 byte) |
ver | - | - | Pop 1 byte from stack and verify. If the value is 1, set mark to true and terminate the script. If the value is anything else, mark is set to false. |
ret | - | - | Set mark to false and terminate the script. |
if | - | - | Pop 1 byte from stack. If the value is 1, execute the IF clause. If the value is not 1 and an ELSE clause is present, execute the ELSE clause. Nested IF statements are supported. |
ifn | - | - | Pop 1 byte from stack. If the value is not 1, execute the IF clause. If the value is 1 and an ELSE clause exists, execute the ELSE clause. |
else | - | - | End of IF clause, beginning of ELSE clause. |
eif | - | - | End of IF clause or ELSE clause. |
push_txr1 | - | - | Push Round value of TxProvideScript on stack. |
push_txr2 | - | - | Push Round value of TxAcceptScript on stack. |
push_txh1 | - | - | Push Height value of TxProvideScript on stack. |
push_txh2 | - | - | Push Height value of TxAcceptScript on stack. |
push_txa1 | - | - | Push value of Arg[0] from the transaction (Tx) on stack. Before executing this opcode, the data type must be specified as #txa1. |
push_txa2 | - | - | Push value of Arg[1] from the transaction (Tx) on stack. Before executing this opcode, the data type must be specified as #txa2. |
push_txa3 | - | - | Push value of Arg[2] from the transaction (Tx) on stack. Before executing this opcode, the data type must be specified as #txa3. |
push_txa4 | - | - | Push value of Arg[3] from the transaction (Tx) on stack. Before executing this opcode, the data type must be specified as #txa4. |
hash_sha | - | - | Pop data from stack, calculate its hash value using SHA256, and push the resulting hash back on stack. |
hash_blake | - | - | Pop data from stack, calculate its hash value using Blake2b256, and push the resulting hash back on stack. |
root_summary | - | - | Pop summary from stack, compute the root of summary, and push the result back on stack. |
equ | - | - | Pop data twice from stack, compare the two values, and push true if they are equal or false if they are not. |
neq | - | - | Pop data twice from stack, compare the two values, and push true if they are not equal or false if they are equal. |
lt | - | - | Pop data twice from stack. If the 1st pop < 2nd pop, push true; otherwise, push false. |
lte | - | - | Pop data twice from stack. If the 1st pop <= 2nd pop, push true; otherwise, push false. |
gt | - | - | Pop data twice from stack. If the 1st pop > 2nd pop, push true; otherwise, push false. |
gte | - | - | Pop data twice from stack. If the 1st pop >= 2nd pop, push true; otherwise, push false. |
dup | - | - | Push a copy of the topmost data on the stack. (Duplicate it) (stack: x, ... → x, x, ...) |
drop | - | - | Pop data from stack and discard it. (stack: x, y, ... → y, ...) |
swap | - | - | Pop data twice from the stack and push them back in reverse order. (stack: x, y, ... → y, x, ...) |
rot | - | - | Rotate the top three pieces of data on the stack. (stack: x, y, z, ... → z, x, y, ...) |
over | - | - | Copy the second data from the top of stack to the top. (stack: x, y, ... → y, x, y, ...) |
add | - | - | Pop data twice from stack, add the two values, and push the result back on stack. (If the types differ, an error is returned.) |