Commit 7ad93ce4 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #1436 from ethereum-optimism/sc/fix-sbs-nonce

fix: use the same nonce for each batch submission
parents 7899adbd 7482d09c
---
'@eth-optimism/batch-submitter': patch
---
Fixes a bug in the batch submitted that would cause it to submit transactions with increasing nonces
......@@ -173,9 +173,11 @@ export class StateBatchSubmitter extends BatchSubmitter {
this.logger.debug('Submitting batch.', { calldata })
// Generate the transaction we will repeatedly submit
const nonce = await this.signer.getTransactionCount()
const tx = await this.chainContract.populateTransaction.appendStateBatch(
batch,
offsetStartsAtIndex
offsetStartsAtIndex,
{ nonce }
)
const submitTransaction = (): Promise<TransactionReceipt> => {
return this.transactionSubmitter.submitTransaction(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment