PrivateKeyAccount is not assignable to type 'never' #421
Unanswered
chrisco512
asked this question in
Question
Replies: 1 comment 6 replies
-
If you have an |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey guys, maybe I'm doing something wrong, but been banging my head trying to get a very basic script together following the docs as closely as possible.
I've set up a private key in my
.env
file asPRIVATE_KEY
. I'm importing that into my script.I've got a local Arbitrum stack running on my machine which has both an L1 and and L2 at
localhost:8545
andlocalhost:8547
respectively.I'm able to read contracts just fine using viem, but I can't get my code to compile to make a
writeContract
orsimulateContract
call to work.The following is my code:
As mentioned, the readContract call works fine. Just writes are giving me trouble. The private key is defined, and when logging out the account to the console, it looks like this:
Beta Was this translation helpful? Give feedback.
All reactions