This template provides a minimal setup to get Foundry woriking with Vite and React. It includes:
- React working in Vite with HMR and some ESLint rules.
- A basic setup for TypeScript.
- Chackra UI for styling.
- WAGMI and Rainbow Kit libraries for interacting with the wallet.
- Bun - A fast all-in-one Javascript/Typescript runtime.
- Foundry - Modular toolkit for Ethereum application development.
- Clone this repository and
cd
into it - Install dependencies with
bun install
- Start the development chain and hot-reload frontend with
bun dev
- Optional:
bun send-eth <your-address>
to send 1 ETH to your account in the development chain - Open
http://localhost:3000
in your browser and connect to the wallet
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list