OP_SIZE

(130 | 0x82)

Input

0 items

|

Output

1 items

The OP_SIZE opcode is designed to assess the size of the data present in the top item of the stack. It pushes the size (in bytes) of this item onto the stack but does not remove the original item. This is particularly useful in scripts that need to validate or work with data of specific sizes, such as in certain data verification scripts or in complex contracts that require inputs of a certain length or format.

OP_Code Walkthrough

Pushes the size of the top item on the stack onto the stack.

Peek at Top Item

Calculate Size of Item

Push Size of Item