diff --git a/internal/service/api/handlers/verify_proof.go b/internal/service/api/handlers/verify_proof.go index ea0714f..60c1d7b 100644 --- a/internal/service/api/handlers/verify_proof.go +++ b/internal/service/api/handlers/verify_proof.go @@ -85,6 +85,9 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) { return } + NetworkConfig(r).LockNonce() + defer NetworkConfig(r).UnlockNonce() + gas, err := EthClient(r).EstimateGas(r.Context(), ethereum.CallMsg{ From: crypto.PubkeyToAddress(NetworkConfig(r).PrivateKey.PublicKey), To: ®istration, @@ -97,9 +100,6 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) { return } - NetworkConfig(r).LockNonce() - defer NetworkConfig(r).UnlockNonce() - tx, err := types.SignNewTx( NetworkConfig(r).PrivateKey, types.NewCancunSigner(NetworkConfig(r).ChainID),