Skip to main content

GasStateTr

Trait GasStateTr 

Source
pub trait GasStateTr<IT: ITy, H: Host + ?Sized> {
    // Required method
    fn sstore_gas_state(
        context: &mut Ictx<'_, H, IT>,
        owner: Address,
        vals: &SStoreResult,
    ) -> Result<GasStateOutcome, InstructionResult>;
}
Expand description

Type-level SSTORE gas-state policy.

This hook is called after the storage write has been journaled and before the subsequent state-gas/refund accounting. The default policy is a no-op.

Required Methods§

Source

fn sstore_gas_state( context: &mut Ictx<'_, H, IT>, owner: Address, vals: &SStoreResult, ) -> Result<GasStateOutcome, InstructionResult>

Called after the main SSTORE journal update and before final gas/refund accounting.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<IT: ITy, H: Host + ?Sized> GasStateTr<IT, H> for NoGasState