Skip to main content
The package provides a utility function for fetching the supported chains dynamically and configuring the SDK. Below is an example of how you would set that up:
The above example demonstrates how to setup dynamic chains in a react application. At the start of your application you would basically configure the dynamic chains in the SDK by using the configureDynamicChains method. Then with the new chains in the promise you would use the viemChain property to create the wagmi config (refer to the wagmi docs for this). Finally take the resulting chains and configure the RainbowKitProvider. Although in this example we used RainbowKit + Wagmi, you’re free to choose whatever libraries you’d like to connect a users wallet. You can call this method as often as you like to refresh the SDK’s chains.