BaseVote is an education-themed Web3 voting application designed to facilitate secure, transparent, and tamper-proof voting for school and college elections. Leveraging blockchain technology, BaseVote ensures that every vote is immutably recorded, fostering trust in student governance and promoting democratic participation.
- Secure Voting: All votes are recorded on the blockchain, ensuring transparency and security.
- Immutable Records: Blockchain technology guarantees that votes cannot be tampered with or altered.
- Educational Focus: BaseVote teaches students the importance of voting and civic engagement in a modern, digital world.
Before you begin, ensure you have the following installed:
-
Clone the Repository
Clone this repository to your local machine:
git clone https://github.com/your-username/basevote.git cd basevote
-
Install Packages
Install the necessary packages using npm:
npm install
-
Compile and Deploy the Smart Contract
Compile the smart contract using Hardhat:
npx hardhat compile
Deploy the contract to your chosen blockchain network:
npx hardhat run --network base_sepolia scripts/deploy.js
After deployment, copy the contract address displayed in the terminal. The contract Address we used for testing here is : 0x820f0BE3f9Da56e4d53E9606bA96b7f3797Cc8Dd https://sepolia.basescan.org/address/0x820f0BE3f9Da56e4d53E9606bA96b7f3797Cc8Dd
-
Update Contract Address in Constants
Open the file where your contract address is stored (usually in a
constants
file, such assrc/constants.js
, and update it with the new contract address:export const CONTRACT_ADDRESS = 'your_new_contract_address';
-
Configure Environment Variables
Create a
.env
file in the root directory and add your private key:PRIVATE_KEY=your_private_key
- PRIVATE_KEY: Your wallet's private key (ensure this is kept secure).
Optionally, you can configure a different blockchain endpoint by modifying the
hardhat.config.js
file. -
Start the Application
With the contract address updated and environment variables set, start the application:
npm start
The application will run locally, allowing you to interact with the BaseVote Dapp.
After starting the application, you can access the BaseVote Dapp through your browser. Follow the on-screen instructions to participate in or manage elections.
Contributions are welcome! If you'd like to contribute to BaseVote, please fork the repository and submit a pull request. For major changes, please open an issue to discuss your ideas.
This project is licensed under the MIT License. See the LICENSE file for details.
- Hardhat: For providing a robust development environment for Ethereum.
- Node.js: For making server-side JavaScript a reality.
- Blockchain Community: For the ongoing development of decentralized technologies.
This README provides clear instructions on how to update the contract address in the project's constants file and guides users through the setup process.# BaseVote