Skip to content

Commit

Permalink
feat: add decode in Log
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyjackal committed Nov 30, 2023
1 parent 8bb99b1 commit 9c9cf22
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/types/log.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ethers } from 'ethers';

export interface Log {
address: string;
topics: string[];
Expand All @@ -9,4 +11,18 @@ export interface Log {
logIndex: number;
removed: boolean;
chainId: number;
decode?: LogDescription;
}

export type LogDescription = {
fragment: {
name: string;
type: ethers.utils.ParamType;
inputs: ReadonlyArray<ethers.utils.ParamType>;
anonymous: boolean;
};
name: string;
signature: string;
args: string[];
topic: string;
};

0 comments on commit 9c9cf22

Please sign in to comment.