pub trait CheatcodeInspectorStrategyRunner:
Debug
+ Send
+ Sync
+ CheatcodeInspectorStrategyExt {
// Required methods
fn record_broadcastable_create_transactions(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
config: Arc<CheatsConfig>,
input: &dyn CommonCreateInput,
ecx: Ecx<'_, '_, '_>,
broadcast: &Broadcast,
broadcastable_transactions: &mut BroadcastableTransactions,
);
fn record_broadcastable_call_transactions(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_config: Arc<CheatsConfig>,
input: &CallInputs,
ecx: Ecx<'_, '_, '_>,
broadcast: &Broadcast,
broadcastable_transactions: &mut BroadcastableTransactions,
active_delegations: Vec<SignedAuthorization>,
active_blob_sidecar: Option<BlobTransactionSidecar>,
);
// Provided methods
fn apply_full(
&self,
cheatcode: &dyn DynCheatcode,
ccx: &mut CheatsCtxt<'_, '_, '_, '_>,
executor: &mut dyn CheatcodesExecutor,
) -> Result { ... }
fn base_contract_deployed(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
) { ... }
fn pre_initialize_interp(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
) { ... }
fn post_initialize_interp(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
) { ... }
fn pre_step_end(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
) -> bool { ... }
}Expand description
Stateless strategy runner for CheatcodeInspectorStrategy.
Required Methods§
Sourcefn record_broadcastable_create_transactions(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
config: Arc<CheatsConfig>,
input: &dyn CommonCreateInput,
ecx: Ecx<'_, '_, '_>,
broadcast: &Broadcast,
broadcastable_transactions: &mut BroadcastableTransactions,
)
fn record_broadcastable_create_transactions( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, config: Arc<CheatsConfig>, input: &dyn CommonCreateInput, ecx: Ecx<'_, '_, '_>, broadcast: &Broadcast, broadcastable_transactions: &mut BroadcastableTransactions, )
Record broadcastable transaction during CREATE.
Sourcefn record_broadcastable_call_transactions(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_config: Arc<CheatsConfig>,
input: &CallInputs,
ecx: Ecx<'_, '_, '_>,
broadcast: &Broadcast,
broadcastable_transactions: &mut BroadcastableTransactions,
active_delegations: Vec<SignedAuthorization>,
active_blob_sidecar: Option<BlobTransactionSidecar>,
)
fn record_broadcastable_call_transactions( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, _config: Arc<CheatsConfig>, input: &CallInputs, ecx: Ecx<'_, '_, '_>, broadcast: &Broadcast, broadcastable_transactions: &mut BroadcastableTransactions, active_delegations: Vec<SignedAuthorization>, active_blob_sidecar: Option<BlobTransactionSidecar>, )
Record broadcastable transaction during CALL.
Provided Methods§
Sourcefn apply_full(
&self,
cheatcode: &dyn DynCheatcode,
ccx: &mut CheatsCtxt<'_, '_, '_, '_>,
executor: &mut dyn CheatcodesExecutor,
) -> Result
fn apply_full( &self, cheatcode: &dyn DynCheatcode, ccx: &mut CheatsCtxt<'_, '_, '_, '_>, executor: &mut dyn CheatcodesExecutor, ) -> Result
Apply cheatcodes.
Sourcefn base_contract_deployed(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
)
fn base_contract_deployed( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, )
Called when the main test or script contract is deployed.
Sourcefn pre_initialize_interp(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
)
fn pre_initialize_interp( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, _interpreter: &mut Interpreter, _ecx: Ecx<'_, '_, '_>, )
Hook for pre initialize_interp.
Sourcefn post_initialize_interp(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
)
fn post_initialize_interp( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, _interpreter: &mut Interpreter, _ecx: Ecx<'_, '_, '_>, )
Hook for post initialize_interp.
Sourcefn pre_step_end(
&self,
_ctx: &mut dyn CheatcodeInspectorStrategyContext,
_interpreter: &mut Interpreter,
_ecx: Ecx<'_, '_, '_>,
) -> bool
fn pre_step_end( &self, _ctx: &mut dyn CheatcodeInspectorStrategyContext, _interpreter: &mut Interpreter, _ecx: Ecx<'_, '_, '_>, ) -> bool
Hook for pre step_end.
Used to override opcode behaviors. Returns true if handled.