Skip to content

Commit

Permalink
fix: Do not fail if rollup contract does not support turns (#6938)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino authored Jun 6, 2024
1 parent 80d1121 commit 5e6fe68
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@ export class ViemTxSender implements L1PublisherTxSender {
}

async getSubmitterAddressForBlock(blockNumber: number): Promise<EthAddress> {
const submitter = await this.rollupContract.read.whoseTurnIsIt([BigInt(blockNumber)]);
return EthAddress.fromString(submitter);
try {
const submitter = await this.rollupContract.read.whoseTurnIsIt([BigInt(blockNumber)]);
return EthAddress.fromString(submitter);
} catch (err) {
this.log.warn(`Failed to get submitter for block ${blockNumber}: ${err}`);
return EthAddress.ZERO;
}
}

async getCurrentArchive(): Promise<Buffer> {
Expand Down

0 comments on commit 5e6fe68

Please sign in to comment.