-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Upgrade hardhat-viem to support viem@2 #4875
Conversation
🦋 Changeset detectedLatest commit: bdf5520 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3774cac
to
192edd0
Compare
I think our own await hre.viem.getContract("Foo", "0x1234567890123456789012345678901234567890", {
walletClient: secondWalletClient
}; it should become: await hre.viem.getContract("Foo", "0x1234567890123456789012345678901234567890", {
client: {
wallet: secondWalletClient
}
} Viem also accepts this: await hre.viem.getContract("Foo", "0x1234567890123456789012345678901234567890", {
client: extendedClient
} But I tried to do it, and making the type-inference work was not straightforward. So I think we could start by only supporting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
6806b80
to
24ea985
Compare
This PR represents the first part of adding support for
viem@2
. A subsequent PR will updatehardhat-toolbox-viem
and the dependencies inpackages/hardhat-core/src/internal/cli/project-creation.ts
.Link to second PR.