fix: change nonce to hexutil

This commit is contained in:
jeevan-sid 2026-02-16 20:10:23 +05:30
parent 67f087a0fa
commit f66b10f1fd
2 changed files with 3 additions and 3 deletions

View file

@ -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 {

View file

@ -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
}