TypeError: Cannot read property 'toHexString' of undefined #1826
Unanswered
ZakatZakat
asked this question in
Q&A
Replies: 1 comment
-
It is likely that one or both of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I'm trying to connect to my ether wallet using this code:
require('dotenv').config();
const privateKey = process.env.PRIVATE_KEY;
const { ethers } = require('ethers');
const provider = new ethers.providers.InfuraProvider('mainnet', process.env.INFURA_KEY);
const wallet = new ethers.Wallet(privateKey, provider)
and get this error:
TypeError: Cannot read property 'toHexString' of undefined
Beta Was this translation helpful? Give feedback.
All reactions