Wagmi setup
@yo-protocol/react requires a wagmi config with the chains you want to support.
Basic Setup
// wagmi.ts
import { http, createConfig } from 'wagmi'
import { base, mainnet } from 'wagmi/chains'
import { injected, walletConnect } from 'wagmi/connectors'
export const config = createConfig({
chains: [base, mainnet],
connectors: [
injected(),
walletConnect({ projectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID! }),
],
transports: {
[base.id]: http(),
[mainnet.id]: http(),
},
})Provider Setup
Chain Support
@yield currently supports:
Ethereum Mainnet (chain ID
1)Base (chain ID
8453)
Your wagmi config should include at least one of these chains. The useYoClient hook will return null if the user is connected to an unsupported chain.