truffle unbox pet-shop
touch contracts/Election.sol
touch migrations/2_deploy_contracts.js
truffle migrate
truffle console
Election.deployed().then(function(instance) { app = instance })
> app.address
> app.candidate()
truffle migrate --reset
app.candidatesCount()
app.candidates(1)
app.candidates(2)
touch test/election.js
truffle test
- Replace src/index.html
- Replace src/js/app.js
truffle migrate --reset
npm run dev
In Metamask use "connect to RPC" and use http://localhost:7545 as address
- Change Election.sol
truffle migrate --reset
truffle test
- Change src/index.html
npm run dev
- Click on vote
- Change Election.sol
truffle migrate --reset
truffle test