diff --git a/precompiles/src/lib.rs b/precompiles/src/lib.rs index 07d1d155..c3faa624 100644 --- a/precompiles/src/lib.rs +++ b/precompiles/src/lib.rs @@ -27,10 +27,7 @@ pub use crate::simple::{ECRecover, Identity, Ripemd160, Sha256}; use alloc::vec::Vec; use evm::standard::{CodeResolver, Config, Precompile, ResolvedCode}; -use evm::{ - ExitError, ExitException, ExitResult, GasedMachine, InvokerControl, RuntimeBackend, - RuntimeState, StaticGasometer, -}; +use evm::{ExitError, ExitException, ExitResult, RuntimeBackend, RuntimeState, StaticGasometer}; use primitive_types::H160; @@ -62,7 +59,7 @@ impl, G: StaticGasometer, H> Precompile for Stan state: S, mut gasometer: G, _handler: &mut H, - ) -> InvokerControl, (ExitResult, (S, G, Vec))> { + ) -> (ExitResult, (S, G, Vec)) { let (exit, retval) = match self { Self::ECRecover => ECRecover.execute(input, state.as_ref(), &mut gasometer), Self::Sha256 => Sha256.execute(input, state.as_ref(), &mut gasometer), @@ -75,7 +72,7 @@ impl, G: StaticGasometer, H> Precompile for Stan Self::Blake2F => Blake2F.execute(input, state.as_ref(), &mut gasometer), }; - InvokerControl::DirectExit((exit, (state, gasometer, retval))) + (exit, (state, gasometer, retval)) } } diff --git a/src/standard/invoker/mod.rs b/src/standard/invoker/mod.rs index 3ef78e1f..08a75a16 100644 --- a/src/standard/invoker/mod.rs +++ b/src/standard/invoker/mod.rs @@ -112,7 +112,7 @@ pub trait Precompile { state: S, gasometer: G, handler: &mut H, - ) -> InvokerControl, (ExitResult, (S, G, Vec))>; + ) -> (ExitResult, (S, G, Vec)); } impl Precompile for Infallible { @@ -122,7 +122,7 @@ impl Precompile for Infallible { _state: S, _gasometer: G, _handler: &mut H, - ) -> InvokerControl, (ExitResult, (S, G, Vec))> { + ) -> (ExitResult, (S, G, Vec)) { match *self {} } } diff --git a/src/standard/invoker/routines.rs b/src/standard/invoker/routines.rs index 4bec5342..4cf6c576 100644 --- a/src/standard/invoker/routines.rs +++ b/src/standard/invoker/routines.rs @@ -56,9 +56,9 @@ where is_static, })) } - ResolvedCode::Precompile(precompile) => { - Ok(precompile.execute(&input, state, gasometer, handler)) - } + ResolvedCode::Precompile(precompile) => Ok(InvokerControl::DirectExit( + precompile.execute(&input, state, gasometer, handler), + )), } }