Expand description
Storage-backed types for ArbOS state.
Provides typed wrappers over raw storage slots: integers, addresses, byte arrays, queues, and vectors that persist in the state trie.
Re-exports§
pub use queue::initialize_queue;pub use queue::open_queue;pub use queue::Queue;pub use vector::open_sub_storage_vector;pub use vector::SubStorageVector;
Modules§
Structs§
- Storage
- Hierarchical storage abstraction over EVM account state.
- Storage
Backed Address - Storage-backed Ethereum address (20 bytes, right-aligned in 32-byte slot).
- Storage
Backed Address OrNil - Storage-backed optional address.
- Storage
Backed BigInt - Storage-backed signed 256-bit integer using two’s complement.
- Storage
Backed BigUint - Storage-backed 256-bit unsigned integer.
- Storage
Backed Bips - Basis points stored as signed i64. 10000 bips = 100%.
- Storage
Backed Bytes - Variable-length byte storage.
- Storage
Backed Int64 - Storage-backed signed 64-bit integer.
- Storage
BackedU Bips - Unsigned basis points stored as u64. 10000 ubips = 100%.
- Storage
Backed Uint16 - Storage-backed 16-bit unsigned integer.
- Storage
Backed Uint24 - Storage-backed 24-bit unsigned integer.
- Storage
Backed Uint32 - Storage-backed 32-bit unsigned integer.
- Storage
Backed Uint64 - Storage-backed 64-bit unsigned integer.
Constants§
- ARBOS_
STATE_ ADDRESS - ArbOS state address — the fictional account that stores all ArbOS state.
- FILTERED_
TX_ STATE_ ADDRESS - Filtered transactions state address — a separate account for tracking filtered tx hashes.
Functions§
- ensure_
account_ in_ bundle - Ensures an arbitrary account exists in bundle_state with nonce=1.
- ensure_
arbos_ account_ in_ bundle - Ensures the ArbOS account exists in bundle_state.
- get_
account_ balance - Reads the balance of an account from the state.
- read_
arbos_ storage - Reads a storage slot from the ArbOS account, checking cache -> bundle -> database.
- read_
storage_ at - Reads a storage slot from an arbitrary account, checking cache -> bundle -> database.
- set_
account_ code - Sets the code of an account, loading it into cache if needed.
- set_
account_ nonce - Sets the nonce of an account, loading it into cache if needed.
- storage_
key_ map - Computes a storage slot using the keccak256-based mapAddress algorithm.
- write_
arbos_ storage - Writes a storage slot to the ArbOS account using the transition mechanism.
- write_
storage_ at - Writes a storage slot to an arbitrary account using the transition mechanism.