This project was generated with Angular CLI version 15.0.4.
This project serves as a proof-of-concept for a e-voting system based on the Ethereum blockchain. It has very basic function, no security or whatsoever but it shows that the possibility to create a secure, transparent and anonymous e-voting platform, exists.
The project was created as part of a term paper in the module "Blockchain" at the FFHS in the B.Sc. Computer Science program.
- Install Ganache (https://trufflesuite.com/ganache/)
- Create a new Ethereum workspace
- Name: be creative :)
- Hostname: Choose your localhost (127.0.0.1)
- Port: 7545
- Others can be left with default values
- There should be some test accounts now
- Create a new Ethereum workspace
- Install MetaMask extension for your Browser (https://metamask.io)
- click on import wallet
- copy your 12-word MNEMONIC from Ganache and insert them in Metamask
- Choose your password and click "import"
- Open Metamask extension and open the networks-dropdown
- click on "add network" -> manual
- name: choose something
- RPC-URL: http://127.0.0.1:7545
- Chain ID: 1337
- Currency symbol: ETH
- You should now see your first Account with the same amount of ETH as in Ganache.
- git clone this project
- Open Ganache, Go to Settings->Workspace and click on Add Project. Import the truffle-config.js, save and restart the network.
- In ganache, go to Contracts and look if the Vote Contract is deployed. If this is not the case, fist do the Install section and after that, run the commands in the Troubleshoot section.
- Install Node (https://nodejs.org/en/) and npm if not already installed on your computer
This project runs on Node version 16. Use Node Version Manager (https://github.com/nvm-sh/nvm) to change the version
nvm install 16.13.2 && nvm use 16.13.2
cd inside the cloned Repository and run npm install
to install all the dependencies.
Run npm run start --open
to start the application. You find further information on the home-page.
If there are some problems with the contracts, check if the /truffle/build/contracts
folder is not empty.
You can also look into Ganache/Contracts and see if there is a Contract deployed.
Try to recompile the contracts:
cd truffle
truffle compile
truffle migrate --network development
Sometimes there is a problem with installing truffle, if you don't have the truffle commands, just try to install it globally with npm install -g truffle