How To Deploy A DAO [devs] - TheDAO/DAO-1.0 GitHub Wiki
Deploying the DAO contracts from a CLI
This is short guide in how you can deploy the DAO contracts if you are comfortable around a terminal, and can type a few commands. For a UI-only detailed guide look here
Prerequisites
You will need to have:
-
The latest solidity compiler
solc
. You can either try to build it from source or get its binary as part of the cpp client releases for your OS here -
An ethereum client to deploy it with. For simplicity's sake we will go with geth for this tutorial.
Compiling the contracts.
Navigate to the directory of the contracts and prepare to use the solidity compiler.
Getting the binary code
Type the following:
solc --optimize --bin DAO.sol
You will need to copy and keep 2 things from there. The binary code of the DAOCreator
contract and the binary code of the DAO
contract. At the moment of writting this is what they look like:
- DAO_Creator
======= DAO_Creator =======
Binary:
606060405261339c806100126000396000f3606060405260e060020a6000350463e2faf0448114601a575b005b6097600435602435604435606435600084308585853360606132e8806100b48339018087600160a060020a0316815260200186600160a060020a0316815260200185815260200184815260200183815260200182600160a060020a031681526020019650505050505050604051809103906000f095945050505050565b60408051600160a060020a03929092168252519081900360200190f3606060405260405160c0806132e88339610120604052905160805160a051925160e0516101005193949293828282600f829055601083905560118054610100830261010060a860020a031990911617905560405130906001906101bc806103378339600160a060020a039390931692019182526020820152604080519182900301906000f060128054600160a060020a031916919091179055505060038054600160a060020a03199081168917909155600e80549091168717905550600c84905560405130906000906101bc806104f38339018083600160a060020a0316815260200182815260200192505050604051809103906000f060405160078054600160a060020a0319169290921790915530906000906101bc806106af8339018083600160a060020a0316815260200182815260200192505050604051809103906000f060088054600160a060020a031916919091179055600754600160a060020a0316600014156101c357610002565b50505030600160a060020a03908116600090815260046020526040808220805460ff19908116600190811790925560035490941683529120805490921617905550505050505050612a7d8061086b6000396000f35b600854600160a060020a0316600014156101dc57610002565b4260025560056001908155600080548282558290801582901161016e57600e0281600e02836000526020600020918201910161016e919061023e565b5050600060098201819055600a820155600d81018054600160a060020a03191690556001015b80821115610333578054600160a060020a03191681556000600182810182905560028381018054848255909281161561010002600019011604601f81901061030557505b506000600383018190556004838101805461ffff19169055600584018290556006840182905560078401805460ff191690556008840180548382559083526020909220610218929091028101905b808211156103335760008082556001820181815560028301919091556003919091018054600160a060020a03191690556102d0565b601f01602090049060005260206000209081019061028291905b80821115610333576000815560010161031f565b50905660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b929150505660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b929150505660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b92915050566060604052361561020e5760e060020a6000350463013cf08b811461022c578063095ea7b3146103ea5780630c3b7b961461045e5780630e70820314610467578063149acf9a1461047957806318160ddd1461048b5780631f2dc5ef1461049457806321b5b8dd146104b4578063234693d3146104c6578063237e94921461052c57806323b872dd1461058d57806334145808146105c057806339d1f908146105c95780634b6753bc146105e15780634df6d6cc146105ea5780634e10c3ee14610605578063590e1ae314610618578063612e45a314610629578063643f7cdd146106c8578063674ed066146106e05780636837ff1e146106e957806370a0823114610733578063749f98891461075957806378524b2e1461077257806381f03fcb1461079f57806382661dc4146107b757806382bf6464146107d85780638b15a605146107ea5780638d7af473146107f357806396d7f3f514610802578063a1da2fb91461080b578063a3912ec814610825578063a9059cbb14610830578063b7bc2c8414610860578063baac53001461086c578063c9d27afe146108d0578063cc9ae3f6146108e6578063cdef91d0146108fa578063dbde198814610912578063dd62ed3e14610937578063e33734fd1461096b578063e59621951461097f578063e66f53b714610997578063eceb2945146109a9578063f8c80d2614610a08578063fbac395114610a1f575b610a4d600f546000906234bc0001421015610a5f57610a6733610873565b610a6d60043560008054829081101561000257508052600e027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5678101547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5698201547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5668301547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564840154600080516020612a5d8339815191528501547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56a8601547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5688701547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56c8801547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56d8901547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5708a0154600160a060020a039586169a96997f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e565979097019860ff888116986101009004811697959691959116939291168c565b610a4d600435602435600160a060020a03338116600081815260156020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b610a4d60105481565b610b64600754600160a060020a031681565b610b64600e54600160a060020a031681565b610a4d60165481565b610a4d5b60004262127500600f6000505403111561267757506014610a6a565b610b64601254600160a060020a031681565b610b64600435600060006000508281548110156100025750508080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56b600e83020180548290811015610002575081526020902060030154600160a060020a0316610754565b60408051602060248035600481810135601f8101859004850286018501909652858552610a4d958135959194604494929390920191819084018382808284375094965050505050505060006000600060006000600034111561140f57610002565b610a4d6004356024356044355b60115460009060ff1680156105b05750600f5442115b801561220b575061220984610a26565b610a4d60065481565b610a4d5b600d5430600160a060020a03163103610a6a565b610a4d600f5481565b610a4d60043560046020526000908152604090205460ff1681565b610a4d60043560243560006121ed6108ea565b610b8160003411156124b557610002565b604080516020604435600481810135601f8101849004840285018401909552848452610a4d948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a01909352828252969897608497919650602491909101945090925082915084018382808284375094965050933593505060a43591505060006000610b833361073a565b610a4d60043560096020526000908152604090205481565b610a4d60015481565b610b8160043530600160a060020a031633600160a060020a03161415806107295750600160a060020a03811660009081526004602052604090205460ff16155b15611ee757611ee4565b610a4d6004355b600160a060020a0381166000908152601460205260409020545b919050565b610a4d600435602435600060003411156122bb57610002565b610a4d60006301dfe200420360026000505410156123375750426002908155600180549091028155610a6a565b610a4d600435600a6020526000908152604090205481565b610a4d6004356024356000600060006000600060003411156118cb57610002565b610b64600854600160a060020a031681565b610a4d600c5481565b610a4d60005460001901610a6a565b610a4d60025481565b610a4d6004356000600060006000341115611f1857610002565b610a4d5b6001610a6a565b610a4d6004356024355b60115460009060ff1680156108505750600f5442115b80156121a457506121a233610a26565b610a4d60115460ff1681565b610a4d6004355b60006000600f600050544210801561088b5750600034115b80156108c357506011546101009004600160a060020a0316600014806108c35750601154600160a060020a0333811661010090920416145b156121e8576123b5610498565b610a4d600435602435600060006111b43361073a565b610a4d5b6000600034111561219957610002565b610a4d60043560056020526000908152604090205481565b610a4d6004356024356044356000612251845b6000600060003411156126ad57610002565b610a4d600435602435600160a060020a03828116600090815260156020908152604080832093851683529290522054610458565b610b81600435600034111561226757610002565b610a4d600435600b6020526000908152604090205481565b610b64600354600160a060020a031681565b604080516020606435600481810135601f8101849004840285018401909552848452610a4d9481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600034111561112557610002565b610b646011546101009004600160a060020a031681565b610a4d6004355b600160a060020a0381166000908152600b6020526040812054819081141561233f576123af565b60408051918252519081900360200190f35b610a67610829565b90505b90565b604051808d600160a060020a031681526020018c8152602001806020018b81526020018a815260200189815260200188815260200187815260200186815260200185815260200184815260200183600160a060020a0316815260200182810382528c818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b820191906000526020600020905b815481529060010190602001808311610b2d57829003601f168201915b50509d505050505050505050505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b005b60001415610b9057610002565b828015610bda5750866000141580610baa57508451600014155b80610bc25750600354600160a060020a038981169116145b80610bcd5750600034115b80610bda575062093a8084105b15610be457610002565b82158015610c045750610bf688610c1e565b1580610c0457506212750084105b15610cc057610002565b835461158390600160a060020a03165b600160a060020a03811660009081526004602052604081205460ff1680610cb35750601254600160a060020a03908116908316148015610cb35750601260009054906101000a9004600160a060020a0316600160a060020a031663d2cc718f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051516006541190505b156128a257506001610754565b6249d400841115610cd057610002565b60115460ff161580610ce35750600f5442105b80610cf85750600c5434108015610cf8575082155b15610d0257610002565b428442011015610d1157610002565b30600160a060020a031633600160a060020a03161415610d3057610002565b6000805460018101808355909190828015829011610d6757600e0281600e028360005260206000209182019101610d679190610e2c565b505060008054929450918491508110156100025750808052600e8302600080516020612a5d8339815191520190508054600160a060020a031916891781556001818101899055875160028084018054600082815260209081902096975091959481161561010002600019011691909104601f908101829004840193918b0190839010610f2457805160ff19168380011785555b50610f54929150610f0c565b5050600060098201819055600a820155600d81018054600160a060020a03191690556001015b80821115610f20578054600160a060020a03191681556000600182810182905560028084018054848255909281161561010002600019011604601f819010610ef257505b506000600383018190556004808401805461ffff19169055600584018290556006840182905560078401805460ff191690556008840180548382559083526020909220610e06929091028101905b80821115610f2057600080825560018201818155600283019190915560039091018054600160a060020a0319169055610ebe565b601f016020900490600052602060002090810190610e7091905b80821115610f205760008155600101610f0c565b5090565b82800160010185558215610dfa579182015b82811115610dfa578251826000505591602001919060010190610f36565b50508787866040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160050160005081905550834201816003016000508190555060018160040160006101000a81548160ff02191690830217905550828160070160006101000a81548160ff02191690830217905550821561103a5760088101805460018101808355909190828015829011611035576004028160040283600052602060002091820191016110359190610ebe565b505050505b600d8082018054600160a060020a031916331790553460068301819055815401905560408051600160a060020a038a16815260208181018a9052918101859052608060608201818152895191830191909152885185937f5790de2c279e58269b93b12828f56fd5f2bc8ad15e61ce08572585c81a38756f938d938d938a938e93929160a084019185810191908190849082908590600090600490601f850104600f02600301f150905090810190601f16801561110a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2509695505050505050565b6000805487908110156100025750808052600e8702600080516020612a5d83398151915201905090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816005016000505414915050949350505050565b600014156111c157610002565b60003411156111cf57610002565b6000805485908110156100025750600160a060020a0333168152600e85027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56e8101602052604090912054600080516020612a5d83398151915291909101915060ff16806112485750600c810160205260406000205460ff165b80611257575060038101544210155b1561126157610002565b82156112a757600160a060020a0333166000908152601460209081526040808320546009850180549091019055600b84019091529020805460ff191660011790556112e3565b600160a060020a033316600090815260146020908152604080832054600a850180549091019055600c84019091529020805460ff191660011790555b600160a060020a0333166000908152600b6020526040812054141561130f576040600020849055611383565b600160a060020a0333166000908152600b60205260408120548154811015610002579080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e566600e90910201546003820154111561138357600160a060020a0333166000908152600b602052604090208490555b604080518481529051600160a060020a0333169186917f86abfce99b7dd908bec0169288797f85049ec73cbe046ed9de818fab3a497ae09181900360200190a35092915050565b6040805186815260208101839052815189927fdfc78bdca8e3e0b18c16c5c99323c6cb9eb5e00afde190b4e7273f5158702b07928290030190a25b5050505092915050565b6000805488908110156100025750808052600e8802600080516020612a5d833981519152019050600781015490945060ff1661144e57620d2f00611453565b622398805b600485015490935060ff16801561146f57506003840154830142115b1561147d5761151f8761152e565b60038401544210806114945750600484015460ff16155b8061151557508360000160009054906101000a9004600160a060020a03168460010160005054876040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020846005016000505414155b15610c0e57610002565b611405565b426002555b6113ca875b6000600060005082815481101561000257908052600e02600080516020612a5d833981519152018150600481015490915060ff161561157557600d80546006830154900390555b600401805460ff1916905550565b1580156115945750600484015460ff165b156115a2576115ae8761152e565b600191506115df6105cd565b604051600d8501546006860154600160a060020a0391909116916000919082818181858883f1935050505050611405565b600185015411156115ef57600091505b50600a8301546009840154865191019060049010801590611634575085600081518110156100025790602001015160f860020a900460f860020a02606860f860020a02145b8015611664575085600181518110156100025790602001015160f860020a900460f860020a02603760f860020a02145b8015611694575085600281518110156100025790602001015160f860020a900460f860020a0260ff60f860020a02145b80156116c4575085600381518110156100025790602001015160f860020a900460f860020a02601e60f860020a02145b80156116f3575030600160a060020a03166000908152600560205260409020546116f09061170b6105cd565b81105b156116fd57600091505b600184015461172e9061170d565b015b30600160a060020a03166000908152600560205260408120546128aa6105cd565b811015801561174557506009840154600a85015490115b801561174e5750815b1561178957604051600d8501546006860154600160a060020a0391909116916000919082818181858883f19350505050151561179757610002565b60018401546118709061170d565b42600255604051600185015485548851600160a060020a03919091169289918190602084810191908190849082908590600090600490601f850104600f02600301f150905090810190601f1680156118035780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f192505050151561182757610002565b60048401805461ff0019166101001790556001848101805430600160a060020a031660009081526005602052604090208054919091019055546006805490910190559450611529565b811015801561188757506009840154600a85015410155b80611890575081155b1561152957604051600d8501546006860154600160a060020a0391909116916000919082818181858883f19350505050151561152457610002565b6118d43361073a565b600014156118e157610002565b60008054889081101561000257508052600e87027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e566810154600080516020612a5d83398151915291909101945042108061194357506003840154622398800142115b8061195c57508354600160a060020a0390811690871614155b8061196c5750600784015460ff16155b806119925750600160a060020a0333166000908152600b8501602052604090205460ff16155b806119b55750600160a060020a0333166000908152600b60205260409020548714155b156119bf57610002565b600884018054600090811015610002579081526020812060030154600160a060020a03161415611b2b57611c1586604051600090600160a060020a038316907f9046fefd66f538ab35263248a44217dcb70e2eb2cd136629e141b8b8f9f03b60908390a260408051600e547fe2faf044000000000000000000000000000000000000000000000000000000008252600160a060020a03858116600484015260248301859052604483018590526223988042016064840152925192169163e2faf04491608480820192602092909190829003018187876161da5a03f1156100025750506040515191506107549050565b6008850180546000908110156100025781815260208082209390935530600160a060020a031681526005909252604082205481549092908110156100025790815260208120905060020155601654600885018054600090811015610002579081526020812090506001015560048401805461ff0019166101001790555b60088401805460009081101561000257815482825260208220600101549291908110156100025790815260208120905054600160a060020a033316600090815260146020526040812054600888018054939091029390930495509081101561000257908152602081209050604080516003909201547fbaac5300000000000000000000000000000000000000000000000000000000008352600160a060020a033381166004850152915191169163baac5300918691602480820192602092909190829003018185886185025a03f11561000257505060405151600014159150611c91905057610002565b60088501805460009081101561000257818152602081206003018054600160a060020a03191690931790925580549091908110156100025790815260208120905060030154600160a060020a031660001415611c7057610002565b600d5430600160a060020a0316311015611c8957610002565b611aae6105cd565b60088401805460009081101561000257815482825260208220600101549291908110156100025790815260208120905060020154600160a060020a0333811660009081526014602090815260408083205430909416835260058083528184205460099093529083205460088b018054969095029690960497509487020494508593929091908290811015610002575260208120815060030154600160a060020a03908116825260208281019390935260409182016000908120805490950190945530168352600590915290205482901015611d6b57610002565b30600160a060020a031660009081526005602052604081208054849003905560088501805483926009929091829081101561000257508152602080822060030154600160a060020a0390811683529290526040808220805494909401909355309091168152205481901015611ddf57610002565b30600160a060020a039081166000908152600960209081526040808320805486900390553393909316808352601482528383205484519081529351929390927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3611e5233610925565b50600160a060020a0333166000908152601460209081526040808320805460168054919091039055839055600a90915281205560019450611405565b30600160a060020a03908116600081815260056020908152604080832080549587168085528285208054979097019096558484528390556009909152808220805494835290822080549490940190935590815290555b50565b604051600160a060020a0382811691309091163190600081818185876185025a03f1925050501515611e8e57610002565b600160a060020a0333818116600090815260096020908152604080832054815160065460085460e060020a63d2cc718f028352935196995091969195929091169363d2cc718f93600483810194919391929183900301908290876161da5a03f11561000257505050604051805190602001506005600050600033600160a060020a031681526020019081526020016000206000505402041015611fba57610002565b600160a060020a03338116600090815260096020908152604080832054815160065460085460e060020a63d2cc718f02835293519296909593169363d2cc718f93600483810194929383900301908290876161da5a03f11561000257505050604051805190602001506005600050600033600160a060020a03168152602001908152602001600020600050540204039050831561210957600860009054906101000a9004600160a060020a0316600160a060020a0316630221038a83600160a060020a0316630e7082036040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a63011081c5028252600160a060020a031660048201526024810186905290516044808301935060209282900301816000876161da5a03f115610002575050604051511515905061217157610002565b6040805160085460e160020a63011081c5028252600160a060020a038581166004840152602483018590529251921691630221038a9160448082019260209290919082900301816000876161da5a03f115610002575050604051511515905061217157610002565b600160a060020a03331660009081526009602052604090208054909101905550600192915050565b610a6733610925565b155b80156121bf57506121bf3384845b6000600061283b8561073a565b80156121db57506121db8383600060003411156128cc57610002565b156121e857506001610458565b610002565b15156121f857610002565b612202838361083a565b9050610458565b155b801561221d575061221d8484846121b2565b801561223a575061223a8484846000600034111561297157610002565b156121e85750600161224a565b90505b9392505050565b151561225c57610002565b61224784848461059a565b30600160a060020a031633600160a060020a03161415806122ac575030600160a060020a03166000908152600560205260409020546064906122a76105cd565b010481115b156122b657610002565b600c55565b600354600160a060020a039081163391909116146122d857610002565b600160a060020a038316600081815260046020908152604091829020805460ff191686179055815185815291517f73ad2a153c8b67991df9459024950b318a609782cee8c7eeda47b905f9baa91f9281900390910190a2506001610458565b506000610a6a565b600160a060020a0383166000908152600b6020526040812054815481101561000257818052600e02600080516020612a5d83398151915201905060038101549091504211156123aa57600160a060020a0383166000908152600b6020526040812081905591506123af565b600191505b50919050565b604051601254601434908102939093049350600160a060020a03169183900390600081818185876185025a03f150505050600160a060020a038316600081815260146020908152604080832080548601905560168054860190556013825291829020805434019055815184815291517fdbccb92686efceafb9bb7e0394df7f58f71b954061b81afb57109bf247d3d75a9281900390910190a260105460165410801590612465575060115460ff16155b156123aa576011805460ff1916600117905560165460408051918252517ff381a3e2428fdda36615919e8d9c35878d9eb0cf85ac6edf575088e80e4c147e9181900360200190a1600191506123af565b600f54421180156124c9575060115460ff16155b15612675576040805160125460e060020a63d2cc718f0282529151600160a060020a039290921691630221038a913091849163d2cc718f91600480830192602092919082900301816000876161da5a03f11561000257505060408051805160e160020a63011081c5028252600160a060020a039490941660048201526024810193909352516044838101936020935082900301816000876161da5a03f11561000257505060408051600160a060020a03331660008181526013602052928320549093509181818185876185025a03f192505050156126755760406000818120600160a060020a0333169182905260136020908152835191548252925191927fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d92918290030190a26014600050600033600160a060020a0316815260200190815260200160002060005054601660008282825054039250508190555060006014600050600033600160a060020a031681526020019081526020016000206000508190555060006013600050600033600160a060020a03168152602001908152602001600020600050819055505b565b4262054600600f600050540311156126a5576201518062127500600f60005054034203046014019050610a6a565b50601e610a6a565b600160a060020a038381166000908152600a6020908152604080832054601654600754835160e060020a63d2cc718f02815293519296919591169363d2cc718f9360048181019492939183900301908290876161da5a03f11561000257505060405151905061271b8661073a565b0204101561272857610002565b600160a060020a038381166000908152600a6020908152604080832054601654600754835160e060020a63d2cc718f02815293519296919591169363d2cc718f9360048181019492939183900301908290876161da5a03f1156100025750506040515190506127968661073a565b0204039050600760009054906101000a9004600160a060020a0316600160a060020a0316630221038a84836040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506020604051808303816000876161da5a03f115610002575050604051511515905061281457610002565b600160a060020a0383166000908152600a60205260409020805482019055600191506123af565b600160a060020a0386166000908152600a602052604090205480850291909104915081111561286957610002565b600160a060020a038581166000908152600a60205260408082208054859003905591861681522080548201905560019150509392505050565b506000610754565b0160030260166000505483020460016000505460166000505404019050610754565b600160a060020a0333166000908152601460205260409020548290108015906128f55750600082115b1561296957600160a060020a03338116600081815260146020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610458565b506000610458565b600160a060020a0384166000908152601460205260409020548290108015906129ba57506015602090815260406000818120600160a060020a0333168252909252902054829010155b80156129c65750600082115b15612a5557600160a060020a0383811660008181526014602090815260408083208054880190558885168084528184208054899003905560158352818420339690961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600161224a565b50600061224a56290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563
- DAO
======= DAO =======
Binary:
606060405260405160c0806132e88339610120604052905160805160a051925160e0516101005193949293828282600f829055601083905560118054610100830261010060a860020a031990911617905560405130906001906101bc806103378339600160a060020a039390931692019182526020820152604080519182900301906000f060128054600160a060020a031916919091179055505060038054600160a060020a03199081168917909155600e80549091168717905550600c84905560405130906000906101bc806104f38339018083600160a060020a0316815260200182815260200192505050604051809103906000f060405160078054600160a060020a0319169290921790915530906000906101bc806106af8339018083600160a060020a0316815260200182815260200192505050604051809103906000f060088054600160a060020a031916919091179055600754600160a060020a0316600014156101c357610002565b50505030600160a060020a03908116600090815260046020526040808220805460ff19908116600190811790925560035490941683529120805490921617905550505050505050612a7d8061086b6000396000f35b600854600160a060020a0316600014156101dc57610002565b4260025560056001908155600080548282558290801582901161016e57600e0281600e02836000526020600020918201910161016e919061023e565b5050600060098201819055600a820155600d81018054600160a060020a03191690556001015b80821115610333578054600160a060020a03191681556000600182810182905560028381018054848255909281161561010002600019011604601f81901061030557505b506000600383018190556004838101805461ffff19169055600584018290556006840182905560078401805460ff191690556008840180548382559083526020909220610218929091028101905b808211156103335760008082556001820181815560028301919091556003919091018054600160a060020a03191690556102d0565b601f01602090049060005260206000209081019061028291905b80821115610333576000815560010161031f565b50905660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b929150505660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b929150505660606040818152806101bc833960a090525160805160008054600160a060020a03191690921760a060020a60ff0219167401000000000000000000000000000000000000000090910217815561016290819061005a90396000f3606060405236156100405760e060020a60003504630221038a811461004d57806318bdc79a146100aa5780638da5cb5b146100be578063d2cc718f146100d0575b6100d96001805434019055565b6100db6004356024356000805433600160a060020a0390811691161415806100755750600034115b806100a05750805460a060020a900460ff1680156100a057508054600160a060020a03848116911614155b156100f757610002565b6100db60005460ff60a060020a9091041681565b6100ed600054600160a060020a031681565b6100db60015481565b005b60408051918252519081900360200190f35b6060908152602090f35b600160a060020a0383168260608381818185876185025a03f1925050501561015c57604080518381529051600160a060020a038516917f9735b0cb909f3d21d5c16bbcccd272d85fa11446f6d679f6ecb170d2dabfecfc919081900360200190a25060015b92915050566060604052361561020e5760e060020a6000350463013cf08b811461022c578063095ea7b3146103ea5780630c3b7b961461045e5780630e70820314610467578063149acf9a1461047957806318160ddd1461048b5780631f2dc5ef1461049457806321b5b8dd146104b4578063234693d3146104c6578063237e94921461052c57806323b872dd1461058d57806334145808146105c057806339d1f908146105c95780634b6753bc146105e15780634df6d6cc146105ea5780634e10c3ee14610605578063590e1ae314610618578063612e45a314610629578063643f7cdd146106c8578063674ed066146106e05780636837ff1e146106e957806370a0823114610733578063749f98891461075957806378524b2e1461077257806381f03fcb1461079f57806382661dc4146107b757806382bf6464146107d85780638b15a605146107ea5780638d7af473146107f357806396d7f3f514610802578063a1da2fb91461080b578063a3912ec814610825578063a9059cbb14610830578063b7bc2c8414610860578063baac53001461086c578063c9d27afe146108d0578063cc9ae3f6146108e6578063cdef91d0146108fa578063dbde198814610912578063dd62ed3e14610937578063e33734fd1461096b578063e59621951461097f578063e66f53b714610997578063eceb2945146109a9578063f8c80d2614610a08578063fbac395114610a1f575b610a4d600f546000906234bc0001421015610a5f57610a6733610873565b610a6d60043560008054829081101561000257508052600e027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5678101547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5698201547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5668301547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564840154600080516020612a5d8339815191528501547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56a8601547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5688701547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56c8801547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56d8901547f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5708a0154600160a060020a039586169a96997f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e565979097019860ff888116986101009004811697959691959116939291168c565b610a4d600435602435600160a060020a03338116600081815260156020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b610a4d60105481565b610b64600754600160a060020a031681565b610b64600e54600160a060020a031681565b610a4d60165481565b610a4d5b60004262127500600f6000505403111561267757506014610a6a565b610b64601254600160a060020a031681565b610b64600435600060006000508281548110156100025750508080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56b600e83020180548290811015610002575081526020902060030154600160a060020a0316610754565b60408051602060248035600481810135601f8101859004850286018501909652858552610a4d958135959194604494929390920191819084018382808284375094965050505050505060006000600060006000600034111561140f57610002565b610a4d6004356024356044355b60115460009060ff1680156105b05750600f5442115b801561220b575061220984610a26565b610a4d60065481565b610a4d5b600d5430600160a060020a03163103610a6a565b610a4d600f5481565b610a4d60043560046020526000908152604090205460ff1681565b610a4d60043560243560006121ed6108ea565b610b8160003411156124b557610002565b604080516020604435600481810135601f8101849004840285018401909552848452610a4d948135946024803595939460649492939101918190840183828082843750506040805160209735808a0135601f81018a90048a0283018a01909352828252969897608497919650602491909101945090925082915084018382808284375094965050933593505060a43591505060006000610b833361073a565b610a4d60043560096020526000908152604090205481565b610a4d60015481565b610b8160043530600160a060020a031633600160a060020a03161415806107295750600160a060020a03811660009081526004602052604090205460ff16155b15611ee757611ee4565b610a4d6004355b600160a060020a0381166000908152601460205260409020545b919050565b610a4d600435602435600060003411156122bb57610002565b610a4d60006301dfe200420360026000505410156123375750426002908155600180549091028155610a6a565b610a4d600435600a6020526000908152604090205481565b610a4d6004356024356000600060006000600060003411156118cb57610002565b610b64600854600160a060020a031681565b610a4d600c5481565b610a4d60005460001901610a6a565b610a4d60025481565b610a4d6004356000600060006000341115611f1857610002565b610a4d5b6001610a6a565b610a4d6004356024355b60115460009060ff1680156108505750600f5442115b80156121a457506121a233610a26565b610a4d60115460ff1681565b610a4d6004355b60006000600f600050544210801561088b5750600034115b80156108c357506011546101009004600160a060020a0316600014806108c35750601154600160a060020a0333811661010090920416145b156121e8576123b5610498565b610a4d600435602435600060006111b43361073a565b610a4d5b6000600034111561219957610002565b610a4d60043560056020526000908152604090205481565b610a4d6004356024356044356000612251845b6000600060003411156126ad57610002565b610a4d600435602435600160a060020a03828116600090815260156020908152604080832093851683529290522054610458565b610b81600435600034111561226757610002565b610a4d600435600b6020526000908152604090205481565b610b64600354600160a060020a031681565b604080516020606435600481810135601f8101849004840285018401909552848452610a4d9481359460248035956044359560849492019190819084018382808284375094965050505050505060006000600034111561112557610002565b610b646011546101009004600160a060020a031681565b610a4d6004355b600160a060020a0381166000908152600b6020526040812054819081141561233f576123af565b60408051918252519081900360200190f35b610a67610829565b90505b90565b604051808d600160a060020a031681526020018c8152602001806020018b81526020018a815260200189815260200188815260200187815260200186815260200185815260200184815260200183600160a060020a0316815260200182810382528c818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015610b4a5780601f10610b1f57610100808354040283529160200191610b4a565b820191906000526020600020905b815481529060010190602001808311610b2d57829003601f168201915b50509d505050505050505050505050505060405180910390f35b60408051600160a060020a03929092168252519081900360200190f35b005b60001415610b9057610002565b828015610bda5750866000141580610baa57508451600014155b80610bc25750600354600160a060020a038981169116145b80610bcd5750600034115b80610bda575062093a8084105b15610be457610002565b82158015610c045750610bf688610c1e565b1580610c0457506212750084105b15610cc057610002565b835461158390600160a060020a03165b600160a060020a03811660009081526004602052604081205460ff1680610cb35750601254600160a060020a03908116908316148015610cb35750601260009054906101000a9004600160a060020a0316600160a060020a031663d2cc718f6040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051516006541190505b156128a257506001610754565b6249d400841115610cd057610002565b60115460ff161580610ce35750600f5442105b80610cf85750600c5434108015610cf8575082155b15610d0257610002565b428442011015610d1157610002565b30600160a060020a031633600160a060020a03161415610d3057610002565b6000805460018101808355909190828015829011610d6757600e0281600e028360005260206000209182019101610d679190610e2c565b505060008054929450918491508110156100025750808052600e8302600080516020612a5d8339815191520190508054600160a060020a031916891781556001818101899055875160028084018054600082815260209081902096975091959481161561010002600019011691909104601f908101829004840193918b0190839010610f2457805160ff19168380011785555b50610f54929150610f0c565b5050600060098201819055600a820155600d81018054600160a060020a03191690556001015b80821115610f20578054600160a060020a03191681556000600182810182905560028084018054848255909281161561010002600019011604601f819010610ef257505b506000600383018190556004808401805461ffff19169055600584018290556006840182905560078401805460ff191690556008840180548382559083526020909220610e06929091028101905b80821115610f2057600080825560018201818155600283019190915560039091018054600160a060020a0319169055610ebe565b601f016020900490600052602060002090810190610e7091905b80821115610f205760008155600101610f0c565b5090565b82800160010185558215610dfa579182015b82811115610dfa578251826000505591602001919060010190610f36565b50508787866040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f150905001935050505060405180910390208160050160005081905550834201816003016000508190555060018160040160006101000a81548160ff02191690830217905550828160070160006101000a81548160ff02191690830217905550821561103a5760088101805460018101808355909190828015829011611035576004028160040283600052602060002091820191016110359190610ebe565b505050505b600d8082018054600160a060020a031916331790553460068301819055815401905560408051600160a060020a038a16815260208181018a9052918101859052608060608201818152895191830191909152885185937f5790de2c279e58269b93b12828f56fd5f2bc8ad15e61ce08572585c81a38756f938d938d938a938e93929160a084019185810191908190849082908590600090600490601f850104600f02600301f150905090810190601f16801561110a5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a2509695505050505050565b6000805487908110156100025750808052600e8702600080516020612a5d83398151915201905090508484846040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020816005016000505414915050949350505050565b600014156111c157610002565b60003411156111cf57610002565b6000805485908110156100025750600160a060020a0333168152600e85027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56e8101602052604090912054600080516020612a5d83398151915291909101915060ff16806112485750600c810160205260406000205460ff165b80611257575060038101544210155b1561126157610002565b82156112a757600160a060020a0333166000908152601460209081526040808320546009850180549091019055600b84019091529020805460ff191660011790556112e3565b600160a060020a033316600090815260146020908152604080832054600a850180549091019055600c84019091529020805460ff191660011790555b600160a060020a0333166000908152600b6020526040812054141561130f576040600020849055611383565b600160a060020a0333166000908152600b60205260408120548154811015610002579080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e566600e90910201546003820154111561138357600160a060020a0333166000908152600b602052604090208490555b604080518481529051600160a060020a0333169186917f86abfce99b7dd908bec0169288797f85049ec73cbe046ed9de818fab3a497ae09181900360200190a35092915050565b6040805186815260208101839052815189927fdfc78bdca8e3e0b18c16c5c99323c6cb9eb5e00afde190b4e7273f5158702b07928290030190a25b5050505092915050565b6000805488908110156100025750808052600e8802600080516020612a5d833981519152019050600781015490945060ff1661144e57620d2f00611453565b622398805b600485015490935060ff16801561146f57506003840154830142115b1561147d5761151f8761152e565b60038401544210806114945750600484015460ff16155b8061151557508360000160009054906101000a9004600160a060020a03168460010160005054876040518084600160a060020a0316606060020a0281526014018381526020018280519060200190808383829060006004602084601f0104600f02600301f15090500193505050506040518091039020846005016000505414155b15610c0e57610002565b611405565b426002555b6113ca875b6000600060005082815481101561000257908052600e02600080516020612a5d833981519152018150600481015490915060ff161561157557600d80546006830154900390555b600401805460ff1916905550565b1580156115945750600484015460ff165b156115a2576115ae8761152e565b600191506115df6105cd565b604051600d8501546006860154600160a060020a0391909116916000919082818181858883f1935050505050611405565b600185015411156115ef57600091505b50600a8301546009840154865191019060049010801590611634575085600081518110156100025790602001015160f860020a900460f860020a02606860f860020a02145b8015611664575085600181518110156100025790602001015160f860020a900460f860020a02603760f860020a02145b8015611694575085600281518110156100025790602001015160f860020a900460f860020a0260ff60f860020a02145b80156116c4575085600381518110156100025790602001015160f860020a900460f860020a02601e60f860020a02145b80156116f3575030600160a060020a03166000908152600560205260409020546116f09061170b6105cd565b81105b156116fd57600091505b600184015461172e9061170d565b015b30600160a060020a03166000908152600560205260408120546128aa6105cd565b811015801561174557506009840154600a85015490115b801561174e5750815b1561178957604051600d8501546006860154600160a060020a0391909116916000919082818181858883f19350505050151561179757610002565b60018401546118709061170d565b42600255604051600185015485548851600160a060020a03919091169289918190602084810191908190849082908590600090600490601f850104600f02600301f150905090810190601f1680156118035780820380516001836020036101000a031916815260200191505b5091505060006040518083038185876185025a03f192505050151561182757610002565b60048401805461ff0019166101001790556001848101805430600160a060020a031660009081526005602052604090208054919091019055546006805490910190559450611529565b811015801561188757506009840154600a85015410155b80611890575081155b1561152957604051600d8501546006860154600160a060020a0391909116916000919082818181858883f19350505050151561152457610002565b6118d43361073a565b600014156118e157610002565b60008054889081101561000257508052600e87027f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e566810154600080516020612a5d83398151915291909101945042108061194357506003840154622398800142115b8061195c57508354600160a060020a0390811690871614155b8061196c5750600784015460ff16155b806119925750600160a060020a0333166000908152600b8501602052604090205460ff16155b806119b55750600160a060020a0333166000908152600b60205260409020548714155b156119bf57610002565b600884018054600090811015610002579081526020812060030154600160a060020a03161415611b2b57611c1586604051600090600160a060020a038316907f9046fefd66f538ab35263248a44217dcb70e2eb2cd136629e141b8b8f9f03b60908390a260408051600e547fe2faf044000000000000000000000000000000000000000000000000000000008252600160a060020a03858116600484015260248301859052604483018590526223988042016064840152925192169163e2faf04491608480820192602092909190829003018187876161da5a03f1156100025750506040515191506107549050565b6008850180546000908110156100025781815260208082209390935530600160a060020a031681526005909252604082205481549092908110156100025790815260208120905060020155601654600885018054600090811015610002579081526020812090506001015560048401805461ff0019166101001790555b60088401805460009081101561000257815482825260208220600101549291908110156100025790815260208120905054600160a060020a033316600090815260146020526040812054600888018054939091029390930495509081101561000257908152602081209050604080516003909201547fbaac5300000000000000000000000000000000000000000000000000000000008352600160a060020a033381166004850152915191169163baac5300918691602480820192602092909190829003018185886185025a03f11561000257505060405151600014159150611c91905057610002565b60088501805460009081101561000257818152602081206003018054600160a060020a03191690931790925580549091908110156100025790815260208120905060030154600160a060020a031660001415611c7057610002565b600d5430600160a060020a0316311015611c8957610002565b611aae6105cd565b60088401805460009081101561000257815482825260208220600101549291908110156100025790815260208120905060020154600160a060020a0333811660009081526014602090815260408083205430909416835260058083528184205460099093529083205460088b018054969095029690960497509487020494508593929091908290811015610002575260208120815060030154600160a060020a03908116825260208281019390935260409182016000908120805490950190945530168352600590915290205482901015611d6b57610002565b30600160a060020a031660009081526005602052604081208054849003905560088501805483926009929091829081101561000257508152602080822060030154600160a060020a0390811683529290526040808220805494909401909355309091168152205481901015611ddf57610002565b30600160a060020a039081166000908152600960209081526040808320805486900390553393909316808352601482528383205484519081529351929390927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3611e5233610925565b50600160a060020a0333166000908152601460209081526040808320805460168054919091039055839055600a90915281205560019450611405565b30600160a060020a03908116600081815260056020908152604080832080549587168085528285208054979097019096558484528390556009909152808220805494835290822080549490940190935590815290555b50565b604051600160a060020a0382811691309091163190600081818185876185025a03f1925050501515611e8e57610002565b600160a060020a0333818116600090815260096020908152604080832054815160065460085460e060020a63d2cc718f028352935196995091969195929091169363d2cc718f93600483810194919391929183900301908290876161da5a03f11561000257505050604051805190602001506005600050600033600160a060020a031681526020019081526020016000206000505402041015611fba57610002565b600160a060020a03338116600090815260096020908152604080832054815160065460085460e060020a63d2cc718f02835293519296909593169363d2cc718f93600483810194929383900301908290876161da5a03f11561000257505050604051805190602001506005600050600033600160a060020a03168152602001908152602001600020600050540204039050831561210957600860009054906101000a9004600160a060020a0316600160a060020a0316630221038a83600160a060020a0316630e7082036040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060408051805160e160020a63011081c5028252600160a060020a031660048201526024810186905290516044808301935060209282900301816000876161da5a03f115610002575050604051511515905061217157610002565b6040805160085460e160020a63011081c5028252600160a060020a038581166004840152602483018590529251921691630221038a9160448082019260209290919082900301816000876161da5a03f115610002575050604051511515905061217157610002565b600160a060020a03331660009081526009602052604090208054909101905550600192915050565b610a6733610925565b155b80156121bf57506121bf3384845b6000600061283b8561073a565b80156121db57506121db8383600060003411156128cc57610002565b156121e857506001610458565b610002565b15156121f857610002565b612202838361083a565b9050610458565b155b801561221d575061221d8484846121b2565b801561223a575061223a8484846000600034111561297157610002565b156121e85750600161224a565b90505b9392505050565b151561225c57610002565b61224784848461059a565b30600160a060020a031633600160a060020a03161415806122ac575030600160a060020a03166000908152600560205260409020546064906122a76105cd565b010481115b156122b657610002565b600c55565b600354600160a060020a039081163391909116146122d857610002565b600160a060020a038316600081815260046020908152604091829020805460ff191686179055815185815291517f73ad2a153c8b67991df9459024950b318a609782cee8c7eeda47b905f9baa91f9281900390910190a2506001610458565b506000610a6a565b600160a060020a0383166000908152600b6020526040812054815481101561000257818052600e02600080516020612a5d83398151915201905060038101549091504211156123aa57600160a060020a0383166000908152600b6020526040812081905591506123af565b600191505b50919050565b604051601254601434908102939093049350600160a060020a03169183900390600081818185876185025a03f150505050600160a060020a038316600081815260146020908152604080832080548601905560168054860190556013825291829020805434019055815184815291517fdbccb92686efceafb9bb7e0394df7f58f71b954061b81afb57109bf247d3d75a9281900390910190a260105460165410801590612465575060115460ff16155b156123aa576011805460ff1916600117905560165460408051918252517ff381a3e2428fdda36615919e8d9c35878d9eb0cf85ac6edf575088e80e4c147e9181900360200190a1600191506123af565b600f54421180156124c9575060115460ff16155b15612675576040805160125460e060020a63d2cc718f0282529151600160a060020a039290921691630221038a913091849163d2cc718f91600480830192602092919082900301816000876161da5a03f11561000257505060408051805160e160020a63011081c5028252600160a060020a039490941660048201526024810193909352516044838101936020935082900301816000876161da5a03f11561000257505060408051600160a060020a03331660008181526013602052928320549093509181818185876185025a03f192505050156126755760406000818120600160a060020a0333169182905260136020908152835191548252925191927fbb28353e4598c3b9199101a66e0989549b659a59a54d2c27fbb183f1932c8e6d92918290030190a26014600050600033600160a060020a0316815260200190815260200160002060005054601660008282825054039250508190555060006014600050600033600160a060020a031681526020019081526020016000206000508190555060006013600050600033600160a060020a03168152602001908152602001600020600050819055505b565b4262054600600f600050540311156126a5576201518062127500600f60005054034203046014019050610a6a565b50601e610a6a565b600160a060020a038381166000908152600a6020908152604080832054601654600754835160e060020a63d2cc718f02815293519296919591169363d2cc718f9360048181019492939183900301908290876161da5a03f11561000257505060405151905061271b8661073a565b0204101561272857610002565b600160a060020a038381166000908152600a6020908152604080832054601654600754835160e060020a63d2cc718f02815293519296919591169363d2cc718f9360048181019492939183900301908290876161da5a03f1156100025750506040515190506127968661073a565b0204039050600760009054906101000a9004600160a060020a0316600160a060020a0316630221038a84836040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506020604051808303816000876161da5a03f115610002575050604051511515905061281457610002565b600160a060020a0383166000908152600a60205260409020805482019055600191506123af565b600160a060020a0386166000908152600a602052604090205480850291909104915081111561286957610002565b600160a060020a038581166000908152600a60205260408082208054859003905591861681522080548201905560019150509392505050565b506000610754565b0160030260166000505483020460016000505460166000505404019050610754565b600160a060020a0333166000908152601460205260409020548290108015906128f55750600082115b1561296957600160a060020a03338116600081815260146020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610458565b506000610458565b600160a060020a0384166000908152601460205260409020548290108015906129ba57506015602090815260406000818120600160a060020a0333168252909252902054829010155b80156129c65750600082115b15612a5557600160a060020a0383811660008181526014602090815260408083208054880190558885168084528184208054899003905560158352818420339690961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600161224a565b50600061224a56290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563
You will just need to keep what comes after Binary:
.
Getting Abstract Binary Interface (ABI)
Still from the same directory type:
solc --optimize --abi DAO.sol
From the output again keep the ABI only for the DAO_Creator
and the DAO
. This is what the output looked like for both at the time of writting this tutorial.
- DAO_Creator
======= DAO_Creator =======
Contract JSON ABI
[{"constant":false,"inputs":[{"name":"_curator","type":"address"},{"name":"_proposalDeposit","type":"uint256"},{"name":"_minTokensToCreate","type":"uint256"},{"name":"_closingTime","type":"uint256"}],"name":"createDAO","outputs":[{"name":"_newDAO","type":"address"}],"type":"function"}]
- DAO
======= DAO =======
Contract JSON ABI
[{"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":"fun
ction"},{"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":"","typ
e":"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":false,"inputs":[],"name":"divisor","outputs":[{"name":"divisor","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"extraBalance","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":true,"inputs":[{"name":"_proposalID","type":"uint256"}],"name":"getNewDAOAdress","outputs":[{"name":"_newDAO","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":"tr
ansferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalRewardToken","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"actualBalance","outputs":[{"name":"_actualBal
ance","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":"addres
s"}],"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"}],"ty
pe":"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":"func
tion"},{"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"},{"constant":false,"inputs":[{"name":"_account","type":"address"}],"name":"isBlocked","outputs":[{"name":"","type":"bool"}],"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":"p
roposalID","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":"NewCura
tor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_recipient","type":"address"},{"indexed":false,"name":"_allowed","type":"bool"}],"name":"AllowedRecipientChanged","type":"event"}]
From the above you should only keep the json part (the part inside the [
and ]
.
Deploying the Contracts
What is important to understand is that deploying the contracts is a two step process.
- One must first deploy an instance of the
DAO_Creator
contract. - Once that is done, a
DAO
contract should be deployed with the address of the previously deployedDAO_Creator
as a constructor argument.
There are many choices regarding the method of deployment. One would be to simply use the Mist wallet as shown in this non-devs Tutorial step and deploy both contracts only using the binary code ABI combination instead of the source.
Since that is well covered in the other tutorial we will focus here on deploying them via the command line interface of an ethereum client. The end result is going to be the same.
Deploying DAO_Creator
In the geth cli
type the following in order, substituting CREATOR_ABI
and CREATOR_BIN
for the json ABI and binary you generated with solc as per the above steps.
var creator_abi = CREATOR_ABI;
var creator_bin = 'CREATOR_BIN';
var creatorContract = web3.eth.contract(creator_abi);
var daoCreatorContract = creatorContract.new({from: web3.eth.accounts[0], data: creator_bin, gas: 4000000});
In the above you have to make sure that your account web3.eth.accounts[0]
is unlocked and has enough eth.
In the command line output you will see something like:
> var daoCreatorContract = creatorContract.new({from: web3.eth.accounts[0], data: creator_bin, gas: 4000000});I0420 00:37:20.795526 core/blockchain.go:959] imported 1 block(s) (0 queued 0 ignored) including 3 txs in 13.462901ms. #786251 [441a4574 / 441a4574]
I0420 00:37:21.938507 eth/api.go:1150] Tx(0x46e61c63d8dd667cf113522f67d5c3a37b7e16e6e21922c661e9c7578a0df380) created: 0xa3bd72ef78f588a957f9a55994fd43f53f844314
undefined
> I0420 00:37:23.988029 core/blockchain.go:959] imported 1 block(s) (0 queued 0 ignored) including 0 txs in 3.471802ms. #786252 [83c4fed7 / 83c4fed7]
The address after 'created:' is the address of your new DAO_Creator
contract. Remember it.
Deploying The DAO
The DAO has several constructor parameters which are very important and we are going to explain here:
curator
Address of the curator (typical a multisig account)daoCreator
Address of the DAO creator which was just created in the previous stepproposalDeposit
The amount (in wei) to be paid as a deposit for a proposal. After a vote in the community slack channel, it was decided that 2 Ether (2 * 10^18 Wei) would be a reasonable number.minTokensToCreate
The minimum number of tokens (in its base unit) which need to be created during the creation phase (e.g. 5.000.000 DAO = 5 * 10^22 base unit DAO) -closingTime
The unix time at which the creation phase ends.privateCreation
The only address which is allowed to create tokens. For a public DAO creation, this field is left empty.
After you decide what values you want for you DAO then you can proceed with the CLI as before. Type the following in order substituting DAO_ABI
and DAO_BIN
for the json ABI and binary you generated with solc,creator_address
with the address of the DAO creator contract generated in the previous step and all the variables of the constructor as mentioned above.
var dao_abi = DAO_ABI;
var dao_bin = 'DAO_BIN';
var daoContract = web3.eth.contract(dao_abi);
var dao = daoContract.new(curator, creator_address, web3.toWei(proposalDeposit, "ether"), web3.toWei(minTokensToCreate, "ether"), closingTime, 0, {from: web3.eth.accounts[0], data: dao_bin, gas: 4000000});
As with the DAO_Creator
step once you type in all 4 of the above commands and your transaction gets mined you will eventually see the address of your newly created DAO pop up in the command line output.
Congratulations your DAO is now deployed. From there and on you can use that address and follow the rest of the tutorials on the sidebar to see how to interact with your DAO.