Skip to content

Instantly share code, notes, and snippets.

@zastrin
Last active March 9, 2018 03:34
Show Gist options
  • Save zastrin/6edda0b1a9470373e7761845c88902bd to your computer and use it in GitHub Desktop.
Save zastrin/6edda0b1a9470373e7761845c88902bd to your computer and use it in GitHub Desktop.
Instructions
mkdir voting_dapp
cd voting_dapp
truffle unbox webpack
npm install
rm contracts/MetaCoin.sol
rm contracts/ConvertLib.sol
create contracts/Voting.sol and copy your contract code
open truffle.js and change port to 8545
Copy the following into migrations/2_deploy_contracts.js
var Voting = artifacts.require("./Voting.sol");
module.exports = function(deployer) {
deployer.deploy(Voting, ['Gayahtri', 'Sindu', 'Trishul']);
};
In a new windows, start: ganache-cli
Back in your project folder:
Run: truffle migrate
If successfully deployed:
Run: truffle console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment