diff --git a/ethcore/src/engines/mod.rs b/ethcore/src/engines/mod.rs index 424a9e94c..11507c206 100644 --- a/ethcore/src/engines/mod.rs +++ b/ethcore/src/engines/mod.rs @@ -44,7 +44,7 @@ use self::epoch::PendingTransition; use account_provider::AccountProvider; use builtin::Builtin; -use vm::{EnvInfo, Schedule, CreateContractAddress}; +use vm::{EnvInfo, Schedule, CreateContractAddress, CallType, ActionValue}; use error::Error; use header::{Header, BlockNumber}; use snapshot::SnapshotComponents; @@ -163,8 +163,10 @@ pub fn default_system_or_code_call<'a>(machine: &'a ::machine::EthereumMachine, None, Some(code), Some(code_hash), + Some(ActionValue::Apparent(U256::zero())), U256::max_value(), Some(data), + Some(CallType::StaticCall), ) }, }; diff --git a/ethcore/src/machine.rs b/ethcore/src/machine.rs index 8162408e9..c74cc6bf4 100644 --- a/ethcore/src/machine.rs +++ b/ethcore/src/machine.rs @@ -135,8 +135,10 @@ impl EthereumMachine { Some(contract_address), code, code_hash, + None, gas, - data + data, + None, ) } @@ -149,8 +151,10 @@ impl EthereumMachine { contract_address: Option
, code: Option>>, code_hash: Option, + value: Option, gas: U256, - data: Option> + data: Option>, + call_type: Option, ) -> Result, Error> { let env_info = { let mut env_info = block.env_info(); @@ -167,11 +171,11 @@ impl EthereumMachine { origin: SYSTEM_ADDRESS, gas, gas_price: 0.into(), - value: ActionValue::Transfer(0.into()), + value: value.unwrap_or(ActionValue::Transfer(0.into())), code, code_hash, data, - call_type: CallType::Call, + call_type: call_type.unwrap_or(CallType::Call), params_type: ParamsType::Separate, }; let schedule = self.schedule(env_info.number);