INNER CODE UNIT · Rust

peek_realcall_input_value

fuzzland/ityfuzz · src/evm/middlewares/cheatcode/mod.rs:539

fn peek_realcall_input_value(interp: &mut Interpreter, op: u8) -> Result<(Bytes, U256), InstructionResult> {
    let value = if op == opcode::CALL || op == opcode::CALLCODE {
        interp.stack().peek(2)?
    } else {
        U256::ZERO
    };

    let (in_offset, in_len) = {
        let (in_offset, in_len) = if op == opcode::CALL || op == opcode::CALLCODE {
            (interp.stack().peek(3)?, interp.stack().peek(4)?)
        } else {
            (interp.stack().peek(2)?, interp.stack().peek(3)?)
        };

        (in_offset.as_limbs()[0] as usize, in_len.as_limbs()[0] as usize)
    };

    let input = if in_len != 0 {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…