This project is an unfinished smart contract for Ethereum that is used in trainings.
The project provides a stub for a smart contract that implements a simple liquid democracy on the blockchain. The projects supplies tests for the stub that all fail initially. During the training we want to actually implement the contract so that the tests all succeed.
To use the project, clone the repository:
$ git clone https://github.com/chrisdotn/ethdemocracy.gitChange into the directory and do a
$ npm installTo develop with the project make sure to have testrpc running.
After all packages have installed you can use the truffle commands to interact with the project:
truffle compilewill compile smart contracts that have been changed since the last compile.truffle compile --allwill compile all smart contracts.truffle migratewill compile smart contracts and deploy them to the default network.truffle migrate --network stagingwill compile and deploy to network staging.truffle migrate --resetwill compile and deploy all smart contract even if they haven't changed.truffle testwill run the tests in directory$(PROJECT)/test.truffle test ./path/to/test/file.solwill run the test in the specified file.truffle consolewill open aweb3-enabled Javascript console for manual interaction with the contracts.
To interact with the frontend use:
npm run buildbuild the frontend using webpacknpm run devbuild the frontend using webpack and serve it tolocalhost:8080. This command will monitor changes to the frontend and redeploy if needed.