Skip to content

reuseman/voting-smart-contract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Peer to Peer and Blockchains assignment

A simple Solidity smart contract for elections of a Mayor in the magical land of Valadilène.

Quickstart

Requirements

npm install
npm install truffle -g

Compile the smart contract

truffle compile

Run the tests

truffle test

With a bigger number of voters

  1. Uncomment in the truffle-config.js the following part:

     development: {
         host: "127.0.0.1",     // Localhost (default: none)
         port: 8545,            // Standard Ethereum port (default: none)
         network_id: "*",       // Any network (default: none)
     }
    
  2. Run ganache with a custom number of accounts

     npx ganache-cli -a 500
    
  3. Run tests

     truffle test
    

Releases

No releases published

Packages

No packages published