Skip to content

Commit

Permalink
Propmon: retry failing retryables (ArbitrumFoundation#314)
Browse files Browse the repository at this point in the history
* retry retryables

* remove whitelist
  • Loading branch information
godzillaba authored Sep 16, 2024
1 parent 0a6fb53 commit be337bc
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src-ts/proposalStage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
ProposalExecutedEventObject,
ProposalQueuedEventObject,
} from "../typechain-types/src/L2ArbitrumGovernor";
import { hasTimelock, hasVettingPeriod, getL1BlockNumberFromL2 } from "./utils";
import { hasTimelock, hasVettingPeriod, getL1BlockNumberFromL2, wait } from "./utils";
import { CallScheduledEvent } from "../typechain-types/src/ArbitrumTimelock";
import { GnosisSafeL2__factory } from "../types/ethers-contracts/factories/GnosisSafeL2__factory";

Expand Down Expand Up @@ -1383,7 +1383,17 @@ export class RetryableExecutionStage implements ProposalStage {
if (!this.isWriter(this.l1ToL2Message)) {
throw new Error("Message is not a writer");
}
await (await this.l1ToL2Message.redeem()).wait();

while (true) {
try {
await (await this.l1ToL2Message.redeem()).wait();
break;
} catch {
const id = this.l1ToL2Message.retryableCreationId.toLowerCase();
console.error(`Failed to redeem retryable ${id}, retrying in 60s`);
await wait(60_000);
}
}
}

public async getExecuteReceipt(): Promise<TransactionReceipt> {
Expand Down

0 comments on commit be337bc

Please sign in to comment.