Viem Or Ethers
Using Viem
V0.19 of the SDK and above ships with Viem by default as it is much lighter than Ethers and is generally more performant.
We have also made viem a peerDependency to avoid bundling it multiple times, as other other packages such as wagmi also need it.
For the above reason, viem will be installed as a peerDependency when you install the SDK. If you are using yarn, you will need to install viem manually:
Using Ethers
If you would still like to use Ethers or do not want to migrate your own application to using Viem, we have provided an extension for accessing Ethers within our Connectors:
If you want to use Ethers V6 instead of V5, it’s as simple as using
@dynamic-labs/ethers-v6
instead of @dynamic-labs/ethers-v5
.
You can then access the signer like so:
Please be aware though that since viem is a peerDependency, viem will still be installed even if you’re using Ethers.
Was this page helpful?