Skip to content

Commit

Permalink
fix(wallet)_: in case of sepolia optimism returned a nonce is not gen…
Browse files Browse the repository at this point in the history
…erated the same way as it is for optimism mainnet

Changes done here simply increment the resolved nonce by sepolia optimism chain by one, cause
it's differently generated that it is for mainnet sepolia and other chains. This change aligns on that.
  • Loading branch information
saledjenic committed Dec 13, 2024
1 parent c27c773 commit 3e165d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transactions/transactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ func (t *Transactor) NextNonce(rpcClient rpc.ClientInterface, chainID uint64, fr
if err != nil {
return 0, err
}
return nonce + countOfPendingTXs, nil
nonce = nonce + countOfPendingTXs
}
// sepolia optimim returns nonce differently than mainnet optimim, that's why we need to increment it by 1
if chainID == wallet_common.OptimismSepolia {
nonce++
}
}

Expand Down

0 comments on commit 3e165d0

Please sign in to comment.