pub trait PostExecutionHandler {
type Context;
type Error;
type ExecResult;
type Output;
// Required methods
fn eip7623_check_gas_floor(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
init_and_floor_gas: InitialAndFloorGas,
);
fn refund(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
eip7702_refund: i64,
);
fn reimburse_caller(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
) -> Result<(), Self::Error>;
fn reward_beneficiary(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
) -> Result<(), Self::Error>;
fn output(
&self,
context: &mut Self::Context,
result: Self::ExecResult,
) -> Result<Self::Output, Self::Error>;
fn clear(&self, context: &mut Self::Context);
// Provided method
fn end(
&self,
_context: &mut Self::Context,
end_output: Result<Self::Output, Self::Error>,
) -> Result<Self::Output, Self::Error> { ... }
}
Required Associated Types§
Required Methods§
Sourcefn eip7623_check_gas_floor(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
init_and_floor_gas: InitialAndFloorGas,
)
fn eip7623_check_gas_floor( &self, context: &mut Self::Context, exec_result: &mut Self::ExecResult, init_and_floor_gas: InitialAndFloorGas, )
Calculate final refund.
Sourcefn refund(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
eip7702_refund: i64,
)
fn refund( &self, context: &mut Self::Context, exec_result: &mut Self::ExecResult, eip7702_refund: i64, )
Calculate final refund.
Sourcefn reimburse_caller(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
) -> Result<(), Self::Error>
fn reimburse_caller( &self, context: &mut Self::Context, exec_result: &mut Self::ExecResult, ) -> Result<(), Self::Error>
Reimburse the caller with balance it didn’t spent.
Sourcefn reward_beneficiary(
&self,
context: &mut Self::Context,
exec_result: &mut Self::ExecResult,
) -> Result<(), Self::Error>
fn reward_beneficiary( &self, context: &mut Self::Context, exec_result: &mut Self::ExecResult, ) -> Result<(), Self::Error>
Reward beneficiary with transaction rewards.