revm_bytecode/
lib.rs

1//! Crate that contains bytecode types and opcode constants.
2//!
3//! EOF bytecode contains its verification logic and only valid EOF bytecode can be created.
4//!
5//! Legacy bytecode will always contain a jump table.
6//!
7//! While EIP-7702 bytecode must contains a Address.
8#![cfg_attr(not(test), warn(unused_crate_dependencies))]
9#![cfg_attr(not(feature = "std"), no_std)]
10
11#[cfg(not(feature = "std"))]
12extern crate alloc as std;
13
14pub mod bytecode;
15pub mod decode_errors;
16pub mod eip7702;
17pub mod eof;
18pub mod iterator;
19pub mod legacy;
20pub mod opcode;
21pub mod utils;
22
23pub use bitvec;
24pub use bytecode::Bytecode;
25pub use decode_errors::BytecodeDecodeError;
26pub use eof::{
27    verification::{
28        validate_eof, validate_eof_code, validate_eof_codes, validate_eof_inner, validate_raw_eof,
29        validate_raw_eof_inner, CodeType, EofValidationError,
30    },
31    Eof, EOF_MAGIC, EOF_MAGIC_BYTES, EOF_MAGIC_HASH,
32};
33pub use iterator::{BytecodeIterator, BytecodeIteratorExt};
34pub use legacy::{JumpTable, LegacyAnalyzedBytecode, LegacyRawBytecode};
35pub use opcode::OpCode;