Closed
Description
In abstract-provider, the type for a Log is defined as:
export interface Log {
blockNumber?: number;
blockHash?: string;
transactionIndex?: number;
removed?: boolean;
transactionLogIndex?: number,
address: string;
data: string;
topics: Array<string>;
transactionHash?: string;
logIndex?: number;
}
I see that many of these are marked as optional with a ?
. Some, like transactionHash, seem like they would always have to be there and others, like blockHash should perhaps be null
able and not optional (only if you wanted to match the JSON-RPC API more closely).
It seems that there are two types of Logs that get returned, one from a getLogs of a mined transaction (including logIndex, blockHash, etc) and one from a getLogs of pending (or from eth_getFilterChanges
?), which has Object keys that are nullable/undefined?
Does that sound right architecturally?
Activity