Wie rufe ich die DAO-Vorschläge mit Geth ab?

Ich verwende Node.JS mit Web3-Schnittstelle zu einem Go Geth-Server.

Ich versuche, Vorschläge sowohl in TESTNET als auch in LIVENET zu erhalten, aber ich kann nicht:

Was ich bisher gemacht habe:

  • Ich verwende Node.JS
  • Ich habe die .abi-Definitionen für theDAO, theDAOInterface, theDAOTokenInterface, theDAOTokenund .theDAOManagedAccounttheDAOManagedAccountInterface

Die einzige Schnittstelle, die die Funktion "proposals()" implementiert, ist die DAO-Schnittstelle. Dann mache ich mit der abi-Definition:

var theDAOInterfaceABI = [{ "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": true, "inputs": [], "name": "rewardAccount", "outputs": [{ "name": "", "type": "address" }], "type": "function" }, { "constant": true, "inputs": [], "name": "daoCreator", "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": "unblockMe", "outputs": [{ "name": "", "type": "bool" }], "type": "function" }, { "constant": true, "inputs": [], "name": "totalRewardToken", "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": "_amount", "type": "uint256" }], "name": "transferWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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": 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": 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": "_amount", "type": "uint256" }], "name": "transferFromWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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" }, { "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 theDAOInterface = web3.eth.contract(theDAOInterfaceABI).at(theDAOAddress);
var proposals = theDAOInterface.proposals()

Was ich habe:

LIVENET:

DAOInterface.Vorschläge():

["0x0000000000000000000000000000000000000000","0","","0",false,false,"0x0000000000000000000000000000000000000000000000000000000000000000","0",false,"0","0","0x0000000000000000000000000000000000000000"]

DAOInterface.numberOfProposals() gibt 0 zurück.

TESTNET:

DAOInterface.Vorschläge():

["0x0000000000000000000000000000000000000000,0,,0,false,false,0x0000000000000000000000000000000000000000000000000000000000000000,0,false,0,0,0x0000000000000000000000000000000000000000"]

DAOInterface.numberOfProposals() gibt 193 zurück.

Was passiert mit diesen APIs? Bin ich der einzige, der versucht, mit diesem Zeug zu arbeiten?

Antworten (1)

F : Was passiert mit diesen APIs? Bin ich der einzige, der versucht, mit diesem Personal zu arbeiten?

Ihr Code gibt wahrscheinlich die richtigen Ergebnisse zurück.

Es gibt noch keine Vorschläge für The DAO im Mainnet, da Vorschläge erst nach Ablauf der Schließzeit von The DAO erstellt werden können.

Aus dem Quellcode von The DAO :

function newProposal(
    address _recipient,
    uint _amount,
    string _description,
    bytes _transactionData,
    uint _debatingPeriod,
    bool _newCurator
) onlyTokenholders returns (uint _proposalID) {

    // Sanity check
    if (_newCurator && (
        _amount != 0
        || _transactionData.length != 0
        || _recipient == curator
        || msg.value > 0
        || _debatingPeriod < minSplitDebatePeriod)) {
        throw;
    } else if (
        !_newCurator
        && (!isRecipientAllowed(_recipient) || (_debatingPeriod <  minProposalDebatePeriod))
    ) {
        throw;
    }

    if (_debatingPeriod > 8 weeks)
        throw;

    if (!isFueled
        || now < closingTime
        || (msg.value < proposalDeposit && !_newCurator)) {

        throw;
    }
    ...

Von der Überprüfung der Variablen für den Vertrag von The DAO in Ethereum Wallet (Mist)

closingTime = 1464426000 // which is Sat, 28 May 2016 09:00:00 GMT
isFueled = true

Die folgende Erklärung newProposal(...)darin verhindert, dass Vorschläge vor Ablauf der Crowdfunding-Periode von The DAO erstellt werden, da sie als wahrnow < closingTime bewertet wird, da sie weniger als Sa, 28. Mai 2016 09:00:00 GMT beträgt:now

    if (!isFueled
        || now < closingTime
        || (msg.value < proposalDeposit && !_newCurator)) {

        throw;
    }



F : Was bedeuten die Elemente im Angebots-Array?

Hier ist die Angebotsstruktur – die Kommentare helfen dabei, die Felder jedes Angebotsdatensatzes im Angebots-Array zu erklären:

// A proposal with `newCurator == false` represents a transaction
// to be issued by this DAO
// A proposal with `newCurator == true` represents a DAO split
struct Proposal {
    // The address where the `amount` will go to if the proposal is accepted
    // or if `newCurator` is true, the proposed Curator of
    // the new DAO).
    address recipient;
    // The amount to transfer to `recipient` if the proposal is accepted.
    uint amount;
    // A plain text description of the proposal
    string description;
    // A unix timestamp, denoting the end of the voting period
    uint votingDeadline;
    // True if the proposal's votes have yet to be counted, otherwise False
    bool open;
    // True if quorum has been reached, the votes have been counted, and
    // the majority said yes
    bool proposalPassed;
    // A hash to check validity of a proposal
    bytes32 proposalHash;
    // Deposit in wei the creator added when submitting their proposal. It
    // is taken from the msg.value of a newProposal call.
    uint proposalDeposit;
    // True if this proposal is to assign a new Curator
    bool newCurator;
    // Data needed for splitting the DAO
    SplitData[] splitData;
    // Number of Tokens in favor of the proposal
    uint yea;
    // Number of Tokens opposed to the proposal
    uint nay;
    // Simple mapping to check if a shareholder has voted for it
    mapping (address => bool) votedYes;
    // Simple mapping to check if a shareholder has voted against it
    mapping (address => bool) votedNo;
    // Address of the shareholder who created the proposal
    address creator;
}



F : Ich meine das Array, das ich bekomme, das voller 0x0000-, falscher und unsinniger Felder.

Ihr Dummy-Array-Ergebnis wird durch die folgende Anweisung erstellt, die dem Array einen Datensatz hinzufügt, den proposalsder nachfolgende Code nicht initialisiert:

proposals.length = 1; // avoids a proposal with ID 0 because it is used

im DAOfolgenden Konstruktor:

function DAO(
    address _curator,
    DAO_Creator _daoCreator,
    uint _proposalDeposit,
    uint _minTokensToCreate,
    uint _closingTime,
    address _privateCreation
) TokenCreation(_minTokensToCreate, _closingTime, _privateCreation) {

    curator = _curator;
    daoCreator = _daoCreator;
    proposalDeposit = _proposalDeposit;
    rewardAccount = new ManagedAccount(address(this), false);
    DAOrewardAccount = new ManagedAccount(address(this), false);
    if (address(rewardAccount) == 0)
        throw;
    if (address(DAOrewardAccount) == 0)
        throw;
    lastTimeMinQuorumMet = now;
    minQuorumDivisor = 5; // sets the minimal quorum to 20%
    proposals.length = 1; // avoids a proposal with ID 0 because it is used
    allowedRecipients[address(this)] = true;
    allowedRecipients[curator] = true;
}

und ist nur ein leerer / genullter Dummy-Datensatz:

["0x0000000000000000000000000000000000000000", // address recipient
"0", // uint amount
"", // string description
"0", // uint votingDeadline
false, // bool open
false, // bool proposalPassed
"0x0000000000000000000000000000000000000000000000000000000000000000", // bytes32 proposalHash
"0", // uint proposalDeposit
false, // bool newCurator
// NO SplitData[] splitData
"0", // uint yea
"0", // uint nay
// NO mapping (address => bool) votedYes
// NO mapping (address => bool) votedNo
"0x0000000000000000000000000000000000000000"] // address creator



Auschecken des DAO auf Testnet

Ich habe die folgenden Befehle ausgeführt, die die Ergebnisse einiger Vorschläge auf Testnet zurückgeben:

> var theDAOAddress="0xad23d7C443382333543Dd13C3B77b99b2A7e2c6D"
undefined
> var theDAOInterfaceABI = [{ "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": true, "inputs": [], "name": "rewardAccount", "outputs": [{ "name": "", "type": "address" }], "type": "function" }, { "constant": true, "inputs": [], "name": "daoCreator", "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": "unblockMe", "outputs": [{ "name": "", "type": "bool" }], "type": "function" }, { "constant": true, "inputs": [], "name": "totalRewardToken", "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": "_amount", "type": "uint256" }], "name": "transferWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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": 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": 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": "_amount", "type": "uint256" }], "name": "transferFromWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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" }, { "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" }];
undefined
> var theDAOInterface = web3.eth.contract(theDAOInterfaceABI).at(theDAOAddress);
undefined
> theDAOInterface.proposals()
["0x0000000000000000000000000000000000000000", 0, "", 0, false, false, "0x0000000000000000000000000000000000000000000000000000000000000000", 0, false, 0, 0, "0x0000000000000000000000000000000000000000"]
> theDAOInterface.proposals(1)
["0x343ca5b0052ea70c6311fdb4bc061c698433d4e3", 0, "test", 1459957706, true, false, "0x9bef2427d88db62a28c0662a9494de97f691ebdd282a6e26cd1caaf2cea5fc41", 0, true, 0, 0, "0x08144824954c65b12f68b75072488e634ac4e67a"]
> theDAOInterface.proposals(2)
["0xd36cd0daab314707cc68300bdb9ba36f098c2784", 0, "test split", 1459958407, true, false, "0x0563d41c2b8a7d3ab5e2118a0fbf9282ab38c3146ec3de19cf86326fa936cd10", 0, true, 0, 0, "0x08144824954c65b12f68b75072488e634ac4e67a"]
> theDAOInterface.proposals(3)
["0xd36cd0daab314707cc68300bdb9ba36f098c2784", 0, "test", 1459959012, true, true, "0x0563d41c2b8a7d3ab5e2118a0fbf9282ab38c3146ec3de19cf86326fa936cd10", 0, true, 1000000000000000000, 0, "0x08144824954c65b12f68b75072488e634ac4e67a"]



Überprüfen Sie den ersten Vorschlag auf Mainnet

** BEARBEITEN 29.05.2016 10:31 AEST Mit erstem Vorschlag **

Ich habe nach Slock.it's Proposal #1 - DAO.Security (redux) gesucht und 5 bereits erstellte Proposals gefunden.

Hier sind die Befehle und Ergebnisse im Mainnet:

> var theDAOAddress="0xbb9bc244d798123fde783fcc1c72d3bb8c189413"
undefined
> var theDAOInterfaceABI = [{ "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": true, "inputs": [], "name": "rewardAccount", "outputs": [{ "name": "", "type": "address" }], "type": "function" }, { "constant": true, "inputs": [], "name": "daoCreator", "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": "unblockMe", "outputs": [{ "name": "", "type": "bool" }], "type": "function" }, { "constant": true, "inputs": [], "name": "totalRewardToken", "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": "_amount", "type": "uint256" }], "name": "transferWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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": 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": 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": "_amount", "type": "uint256" }], "name": "transferFromWithoutReward", "outputs": [{ "name": "success", "type": "bool" }], "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" }, { "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" }];
undefined
> var theDAOInterface = web3.eth.contract(theDAOInterfaceABI).at(theDAOAddress);
undefined
// Following is the dummy proposal
> theDAOInterface.proposals()
["0x0000000000000000000000000000000000000000", 0, "", 0, false, false, "0x0000000000000000000000000000000000000000000000000000000000000000", 0, false, 0, 0, "0x0000000000000000000000000000000000000000"]
// And following is the first proposal
> theDAOInterface.proposals(1)
["0x13680fa2a60fd551894199f009cca20fb63a3e31", 0, "", 1465049035, true, false, "0xf8fc53d03003f6ba1cf65bcbd73238e12045d5c8c92abe6e551cf186bf483ba2", 0, true, 47001968965517241378, 2.536695416315195657391e+21, "0x13680fa2a60fd551894199f009cca20fb63a3e31"]
> theDAOInterface.proposals(2)
["0xbb9bc244d798123fde783fcc1c72d3bb8c189413", 0, "Do you believe in god?", 1465665517, true, false, "0x08fc31bd95397edcaa43fbfee1f3552b4d55f8125dea525a959527bb81933141", 2000000000000000000, false, 2.263294834581950253541e+21, 4.722686353944849847392e+21, "0x5a8e70f2d75c1468db4a2241fdd70e5a84f028b8"]
> theDAOInterface.proposals(3)
["0xbb9bc244d798123fde783fcc1c72d3bb8c189413", 0, "Should curators only whitelist projects that are related to DAO security for the next 4 weeks?", 1465668580, true, false, "0x08fc31bd95397edcaa43fbfee1f3552b4d55f8125dea525a959527bb81933141", 2000000000000000000, false, 2.30243064182194616977e+21, 6.68352975383731971126e+21, "0x66756ae3ebe94cd4e5e95846fceefcd4f69f8a8d"]
> theDAOInterface.proposals(4)
["0x3d5507b53d1613d8491a606ecf5c9268301095dd", 0, "split", 1465066744, true, false, "0xa4c212a943e73926a115f13aadb145ec1a0c78bda83f72a3f0319a2f9cc78b7b", 0, true, 0, 2.86311518905864295125e+21, "0x3d5507b53d1613d8491a606ecf5c9268301095dd"]
> theDAOInterface.proposals(4)
["0x3d5507b53d1613d8491a606ecf5c9268301095dd", 0, "split", 1465066744, true, false, "0xa4c212a943e73926a115f13aadb145ec1a0c78bda83f72a3f0319a2f9cc78b7b", 0, true, 0, 2.86311518905864295125e+21, "0x3d5507b53d1613d8491a606ecf5c9268301095dd"]
> theDAOInterface.proposals(6)
new BigNumber() not a base 16 number: 
    at raise (web3.js:14426:29)

Und hier ist die Seite The DAO - Proposals von EtherScan.io .

Was ist mit den Elementen im Vorschlagsarray? Was meinen sie?
Ich kenne die .sol-Datei, ich habe dasselbe gelesen wie Sie. Ich meine das Array, das ich bekomme, das voller 0x0000-, falscher und unsinniger Felder.
Es ist nur ein Dummy-Datensatz, der von der Anweisung proposals.length = 1im DAO()Konstruktor erstellt wird.