Instructions

Instructions, also known as opcodes or Ops internally, are the building blocks of ETK smart contracts. Each instruction has a human-readable mnemonic (like dup3) and the machine readable equivalent (which would be 0x82). The push family of instructions also encode an immediate value (or argument.)

List of Instructions

stop
add
mul
sub
div
sdiv
mod
smod
addmod
mulmod
exp
signextend

lt
gt
slt
sgt
eq
iszero
and
or
xor
not
byte
shl
shr
sar

keccak256

address
balance
origin
caller
callvalue
calldataload
calldatasize
calldatacopy
codesize
codecopy
gasprice
extcodesize
extcodecopy
returndatasize
returndatacopy
extcodehash
blockhash
coinbase
timestamp
number
difficulty
gaslimit
chainid
selfbalance
basefee

pop
mload
mstore
mstore8
sload
sstore
jump
jumpi
pc
msize
gas
jumpdest
mcopy

push1 0xAA
push2 0xAABB
push3 0xAABBCC
push4 0xAABBCCDD
push5 0xAABBCCDDEE
push6 0xAABBCCDDEEFF
push7 0xAABBCCDDEEFF00
push8 0xAABBCCDDEEFF0011
push9 0xAABBCCDDEEFF001122
push10 0xAABBCCDDEEFF00112233
push11 0xAABBCCDDEEFF0011223344
push12 0xAABBCCDDEEFF001122334455
push13 0xAABBCCDDEEFF00112233445566
push14 0xAABBCCDDEEFF0011223344556677
push15 0xAABBCCDDEEFF001122334455667788
push16 0xAABBCCDDEEFF00112233445566778899
push17 0xAABBCCDDEEFF00112233445566778899AA
push18 0xAABBCCDDEEFF00112233445566778899AABB
push19 0xAABBCCDDEEFF00112233445566778899AABBCC
push20 0xAABBCCDDEEFF00112233445566778899AABBCCDD
push21 0xAABBCCDDEEFF00112233445566778899AABBCCDDEE
push22 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF
push23 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF00
push24 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF0011
push25 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF001122
push26 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233
push27 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF0011223344
push28 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF001122334455
push29 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566
push30 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF0011223344556677
push31 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF001122334455667788
push32 0xAABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899
dup1
dup2
dup3
dup4
dup5
dup6
dup7
dup8
dup9
dup10
dup11
dup12
dup13
dup14
dup15
dup16
swap1
swap2
swap3
swap4
swap5
swap6
swap7
swap8
swap9
swap10
swap11
swap12
swap13
swap14
swap15
swap16
log0
log1
log2
log3
log4

create
call
callcode
return
delegatecall
create2

staticcall

revert
invalid
selfdestruct