Skip to content

Commit

Permalink
chore: rename ext call inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jul 17, 2024
1 parent 9195d7f commit 84547c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/revmc-builtins/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,16 +758,16 @@ pub unsafe extern "C" fn __revmc_builtin_ext_call(
spec_id: SpecId,
) -> InstructionResult {
let (target_address, in_offset, in_len, value) = if call_kind == ExtCallKind::Call {
let rev![target_address, offset, len, value] = &mut *sp.cast::<[EvmWord; 4]>();
(target_address, offset, len, value.to_u256())
let rev![target_address, in_offset, in_len, value] = &mut *sp.cast::<[EvmWord; 4]>();
(target_address, in_offset, in_len, value.to_u256())
} else {
let rev![target_address, offset, len] = &mut *sp.cast::<[EvmWord; 3]>();
(target_address, offset, len, U256::ZERO)
let rev![target_address, in_offset, in_len] = &mut *sp.cast::<[EvmWord; 3]>();
(target_address, in_offset, in_len, U256::ZERO)
};

let target_address_bytes = target_address.to_be_bytes();
let (pad, target_address) = target_address_bytes.split_last_chunk::<20>().unwrap();
if pad.iter().any(|i| *i != 0) {
if !pad.iter().all(|i| *i == 0) {
return InstructionResult::InvalidEXTCALLTarget;
}
let target_address = Address::new(*target_address);
Expand Down

0 comments on commit 84547c0

Please sign in to comment.