Skip to content

Commit 04674c5

Browse files
authored
fix: nonce issue in burning mechanism cronjob (#1674)
1 parent 93dea74 commit 04674c5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

operations/src/commands/burn-and-bridge.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ export default class BurnAndBridge extends Command {
281281
web3SignerTrustedStorePassphrase,
282282
});
283283

284+
const senderAddressNonce = await client.getTransactionCount({ address: senderAddress });
285+
284286
const transactionToSerialize: TransactionSerializable = {
285287
to: rollupRevenueVaultContractAddress,
286288
type: "eip1559",
@@ -290,6 +292,7 @@ export default class BurnAndBridge extends Command {
290292
gas: gasLimit,
291293
maxFeePerGas: baseFeePerGas + priorityFeePerGas,
292294
maxPriorityFeePerGas: priorityFeePerGas,
295+
nonce: senderAddressNonce,
293296
};
294297

295298
const signature = await this.signBurnAndBridgeTransaction(

operations/src/commands/submit-invoice.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ export default class SubmitInvoice extends Command {
327327
SIGNING TRANSACTION
328328
******************************/
329329

330+
const senderAddressNonce = await client.getTransactionCount({ address: senderAddress });
331+
330332
const transactionToSerialize: TransactionSerializable = {
331333
to: contractAddress,
332334
type: "eip1559",
@@ -336,6 +338,7 @@ export default class SubmitInvoice extends Command {
336338
gas: gasLimit,
337339
maxFeePerGas: baseFeePerGas + priorityFeePerGas,
338340
maxPriorityFeePerGas: priorityFeePerGas,
341+
nonce: senderAddressNonce,
339342
};
340343

341344
const httpsAgent = this.buildHttpsAgentIfNeeded({

0 commit comments

Comments
 (0)