Skip to content

Instantly share code, notes, and snippets.

@subhanshu-shukla
subhanshu-shukla / Voting.sol
Created July 4, 2019 18:39
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.18+commit.9cf6e910.js&optimize=false&gist=
pragma solidity ^0.4.18;
contract Voting
{
event AddedCandidate(uint candidateID);
address owner;
function Voting()
public
@subhanshu-shukla
subhanshu-shukla / ballot.sol
Created June 23, 2019 06:28
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.6.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {