ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

signer.signTransaction error

Open zemse opened this issue 2 years ago • 0 comments

Ethers Beta Version

6.0.0-beta.9

Describe the Problem

This seems like a small issue with the eth_signTransaction being typoed as eth_sign_Transaction internally.

Code Snippet

const provider = new JsonRpcProvider(); // I have a node hardhat network node running on localhost:8545 from another project, ganache also gives similar error.
const signer = await provider.getSigner(0);
const stx = await signer.signTransaction({}); // this lign fails

Errors

Error: error from JSON-RPC (result={"jsonrpc":"2.0","id":3,"error":{"code":-32601,"message":"Method eth_sign_Transaction not found","data":{"message":"Method eth_sign_Transaction not found"}}}, code=UNKNOWN_ERROR, version=@ethersproject/[email protected])
      at Logger.makeError (file:///Users/sohamzemse/Workspace/smart-contract-projects/v6-typechain-trial/node_modules/@ethersproject/logger/src.ts/logger.ts:94:27)
      at Logger.throwError (file:///Users/sohamzemse/Workspace/smart-contract-projects/v6-typechain-trial/node_modules/@ethersproject/logger/src.ts/logger.ts:105:20)
      at JsonRpcProvider.send (file:///Users/sohamzemse/Workspace/smart-contract-projects/v6-typechain-trial/node_modules/@ethersproject/providers/src.ts/provider-jsonrpc.ts:657:27)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async JsonRpcSigner.signTransaction (file:///Users/sohamzemse/Workspace/smart-contract-projects/v6-typechain-trial/node_modules/@ethersproject/providers/src.ts/provider-jsonrpc.ts:272:16)
      at async Context.<anonymous> (file:///Users/sohamzemse/Workspace/smart-contract-projects/v6-typechain-trial/test/SimpleStorage.test.ts:40:19)

Environment

node.js

Environment (Other)

No response

zemse avatar Jun 04 '22 16:06 zemse