Expand description
Storage slot identification and decoding utilities for Solidity storage layouts.
This module provides functionality to identify and decode storage slots based on Solidity storage layout information from the compiler.
Structs§
- Decoded
Slot Values - Decoded storage slot values
- Slot
Identifier - Storage slot identifier that uses Solidity [
StorageLayout
] to identify storage slots. - Slot
Info - Information about a storage slot including its label, type, and decoded values.
- Storage
Type Info - Wrapper type that holds both the original type label and the parsed DynSolType.
Constants§
- ENCODING_
BYTES - “bytes” encoding type for bytes and string types, which use either inplace or keccak256 hash-based storage depending on length
- ENCODING_
DYN_ ARRAY - “dynamic_array” encoding type for dynamic arrays, which uses keccak256 hash-based storage
- ENCODING_
INPLACE - “inplace” encoding type for variables that fit in one storage slot i.e 32 bytes
- ENCODING_
MAPPING - “mapping” encoding type for Solidity mappings, which use keccak256 hash-based storage
Functions§
- get_
array_ 🔒base_ indices - Returns the base indices for array types, e.g. “[0][0]” for 2D arrays.
- is_
struct - Checks if a given type label represents a struct type.
- serialize_
mapping_ 🔒keys - Custom serializer for mapping keys
- serialize_
slot_ 🔒type - Custom serializer for StorageTypeInfo that only outputs the label