Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit

Permalink
Always use latest nonce (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
hazim-j authored May 14, 2023
1 parent 9f9a40f commit 98f1347
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/entrypoint/transaction/handleops.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ func HandleOps(
return nil, nil, err
}

nonce, err := eth.NonceAt(context.Background(), eoa.Address, nil)
if err != nil {
return nil, nil, err
}

auth, err := bind.NewKeyedTransactorWithChainID(eoa.PrivateKey, chainID)
if err != nil {
return nil, nil, err
}
auth.GasLimit = gas
auth.Nonce = big.NewInt(int64(nonce))

txn, err = ep.HandleOps(auth, toAbiType(batch), beneficiary)
if err != nil {
Expand Down

0 comments on commit 98f1347

Please sign in to comment.