Crate bytecode
Expand description
Crate that contains bytecode types and opcode constants.
EOF bytecode contains its verification logic and only valid EOF bytecode can be created.
Legacy bytecode will always contain a jump table.
While EIP-7702 bytecode must contains a Address.
Modules§
- bitvec
- bytecode
- decode_
errors - eip7702
- eof
- legacy
- opcode
- EVM opcode definitions and utilities. It contains opcode information and utilities to work with opcodes.
- utils
Structs§
- Eof
- EVM Object Format (EOF) container
- Jump
Table - A table of valid
jump
destinations. Cheap to clone and memory efficient, one bit per opcode. - Legacy
Analyzed Bytecode - Legacy analyzed bytecode represents the original bytecode format used in Ethereum.
- Legacy
RawBytecode - Used only as intermediate representation for legacy bytecode.
Please check
LegacyAnalyzedBytecode
for the main structure that is used in Revm.
Enums§
- Bytecode
- Main bytecode structure with all variants.
- Bytecode
Decode Error - EOF decode errors
- Code
Type - Types of code sections in EOF container
- EofValidation
Error - EOF Validation Error
Constants§
- EOF_
MAGIC - EOF Magic in u16 form
- EOF_
MAGIC_ HASH - Hash of EF00 bytes that is used for EXTCODEHASH when called from legacy bytecode
Statics§
- EOF_
MAGIC_ BYTES - EOF magic number in array form
Functions§
- validate_
eof - Fully validates an
Eof
container. - validate_
eof_ code - Validates that:
- validate_
eof_ codes - Validates an
Eof
structure, without recursing into containers. - validate_
eof_ inner - validate_
raw_ eof - Decodes
raw
into anEof
container and validates it. - validate_
raw_ eof_ inner - Decodes
raw
into anEof
container and validates it.