Class HookStorageEntry
Represents a single storage entry for an EVM hook, either a direct storage slot or an entry within a Solidity mapping.
Implements
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed record HookStorageEntry : IEquatable<HookStorageEntry>
Remarks
When IndexKey is null, this represents
a direct storage slot update identified by Key.
When IndexKey is set, this represents an entry
in a Solidity mapping where Key is the mapping's
base slot and IndexKey is the key into the mapping.
Constructors
| Edit this page View SourceHookStorageEntry(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>)
Creates a direct storage slot entry.
Declaration
public HookStorageEntry(ReadOnlyMemory<byte> key, ReadOnlyMemory<byte> value)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlyMemory<byte> | key | The key of the storage slot (minimal representation, max 32 bytes). |
| ReadOnlyMemory<byte> | value | The value for the slot (minimal representation, max 32 bytes, empty removes it). |
HookStorageEntry(ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, ReadOnlyMemory<byte>, bool)
Creates a mapping entry within a Solidity mapping.
Declaration
public HookStorageEntry(ReadOnlyMemory<byte> key, ReadOnlyMemory<byte> indexKey, ReadOnlyMemory<byte> value, bool isPreimage = false)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlyMemory<byte> | key | The base slot of the Solidity mapping (minimal representation, max 32 bytes). |
| ReadOnlyMemory<byte> | indexKey | The key into the mapping (explicit bytes or preimage, depending on
|
| ReadOnlyMemory<byte> | value | The value for the mapping entry (max 32 bytes, empty removes it). |
| bool | isPreimage | When |
Properties
| Edit this page View SourceIndexKey
When set, indicates this is a mapping entry and contains
the key into the Solidity mapping. When null, this
is a direct storage slot update.
Declaration
public ReadOnlyMemory<byte>? IndexKey { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte>? |
IsPreimage
When IndexKey is set, indicates whether it is the preimage of the Keccak256 hash rather than an explicit mapping key. Preimage keys may be variable length and can include leading zeros.
Declaration
public bool IsPreimage { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Key
The storage slot key (for direct slots) or the mapping's base slot (for mapping entries). Minimal representation, max 32 bytes.
Declaration
public ReadOnlyMemory<byte> Key { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |
Value
The value for the storage slot or mapping entry. Minimal representation, max 32 bytes. An empty value removes the entry.
Declaration
public ReadOnlyMemory<byte> Value { get; }
Property Value
| Type | Description |
|---|---|
| ReadOnlyMemory<byte> |