Skip to content

@ecp.eth/sdk


@ecp.eth/sdk / comments / decodeMetadataTypes

Function: decodeMetadataTypes()

function decodeMetadataTypes(metadataEntries): Record<Hex, {
  key: string;
  type: MetadataType;
}>;

Defined in: packages/sdk/src/comments/metadata.ts:362

Decodes metadata types from on-chain metadata entries by reverse-engineering the type information from the encoded key field. Works without requiring prior knowledge of the key-type mappings.

Parameters

metadataEntries

MetadataEntry[]

Array of MetadataEntry from contracts

Returns

Record<Hex, { key: string; type: MetadataType; }>

Mapping from hashed key to original key and type information