Skip to main content

Crate bal_layout

Crate bal_layout 

Source
Expand description

bal-layout: solc storageLayout → slot arithmetic and typed decoding.

Knows nothing about where words come from. Give it a path like balances[0xabc…], totals.index, nested[0xabc…][7], items[2], items.length, and it answers with a Location (slot, byte offset, size, type). Give it a 32-byte word and a location, and it decodes a Value. The reverse direction — “which field is slot X?” — works for everything except mapping entries (keccak is one-way; see Layout::describe_slot).

Structs§

Layout
A parsed storage layout.
Location
Where a value lives.
StorageEntry
One variable (or struct member) as solc reports it.
TypeInfo
One entry of the layout’s types table.

Enums§

Encoding
solc storage encodings.
LayoutError
Layout parsing and path resolution failures.
PathKind
What a storage path names.
Value
A decoded value. Raw means the layout knew the location but not how to read it (dynamic bytes/strings, unknown encodings): the word is shown as is rather than guessed.
ValueKind
How a decoded value should be read by a caller that only sees text.

Type Aliases§

Result
Result of layout operations.