不求谌解

不求谌解

💻 Web Dev / Creative 💗 ⚽ 🎧 🏓
twitter
github
jike
email

Recording the process of upgrading wagmi

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
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.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.