Warning
This starter kit is running on Next 15+, which presumably not working well with Web3 protocols.
Legacy branch of nextjs-14
will be released soon.
Important
Install Bun
before proceeding.
curl -fsSL https://bun.sh/install | bash
-
bun install
to install all necessary dependencies. -
Start the development server for
Next.js
:bun run dev
-
In a new terminal, compile and test the smart contracts:
bun run test
.
├── contracts # Solidity smart contracts
│ └── SampleContract.sol
├── next-app
│ ├── public # Public assets
│ └── src # Next.js source
├── scripts
│ └── contracts.ts # List of contracts to deploy
└── test # Contract tests using Hardhat
└── SampleContractTest.ts
-
Make a copy of
.env.example
and rename it to.env
. -
Fill in the necessary environment variables.
For local deployment, not all fields are required.
-
Specify the contracts to deploy in
scripts/contracts.ts
.
Warning
Ensure your .env
file is configured correctly. Do not commit sensitive information.
bun run deploy
to deploy on testnet.
-
Start a local node with
bun run local
. -
bun run deploy:local
to deploy locally.