1mod action_params;
6mod call_create_type;
7mod context;
8mod env;
9mod error;
10mod instruction_result;
11mod interpreter_info;
12mod return_data;
13mod spec;
14
15#[cfg(any(test, feature = "testonly_code"))]
16pub mod tests;
17
18pub use self::{
19 action_params::{ActionParams, ActionValue, ParamsType},
20 call_create_type::{CallType, CreateType},
21 context::{
22 contract_address, BlockHashSource, Context, ContractCreateResult,
23 CreateContractAddress, MessageCallResult,
24 },
25 env::Env,
26 error::{
27 separate_out_db_error, Error, ExecTrapError, ExecTrapResult, Result,
28 TrapError, TrapKind, TrapResult,
29 },
30 instruction_result::InstructionResult,
31 interpreter_info::InterpreterInfo,
32 return_data::{GasLeft, ReturnData},
33 spec::{
34 extract_7702_payload, CIP645Spec, ConsensusGasSpec, Spec,
35 CODE_PREFIX_7702,
36 },
37};
38
39pub trait Exec: Send {
41 fn exec(
45 self: Box<Self>, context: &mut dyn Context,
46 ) -> ExecTrapResult<GasLeft>;
47}
48
49pub trait ResumeCall: Send {
51 fn resume_call(self: Box<Self>, result: MessageCallResult)
53 -> Box<dyn Exec>;
54}
55
56pub trait ResumeCreate: Send {
58 fn resume_create(
60 self: Box<Self>, result: ContractCreateResult,
61 ) -> Box<dyn Exec>;
62}