View the demo app.
This is a template for building a robust frontend application designed to interact with Ethereum-based smart contracts.
It uses the following features:
- Next 13
- React 18
- TypeScript
- Material UI
- Emotion
- Viem
- Wagmi
- WalletConnect v3
- Infura & Alchemy RPC Providers
- ESLint
- Prettier
- Commitlint
- Yarn
- Husky Git Hooks
This template relies on WalletConnect and an RPC provider to connect to Ethereum-compatible networks. Therefore, you must perform the following steps prior to running the app locally:
- WalletConnect Project ID - Set up a new WalletConnect Project to obtain the Project ID. Add it to
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
in the.env
file. - Infura RPC API Key - For a simple setup, create a new Infura API Key, and add it to
NEXT_PUBLIC_INFURA_RPC_KEY
in the.env
file. - Alternate: Alchemy RPC API Key - If you prefer to use Alchemy as an RPC provider instead of Infura, set up a new Alchemy API Key for the network that you wish to use, and add it to
NEXT_PUBLIC_ALCHEMY_RPC_KEY
in the.env
file.
- Install dependencies:
yarn install
- Setup environment variables:
cp .env .env.local
- Update values with appropriate keys
- Or, comment them out in
src/lib/wagmiConfig.ts
- Run development server:
yarn dev
- Open browser:
http://localhost:3000
- It will hot reload on each file save
- Follow the steps this README to add contract ABIs and configurations for deployment addresses
- Start editing:
src/app/page.tsx
to update the UI (visit the Dashboard page to mint an example NFT)