Skip to content

A simple solidity contract for storing proposals & boolean votes on them.

Notifications You must be signed in to change notification settings

danfinlay/Solidity-Proposal-Vote-Db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidity Proposal Vote DB

A simple proposal & vote database contract for Ethereum written in Solidity.

Inherits from DS-Auth and DS-Base.

Should be used by a frontend contract that is set as the database's owner, as defined by DS-Auth, allowing for easily updating frontend logic while keeping a consistent vote tally db.

Solidity Interface:

contract ProposalVoteDb is DSAuth, DSBase {

  function addProposal (uint _eip, bytes32 _proposalId);
  function getProposalCount (uint _eip) returns (uint);
  function setVote (bytes32 _proposal, bytes32 _voter, bool _position);
  function getVote (bytes32 _proposal, bytes32 _voter) returns (bool);
  function getVoteTallies (bytes32 _proposalId) returns (uint, uint);

}

JSON ABI

Installation

Install Dapple with npm install dapple -g.

Your project may need to be a Dapple project to install in this manner, but we will add a proper ethpm module eventually.

In your project folder:

dapple init

Run dapple pkg install ipfs://QmNvkFwUn3UikUSXHUGpoJcrf4BQzozD459T2rt1AbZyqY

Import the file into our solidity files:

import "sol-proposal-address-vote-db/proposal-vote-db.sol";

About

A simple solidity contract for storing proposals & boolean votes on them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published