Coder Social home page Coder Social logo

solidity-proposal-vote-db's Introduction

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";

solidity-proposal-vote-db's People

Contributors

danfinlay avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.