Skip to content

Commit

Permalink
fix: Failed to save file to change failed ones too
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Cory authored and Will Cory committed Jun 16, 2023
1 parent 87f89d8 commit 698e4d7
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions packages/sdk/src/cross-chain-messenger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,9 +768,14 @@ export class CrossChainMessenger {

// We didn't find a transaction that relayed the message. We now attempt to find
// FailedRelayedMessage events instead.
const failedRelayedMessageEvents = await messenger.queryFilter(
messenger.filters.FailedRelayedMessage(messageHash)
)
const failedRelayedMessageEvents = [
...(await messenger.queryFilter(
messenger.filters.FailedRelayedMessage(messageHashV0)
)),
...(await messenger.queryFilter(
messenger.filters.FailedRelayedMessage(messageHashV1)
)),
]

// A transaction can fail to be relayed multiple times. We'll always return the last
// transaction that attempted to relay the message.
Expand Down Expand Up @@ -1040,13 +1045,13 @@ export class CrossChainMessenger {
const challengePeriod =
oracleVersion === '1.0.0'
? // The ABI in the SDK does not contain FINALIZATION_PERIOD_SECONDS
// in OptimismPortal, so making an explicit call instead.
BigNumber.from(
await this.contracts.l1.OptimismPortal.provider.call({
to: this.contracts.l1.OptimismPortal.address,
data: '0xf4daa291', // FINALIZATION_PERIOD_SECONDS
})
)
// in OptimismPortal, so making an explicit call instead.
BigNumber.from(
await this.contracts.l1.OptimismPortal.provider.call({
to: this.contracts.l1.OptimismPortal.address,
data: '0xf4daa291', // FINALIZATION_PERIOD_SECONDS
})
)
: await this.contracts.l1.L2OutputOracle.FINALIZATION_PERIOD_SECONDS()
return challengePeriod.toNumber()
}
Expand Down

0 comments on commit 698e4d7

Please sign in to comment.