storage_access
Storage access primitives for Starknet contract storage.This module provides abstractions over the system calls for reading from and writing to Starknet contract storage. It includes traits and implementations for storing various data types efficiently. # Storage ArchitectureStorage addresses range from [0, 2^251)
* Base addresses can be combined with offsets, allowing storage of up to 255 values sequentially * Multiple storage domains can be supported, each with its own set of storage space. Currently, only the domain 0
is supported. Values stored in domain 0
are committed to Ethereum as part of the state diffs. # Core ComponentsStorageAddress
: Represents a specific storage location * StorageBaseAddress
: Base address that can be combined with offsets * Store<T>
: Core trait for types that can be stored in contract storage * StorePacking<T,P>
: Trait for efficient packing/unpacking of valuesGenerally, you don't need to implement the Store
trait yourself. Most types of the core library, at the exception of collection types, implement the Store
trait - and thus, you can derive the Store
trait for your own types, as long as they don't contain any collections.
Fully qualified path: core::starknet::storage_access