We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93b2600 commit 622ad9fCopy full SHA for 622ad9f
1 file changed
contracts/scripts/disputeRelayerBot.ts
@@ -104,11 +104,15 @@ export default async function main(
104
const disputeRequests: DisputeRequestEvent.OutputObject[] =
105
fullTxReceipt.logs
106
.filter((log: Log) => log.topics[0] === disputeRequestTopic)
107
- .map(
108
- (log: Log) =>
109
- arbitrableInterface.parseLog(log)!
110
- .args as unknown as DisputeRequestEvent.OutputObject,
111
- );
+ .map((log: Log) => {
+ const parsed = arbitrableInterface.parseLog(log);
+ if (!parsed) {
+ throw new Error(
+ `Failed to parse DisputeRequest log: ${log.transactionHash}`,
112
+ );
113
+ }
114
+ return parsed.args as unknown as DisputeRequestEvent.OutputObject;
115
+ });
116
logger.warn(
117
`More than 1 DisputeRequest event: not supported yet, skipping the others events.`,
118
);
0 commit comments