Search code examples
javascriptnode.jsblockchainethers.js

How to fix invalid hexlify value error in ethers.js


Error: invalid hexlify value (argument="value", value="PRIVATE_KEY", code=INVALID_ARGUMENT, version=bytes/5.7.0)

I encountered an error while building an application to send a token from one wallet to another using Ethers.js and Node.js. I am using a private key for the token transfer.


Solution

  • My Answer:

    Please carefully check your PRIVATE KEY. It should be a 64-character string, so make sure it is correct.