CodeStream

class eth.vm.code_stream.CodeStream(code_bytes: bytes)
is_valid_opcode(position: int) bool

Return True if a valid opcode exists at position.

peek() int

Return the ordinal value of the byte at the current program counter.

read(size: int) bytes

Read and return the code from the current position of the cursor up to size.

seek(program_counter: int) Iterator[CodeStream]

Return a ContextManager with the program counter set to program_counter.

invalid_positions: Set[int]
logger = <Logger eth.vm.CodeStream (WARNING)>
program_counter: int
valid_positions: Set[int]