diff --git a/crates/interpreter/src/instructions/contract.rs b/crates/interpreter/src/instructions/contract.rs index 3bf8987a8e..d5d8f49ccd 100644 --- a/crates/interpreter/src/instructions/contract.rs +++ b/crates/interpreter/src/instructions/contract.rs @@ -417,7 +417,7 @@ pub fn call(interpreter: &mut Interpreter, host: & return; }; #[cfg(feature = "scroll")] - if account_load.is_cold && host.is_address_in_access_list(interpreter.contract.target_address) { + if account_load.is_cold && host.is_address_in_access_list(to) { panic!("access list account should be either loaded or never accessed"); } let Some(mut gas_limit) = @@ -469,7 +469,7 @@ pub fn call_code(interpreter: &mut Interpreter, ho // set is_empty to false as we are not creating this account. load.is_empty = false; #[cfg(feature = "scroll")] - if load.is_cold && host.is_address_in_access_list(interpreter.contract.target_address) { + if load.is_cold && host.is_address_in_access_list(to) { panic!("access list account should be either loaded or never accessed"); } let Some(mut gas_limit) = @@ -521,7 +521,7 @@ pub fn delegate_call(interpreter: &mut Interpreter // set is_empty to false as we are not creating this account. load.is_empty = false; #[cfg(feature = "scroll")] - if load.is_cold && host.is_address_in_access_list(interpreter.contract.target_address) { + if load.is_cold && host.is_address_in_access_list(to) { panic!("access list account should be either loaded or never accessed"); } let Some(gas_limit) = calc_call_gas::(interpreter, load, false, local_gas_limit) else { @@ -566,7 +566,7 @@ pub fn static_call(interpreter: &mut Interpreter, // set is_empty to false as we are not creating this account. load.is_empty = false; #[cfg(feature = "scroll")] - if load.is_cold && host.is_address_in_access_list(interpreter.contract.target_address) { + if load.is_cold && host.is_address_in_access_list(to) { panic!("access list account should be either loaded or never accessed"); } let Some(gas_limit) = calc_call_gas::(interpreter, load, false, local_gas_limit) else {