mod action_params;
mod call_create_type;
mod context;
mod env;
mod error;
mod instruction_result;
mod interpreter_info;
mod return_data;
mod spec;
#[cfg(any(test, feature = "testonly_code"))]
pub mod tests;
pub use self::{
action_params::{ActionParams, ActionValue, ParamsType},
call_create_type::{CallType, CreateType},
context::{
contract_address, BlockHashSource, Context, ContractCreateResult,
CreateContractAddress, MessageCallResult,
},
env::Env,
error::{
separate_out_db_error, Error, ExecTrapError, ExecTrapResult, Result,
TrapError, TrapKind, TrapResult,
},
instruction_result::InstructionResult,
interpreter_info::InterpreterInfo,
return_data::{GasLeft, ReturnData},
spec::{CleanDustMode, Spec, WasmCosts},
};
pub trait Exec: Send {
fn exec(
self: Box<Self>, context: &mut dyn Context,
) -> ExecTrapResult<GasLeft>;
}
pub trait ResumeCall: Send {
fn resume_call(self: Box<Self>, result: MessageCallResult)
-> Box<dyn Exec>;
}
pub trait ResumeCreate: Send {
fn resume_create(
self: Box<Self>, result: ContractCreateResult,
) -> Box<dyn Exec>;
}