Struct revm_primitives::bytecode::Bytecode
source · pub struct Bytecode {
pub bytecode: Bytes,
pub hash: B256,
pub state: BytecodeState,
}
Fields§
§bytecode: Bytes
§hash: B256
§state: BytecodeState
Implementations§
source§impl Bytecode
impl Bytecode
pub fn new_raw(bytecode: Bytes) -> Self
sourcepub unsafe fn new_raw_with_hash(bytecode: Bytes, hash: B256) -> Self
pub unsafe fn new_raw_with_hash(bytecode: Bytes, hash: B256) -> Self
sourcepub unsafe fn new_checked(bytecode: Bytes, len: usize, hash: Option<B256>) -> Self
pub unsafe fn new_checked(bytecode: Bytes, len: usize, hash: Option<B256>) -> Self
Create new checked bytecode
Safety
Bytecode need to end with STOP (0x00) opcode as checked bytecode assumes that it is safe to iterate over bytecode without checking lengths