Skip to main content

Module accounting

Module accounting 

Source
Expand description

Backend-agnostic TIP-1060 SSTORE storage credits accounting.

sstore_storage_credits implements the storage credits policy that runs after a storage slot is written. It is driven through the StorageCreditsBackend trait so the exact same logic can be reused from two places:

  • the opcode-level SSTORE hook in tempo-revm (TempoGasState), and
  • EvmPrecompileStorageProvider so precompile-driven storage writes honor the same accounting.

Traits§

StorageCreditsBackend
Minimal journal/gas operations required by storage credit accounting.
StorageCreditsErr
Error mapping required by storage credit accounting.

Functions§

sstore_storage_credits
Applies TIP-1060 storage credits after a single SSTORE has been journaled.
store_credit_state 🔒