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;
15mod decode_errors;
16/// EIP-7702 bytecode.
17pub mod eip7702;
18pub mod eof;
19/// Iterator for the bytecode.
20mod iter;
21/// Legacy bytecode.
22pub mod legacy;
23pub mod opcode;
24pub mod utils;
25
26/// Re-export of bitvec crate, used to store legacy bytecode jump table.
27pub use bitvec;
28pub use bytecode::Bytecode;
29pub use decode_errors::BytecodeDecodeError;
30pub use eof::{
31    verification::{
32        validate_eof, validate_eof_code, validate_eof_codes, validate_eof_inner, validate_raw_eof,
33        validate_raw_eof_inner, CodeType, EofValidationError,
34    },
35    Eof, EOF_MAGIC, EOF_MAGIC_BYTES, EOF_MAGIC_HASH,
36};
37pub use iter::BytecodeIterator;
38pub use legacy::{JumpTable, LegacyAnalyzedBytecode, LegacyRawBytecode};
39pub use opcode::OpCode;