A Repository for the project of my Thesis, which is a blockchain based application to prevent wine counterfeiting using smart contracts
- Solidity for smart contract development
- Hardhat for dAPP development
- ChaiJS for unit testing
- Ethereum Wallet --> Metamask
- Performant Node Package Manager - PNPM
- SvelteKit - Typescript
- Blockchain libraries
- Ethers-svelte
- Ethers.js
- Shadcn-svelte - Tailwinds
Frontend:
- Node.js --> npm/pnpm
- Metamask Browser extension
Backend
- Yarn package manager
-
Install dependencies
yarn install -
Simulate local blockchain using the hardhat network
yarn hardhat node -
Compile smart contracts
yarn hardhat compile -
Deploy compiled smart contract to local hardhat blockchain
yarn hardhat run scripts/deploy.js --network localhost
-
Install Metamask browser extension, register an account
-
Add hardhat network as custom network
- Network name: Hardhat
- RPC URL: http://127.0.0.1:8545
- Chain ID: 31337
- Currency symbol: HardhatETH
-
Import a Metamask account using a private key from hardhat node
Add account or hardware wallet --> Import Account --> Enter private key -
Change the network to Hardhat, change to the added account
Every time you restart the local blockchain, you need to clear "cache" in metamask
Settings --> Advanced --> Clear activity tab data
-
Install dependencies
pnpm install or npm install -
Run local development server
pnpm run dev
Open http://localhost:5173/ and use the application