A project to learn more about the Web3 development ecosystem. The project has two packages: Hardhat & NextJS.
Hardhat
The Hardhat project contains a Voting Contract sample which allows the Users to vote for an Option. It uses Chai to test the Contract, ESLint to lint the TS code, Solhint to lint Solidity code and Biome to format the code.
NextJS
The NextJS project contains the code to unlock the Ganache generated accounts, send a transaction to another account and deploy a Contract. It uses Jest and Playwright to test the web page, ESLint to lint the TS code and Biome to format the code.
Install pre-commit:
$ python -m venv venv
$ venv/bib/activate
$ pip install pre-commit
$ pre-commit install
Use the Hardhat package directory:
$ cd package/hardhat
$ bun install
$ bun run hardhat test
$ bun run hardhat compile
Use the Hardhat package directory:
$ cd package/nextjs
$ bun install
Run Ganache + Server:
$ docker compose up ganache
$ bun run dev
# Or
$ docker compose up --build
Unit
$ docker compose up ganache
$ bun run jest
End-to-End
$ bun run playwright install
$ docker compose up --build
$ bun run playwright test