4

The EtherScan.io website provides a page for The DAO proposals.

enter image description here

This page does not provide the current voting status. How can I view The DAO proposals including the current voting status?

4
2

EDIT 03/06/2016 - Updated list of sites providing the list of The DAO proposals

You can view the list of The DAO proposals with the current voting status at:



Getting The Proposal Data Programmatically

Here is a Unix script theDAOProposals that will display the current list of The DAO proposals, including the current voting status.

The shell script works in the Linux and Mac environments where you are already running a geth instance that synch with the Ethereum blockchain.

You can customise the geth attach command to connect via IPC or RPC (eg: geth attach rpc:http://192.168.1.52:8545).

Create the file $HOME/bin/theDAOProposals with the following content:

#!/bin/sh

geth attach << EOF

function listProposals(startProposal, endProposal) {
  var theDAOAddress="0xbb9bc244d798123fde783fcc1c72d3bb8c189413";
  var theDAOABI =[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"description","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"open","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"proposalHash","type":"bytes32"},{"name":"proposalDeposit","type":"uint256"},{"name":"newCurator","type":"bool"},{"name":"yea","type":"uint256"},{"name":"nay","type":"uint256"},{"name":"creator","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"minTokensToCreate","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"rewardAccount","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"daoCreator","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"divisor","outputs":[{"name":"divisor","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"extraBalance","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"},{"name":"_transactionData","type":"bytes"}],"name":"executeProposal","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"unblockMe","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalRewardToken","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"actualBalance","outputs":[{"name":"_actualBalance","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"closingTime","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"allowedRecipients","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferWithoutReward","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_description","type":"string"},{"name":"_transactionData","type":"bytes"},{"name":"_debatingPeriod","type":"uint256"},{"name":"_newCurator","type":"bool"}],"name":"newProposal","outputs":[{"name":"_proposalID","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"DAOpaidOut","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"minQuorumDivisor","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_newContract","type":"address"}],"name":"newContract","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_recipient","type":"address"},{"name":"_allowed","type":"bool"}],"name":"changeAllowedRecipients","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"halveMinQuorum","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"paidOut","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"},{"name":"_newCurator","type":"address"}],"name":"splitDAO","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"DAOrewardAccount","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[],"name":"proposalDeposit","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"numberOfProposals","outputs":[{"name":"_numberOfProposals","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"lastTimeMinQuorumMet","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_toMembers","type":"bool"}],"name":"retrieveDAOReward","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"receiveEther","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"isFueled","outputs":[{"name":"","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_tokenHolder","type":"address"}],"name":"createTokenProxy","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"_proposalID","type":"uint256"}],"name":"getNewDAOAddress","outputs":[{"name":"_newDAO","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"},{"name":"_supportsProposal","type":"bool"}],"name":"vote","outputs":[{"name":"_voteID","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[],"name":"getMyReward","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"rewardToken","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFromWithoutReward","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalDeposit","type":"uint256"}],"name":"changeProposalDeposit","outputs":[],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"blocked","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"curator","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"_proposalID","type":"uint256"},{"name":"_recipient","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_transactionData","type":"bytes"}],"name":"checkProposalCode","outputs":[{"name":"_codeChecksOut","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"privateCreation","outputs":[{"name":"","type":"address"}],"type":"function"},{"inputs":[{"name":"_curator","type":"address"},{"name":"_daoCreator","type":"address"},{"name":"_proposalDeposit","type":"uint256"},{"name":"_minTokensToCreate","type":"uint256"},{"name":"_closingTime","type":"uint256"},{"name":"_privateCreation","type":"address"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"value","type":"uint256"}],"name":"FuelingToDate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"CreatedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"recipient","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"newCurator","type":"bool"},{"indexed":false,"name":"description","type":"string"}],"name":"ProposalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"position","type":"bool"},{"indexed":true,"name":"voter","type":"address"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"proposalID","type":"uint256"},{"indexed":false,"name":"result","type":"bool"},{"indexed":false,"name":"quorum","type":"uint256"}],"name":"ProposalTallied","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_newCurator","type":"address"}],"name":"NewCurator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_recipient","type":"address"},{"indexed":false,"name":"_allowed","type":"bool"}],"name":"AllowedRecipientChanged","type":"event"}];
  var theDAO = web3.eth.contract(theDAOABI).at(theDAOAddress);
  var numberOfProposals = theDAO.numberOfProposals();
  console.log("Number of proposals: " + numberOfProposals);

  if (startProposal == null) {
    startProposal = 1;
  }
  if (endProposal == null) {
    endProposal = numberOfProposals;
  }

  var totalSupply = theDAO.totalSupply();

  for (i = startProposal; i <= endProposal; i++) {
    var proposal = theDAO.proposals(i);  
    var recipient = proposal[0];  
    var amount = proposal[1];
    var description = proposal[2];
    var votingDeadline = proposal[3];
    var open = proposal[4];
    var proposalPassed = proposal[5];
    var yea = proposal[9] / 1e16;
    var yeaPercentOfTotalSupply = yea / totalSupply * 100;
    var nay = proposal[10] / 1e16;
    var nayPercentOfTotalSupply = nay / totalSupply * 100;
    var yeaAndNay = yea + nay;
    var yeaPercent;
    var nayPercent;
    if (yeaAndNay > 0) {
       yeaPercent = yea / yeaAndNay * 100;
       nayPercent = nay / yeaAndNay * 100;
    } else {
       yeaPercent = 0;
       nayPercent = 0;
    }
    var newCurator = proposal[8];
    var creator = proposal[11];
    console.log("Proposal_ID: " + i  + "\n" +
      "  Created by     : " + creator + "\n" +
      "  Recipient      : " + recipient + "\n" +
      "  Amount         : " + amount + "\n" +
      "  New Curator    : " + newCurator + "\n" +
      "  Description    : " + description + "\n" +
      "  Voting Deadline: " + votingDeadline + " (" + new Date(votingDeadline * 1000) + ")\n" +
      "  Open           : " + open + "\n" +
      "  Proposal Passed: " + proposalPassed + "\n" +
      "  Yeas           : " + yea.toFixed(4) + " " + yeaPercent.toFixed(2) + "% " + yeaPercentOfTotalSupply.toFixed(20) + "% supply\n" + 
      "  Nays           : " + nay.toFixed(4) + " " + nayPercent.toFixed(2) + "% " + nayPercentOfTotalSupply.toFixed(20) + "% supply\n");
  }

  // console.log("Total supply: " + totalSupply);
}

listProposals();

exit;

EOF

Set the executable bit for this file using the command:

chmod 700 $HOME/bin/theDAOProposals

Run the script using the command theDAOProposals or $HOME/bin/theDAOProposals to produce the following type of output:

Number of proposals: 7
Proposal_ID: 1
  Created by     : 0x13680fa2a60fd551894199f009cca20fb63a3e31
  Recipient      : 0x13680fa2a60fd551894199f009cca20fb63a3e31
  Amount         : 0
  New Curator    : true
  Description    : 
  Voting Deadline: 1465049035 (Sun, 05 Jun 2016 00:03:55 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 238466.8820 42.10% 0.00000000000000000203% supply
  Nays           : 327969.5416 57.90% 0.00000000000000000280% supply

Proposal_ID: 2
  Created by     : 0x5a8e70f2d75c1468db4a2241fdd70e5a84f028b8
  Recipient      : 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
  Amount         : 0
  New Curator    : false
  Description    : Do you believe in god?
  Voting Deadline: 1465665517 (Sun, 12 Jun 2016 03:18:37 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 322383.0549 31.54% 0.00000000000000000275% supply
  Nays           : 699619.3580 68.46% 0.00000000000000000597% supply

Proposal_ID: 3
  Created by     : 0x66756ae3ebe94cd4e5e95846fceefcd4f69f8a8d
  Recipient      : 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
  Amount         : 0
  New Curator    : false
  Description    : Should curators only whitelist projects that are related to DAO security for the next 4 weeks?
  Voting Deadline: 1465668580 (Sun, 12 Jun 2016 04:09:40 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 250243.0642 25.82% 0.00000000000000000213% supply
  Nays           : 718921.3656 74.18% 0.00000000000000000613% supply

Proposal_ID: 4
  Created by     : 0x3d5507b53d1613d8491a606ecf5c9268301095dd
  Recipient      : 0x3d5507b53d1613d8491a606ecf5c9268301095dd
  Amount         : 0
  New Curator    : true
  Description    : split
  Voting Deadline: 1465066744 (Sun, 05 Jun 2016 04:59:04 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 79.8518 0.02% 0.00000000000000000000% supply
  Nays           : 331805.6561 99.98% 0.00000000000000000283% supply

Proposal_ID: 5
  Created by     : 0xd68ba7734753e2ee54103116323aba2d94c78dc5
  Recipient      : 0xbb9bc244d798123fde783fcc1c72d3bb8c189413
  Amount         : 0
  New Curator    : false
  Description    : Moratorium on proposals until the DAO contract is upgraded (via newContract proposal), fixing most serious issues with voting and splitting. Funds can be moved to the new contract gradually, via multiple proposals.
  Voting Deadline: 1465673494 (Sun, 12 Jun 2016 05:31:34 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 2926509.3855 90.20% 0.00000000000000002495% supply
  Nays           : 317945.4841 9.80% 0.00000000000000000271% supply

Proposal_ID: 6
  Created by     : 0xbeb0b93c01297146782a5581370489a36b24deca
  Recipient      : 0xbeb0b93c01297146782a5581370489a36b24deca
  Amount         : 0
  New Curator    : true
  Description    : Original intent, non-interventionist curator.  Split to restore nonjudgmental role of curator.
  Voting Deadline: 1465702912 (Sun, 12 Jun 2016 13:41:52 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 1.9900 0.13% 0.00000000000000000000% supply
  Nays           : 1520.3226 99.87% 0.00000000000000000001% supply

Proposal_ID: 7
  Created by     : 0xe82d5b10ad98d34df448b07a5a62c1affbef758f
  Recipient      : 0xe82d5b10ad98d34df448b07a5a62c1affbef758f
  Amount         : 0
  New Curator    : true
  Description    : Leave me alone
  Voting Deadline: 1465104577 (Sun, 05 Jun 2016 15:29:37 AEST)
  Open           : true
  Proposal Passed: false
  Yeas           : 98900.0000 100.00% 0.00000000000000000084% supply
  Nays           : 0.0000 0.00% 0.00000000000000000000% supply

You can customise the starting and ending proposals listed by setting these numbers in the listProposals(); statement in the script, for example:

listProposals(5);     // to view the 5 proposal onwards
listProposals(3, 4);  // to view the 3rd and 4th proposal

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.