Function evm_disassembler::disassemble_bytes
source · pub fn disassemble_bytes(bytes: Vec<u8>) -> Result<Vec<Operation>>Expand description
Disassemble a vector of bytes into a vector of decoded Operations
Will stop disassembling when it encounters a push instruction with a size greater than remaining bytes in the input
Arguments
bytes- A vector of bytes representing the encoded bytecode
Examples
use evm_disassembler::disassemble_bytes;
let bytecode = "608060405260043610603f57600035";
let bytes = hex::decode(bytecode).unwrap();
let instructions_from_bytes = disassemble_bytes(bytes).unwrap();