From f66b10f1fd8792768ef662f2144033f8a1636ee0 Mon Sep 17 00:00:00 2001 From: jeevan-sid Date: Mon, 16 Feb 2026 20:10:23 +0530 Subject: [PATCH] fix: change nonce to hexutil --- ethclient/ethclient.go | 2 +- internal/ethapi/api.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ethclient/ethclient.go b/ethclient/ethclient.go index 967fd7e58e..1d6673cd1c 100644 --- a/ethclient/ethclient.go +++ b/ethclient/ethclient.go @@ -289,7 +289,7 @@ func (ec *Client) TransactionByHash(ctx context.Context, hash common.Hash) (tx * } // TransactionHashBySenderAndNonce returns the transaction hash for the given sender and nonce. -func (ec *Client) TransactionHashBySenderAndNonce(ctx context.Context, sender common.Address, nonce uint64) (*common.Hash, error) { +func (ec *Client) TransactionHashBySenderAndNonce(ctx context.Context, sender common.Address, nonce hexutil.Uint64) (*common.Hash, error) { var hash *common.Hash err := ec.c.CallContext(ctx, &hash, "eth_getTransactionBySenderAndNonce", sender, nonce) if err != nil { diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index b034badcd1..a08f21a2b8 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1450,8 +1450,8 @@ func (api *TransactionAPI) GetTransactionByHash(ctx context.Context, hash common } // GetTransactionBySenderAndNonce returns the hash of a transaction for the given sender and nonce. -func (s *TransactionAPI) GetTransactionBySenderAndNonce(ctx context.Context, sender common.Address, nonce uint64) (*common.Hash, error) { - hash, err := s.b.GetTransactionBySenderAndNonce(ctx, sender, nonce) +func (s *TransactionAPI) GetTransactionBySenderAndNonce(ctx context.Context, sender common.Address, nonce hexutil.Uint64) (*common.Hash, error) { + hash, err := s.b.GetTransactionBySenderAndNonce(ctx, sender, uint64(nonce)) if err != nil { return nil, err }