Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

wallet.signTransaction fail with error  #5170

@nazarhussain

Description

@nazarhussain

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Signing a transaction with wallet object is resulting into following error.

Signer Error  gasLimit is too low. given 0, need at least 53572.

Expected Behavior

It should sign the transaction without any issue.

Steps to Reproduce

await web3.eth.accounts.wallet.get(0).signTransaction({
      data:
        "0x1234567000000000000000000000000" +
        account.address.toLowerCase().replace("0x", "") +
        "00000000000000000000000000000000000000000000000000000000000000c8",
      from: account.address.toLowerCase(),
      gas: "0xd658",
      gasPrice: "0xbb8",
      chainId: "0x1",
      nonce: "0x1",
      chain: "mainnet",
      hardfork: "petersburg",
    })

Web3.js Version

4.x

Environment

No response

Anything Else?

No response

Metadata

Metadata

Assignees

Labels

4.x4.0 relatedBugAddressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions