Function sstore_with_gas_accounting
pub fn sstore_with_gas_accounting<'a, IT, H, F>(
context: InstructionContext<'a, H, IT>,
gas_accounting: F,
) -> Result<(), InstructionResult>where
IT: InterpreterTypes,
H: Host + ?Sized,
F: for<'ctx, 'load> FnOnce(&'ctx mut InstructionContext<'a, H, IT>, Address, &'load StateLoad<SStoreResult>) -> Result<(), InstructionResult>,Expand description
Implements SSTORE, delegating dynamic gas and refund accounting to gas_accounting.
This helper performs the common SSTORE instruction flow: static-call checks, stack pops, stipend/static-gas charging, and the journaled storage write. Custom instruction sets can override the SSTORE opcode and call this helper with their own gas accounting closure.