Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Files.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Commit your files in this repository.
Commit your files in this repository.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Voting_System_Ethereum_Blockchain-master
#### How to setup

1. Git clone this repository
2. Download Ganache
3. Setup a Ganache workspace, Port = 7545 & Network ID = 5777
4. `npm install` in the cloned repository's root
5. `truffle migrate --reset` to deploy the contract to Ganache
6. `truffle console` to interact with the blockchain
7. `npx lite-server` to start the Application
5 changes: 5 additions & 0 deletions bs-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"server": {
"baseDir": ["./src", "./build/contracts"]
}
}
2,985 changes: 2,985 additions & 0 deletions build/contracts/Election.json

Large diffs are not rendered by default.

905 changes: 905 additions & 0 deletions build/contracts/Migrations.json

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pragma solidity >=0.4.21 <0.7.0;

contract Migrations {
address public owner;
uint public last_completed_migration;

constructor() public {
owner = msg.sender;
}

modifier restricted() {
if (msg.sender == owner) _;
}

function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}
5 changes: 5 additions & 0 deletions migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const Migrations = artifacts.require("Migrations");

module.exports = function(deployer) {
deployer.deploy(Migrations);
};
Loading