The voting contract source code in Solidity.
- Truffle as a development framework
- Zeppelin for reusable contracts
- Testrpc for local development blockchain
npm install -g truffle
npm install -g ethereumjs-testrpc
npm install
Execute in a separate terminal
testrpc
Note that it gives you a list of accounts with their private key. You may need them.
truffle test ./test/poll.js
truffle compile
The compiled contract (.json) will be created in ./build/contracts
- Development network
truffle migrate --reset
--reset
is usefull to force the contract to deploy
- Live network (need a sync rpc-enabled node)
truffle migrate --reset --network live