Skip to main content

Module stack

Module stack 

Source
Expand description

Stack manipulation opcodes

Functionsยง

op_btoi
Convert bytes to integer (big-endian)
op_bury
Bury value at stack depth N
op_concat
Concatenate two byte arrays
op_cover
Cover N values with top value
op_dig
Dig value from stack depth N
op_dup
Duplicate the top stack value
op_dup2
Duplicate the top two stack values according to TEAL spec: [A, B] -> [A, B, A, B]
op_dupn
Duplicate N values from top of stack
op_itob
Convert integer to bytes (big-endian)
op_len
Get byte array length
op_load
Load value from scratch space
op_pop
Pop the top stack value
op_popn
Pop N values from top of stack
op_select
Select between two values based on condition
op_store
Store value to scratch space
op_substring
Extract substring with immediate start and length
op_substring3
Extract substring with stack arguments
op_swap
Swap the top two stack values
op_uncover
Uncover N values to top