How to get EIP1193 Provider from privateKeyToAccount
#1988
Unanswered
technophile-04
asked this question in
Question
Replies: 1 comment 1 reply
-
The https://github.com/wevm/wagmi/blob/main/packages/core/src/connectors/mock.ts |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are trying to implement Connector for wagmi v2, where we need to create
getProvider
. We wanted the Connector to be linked with account created fromprivateKeyToAccount
.Here is the naive example :
But the problem with above approach is since we are using
http
transport its always getting connected to Hardhat's 0th account because on local network I thinketh_account
to http://127.0.0.1:8545/ gives hardhat's 0th account.how do I tell
createWalletClient
to use passed in account for all the methods ?Beta Was this translation helpful? Give feedback.
All reactions