Wallet Setup (RainbowKit + wagmi)
RainbowKit adds wallet connection on top of wagmi and viem. We’ll add the providers and a Connect button.Install
The Web3 provider
Create one component that wires the three providers in order (WagmiProvider → QueryClientProvider → RainbowKitProvider) and syncs RainbowKit’s
modal theme with the app’s light/dark mode.
src/components/web3-provider.tsx
ThemeProvider, so it can read the theme):
src/main.tsx
The Connect button
Render RainbowKit’sConnectButton anywhere — e.g. above the main card:
src/App.tsx
getDefaultConfig also auto-detects injected wallets (MetaMask) via EIP-6963, so
they work even without a WalletConnect projectId (only WalletConnect/mobile
wallets need it).
Make sure MetaMask is on the Sepolia network. Need test ETH? Use a Sepolia
faucet (e.g. Google Cloud Web3 faucet or Alchemy).
Next: Smart Contracts
Deploy the RupiahToken + Vault contracts to Sepolia.
