Skip to content

Commit

Permalink
Prevent malformed logs from preventing other logs being decoded (ethe…
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 9eb88e0 commit 749d002
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src.ts/contract/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ export class ContractTransactionReceipt extends TransactionReceipt {
return super.logs.map((log) => {
const fragment = log.topics.length ? this.#iface.getEvent(log.topics[0]): null;
if (fragment) {
return new EventLog(log, this.#iface, fragment)
} else {
return log;
try {
return new EventLog(log, this.#iface, fragment)
} catch (error) { }
}

return log;
});
}

Expand Down

0 comments on commit 749d002

Please sign in to comment.