Module slot_identifier

Module slot_identifier 

Source
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ยง

DecodedSlotValues
Decoded storage slot values
SlotIdentifier
Storage slot identifier that uses Solidity [StorageLayout] to identify storage slots.
SlotInfo
Information about a storage slot including its label, type, and decoded values.
StorageTypeInfo
Wrapper type that holds both the original type label and the parsed DynSolType.

Constantsยง

ENCODING_INPLACE ๐Ÿ”’
ENCODING_MAPPING ๐Ÿ”’

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