-
I would like to write |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Do NOT paste a private key in this issue or send a private key to anyone by e-mail, but what is the type of DEPLOYER_PRIVATE_KEY? The private key should be be a hexstring with 32 bytes of data (64 nibbles) with a |
Beta Was this translation helpful? Give feedback.
-
@EazyReal I think your main issue with Typescript is that process.env.WHATEVER can be undefined so Typescript complains on var being possibly undefined, and Ethers needs some string. (see if(!process.env.DEPLOYER_PRIVATE_KEY || process.env.DEPLOYER_PRIVATE_KEY.substring(0, 2) !== '0x')
throw new Error('Need private key string !'); |
Beta Was this translation helpful? Give feedback.
-
Thanks, I solved it with the |
Beta Was this translation helpful? Give feedback.
Thanks, I solved it with the
!
operatorlet deployer = new Wallet(process.env.DEPLOYER_PRIVATE_KEY!);