My Web3 full stack Solicity smart contract & blockchain development journey along with
» this course from Patrick Collins
- Clone the repo
git clone https://github.com/levblanc/web3-lottery-nextjs.git
-
Install dependencies with
yarn install
ornpm install
-
Deploy contracts in web3-lottery-hardhat
# under web3-lottery-hardhat project directory
# deploy locally
yarn deploy
# deploy to goerli testnet
yarn deploy:goerli
- Update contract address in
constants/contractAddresses.json
{
"31337": ["localhost_contract_address"],
"5": ["goerli_contract_address"],
}
Run the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
- NextJS setup
- Manual Header to understand how
ConnectButton
works - React Hooks (
useEffect
,useState
) - react-moralis hooks & functions (
useMoralis
&isWeb3Enabled
,useWeb3Contract
&runContractFunction
) - Automatic Constant Value UI Updater
- web3uikit for easier UI implementation
- Calling Functions in NextJS
- Reading & Displaying Contract Data
- Tailwind & Styling