-
Live Project Current Deployment (Validity 1 year) - https://voting-decentralized-app235.netlify.app/
-
Live Project Deployment 1 - https://voting-dapp235.netlify.app/
-
Project Files - https://github.com/Pragna235/Decentralized-Voting-Application/tree/master
Solidity
- To write a smart contract- Any ethereum blockchain based testnet (in this project,
Sepolia
testnet is used) - Application runs in
React.js
and it communicates with the blockchain throughhardhat ether.js
framework Metamask
extension to connect to the blockchain addresses to communicate with the smart contract- Application runs on the
client-side
of the browser
https://github.com/Pragna235/Decentralized-Voting-Application/tree/main (Files)
-
Create a new folder
Voting dApp
and add apackage.json
with the required dependencies -
npm install
-
Create a
.env
file and add yourAPI_KEY
andPRIVATE_KEY
variables -
npx hardhat
-
Add your
Voting.sol
smart contract to thecontract
folder -
Make changes in the
deploy.js
file -
npx hardhat compile
-
Make changes in the
hardhat.config.js
-
npx hardhat run --network sepolia scripts/deploy.js
-
Paste the obtained smart contract address in
CONTRACT_ADDRESS
variable of the.env
file -
Go to
cmd
-
npx create-react-app react-voting-app .
-
Navigate to the React app folder
-
cd react-voting-app
-
Initiate the VSCode of this folder
-
code .
-
Make changes in the
App.js
by removing the header tag and the logo -
Make changes in the code of the folders as required
-
npm install [email protected]
-
Make all necessary changes in the code and run 'em
- Navigate to the react-app folder
-
npm run build
- Upload the
build
folder manually onnetlify.com
- Change the domain name and voila.....