Buzzkill Hatchlings DApp
This is a Next.js project bootstrapped with create-next-app.
Getting Started
- Install Dependencies
First, install all project dependencies by running:
npm install
yarn install
pnpm install
bun install
- Environment Variables
Create a .env file in the root of the project with the following environment variables (if not already present):
NEXT_PUBLIC_HATCHLINGS_ADDRESS=0x603a23682ae999c5A33BaC9a15216521c9f32Cd8
- Run the Development Server
To run the development server, use:
npm run dev
yarn dev
pnpm dev
bun dev
Once the server is running, open http://localhost:3000 in your browser to see the application.
- Generate WAGMI Hooks
If you've made changes to your smart contract's ABI or need to update the generated hooks, follow these steps:
-
Ensure that your ABI files are up-to-date. Get the latest ABIs from your smart contract repo and paste them into src/app/libs/abi.
-
Run the WAGMI CLI tool to regenerate the hooks:
npx wagmi generate --config wagmi.config.hatchlings.ts
npx wagmi generate --config wagmi.config.hivestaking.ts
This will use the configuration in wagmi.config.ts to generate the hooks for your smart contract(s) and place them in src/hooks/BuzzkillHatchlingsNFT.ts.
- Update ABI Files
To update the ABI files used in the project:
- Navigate to your smart contract repository.
- Copy the ABI JSON file from the build folder (usually after compiling with Hardhat, Foundry, or Truffle).
- Paste the ABI JSON into src/app/libs/abi/.
- Re-run the wagmi-cli tool as described above to regenerate the hooks.