Recently, there have been major updates for wagmi, viem, and rainbowkit. It's time to upgrade the relevant dependencies in the previous projects (wagmi v0.5.x and ether.js) all at once.
Target Versions#
wagmi v1.2.0 |
Migration Process#
The official migration guide for wagmi is excellent. For me, the main focus is on the following changes:
- provider => publicClient()
- signer => walletClient()
- useProvider => usePublicClient()
- useClient => useConfig()
- BigNumber => BigInt
Of course, part of the work is migrating from ether.js to viem in the previous project. Fortunately, the official documentation of viem has provided migration examples.
Overall, the wagmi upgrade process this time didn't encounter any major issues. Following the official migration guide should be sufficient.