This project demonstrates how to create a private Ethereum blockchain using Hardhat, deploy a smart contract to it, and interact via Remix and MetaMask.
- Hardhat – local Ethereum network
- Solidity – smart contract language
- Remix – web IDE for testing
- MetaMask – Ethereum wallet
- Node.js + npm
-
Installed Hardhat and initialized the project:
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox npx hardhat
-
compiled simple smart contract
HelloWorld.sol -
Ran the local Hardhat blockchain:
npx hardhat node
-
Deployed the contract locally:
npx hardhat run scripts/deploy.js --network localhost
-
Connected Remix to
http://127.0.0.1:8545via Web3 Provider and interacted with the contract.
- Clone this repo
- Install dependencies:
npm install - Compile contracts:
npx hardhat compile - Start local blockchain:
npx hardhat node - Deploy:
npx hardhat run scripts/deploy.js --network localhost
Rohit Mishra