You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Hardhat 3 version of hardhat-viem should have a publicClient property in addition to the getPublicClient getter. We didn't do that in v2 because viem clients are built asynchronously, and the HRE needed to be built synchronously. But in v3, the viem object is returned by the async network.connect method, so we can create and add a client.
The reason this is valuable is that it makes less verbose the very verbose viem usage:
There's probably other things we could look into here. For example, maybe we could have a viem.client property, which only has public actions if there are no configured wallets, has test actions when connecting to a Hardhat network, etc. But I think we should keep it simple. The publicClient property is obvious and unlikely to be a bad call, and we can add other things later in a backwards compatible way.
The text was updated successfully, but these errors were encountered:
The Hardhat 3 version of
hardhat-viem
should have apublicClient
property in addition to thegetPublicClient
getter. We didn't do that in v2 because viem clients are built asynchronously, and the HRE needed to be built synchronously. But in v3, the viem object is returned by the async network.connect method, so we can create and add a client.The reason this is valuable is that it makes less verbose the very verbose viem usage:
There's probably other things we could look into here. For example, maybe we could have a
viem.client
property, which only has public actions if there are no configured wallets, has test actions when connecting to a Hardhat network, etc. But I think we should keep it simple. ThepublicClient
property is obvious and unlikely to be a bad call, and we can add other things later in a backwards compatible way.The text was updated successfully, but these errors were encountered: