This is a sample app that demonstrates Solidity features with Celo. It allows users to rate their favorite politicians on-chain. Only the owner can add new politicians.
- Install the CeloExtensionWallet from the Google Chrome Store.
- Create a wallet.
- Go to https://celo.org/developers/faucet and get tokens for the Alfajores testnet. Make sure your balance shows the tokens.
- Switch to the Alfajores testnet in the CeloExtensionWallet.
- If using the provided live demo, just choose your favorite politician, pick a rating, and click "Vote". Next, you should approve the contract to access your funds, then make the payment (1 cUSD required per vote).
- If you're setting up your own version of the dApp, you can also add new politicians from the owner address.
- The project uses the jQuery star-rating-svg.js plugin as well as the OpenZeppelin Ownable contract.
npm install
npm run dev
npm run build
This project uses a deprecated version of webpack and subsequent modules.
- Check the owner address by interrogating the contract rather than have the address hard-coded.
- Add separate, more complex structures for political parties, add user reviews, etc.
- Improve the UI.
- ...