Skip to main content

Scaffold

This scaffolds the full monorepo with Dynamic as the wallet provider. For just the frontend, add --template frontend.

Environment Setup

Get your Environment ID from app.dynamic.xyz and set it in frontend/.env:
frontend/.env

Provider Setup

Dynamic wraps your app with DynamicContextProvider + a wagmi connector (DynamicWagmiConnector). The EVM network it shows is built from activeChain in lib/network.ts, which follows NEXT_PUBLIC_NETWORK — no per-provider chain edits needed.
components/Providers.tsx
Provider hierarchy: ThemeProviderDynamicContextProviderWagmiProviderQueryClientProviderDynamicWagmiConnector

Inco SDK Integration

The Inco SDK works with the walletClient provided by wagmi (which Dynamic supplies via DynamicWagmiConnector). The network-aware client comes from lib/network.ts:
hooks/useConfLottery.ts

Dependencies