Skip to content

Commit

Permalink
fix(EOF): extstaticcall make static (#1508)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakita authored Jun 11, 2024
1 parent 8d91886 commit 4902ffa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/interpreter/src/instructions/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ pub fn extcall<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpreter, host
require_eof!(interpreter);
pop_address!(interpreter, target_address);

// TODO check if target is left paddded with zeroes.

// input call
let Some(input) = extcall_input(interpreter) else {
return;
Expand Down Expand Up @@ -232,6 +234,8 @@ pub fn extdelegatecall<H: Host + ?Sized, SPEC: Spec>(interpreter: &mut Interpret
require_eof!(interpreter);
pop_address!(interpreter, target_address);

// TODO check if target is left paddded with zeroes.

// input call
let Some(input) = extcall_input(interpreter) else {
return;
Expand Down Expand Up @@ -265,6 +269,8 @@ pub fn extstaticcall<H: Host + ?Sized>(interpreter: &mut Interpreter, host: &mut
require_eof!(interpreter);
pop_address!(interpreter, target_address);

// TODO check if target is left paddded with zeroes.

// input call
let Some(input) = extcall_input(interpreter) else {
return;
Expand All @@ -284,7 +290,7 @@ pub fn extstaticcall<H: Host + ?Sized>(interpreter: &mut Interpreter, host: &mut
bytecode_address: target_address,
value: CallValue::Transfer(U256::ZERO),
scheme: CallScheme::Call,
is_static: interpreter.is_static,
is_static: true,
is_eof: true,
return_memory_offset: 0..0,
}),
Expand Down

0 comments on commit 4902ffa

Please sign in to comment.