opcodes

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxOpCodesCount = 256
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OpCode

type OpCode byte
const (
	STOP OpCode = iota + 0x00
	ADD
	MUL
	SUB
	DIV
	SDIV
	MOD
	SMOD
	ADDMOD
	MULMOD
	EXP
	SIGNEXTEND
)
const (
	LT OpCode = iota + 0x10
	GT
	SLT
	SGT
	EQ
	ISZERO
)
const (
	AND OpCode = iota + 0x16
	OR
	XOR
	NOT
	BYTE
	SHL
	SHR
	SAR
)
const (
	ADDRESS OpCode = iota + 0x30
	BALANCE
	ORIGIN
	CALLER
	CALLVALUE
	CALLDATALOAD
	CALLDATASIZE
	CALLDATACOPY
	CODESIZE
	CODECOPY
	GASPRICE
	EXTCODESIZE
	EXTCODECOPY
	RETURNDATASIZE
	RETURNDATACOPY
	EXTCODEHASH
	BLOCKHASH
	COINBASE
	TIMESTAMP
	NUMBER
	DIFFICULTY
	GASLIMIT
)
const (
	POP OpCode = iota + 0x50
	MLOAD
	MSTORE
	MSTORE8
	SLOAD
	SSTORE
	JUMP
	JUMPI
	PC
	MSIZE
	GAS
	JUMPDEST
)
const (
	PUSH1 OpCode = iota + 0x60
	PUSH2
	PUSH3
	PUSH4
	PUSH5
	PUSH6
	PUSH7
	PUSH8
	PUSH9
	PUSH10
	PUSH11
	PUSH12
	PUSH13
	PUSH14
	PUSH15
	PUSH16
	PUSH17
	PUSH18
	PUSH19
	PUSH20
	PUSH21
	PUSH22
	PUSH23
	PUSH24
	PUSH25
	PUSH26
	PUSH27
	PUSH28
	PUSH29
	PUSH30
	PUSH31
	PUSH32
)
const (
	DUP1 OpCode = iota + 0x80
	DUP2
	DUP3
	DUP4
	DUP5
	DUP6
	DUP7
	DUP8
	DUP9
	DUP10
	DUP11
	DUP12
	DUP13
	DUP14
	DUP15
	DUP16
)
const (
	SWAP1 OpCode = iota + 0x90
	SWAP2
	SWAP3
	SWAP4
	SWAP5
	SWAP6
	SWAP7
	SWAP8
	SWAP9
	SWAP10
	SWAP11
	SWAP12
	SWAP13
	SWAP14
	SWAP15
	SWAP16
)
const (
	LOG0 OpCode = iota + 0xA0
	LOG1
	LOG2
	LOG3
	LOG4
)
const (
	CREATE OpCode = iota + 0xF0
	CALL
	CALLCODE
	RETURN
	DELEGATECALL
	CREATE2
)
const (
	REVERT OpCode = iota + 0xFD
)
const (
	SELFDESTRUCT OpCode = iota + 0xFF
)
const (
	SHA3 OpCode = iota + 0x20
)
const (
	STATICCALL OpCode = iota + 0xFA
)

func (OpCode) String

func (c OpCode) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL