Skip to content

Documentation / @etherfold/core / storedEventOf

Function: storedEventOf() ​

storedEventOf<ABI>(event): StoredLogEvent

Defined in: packages/core/src/internal/stream/strip.ts:18

ONE EVENT, stripped of its decoded half.

args / eventName are what SOME ABI made of those bytes and decodeError is what happened when one could not, so all three are a CACHE that LogEventFetcher.reparse re-derives on read against the source running now (ADR-0034). What is stored is the half that is true forever.

It builds a NEW object, and that is the whole point rather than a detail: the event handed in is the very one the processor is about to fold, so deleting three keys off it would corrupt what the fold reads. Same destructuring as reparse does on the way back, so the two halves of "the decoded half is a cache" are spelled the same way.

Type Parameters ​

ABI ​

ABI extends Abi

Parameters ​

event ​

LogEvent<ABI>

Returns ​

StoredLogEvent