The-Dao

如何知道一個提案是否與另一個提案分開

  • June 16, 2016

我正在使用 DAOInterface ABI 來檢索提案,但我無法在那裡獲得拆分資訊。我看到 Etherscan 顯示了它。

有誰知道如何通過程式碼獲取此資訊?

當 newcurator (proposal) 時,提案是拆分提案

$$ 8 $$) 是真的。 請參閱Github - BokkyPooBah/TheDAOVoter/TheDAOVoter,第 730-747 行

for (proposalId = $first; proposalId <= $last; proposalId++) {
 var proposal = theDAO.proposals(proposalId);
 var open = proposal[4];
 var newCurator = proposal[8];
 console.log(proposalId + " open=" + open + " newCurator=" + newCurator);
 var include = true;
 var status = "$proposalStatus";
 var split = "$split";
 if (status == "open" && open == false) {
   include = false;
 } else if (status == "closed" && open == true) {
   include = false;
 }
 if (split == "exclude" && newCurator == true) {
   include = false;
 } else if (split == "only" && newCurator == false) {
   include = false;
 }
 ...

這是執行的目前輸出theDAOVoter --sumsplits,列出並彙總了拆分提案:

  Prop Status                Yea             Nay Recipient                                  Description                             
------- --------- --------------- --------------- ------------------------------------------ ----------------------------------------
     1 Expired         967598.22      4276278.60 0x13680fa2a60fd551894199f009cca20fb63a3e31                                         
     4 Expired           5279.34      4322941.58 0x3d5507b53d1613d8491a606ecf5c9268301095dd split                                   
     6 Expired              1.99       175453.91 0xbeb0b93c01297146782a5581370489a36b24deca Original intent, non-interventionist cur
     7 Expired         118006.68      3967413.62 0xe82d5b10ad98d34df448b07a5a62c1affbef758f Leave me alone                          
     8 Expired         199999.99      3931880.95 0xa72ded5c1122312d9f4ed66bf4a396139eadaf56                                         
     9 Expired        2659899.77      3911880.49 0x228d29ea776cb17ca0db0538562ecaacdc0a9e46                                         
    10 Expired          15746.04      3933147.83 0x374139a05ac55917badd3f934f1b93f5c8623ded                                         
    12 Expired           5281.35      3945155.27 0xcdc00dd1459e293c9c81880a2b3c4e5396a8ef7b �� cdc00 split proposal ��      
    13 Expired          46039.25      3926435.27 0xf8f9fc62a19c87c657a06febd184f068c0fc9cae arbitrage ftw                           
    14 Expired          51751.22      3873726.70 0x1502447aadf5979e7a842709cd6c4f60afb0a281                                         
    16 Expired         130199.49      3892661.67 0x7c81d252d9d1295058cd3620835f37e0eedd8840 Split 0x7C8                             
    18 Expired           2200.20      3913649.01 0x13680fa2a60fd551894199f009cca20fb63a3e31                                         
    19 Expired        1686495.65      3906900.95 0xf398c9b8107dccc697546969fb2d5956762b60fb split-ID-x8nj2z                         
    20 Expired           1000.00      3906620.95 0xe7535ddfcbefe5c318d271476d068d5f7cf77290                                         
    21 Expired              0.00      3866620.95 0xe7535ddfcbefe5c318d271476d068d5f7cf77290                                         
    22 Expired         239999.99      3894155.12 0x95a61f934d66580dd410a7369f9c5b8e228d2ff3                                         
    23 Expired           9999.85      3885353.61 0x357d083321319cc1a8ebad90ba1db06c8698eef6 sploot                                  
    24 Expired             10.00      3885353.61 0x3065a8444787f076bff10e5df3ec66606e3c8b68 WL split                                
    25 Expired         100000.00      3885353.61 0x1873f651ecf56d27c01d8d17a1bf06a9acf8830b 0x187 canonball                         
    26 Expired          10000.00      3885353.61 0x2b15c5211bda6a867c582080536f6c61766aa5af 0x2b15 DAO Split                        
    27 Expired           4117.33      3881046.67 0xa7c605a1aacb641d873c82f9b2715e87339dfd48 n0k0 split                              
    28 Expired          22737.70      3885353.61 0xb18e6467db64686dfed14c7368ca59e5019c95c8 0xB18e split                            
    29 Expired        1275842.51        46973.61 0xd68ba7734753e2ee54103116323aba2d94c78dc5                                         
    30 Expired          24653.70        44306.95 0x479abf2da4d58716fd973a0d13a75f530150260a                                         
    31 Expired           7318.67        44306.95 0xf8c3879ee8dde81f074abca79b2270eab9942ec1 my_pitui                                
    32 Expired          18007.67        44306.95 0xb42da5b3701a0592e5aa0aebc0c20711bd49fb46 0xB42 private split                     
    33 Expired           7312.66        44306.95 0xcf69ab35bb6a87a68ce83571a174eef4f998baa7                                         
    34 Expired          26685.38        45306.95 0xfdf97eaa34a883647fac329926b1747e9ef601c6 arbitrageservice 0.00 - test            
    35 Expired            331.23        45306.95 0xaf496a1083a3a7c7edb831f2e9a31eb065f5a228 E's Castle Rock                         
    36 Expired              9.00        45306.95 0xaf496a1083a3a7c7edb831f2e9a31eb065f5a228 Galt's Gulch                            
    37 Expired           7676.17        44306.95 0x98dac39fdcc5c9a8dfc6f63898b62704806851b4 0x98dac split                           
    38 Open              4542.00         4306.95 0x3822e5ff792e75817b89f5bbb405fc4a9d1a0552 The Ilium Works                         
    39 Expired         212183.45      3904410.23 0xf4c0eef475ab35625ac223394f9c410ccb577747 GFX, others please don't vote           
    41 Expired              0.19      3888583.17 0xfaed3f06255794bf3f83d7ab08d4554d5d218b41                                         
    42 Expired          54977.28      3896914.31 0xbb9bc244d798123fde783fcc1c72d3bb8c189413                                         
    44 Expired          25000.00      3910120.72 0x5a422fb07fc9270f5b310fc61f85b8e779cb29a2 Hotdog cheap plot gongzho dao           
    45 Expired             99.99      3844276.22 0x5824a7486ea2ec17749f936c7b89faa4972f8eb1                                         
    46 Expired             99.99      3844276.22 0x5824a7486ea2ec17749f936c7b89faa4972f8eb1                                         
    47 Expired             99.99      3844276.22 0x5824a7486ea2ec17749f936c7b89faa4972f8eb1                                         
    48 Expired             99.99      3844276.22 0x5824a7486ea2ec17749f936c7b89faa4972f8eb1                                         
    49 Expired            737.68      3844276.22 0x5824a7486ea2ec17749f936c7b89faa4972f8eb1                                         
    50 Expired              0.00      3844276.22 0x0ee82c5e35cbcf9e1271808f0386b930ee8ae8a2 m split                                 
    52 Expired            350.00      3844526.22 0x56ae819a1bc418121a6e8428b5884f7604152322 test split 1337                         
    53 Expired           1000.00      3847136.35 0x4853143d0f5524df67a0a5bdd2fb63c76c7693f6 arbitrage ftw 2                         
    54 Expired            200.00      3838630.00 0x0f935781046701897c9e0d9876fb5c82d89d53be split me baby one more time             
    55 Expired         477555.42      3838380.00 0xf2a83b593162d77c62337a02668be1ee088cb55d 0xF2a83 Split                           
    56 Expired            500.00      3858630.46 0x55d1554b08a5311c5c0a0b6464162192f9d2f884 Baby Split                              
    57 Expired              1.99      3838380.00 0x065f074f1e93a215a9a05b2c92059ca44a4827eb split-0x065f                            
    58 Expired            560.00      3838630.00 0xc4dc238f4ff143480f64456e0c4837e1c802934e this is rickdiculous!                   
    59 Expired              0.00      3838630.00 0xb656b2a9c3b2416437a811e07466ca712f5a5b5a lonely, so lonely                       
    60 Expired             10.00            0.00 0x65c407ffea9fcff194fe9d3335d2b78416226056 0x65split                               
    61 Expired            500.00          250.00 0x42b8a09e46e6e367ed0135d3cd7fbdce777e0873 banana split                            
    62 Expired         115105.50          250.00 0x4e0494181464ce213089eb86b8195ed135eb4d48 0x4E04 split proposal                   
    63 Expired          55938.40          250.00 0x46664c1e2ddd896a3e0c2b3d502842f261b9e62f Toni split                              
    64 Expired        3069669.68          250.00 0x547389052a8dc86365c46641b5184956ec22749d 0x54738 Split                           
    65 Expired            500.00          250.00 0x208e4a03118380b4f63cf056ecbfe0a241a41b46 0x28e 432 split                         
    66 Expired         100000.00          250.00 0x9a9d6a470fc8034085ee8e509623e2f742da6625 THE DAO SHOWS THAT VAROUFAKIS HAS NO VIS
    67 Expired             10.00          250.00 0x3065a8444787f076bff10e5df3ec66606e3c8b68 WL split again                          
    68 Open                 0.00          250.00 0x4b595e2328b73a7f4e4cb65b506a74d836bbd7f9                                         
    69 Open                 0.00            0.00 0x55d1554b08a5311c5c0a0b6464162192f9d2f884 Congo Split                             
    70 Open            328456.84          250.00 0x55d1554b08a5311c5c0a0b6464162192f9d2f884 Congo Split                             
    71 Open               199.59          250.00 0xc1aba55035310a703ee450142eb31961a2723006 beer split                              
    72 Open               299.99          250.00 0x3c111dde8bbe5270b55f85e7c377c8fe4ee26242 FUN-SPLT-42                             
    73 Open                 0.00            0.00 0xa003e4b91180d3e06a03f1916fe94eb4c350850e                                         
    74 Open               109.58            0.00 0x1bc31e2e4f1bcc0a7dd9d849dfc57e66e59896ab                                         
    75 Open                 0.00            0.00 0x98e27ba4f77f2b4149402c0fd7b92921b47ac8f1 TestSplitT                              
    76 Open               101.90            0.00 0x7727b2afc5a6816452a455e65a6a7dd01d03af4b Split Proposal - C                      
    77 Open              3999.89            0.00 0xe52435be3f079a6185f62766cbac3c0bdfaea5b4                                         
    78 Open             33323.56            0.00 0x5494167cc3404fcc4e2435c124d0f661a8f45861 Northern split                          
    79 Open             10000.00            0.00 0x0449d907531168fbe26afc381a4ae005e31bbe75 SplitxProposal Are there stalkers?      
    80 Open                 0.00            0.00 0xc4dc238f4ff143480f64456e0c4837e1c802934e Split 0xc4D                             
    81 Open             32000.00            0.00 0x83444307da515dc6646ae0201c718d783897d772 blaa blaa blaa                          
    83 Open                 0.00            0.00 0x81fff0f75c6cb65bc9799922c18b27d211131079 Split-Zg7vm2                            
    85 Open              5010.00            0.00 0x51476eb4696e33b412091f09b5463e83598b555e EpSplit                                 
    86 Open                 0.00            0.00 0x862656d0db96c32c7cc551e1e22780c394c9e24e Split. Please don't stalk. Bye.         
    87 Open                 0.00            0.00 0xffbf6b9f8d575765f430392b57a29ddf92c365a0 Split ffbf                              
    88 Open                 0.00            0.00 0x7b49fe515e027f80cc93a9d6db6e3c5aaca91917                                         
    89 Open            100000.00            0.00 0x1873f651ecf56d27c01d8d17a1bf06a9acf8830b NEW SOLOSPLIT PROPOSAL AGAIN BECAUSE THE
    90 Open                 0.00            0.00 0xf2a83b593162d77c62337a02668be1ee088cb55d                                         
    91 Open                17.06            0.00 0x522b59b92a4566440ae3ef8e3426fbfaa2f37a9b schplitter                              
    92 Open              8177.04            0.00 0x14c81f47cda966e90c5ff7fc1a3f81012dd8b721 moose1                                  
    93 Open               200.00            0.00 0xef0b9496aaf4245db417ba821818340f6213ecd1 06/14-1465895020                        
    94 Open                 0.00            0.00 0x55d1554b08a5311c5c0a0b6464162192f9d2f884 Last hurrah                             
    95 Open                 0.00            0.00 0x55d1554b08a5311c5c0a0b6464162192f9d2f884 Hammer Split                            
    96 Open              3000.00            0.00 0x996114abfffe481c05c5341098b284679f158d53 0x99611 split                           
    97 Open            100000.00            0.00 0x5236a1870aee21aa83a55c534127b43a775d216f T A X A T I O N    I S    T H E F T     
    98 Open                 0.00            0.00 0x522b59b92a4566440ae3ef8e3426fbfaa2f37a9b                                         
    99 Open             14000.80            0.00 0x8d184669301640a42652e9b436843a3fa4998370 moose2                                  
   100 Open                 1.00            0.00 0x8fdb7441bd9263499af346135153a737aa9b3fbb                                         
   101 Open              1009.98            0.00 0x5fbea6b04d5824c73a89cb8348d66492e0e4b7bf split909090                             
   102 Open                 0.00            0.00 0xd68ba7734753e2ee54103116323aba2d94c78dc5                                         
   103 Open             46732.67            0.00 0xaa09688e89371fee6dcda9dd7a995737e2a3a196 squids split proposal                   
   104 Open                10.00            0.00 0x8bebbfbc64a23a31fa3a003c1883b0ef26514400 0x8beb split                            
   105 Open             80258.05            0.00 0xbb5c7fccc433fb92d04064816cbee74070f9ec90 Split 0xBB5                             
   106 Open              5000.00            0.00 0x8c99b1fab831dae42fa8acd4f3a05a19f443f559                                         
   107 Open                 0.00            0.00 0x522163712cadf19b64d13b0cb0f07024081d23cb Split 0xbeef                            
   108 Open             28400.01            0.00 0x465423cb836d2809811c9c5309a3c7e4d53e3d20 0x4654 Split                            
   109 Open              8000.00            0.00 0xaf8bd1432b1baf546ae1751769d31a633841c605                                         
   110 Open               689.12            0.00 0x64d4c6a676b0314d747847d2314634aa71126a09                                         
   111 Open               100.00            0.00 0xffff16f80329cd2110c1dea6715a678fc826b43b split prop 0xffff16f                    
   112 Open              5210.00            0.00 0xb9c13e25933c54b68ed425a862272db940386bee refundsplit                             
   113 Open             66509.91            0.00 0xf49efc9b25bed7694dc1cbfd119dcef5862c25bd                                         
   114 Open              3500.98            0.00 0x1ea0517703749db2619d54ccd8de0b53494008ed AngSplit                                
   115 Open                 0.01            0.00 0xe3cbc85806a5407ed22e087e9a4ee1c8f934b82b 0xe3Cb Split                            
   116 Open                 0.01            0.00 0x2c4c5cf7aedbe989a07acd7d071053ecd331c74c 0x2C4c Split                            
   117 Open                 0.01            0.00 0x129344ed0f059580bf667a27bd15a5dea0b751d6 0x1293 Split                            
   118 Open                 0.01            0.00 0x899d6a07c90ad5eb406ba2165ae0d55415a8e752 0x899d Split                            
   119 Open                 0.01            0.00 0xb6bfe6ae7d164cfcd4622de6e87fb55a54e7220e 0xB6bF Split                            
   120 Open             29320.00            0.00 0x907b7be980917cdda0346bd747f026393e794df7 0xFEFE Split Proposal                   
   121 Open              6000.00            0.00 0x94b6c4e1af692c88fb8c9f69fa961098ce8fab67 split prop 0x94b6c4                     
   122 Open                 0.00            0.00 0x81d0fae35a74c5105c4332f6ede87fd27344f5c1 0x81d split                             
   123 Open                 0.00            0.00 0xa852246e4ac2da710afa72aa1a60f03620d1978a 123 split                               
   124 Open             11000.00            0.00 0x131ba80e1ae0d9a9a3b905193ed76122acf36541                                         
   125 Open              1000.00            0.00 0x77d0967ffddbad3aba301837208392573da29299 BloomSplit                              
------- --------- --------------- --------------- ------------------------------------------ ----------------------------------------
Closed                       0.00            0.00 Yeas 0.00% of the original supply
Expired               11759400.60    152767545.58 Yeas 1.00% of the original supply
Open                    936180.02         5306.95 Yeas 0.08% of the original supply
Total                 12695580.62    152772852.53 Yeas 1.08% of the original supply
Supply  Current     1159931811.69                 Reduction from original supply of 12587259.78 or 1.07%
Supply  Original    1172519071.47
------- --------- --------------- --------------- ------------------------------------------ ----------------------------------------
Notes: Nay votes don't affect split votes
Generated by theDAOVoter at Fri Jun 17 08:13:53 2016

更多資訊請參見如何列出 DAO 提案並從命令行投票?https://github.com/bokkypoobah/TheDAOVoter

並參考以下來自Etherscan 的 The DAO source code - The DAO - Source Code中的第 3 行:

// 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;
}

引用自:https://ethereum.stackexchange.com/questions/6137