Skip to main content

Module storage

Module storage 

Source
Expand description

EVM storage abstraction layer for Tempo precompile contracts.

Provides traits and types for reading/writing contract state from EVM storage, including persistent (SLOAD/SSTORE) and transient (TLOAD/TSTORE) operations.

Re-exports§

pub use thread_local::CheckpointGuard;
pub use thread_local::StorageCtx;
pub use packing::FieldLocation;

Modules§

array
Fixed-size array handler for the storage traits.
bytes_like
Bytes-like (Bytes, String) implementation for the storage traits.
evm
hashmap
mapping
Type-safe wrapper for EVM storage mappings (hash-based key-value storage).
packing
Shared utilities for packing and unpacking values in EVM storage slots.
set
OpenZeppelin’s EnumerableSet implementation for EVM storage using Rust primitives. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/EnumerableSet.sol
slots
Type-safe wrapper for EVM storage mappings (hash-based key-value storage).
thread_local
types 🔒
Storable type system for EVM storage.
vec
Dynamic array (Vec<T>) implementation for the storage traits.

Structs§

LayoutCtx
Describes the context in which a storable value is being loaded or stored.
Mapping
Type-safe access wrapper for EVM storage mappings (hash-based key-value storage).
Set
An ordered set that preserves insertion order.
SetHandler
Type-safe handler for accessing Set<T> in storage.
Slot
Type-safe wrapper for a single EVM storage slot.

Enums§

Layout
Describes how a type is laid out in EVM storage.

Traits§

ContractStorage
Trait providing access to a contract’s address.
FromWord
Trait for primitive types that fit into a single EVM storage slot.
Handler
Abstracts reading, writing, and deleting values for Storable types.
Packable
Trait for types that can be packed into EVM storage slots.
PrecompileStorageProvider
Low-level storage provider for interacting with the EVM.
Storable
High-level storage operations for storable types.
StorableType
Helper trait to access storage layout information without requiring const generic parameter.
StorageKey
Trait for types that can be used as storage mapping keys.
StorageOps
Storage operations for a given (contract) address.