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

Commit 98f1347

Browse files
authored
Always use latest nonce (#170)
1 parent 9f9a40f commit 98f1347

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/entrypoint/transaction/handleops.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,17 @@ func HandleOps(
9292
return nil, nil, err
9393
}
9494

95+
nonce, err := eth.NonceAt(context.Background(), eoa.Address, nil)
96+
if err != nil {
97+
return nil, nil, err
98+
}
99+
95100
auth, err := bind.NewKeyedTransactorWithChainID(eoa.PrivateKey, chainID)
96101
if err != nil {
97102
return nil, nil, err
98103
}
99104
auth.GasLimit = gas
105+
auth.Nonce = big.NewInt(int64(nonce))
100106

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

0 commit comments

Comments
 (0)