Show / Hide Table of Contents

Class HookStorageEntry

Represents a single storage entry for an EVM hook, either a direct storage slot or an entry within a Solidity mapping.

Inheritance
object
HookStorageEntry
Implements
IEquatable<HookStorageEntry>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
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 Source

HookStorageEntry(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).

| Edit this page View Source

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 isPreimage).

ReadOnlyMemory<byte> value

The value for the mapping entry (max 32 bytes, empty removes it).

bool isPreimage

When true, indexKey is the preimage of the Keccak256 hash that forms the mapping key.

Properties

| Edit this page View Source

IndexKey

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>?
| Edit this page View Source

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
| Edit this page View Source

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>
| Edit this page View Source

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>

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top .NET Client Library for Hiero Network and Hedera Hashgraph