Contract Source Code
/*
This file is part of the DAO.
000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413
Account 0xB3267B3B37a1C153Ca574c3A50359f9d1613F95d
dthPool 0xB256D572885A5246DDbF548F39da57f5f8074b9a
Hello all! I just deployed the first DTHPool (Delegate) in the real net.
The delegate in this contract is myself. My intention is not to be a stable delegate but to construct a repository of delegates where DTH’s can choose.
I tested to delegate and undelegate some tokens. I also set up the votes for the proposals made to the DAO until now.
If any body wants to delegate me some tokens, he will be wellcome!. You can also check the votes set up and his motivations.
I'll appreciate any feedback.
If any body wants to be a delegate, I’m absolutely open to help him to deploy the contract.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU lesser General Public License for more details.
You should have received a copy of the GNU lesser General Public License
along with the DAO. If not, see <http://www.gnu.org/licenses/>.
*/
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU lesser General Public License for more details.
You should have received a copy of the GNU lesser General Public License
along with the DAO. If not, see <http://www.gnu.org/licenses/>.
*/
// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize srl, Thomas Bertani
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
contract OraclizeI {
address public cbAddress;
function query(uint _timestamp, string _datasource, string _arg) returns (bytes32 _id);
function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) returns (bytes32 _id);
function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) returns (bytes32 _id);
function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) returns (bytes32 _id);
function getPrice(string _datasource) returns (uint _dsprice);
function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice);
function useCoupon(string _coupon);
function setProofType(byte _proofType);
}
contract OraclizeAddrResolverI {
function getAddress() returns (address _addr);
}
contract usingOraclize {
uint constant day = 60*60*24;
uint constant week = 60*60*24*7;
uint constant month = 60*60*24*30;
byte constant proofType_NONE = 0x00;
byte constant proofType_TLSNotary = 0x10;
byte constant proofStorage_IPFS = 0x01;
uint8 constant networkID_auto = 0;
uint8 constant networkID_mainnet = 1;
uint8 constant networkID_testnet = 2;
uint8 constant networkID_morden = 2;
uint8 constant networkID_consensys = 161;
OraclizeAddrResolverI OAR;
OraclizeI oraclize;
modifier oraclizeAPI {
address oraclizeAddr = OAR.getAddress();
if (oraclizeAddr == 0){
oraclize_setNetwork(networkID_auto);
oraclizeAddr = OAR.getAddress();
}
oraclize = OraclizeI(oraclizeAddr);
_
}
modifier coupon(string code){
oraclize = OraclizeI(OAR.getAddress());
oraclize.useCoupon(code);
_
}
function oraclize_setNetwork(uint8 networkID) internal returns(bool){
if (getCodeSize(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed)>0){
OAR = OraclizeAddrResolverI(0x1d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed);
return true;
}
if (getCodeSize(0x9efbea6358bed926b293d2ce63a730d6d98d43dd)>0){
OAR = OraclizeAddrResolverI(0x9efbea6358bed926b293d2ce63a730d6d98d43dd);
return true;
}
if (getCodeSize(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf)>0){
OAR = OraclizeAddrResolverI(0x20e12a1f859b3feae5fb2a0a32c18f5a65555bbf);
return true;
}
return false;
}
function oraclize_query(string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource);
if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
return oraclize.query.value(price)(0, datasource, arg);
}
function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource);
if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
return oraclize.query.value(price)(timestamp, datasource, arg);
}
function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource, gaslimit);
if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit);
}
function oraclize_query(string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource, gaslimit);
if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
return oraclize.query_withGasLimit.value(price)(0, datasource, arg, gaslimit);
}
function oraclize_query(string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource);
if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
return oraclize.query2.value(price)(0, datasource, arg1, arg2);
}
function oraclize_query(uint timestamp, string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource);
if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price
return oraclize.query2.value(price)(timestamp, datasource, arg1, arg2);
}
function oraclize_query(uint timestamp, string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource, gaslimit);
if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
return oraclize.query2_withGasLimit.value(price)(timestamp, datasource, arg1, arg2, gaslimit);
}
function oraclize_query(string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){
uint price = oraclize.getPrice(datasource, gaslimit);
if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price
return oraclize.query2_withGasLimit.value(price)(0, datasource, arg1, arg2, gaslimit);
}
function oraclize_cbAddress() oraclizeAPI internal returns (address){
return oraclize.cbAddress();
}
function oraclize_setProof(byte proofP) oraclizeAPI internal {
return oraclize.setProofType(proofP);
}
function getCodeSize(address _addr) constant internal returns(uint _size) {
assembly {
_size := extcodesize(_addr)
}
}
function parseAddr(string _a) internal returns (address){
bytes memory tmp = bytes(_a);
uint160 iaddr = 0;
uint160 b1;
uint160 b2;
for (uint i=2; i<2+2*20; i+=2){
iaddr *= 256;
b1 = uint160(tmp[i]);
b2 = uint160(tmp[i+1]);
if ((b1 >= 97)&&(b1 <= 102)) b1 -= 87;
else if ((b1 >= 48)&&(b1 <= 57)) b1 -= 48;
if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87;
else if ((b2 >= 48)&&(b2 <= 57)) b2 -= 48;
iaddr += (b1*16+b2);
}
return address(iaddr);
}
function strCompare(string _a, string _b) internal returns (int) {
bytes memory a = bytes(_a);
bytes memory b = bytes(_b);
uint minLength = a.length;
if (b.length < minLength) minLength = b.length;
for (uint i = 0; i < minLength; i ++)
if (a[i] < b[i])
return -1;
else if (a[i] > b[i])
return 1;
if (a.length < b.length)
return -1;
else if (a.length > b.length)
return 1;
else
return 0;
}
function indexOf(string _haystack, string _needle) internal returns (int)
{
bytes memory h = bytes(_haystack);
bytes memory n = bytes(_needle);
if(h.length < 1 || n.length < 1 || (n.length > h.length))
return -1;
else if(h.length > (2**128 -1))
return -1;
else
{
uint subindex = 0;
for (uint i = 0; i < h.length; i ++)
{
if (h[i] == n[0])
{
subindex = 1;
while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex])
{
subindex++;
}
if(subindex == n.length)
return int(i);
}
}
return -1;
}
}
function strConcat(string _a, string _b, string _c, string _d, string _e) internal returns (string){
bytes memory _ba = bytes(_a);
bytes memory _bb = bytes(_b);
bytes memory _bc = bytes(_c);
bytes memory _bd = bytes(_d);
bytes memory _be = bytes(_e);
string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
bytes memory babcde = bytes(abcde);
uint k = 0;
for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
for (i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
for (i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
for (i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
for (i = 0; i < _be.length; i++) babcde[k++] = _be[i];
return string(babcde);
}
function strConcat(string _a, string _b, string _c, string _d) internal returns (string) {
return strConcat(_a, _b, _c, _d, "");
}
function strConcat(string _a, string _b, string _c) internal returns (string) {
return strConcat(_a, _b, _c, "", "");
}
function strConcat(string _a, string _b) internal returns (string) {
return strConcat(_a, _b, "", "", "");
}
// parseInt
function parseInt(string _a) internal returns (uint) {
return parseInt(_a, 0);
}
// parseInt(parseFloat*10^_b)
function parseInt(string _a, uint _b) internal returns (uint) {
bytes memory bresult = bytes(_a);
uint mint = 0;
bool decimals = false;
for (uint i=0; i<bresult.length; i++){
if ((bresult[i] >= 48)&&(bresult[i] <= 57)){
if (decimals){
if (_b == 0) break;
else _b--;
}
mint *= 10;
mint += uint(bresult[i]) - 48;
} else if (bresult[i] == 46) decimals = true;
}
return mint;
}
}
// </ORACLIZE_API>
/*
Basic, standardized Token contract with no "premine". Defines the functions to
check token balances, send tokens, send tokens on behalf of a 3rd party and the
corresponding approval process. Tokens need to be created by a derived
contract (e.g. TokenCreation.sol).
Thank you ConsenSys, this contract originated from:
https://github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/Standard_Token.sol
Which is itself based on the Ethereum standardized contract APIs:
https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs
*/
/// @title Standard Token Contract.
contract TokenInterface {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
/// Public variables of the token, all used for display
string public name;
string public symbol;
uint8 public decimals;
string public standard = 'Token 0.1';
/// Total amount of tokens
uint256 public totalSupply;
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint256 balance);
/// @notice Send `_amount` tokens to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint256 _amount) returns (bool success);
/// @notice Send `_amount` tokens to `_to` from `_from` on the condition it
/// is approved by `_from`
/// @param _from The address of the origin of the transfer
/// @param _to The address of the recipient
/// @param _amount The amount of tokens to be transferred
/// @return Whether the transfer was successful or not
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success);
/// @notice `msg.sender` approves `_spender` to spend `_amount` tokens on
/// its behalf
/// @param _spender The address of the account able to transfer the tokens
/// @param _amount The amount of tokens to be approved for transfer
/// @return Whether the approval was successful or not
function approve(address _spender, uint256 _amount) returns (bool success);
/// @param _owner The address of the account owning tokens
/// @param _spender The address of the account able to transfer the tokens
/// @return Amount of remaining tokens of _owner that _spender is allowed
/// to spend
function allowance(
address _owner,
address _spender
) constant returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _amount);
event Approval(
address indexed _owner,
address indexed _spender,
uint256 _amount
);
}
contract tokenRecipient {
function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);
}
contract Token is TokenInterface {
// Protects users by preventing the execution of method calls that
// inadvertently also transferred ether
modifier noEther() {if (msg.value > 0) throw; _}
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
function transfer(address _to, uint256 _amount) noEther returns (bool success) {
if (balances[msg.sender] >= _amount && _amount > 0) {
balances[msg.sender] -= _amount;
balances[_to] += _amount;
Transfer(msg.sender, _to, _amount);
return true;
} else {
return false;
}
}
function transferFrom(
address _from,
address _to,
uint256 _amount
) noEther returns (bool success) {
if (balances[_from] >= _amount
&& allowed[_from][msg.sender] >= _amount
&& _amount > 0) {
balances[_to] += _amount;
balances[_from] -= _amount;
allowed[_from][msg.sender] -= _amount;
Transfer(_from, _to, _amount);
return true;
} else {
return false;
}
}
function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
/// Allow another contract to spend some tokens in your behalf
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
returns (bool success) {
allowed[msg.sender][_spender] = _value;
tokenRecipient spender = tokenRecipient(_spender);
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
}
/*
This file is part of the DAO.
The DAO is free software: you can redistribute it and/or modify
it under the terms of the GNU lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The DAO is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU lesser General Public License for more details.
You should have received a copy of the GNU lesser General Public License
along with the DAO. If not, see <http://www.gnu.org/licenses/>.
*/
/////////////////////
// There is a solidity bug in the return parameters that it's not solved
// when the bug is solved, the import from DAO is more clean.
// In the meantime, a workaround proxy is defined
// Uncoment this line when error fixed
// import "./DAO.sol";
// Workaround proxy remove when fixed
contract DAO {
function proposals(uint _proposalID) returns(
address recipient,
uint amount,
uint descriptionIdx,
uint votingDeadline,
bool open,
bool proposalPassed,
bytes32 proposalHash,
uint proposalDeposit,
bool newCurator
);
function transfer(address _to, uint256 _amount) returns (bool success);
function transferFrom(address _from, address _to, uint256 _amount) returns (bool success);
function vote(
uint _proposalID,
bool _supportsProposal
) returns (uint _voteID);
function balanceOf(address _owner) constant returns (uint256 balance);
}
// End of workaround proxy
////////////////////
contract DTHPoolInterface {
// delegae url
string public delegateUrl;
// Max time the tokens can be blocked.
// The real voting in the DAO will be called in the last moment in order
// to block the tokens for the minimum time. This parameter defines the
// seconds before the voting period ends that the vote can be performed
uint maxTimeBlocked;
// Address of the delegate
address public delegate;
// The DAO contract
address public daoAddress;
struct ProposalStatus {
// True when the delegate sets the vote
bool voteSet;
// True if the proposal should ve voted
bool willVote;
// True if the proposal should be accepted.
bool suportProposal;
// True when the vote is performed;
bool executed;
// Proposal votingDeadline
uint votingDeadline;
// String set by the delegator with the motivation
string motivation;
}
// Statuses of the diferent proposal
mapping (uint => ProposalStatus) public proposalStatuses;
// Index of proposals by oraclizeId
mapping (bytes32 => uint) public oraclizeId2proposalId;
/// @dev Constructor setting the dao address and the delegate
/// @param _daoAddress address of the DAO
/// @param _delegate adddress of the delegate.
/// @param _maxTimeBlocked the maximum time the tokens will be blocked
/// @param _delegateName Name of the delegate
/// @param _delegateUrl Url of the delegate
/// @param _tokenSymbol token symbol.
// DTHPool(address _daoAddress, address _delegate, uint _maxTimeBlocked, string _delegateName, string _delegateUrl, string _tokenSymbol);
/// @notice send votes to this contract.
/// @param _amount Tokens that will be transfered to the pool.
/// @return Whether the transfer was successful or not
function delegateDAOTokens(uint _amount) returns (bool _success);
/// Returns DAO tokens to the original
/// @param _amount that will be transfered back to the owner.
/// @return Whether the transfer was successful or not
function undelegateDAOTokens(uint _amount) returns (bool _success);
/// @notice This method will be called by the delegate to publish what will
/// be his vote in a specific proposal.
/// @param _proposalID The proposal to set the vote.
/// @param _willVote true If the proposal will be voted.
/// @param _supportsProposal What will be the vote.
function setVoteIntention(
uint _proposalID,
bool _willVote,
bool _supportsProposal,
string _motivation
) returns (bool _success);
/// @notice This method will be doing the actual voting in the DAO
/// for the _proposalID
/// @param _proposalID The proposal to set the vote.
/// @return _finalized true if this vote Proposal must not be executed again.
function executeVote(uint _proposalID) returns (bool _finalized);
/// @notice This function is intended because if some body sends tokens
/// directly to this contract, the tokens can be sent to the delegate
function fixTokens() returns (bool _success);
/// @notice If some body sends ether to this contract, the delegate will be
/// able to extract it.
function getEther() returns (uint _amount);
/// @notice Called when some body delegates token to the pool
event Delegate(address indexed _from, uint256 _amount);
/// @notice Called when some body undelegates token to the pool
event Undelegate(address indexed _from, uint256 _amount);
/// @notice Called when the delegate set se vote intention
event VoteIntentionSet(uint indexed _proposalID, bool _willVote, bool _supportsProposal);
/// @notice Called when the vote is executed in the DAO
event VoteExecuted(uint indexed _proposalID);
}
contract DTHPool is DTHPoolInterface, Token, usingOraclize {
modifier onlyDelegate() {if (msg.sender != delegate) throw; _}
// DTHPool(address _daoAddress, address _delegate, uint _maxTimeBlocked, string _delegateName, string _delegateUrl, string _tokenSymbol);
function DTHPool(
address _daoAddress,
address _delegate,
uint _maxTimeBlocked,
string _delegateName,
string _delegateUrl,
string _tokenSymbol
) {
daoAddress = _daoAddress;
delegate = _delegate;
delegateUrl = _delegateUrl;
maxTimeBlocked = _maxTimeBlocked;
name = _delegateName;
symbol = _tokenSymbol;
decimals = 16;
oraclize_setNetwork(networkID_auto);
}
function delegateDAOTokens(uint _amount) returns (bool _success) {
DAO dao = DAO(daoAddress);
if (!dao.transferFrom(msg.sender, address(this), _amount)) {
throw;
}
balances[msg.sender] += _amount;
totalSupply += _amount;
Delegate(msg.sender, _amount);
return true;
}
function undelegateDAOTokens(uint _amount) returns (bool _success) {
DAO dao = DAO(daoAddress);
if (_amount > balances[msg.sender]) {
throw;
}
if (!dao.transfer(msg.sender, _amount)) {
throw;
}
balances[msg.sender] -= _amount;
totalSupply -= _amount;
Undelegate(msg.sender, _amount);
return true;
}
function setVoteIntention(
uint _proposalID,
bool _willVote,
bool _supportsProposal,
string _motivation
) onlyDelegate returns (bool _success) {
DAO dao = DAO(daoAddress);
ProposalStatus proposalStatus = proposalStatuses[_proposalID];
if (proposalStatus.voteSet) {
throw;
}
var (,,,votingDeadline, ,,,,newCurator) = dao.proposals(_proposalID);
if (votingDeadline < now || newCurator ) {
throw;
}
proposalStatus.voteSet = true;
proposalStatus.willVote = _willVote;
proposalStatus.suportProposal = _supportsProposal;
proposalStatus.votingDeadline = votingDeadline;
proposalStatus.motivation = _motivation;
VoteIntentionSet(_proposalID, _willVote, _supportsProposal);
if (!_willVote) {
proposalStatus.executed = true;
VoteExecuted(_proposalID);
}
bool finalized = executeVote(_proposalID);
if ((!finalized)&&(address(OAR) != 0)) {
bytes32 oraclizeId = oraclize_query(votingDeadline - maxTimeBlocked +15, "URL", "");
oraclizeId2proposalId[oraclizeId] = _proposalID;
}
return true;
}
function executeVote(uint _proposalID) returns (bool _finalized) {
DAO dao = DAO(daoAddress);
ProposalStatus proposalStatus = proposalStatuses[_proposalID];
if (!proposalStatus.voteSet
|| now > proposalStatus.votingDeadline
|| !proposalStatus.willVote
|| proposalStatus.executed) {
return true;
}
if (now < proposalStatus.votingDeadline - maxTimeBlocked) {
return false;
}
dao.vote(_proposalID, proposalStatus.suportProposal);
proposalStatus.executed = true;
VoteExecuted(_proposalID);
return true;
}
function __callback(bytes32 oid, string result) {
uint proposalId = oraclizeId2proposalId[oid];
executeVote(proposalId);
oraclizeId2proposalId[oid] = 0;
}
function fixTokens() returns (bool _success) {
DAO dao = DAO(daoAddress);
uint ownedTokens = dao.balanceOf(this);
if (ownedTokens < totalSupply) {
throw;
}
uint fixTokens = ownedTokens - totalSupply;
if (fixTokens == 0) {
return true;
}
balances[delegate] += fixTokens;
totalSupply += fixTokens;
return true;
}
function getEther() onlyDelegate returns (uint _amount) {
uint amount = this.balance;
if (!delegate.call.value(amount)()) {
throw;
}
return amount;
}
} Contract ABI
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[],"name":"daoAddress","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"oid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposalStatuses","outputs":[{"name":"voteSet","type":"bool"},{"name":"willVote","type":"bool"},{"name":"suportProposal","type":"bool"},{"name":"executed","type":"bool"},{"name":"votingDeadline","type":"uint256"},{"name":"motivation","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"},{"name":"_willVote","type":"bool"},{"name":"_supportsProposal","type":"bool"},{"name":"_motivation","type":"string"}],"name":"setVoteIntention","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"standard","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"oraclizeId2proposalId","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"delegateDAOTokens","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"delegateUrl","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"type":"function"},{"constant":true,"inputs":[],"name":"delegate","outputs":[{"name":"","type":"address"}],"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","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":"getEther","outputs":[{"name":"_amount","type":"uint256"}],"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"undelegateDAOTokens","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[],"name":"fixTokens","outputs":[{"name":"_success","type":"bool"}],"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"}],"name":"executeVote","outputs":[{"name":"_finalized","type":"bool"}],"type":"function"},{"inputs":[{"name":"_daoAddress","type":"address"},{"name":"_delegate","type":"address"},{"name":"_maxTimeBlocked","type":"uint256"},{"name":"_delegateName","type":"string"},{"name":"_delegateUrl","type":"string"},{"name":"_tokenSymbol","type":"string"}],"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":true,"name":"_from","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Delegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Undelegate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalID","type":"uint256"},{"indexed":false,"name":"_willVote","type":"bool"},{"indexed":false,"name":"_supportsProposal","type":"bool"}],"name":"VoteIntentionSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_proposalID","type":"uint256"}],"name":"VoteExecuted","type":"event"}] Contract Creation ByteCode
60a060405260096060527f546f6b656e20302e310000000000000000000000000000000000000000000000608052600b805460008290527f546f6b656e20302e31000000000000000000000000000000000000000000001282556100b5907f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9602060026001841615610100026000190190931692909204601f01919091048101905b8082111561019557600081556001016100a1565b50506040516118d23803806118d28339810160405280805190602001909190805190602001909190805190602001909190805182019190602001805182019190602001805182019190602001505060038054600160a060020a031990811688179091556002805490911686178155825160008054818052909260206001831615610100026000190190921604601f9081018290047f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563908101939290919087019083901061019957805160ff19168380011785555b506101c99291506100a1565b5090565b82800160010185558215610189579182015b828111156101895782518260005055916020019190600101906101ab565b50506001848155600880548551600083905291927ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee36020600292841615610100026000190190931691909104601f9081018390048201939288019083901061024457805160ff19168380011785555b506102749291506100a1565b82800160010185558215610238579182015b82811115610238578251826000505591602001919060010190610256565b50508060096000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102cd57805160ff19168380011785555b506102fd9291506100a1565b828001600101855582156102c1579182015b828111156102c15782518260005055916020019190600101906102df565b5050600a805460ff19166010179055610332600060006000610350731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed5b3b90565b505050505050506114a2806104306000396000f35b5060005b919050565b11156103845750600d8054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055600161034b565b60006103a3739efbea6358bed926b293d2ce63a730d6d98d43dd61032e565b11156103da5750600d8054739efbea6358bed926b293d2ce63a730d6d98d43dd600160a060020a031991909116179055600161034b565b60006103f97320e12a1f859b3feae5fb2a0a32c18f5a65555bbf61032e565b11156103475750600d80547320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160a060020a031991909116179055600161034b56606060405236156101115760e060020a600035046306fdde038114610113578063095ea7b31461017157806318160ddd146101e65780632131c68c146101ef57806323b872dd1461020157806327dc297e1461021d578063313ce5671461027e57806334075cbd1461028a5780634da74ee6146102cf5780635a3b7e421461034757806370a08231146103a557806383c218c2146103ca5780638bfc2f33146103e25780638e95b28b1461047557806395d89b41146104d3578063a9059cbb14610531578063c89e43611461054a578063cae9ca511461055c578063dd62ed3e146106c5578063de0ff7c5146106f9578063e417291b1461071d578063e49dcee914610751578063f98a4eca146107db575b005b6040805160088054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261084993908301828280156109f35780601f106109c8576101008083540402835291602001916109f3565b6108b760043560243533600160a060020a03908116600081815260076020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b6108cb600c5481565b6108dd600354600160a060020a031681565b6108b7600435602435604435600060003411156109fb57610002565b60408051602060248035600481810135601f81018590048502860185019096528585526101119581359591946044949293909201918190840183828082843750949650505050505050600082815260056020526040902054610ae9816107e2565b6108fa600a5460ff1681565b61091160043560046020526000908152604090208054600182015460ff8281169361010084048216936201000081048316936301000000909104909216919060020186565b604080516020606435600481810135601f81018490048402850184019095528484526108b794813594602480359560443595608494920191908190840183828082843750949650505050505050600254600090819081908190819081908190600160a060020a039081163390911614610afd57610002565b60408051600b8054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261084993908301828280156109f35780601f106109c8576101008083540402835291602001916109f3565b6108cb600435600160a060020a0381166000908152600660205260409020545b919050565b6108cb60043560056020526000908152604090205481565b6108b7600435604080516003547f23b872dd00000000000000000000000000000000000000000000000000000000825233600160a060020a0390811660048401523081166024840152604483018590529251600093919091169182916323b872dd91606481810192602092909190829003018188876161da5a03f1156100025750506040515115159050610e1c57610002565b6040805160008054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261084993908301828280156109f35780601f106109c8576101008083540402835291602001916109f3565b6040805160098054602060026001831615610100026000190190921691909104601f810182900482028401820190945283835261084993908301828280156109f35780601f106109c8576101008083540402835291602001916109f3565b6108b760043560243560006000341115610e8257610002565b6108dd600254600160a060020a031681565b604080516020604435600481810135601f81018490048402850184019095528484526108b794813594602480359593946064949293910191819084018382808284375094965050505050505060006000836007600050600033600160a060020a03168152602001908152602001600020600050600087600160a060020a031681526020019081526020016000206000508190555084905080600160a060020a0316638f4ffcb1338630876040518560e060020a0281526004018085600160a060020a0316815260200184815260200183600160a060020a03168152602001806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156106965780820380516001836020036101000a031916815260200191505b50955050505050506000604051808303816000876161da5a03f11561000257505050600191505b509392505050565b6108cb600435602435600160a060020a038281166000908152600760209081526040808320938516835292905220546101e0565b6108cb6002546000908190600160a060020a039081163390911614610f2857610002565b60035433600160a060020a039081166000908152600660205260408120546108b793600435931690831115610f5d57610002565b600354604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600160a060020a03908116600483015291516108b79360009316918391829184916370a0823191602481810192602092909190829003018187876161da5a03f11561000257505060405151600c54909350831015905061105a57610002565b6108b76004355b600354600082815260046020526040812080549192600160a060020a03169160ff1615806108135750600181015442115b8061082557508054610100900460ff16155b80610838575080546301000000900460ff165b1561107257600192505b5050919050565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156108a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b604080519115158252519081900360200190f35b60408051918252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b6040805160ff929092168252519081900360200190f35b60408051871515815286151560208201528515159181019190915283151560608201526080810183905260c060a082018181528354600260018216156101000260001901909116049183018290529060e0830190849080156109b45780601f10610989576101008083540402835291602001916109b4565b820191906000526020600020905b81548152906001019060200180831161099757829003601f168201915b505097505050505050505060405180910390f35b820191906000526020600020905b8154815290600101906020018083116109d657829003601f168201915b505050505081565b600160a060020a038416600090815260066020526040902054829010801590610a445750600760209081526040600081812033600160a060020a03168252909252902054829010155b8015610a505750600082115b15610ade57600160a060020a03838116600081815260066020908152604080832080548801905588851680845281842080548990039055600783528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610ae2565b5060005b9392505050565b505050600090815260056020526040812055565b60035460008c81526004602052604090208054600160a060020a03929092169750955060ff1615610b2d57610002565b85600160a060020a031663013cf08b8c6040518260e060020a02815260040180828152602001915050610120604051808303816000876161da5a03f1156100025750506040516060810151610100919091015190955093505042841080610b915750825b15610b9b57610002565b845460ff1916600190811761ff0019166101008c81029190911762ff00001916620100008c0217875586820186905589516002888101805460008281526020908190209296821615909502600019011691909104601f9081018490048201938d0190839010610c2d57805160ff19168380011785555b50610c5d9291505b80821115610ced5760008155600101610c19565b82800160010185558215610c11579182015b82811115610c11578251826000505591602001919060010190610c3f565b5050604080518b151581528a1515602082015281518d927f7b6d7a4a838ed871a2a29107db06bf46efc9e7fa36109f9ff96bd011e5d9a271928290030190a2891515610ce057604051855463ff000000191663010000001786558b907f52d3592a0e22b4a6b418348937afee958ced77436fb0ea66d273a4fe7922ce1c90600090a25b610cf18b6107e2565b8091505b5090565b915081158015610d0d5750600d54600160a060020a0316600014155b15610e0b57604080516001548183018352600382527f55524c0000000000000000000000000000000000000000000000000000000000602083810191909152835190810190935260008352610df792908703600f019190600060006000600d60009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f11561000257505060405151915050600160a060020a03811682141561119c576111446000600060006113bc731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed5b3b90565b60008181526005602052604090208c905590505b5060019a9950505050505050505050565b33600160a060020a0316600081815260066020908152604091829020805487019055600c805487019055815186815291517fb0d234274aef7a61aa5a2eb44c23881ebf46a068cccbd413c978bcbd555fe17f9281900390910190a2600191505b50919050565b33600160a060020a0316600090815260066020526040902054829010801590610eab5750600082115b15610f205733600160a060020a03908116600081815260066020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060016101e0565b5060006101e0565b5060025460405130600160a060020a03908116319216908290600081818185876185025a03f1925050501515610ce957610002565b80600160a060020a031663a9059cbb33856040518360e060020a0281526004018083600160a060020a03168152602001828152602001925050506020604051808303816000876161da5a03f1156100025750506040515115159050610fc157610002565b33600160a060020a031660008181526006602090815260409182902080548790039055600c80548790039055815186815291517f17659a1d1f57d2e58b7063ee8b518b50d00bf3e5c0d8224b68ba865e4725a0b49281900390910190a260019150610e7c565b600254600160a060020a03166000908152600660205260409020805482019055600c805482019055600193505b50505090565b50600c54810360008114156110275760019350611054565b60018054908201540342101561108b5760009250610842565b6040805182547fc9d27afe0000000000000000000000000000000000000000000000000000000082526004820187905262010000900460ff16151560248201529051600160a060020a0384169163c9d27afe91604482810192602092919082900301816000876161da5a03f115610002575050604051825463ff000000191663010000001783558591507f52d3592a0e22b4a6b418348937afee958ced77436fb0ea66d273a4fe7922ce1c90600090a260019250610842565b50600d60009054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518160e060020a0281526004018090506020604051808303816000876161da5a03f115610002575050604051519150505b600e8054600160a060020a0319168217908190556040517f524f388900000000000000000000000000000000000000000000000000000000815260206004828101828152895160248501528951600160a060020a03959095169463524f3889948b9492938493604492909201928683019290918291859183918691600091601f850104600f02600301f150905090810190601f1680156112505780820380516001836020036101000a031916815260200191505b50925050506020604051808303816000876161da5a03f11561000257505060405151925050670de0b6b3a764000062030d403a02018211156112965750600091506106bd565b600e60009054906101000a9004600160a060020a0316600160a060020a031663adf59f99838888886040518560e060020a0281526004018084815260200180602001806020018381038352858181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156113345780820380516001836020036101000a031916815260200191505b508381038252848181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f16801561138d5780820380516001836020036101000a031916815260200191505b509550505050505060206040518083038185886185025a03f1156100025750506040515194506106bd92505050565b11156113f25750600d8054731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600160a060020a031990911617905560016103c5565b6000611411739efbea6358bed926b293d2ce63a730d6d98d43dd610df3565b11156114475750600d8054739efbea6358bed926b293d2ce63a730d6d98d43dd600160a060020a031990911617905560016103c5565b60006114667320e12a1f859b3feae5fb2a0a32c18f5a65555bbf610df3565b111561149a5750600d8054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016103c5565b5060006103c556
Constructor Arguements (ABI-encoded and appended to the ByteCode above)
000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413000000000000000000000000b3267b3b37a1c153ca574c3a50359f9d1613f95d0000000000000000000000000000000000000000000000000000000000000e1000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000001d4a6f726469204261796c696e612054686544414f2044454c45474154450000000000000000000000000000000000000000000000000000000000000000000016687474703a2f2f7777772e6261796c696e612e6361740000000000000000000000000000000000000000000000000000000000000000000000000000000000046a62c39000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Found 12 constructor arguements :
Arg [0] : 000000000000000000000000bb9bc244d798123fde783fcc1c72d3bb8c189413
Arg [1] : 000000000000000000000000b3267b3b37a1c153ca574c3a50359f9d1613f95d
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000e10
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [6] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [7] : 4a6f726469204261796c696e612054686544414f2044454c4547415445000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000016
Arg [9] : 687474703a2f2f7777772e6261796c696e612e63617400000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 6a62c39000000000000000000000000000000000000000000000000000000000