We're currently participating in Junction Hackathon 2022, in the Year 2222 challenge and in the Society 2.0 challenge. During this hackathon we created this solution and we're excited to be able to share it with you all.
*: not mandadory
- Clone the repo
git clone https://github.com/mrBymax/junction2022.git
- Install NPM packages
or
yarn install
npm install
- Start Ganache trough GUI/CLI
- Compile and migrate the smart contracts
truffle migrate
- Start the client
or
yarn start
npm start
- Run the tests
truffle test
- Deploy the smart contracts to the blockchain
where
truffle migrate --network <network>
<network>
is one of the networks specified intruffle-config.js
. - Build the application for production
or
yarn build
npm run build
- Run the application in production mode
- Deploy the application to IPFS (not mandadory)
ipfs add -r build
- Connect your Metamask wallet to the application
- Click on
VOTE
button to express your preference
For now, only governors can add candidates to a poll. To do so, you need to edit the addCandidate
function in src/contracts/Election.sol
and then deploy the contract again.