truffle compile
After running, contract information — including ABI — will be available at the build/contracts/
directory.
Start blockchain, I use ganache-cli
ganache-cli
Clone repository
git clone https://github.com/rodrigorsdev/r2.eth.election.git
Install dependencies
npm install
Deploy ElectionFactory contract
truffle migrate
Start dapp
npm run dev
truffle test
To run tests within a specific file:
truffle test <file_path>
Create .env file on root with:
MNENOMIC = // Your metamask's recovery words
INFURA_API_KEY = // Your Infura API Key after its registration
Run migrate command
truffle migrate --network <network_name>
Contract address and transaction ID will be shown on screen.