-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error creating new Wallet instance #3768
Comments
After reading the source code, I realized I must prefix the private key with "0x". Ethers v5 does the prefixing automatically. |
I was debating whether to re-introduce that functionality. I really want to force people to include a 0x prefix, but I believe there is a popular piece of software that spits out keys without it. I have to look through my notes and figure out which software and if it is better now. :) |
Thank you for your reply. In my case, I'm using Metamask, and it's still exporting the private key without the 0x prefix. |
Ah yes... I think it was because of MetaMask. I'll re-add support. Thanks! |
Thank you. It'll be very helpful |
Added in v6.0.5. Let me know if you still have any issues. Thanks! :) |
Ethers Version
6.0.2
Search Terms
wallet, invalid BytesLike value
Describe the Problem
I couldn't create a new instance of
Wallet
using ethers v6.0.2, whereas I could do it using ethers v5.4.0.Expect:
Actual:
Code Snippet
Contract ABI
No response
Errors
Environment
node.js (older than v12)
Environment (Other)
Node.js v18.14.0
The text was updated successfully, but these errors were encountered: