Table of contents

Rolling out alpha support for viem and wagmi v1

https://www.dynamic.xyz/blog/viem-and-wagmi-v1
Rolling out alpha support for viem and wagmi v1
Rolling out alpha support for viem and wagmi v1
Download

If you’re an avid reader of our blog posts (and let’s face it - who isn’t 😉), you’ll know that we have an affinity for an up and coming project called viem, created by the wagmi team, which aims to provide an alternative to Ethers.js and web3.js.

And so today, we’re thrilled to announce that we’re rolling out support for viem! Starting today, you’ll be able to easily choose between using ethers and viem as the underlying JS libraries for Dynamic, easily swapping one for the other.

You’ll also still be able to leverage wagmi with the Dynamic-wagmi connector (you’ll have one for viem and one for ethers). In all cases, the core functionality of Dynamic stays the same, with the flexibility to use whatever tool is best for your use-case.

Getting started with viem only takes a minute

Step 1: npm install viem
npm install @dynamic-labs/sdk-react@viem

Step 2: configure the SDK
import { DynamicContextProvider, DynamicWidget} from '@dynamic-labs/sdk-react';

const App = () => (
  <DynamicContextProvider
     settings={{
       environmentId: 'Enter your Environment ID here'
    }}>
    <DynamicWidget />
  </DynamicContextProvider>
);

export default App;

As the field matures and many wonderful solutions like viem enter the space, we’ll work to support those so that you get a dynamic (pun intended) solution that works for you.

You can read more about how to use dynamic with viem here.

Curious about how viem, ethers and web3.js work? here are some articles worth checking out:

Lastly, if you have any questions or want to discuss viem further, feel free to join our Slack Community Channel!

Share this article

https://www.dynamic.xyz/blog/viem-and-wagmi-v1
Itai Turbahn

Itai is the co-founder and CEO of Dynamic. Before Dynamic, Itai spent 7 years in product management leadership positions, and was previously a consultant at the Boston Consulting Group. Itai holds an MBA from Harvard Business School and B.Sc degrees in EECS and Economics from MIT.

Related articles

Dynamic takes minutes to set up

(Oh, and we also offer a free multi-chain wallet adaptor)

Get started