Class UpdateHookStorageParams
Represents the parameters required to update the storage of an EVM hook on the Hedera network.
Inherited Members
Namespace: Hiero
Assembly: Hiero.dll
Syntax
public sealed class UpdateHookStorageParams : TransactionParams<TransactionReceipt>
Examples
Rewrite one or more storage slots on an EVM hook. Useful for maintaining allow/deny lists or other state consumed by hook logic:
// Rewrite one or more storage slots on a hook. Use this to maintain
// state (e.g., allow/deny lists) consumed by a contract's hook logic.
// The hook's owner account must sign.
var receipt = await client.UpdateHookStorageAsync(new UpdateHookStorageParams
{
Hook = hook,
StorageUpdates = new[]
{
new HookStorageEntry(slotKey, slotValue)
}
});
Console.WriteLine($"Hook update status: {receipt.Status}");
Properties
| Edit this page View SourceCancellationToken
Optional Cancellation token that can interrupt the hook storage update.
Declaration
public CancellationToken? CancellationToken { get; set; }
Property Value
| Type | Description |
|---|---|
| CancellationToken? |
Hook
The identity of the hook whose storage is being updated.
Declaration
public Hook Hook { get; set; }
Property Value
| Type | Description |
|---|---|
| Hook |
Signatory
Additional private key, keys or signing callback method required to authorize the storage update. Typically the hook owner's key or its admin key.
Declaration
public Signatory? Signatory { get; set; }
Property Value
| Type | Description |
|---|---|
| Signatory |
Remarks
Keys/callbacks added here will be combined with those already identified in the client object's context when signing this transaction.
StorageUpdates
The storage updates to apply to the hook.
Declaration
public IEnumerable<HookStorageEntry>? StorageUpdates { get; set; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<HookStorageEntry> |