Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions yarn-project/stdlib/src/abi/event_metadata_definition.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type { AbiType } from './abi.js';
import type { EventSelector } from './event_selector.js';

/** Metadata for a contract event, used to decode emitted event logs back into structured data. */
export type EventMetadataDefinition = {
eventSelector: EventSelector;
abiType: AbiType;
/** Names of the event's struct members (not serialized Noir Field elements). */
fieldNames: string[];
};
6 changes: 4 additions & 2 deletions yarn-project/stdlib/src/logs/public_log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ export class FlatPublicLogs {

export class PublicLog {
constructor(
public contractAddress: AztecAddress,
public fields: Fr[],
public readonly contractAddress: AztecAddress,
public readonly fields: Fr[],
) {}

static from(fields: FieldsOf<PublicLog>) {
Expand All @@ -146,7 +146,9 @@ export class PublicLog {
return this.fields.length + PUBLIC_LOG_HEADER_LENGTH;
}

/** Returns the serialized log (field as in noir field and not a struct field). */
getEmittedFields() {
// We slice from 0 to return a shallow copy.
return this.fields.slice(0);
}

Expand Down
Loading