ETH Price: $3,147.82 (+1.81%)

Contract

0x6A3DCd2Ad3C693aA8CBc3e5bCB075b674209A033
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw Pending...152003422022-07-23 17:55:25847 days ago1658598925IN
0x6A3DCd2A...74209A033
0 ETH0.0007517817.71028689
Withdraw Pending...129419392021-08-01 21:08:371202 days ago1627852117IN
0x6A3DCd2A...74209A033
0 ETH0.0015706137
Order To Contrac...61073422018-08-07 23:59:502292 days ago1533686390IN
0x6A3DCd2A...74209A033
0 ETH0.0009575941
Transfer44583562017-10-30 14:30:072574 days ago1509373807IN
0x6A3DCd2A...74209A033
0.00323745 ETH0.0008692622
Transfer44583122017-10-30 14:20:172574 days ago1509373217IN
0x6A3DCd2A...74209A033
0.00322686 ETH0.0008692622
Withdraw Pending...43430092017-10-06 21:29:002597 days ago1507325340IN
0x6A3DCd2A...74209A033
0 ETH0.0006591123
Withdraw Pending...39838382017-07-06 16:24:012690 days ago1499358241IN
0x6A3DCd2A...74209A033
0.01 ETH0.0006017921
Withdraw Pending...37914742017-05-30 7:16:132727 days ago1496128573IN
0x6A3DCd2A...74209A033
0 ETH0.04221
Withdraw Pending...37914612017-05-30 7:11:072727 days ago1496128267IN
0x6A3DCd2A...74209A033
0 ETH0.004221
Withdraw Pending...37914172017-05-30 7:00:512727 days ago1496127651IN
0x6A3DCd2A...74209A033
0 ETH0.0012944121
Withdraw Pending...33685342017-03-17 13:51:172801 days ago1489758677IN
0x6A3DCd2A...74209A033
0.001 ETH0.0011927341
Execute Decision32674332017-02-28 17:12:292818 days ago1488301949IN
0x6A3DCd2A...74209A033
0 ETH0.0111429742
Vote32624122017-02-27 21:17:252818 days ago1488230245IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32614612017-02-27 17:39:572819 days ago1488217197IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32591122017-02-27 8:05:472819 days ago1488182747IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32566762017-02-26 22:22:482819 days ago1488147768IN
0x6A3DCd2A...74209A033
0 ETH0.004110941
Vote32564442017-02-26 21:25:362819 days ago1488144336IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32544382017-02-26 13:21:142820 days ago1488115274IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32491642017-02-25 16:31:082821 days ago1488040268IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32438932017-02-24 19:35:312822 days ago1487964931IN
0x6A3DCd2A...74209A033
0 ETH0.0042111742
Vote32408292017-02-24 7:39:052822 days ago1487921945IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32384002017-02-23 21:43:082822 days ago1487886188IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32382672017-02-23 21:14:032822 days ago1487884443IN
0x6A3DCd2A...74209A033
0 ETH0.002599641
Vote32374832017-02-23 18:15:062823 days ago1487873706IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
Vote32373932017-02-23 17:45:042823 days ago1487871904IN
0x6A3DCd2A...74209A033
0 ETH0.0041139441
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
32674332017-02-28 17:12:292818 days ago1488301949
0x6A3DCd2A...74209A033
1.79443645 ETH
32624122017-02-27 21:17:252818 days ago1488230245
0x6A3DCd2A...74209A033
0.16493323 ETH
32614612017-02-27 17:39:572819 days ago1488217197
0x6A3DCd2A...74209A033
0.16493323 ETH
32591122017-02-27 8:05:472819 days ago1488182747
0x6A3DCd2A...74209A033
0.16650403 ETH
32566762017-02-26 22:22:482819 days ago1488147768
0x6A3DCd2A...74209A033
0.14985362 ETH
32564442017-02-26 21:25:362819 days ago1488144336
0x6A3DCd2A...74209A033
0.16650403 ETH
32544382017-02-26 13:21:142820 days ago1488115274
0x6A3DCd2A...74209A033
0.16650403 ETH
32491642017-02-25 16:31:082821 days ago1488040268
0x6A3DCd2A...74209A033
0.16810503 ETH
32438932017-02-24 19:35:312822 days ago1487964931
0x6A3DCd2A...74209A033
0.16973712 ETH
32408292017-02-24 7:39:052822 days ago1487921945
0x6A3DCd2A...74209A033
0.1714012 ETH
32384002017-02-23 21:43:082822 days ago1487886188
0x6A3DCd2A...74209A033
0.1714012 ETH
32374832017-02-23 18:15:062823 days ago1487873706
0x6A3DCd2A...74209A033
0.1714012 ETH
32373932017-02-23 17:45:042823 days ago1487871904
0x6A3DCd2A...74209A033
0.01714012 ETH
32356102017-02-23 10:49:002823 days ago1487846940
0x6A3DCd2A...74209A033
0.17309825 ETH
32350132017-02-23 8:21:472823 days ago1487838107
0x6A3DCd2A...74209A033
0.17309825 ETH
32324912017-02-22 22:10:262823 days ago1487801426
0x6A3DCd2A...74209A033
0.15578842 ETH
32318622017-02-22 19:36:332824 days ago1487792193
0x6A3DCd2A...74209A033
0.17270842 ETH
32314042017-02-22 17:48:062824 days ago1487785686
0x6A3DCd2A...74209A033
0.17309825 ETH
32310812017-02-22 16:29:342824 days ago1487780974
0x6A3DCd2A...74209A033
0.1679053 ETH
32304022017-02-22 13:50:322824 days ago1487771432
0x6A3DCd2A...74209A033
0.16444333 ETH
32303042017-02-22 13:29:452824 days ago1487770185
0x6A3DCd2A...74209A033
0.15578842 ETH
32297432017-02-22 11:14:292824 days ago1487762069
0x6A3DCd2A...74209A033
0.17309825 ETH
32297042017-02-22 11:04:292824 days ago1487761469
0x6A3DCd2A...74209A033
0.16444333 ETH
32295102017-02-22 10:22:502824 days ago1487758970
0x6A3DCd2A...74209A033
0.17482923 ETH
32289772017-02-22 8:10:592824 days ago1487751059
0x6A3DCd2A...74209A033
0.17482923 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PassCommitteeRoom

Compiler Version
v0.4.8+commit.60cc1668

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2017-02-08
*/

pragma solidity ^0.4.8;

/*
This file is part of Pass DAO.

Pass 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.

Pass 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 Pass DAO.  If not, see <http://www.gnu.org/licenses/>.
*/

/*
Smart contract for a Decentralized Autonomous Organization (DAO)
to automate organizational governance and decision-making.
*/

/// @title Pass Dao smart contract
contract PassDao {
    
    struct revision {
        // Address of the Committee Room smart contract
        address committeeRoom;
        // Address of the share manager smart contract
        address shareManager;
        // Address of the token manager smart contract
        address tokenManager;
        // Address of the project creator smart contract
        uint startDate;
    }
    // The revisions of the application until today
    revision[] public revisions;

    struct project {
        // The address of the smart contract
        address contractAddress;
        // The unix effective start date of the contract
        uint startDate;
    }
    // The projects of the Dao
    project[] public projects;

    // Map with the indexes of the projects
    mapping (address => uint) projectID;
    
    // The address of the meta project
    address metaProject;

    
// Events

    event Upgrade(uint indexed RevisionID, address CommitteeRoom, address ShareManager, address TokenManager);
    event NewProject(address Project);

// Constant functions  
    
    /// @return The effective committee room
    function ActualCommitteeRoom() constant returns (address) {
        return revisions[0].committeeRoom;
    }
    
    /// @return The meta project
    function MetaProject() constant returns (address) {
        return metaProject;
    }

    /// @return The effective share manager
    function ActualShareManager() constant returns (address) {
        return revisions[0].shareManager;
    }

    /// @return The effective token manager
    function ActualTokenManager() constant returns (address) {
        return revisions[0].tokenManager;
    }

// modifiers

    modifier onlyPassCommitteeRoom {if (msg.sender != revisions[0].committeeRoom  
        && revisions[0].committeeRoom != 0) throw; _;}
    
// Constructor function

    function PassDao() {
        projects.length = 1;
        revisions.length = 1;
    }
    
// Register functions

    /// @dev Function to allow the actual Committee Room upgrading the application
    /// @param _newCommitteeRoom The address of the new committee room
    /// @param _newShareManager The address of the new share manager
    /// @param _newTokenManager The address of the new token manager
    /// @return The index of the revision
    function upgrade(
        address _newCommitteeRoom, 
        address _newShareManager, 
        address _newTokenManager) onlyPassCommitteeRoom returns (uint) {
        
        uint _revisionID = revisions.length++;
        revision r = revisions[_revisionID];

        if (_newCommitteeRoom != 0) r.committeeRoom = _newCommitteeRoom; else r.committeeRoom = revisions[0].committeeRoom;
        if (_newShareManager != 0) r.shareManager = _newShareManager; else r.shareManager = revisions[0].shareManager;
        if (_newTokenManager != 0) r.tokenManager = _newTokenManager; else r.tokenManager = revisions[0].tokenManager;

        r.startDate = now;
        
        revisions[0] = r;
        
        Upgrade(_revisionID, _newCommitteeRoom, _newShareManager, _newTokenManager);
            
        return _revisionID;
    }

    /// @dev Function to set the meta project
    /// @param _projectAddress The address of the meta project
    function addMetaProject(address _projectAddress) onlyPassCommitteeRoom {

        metaProject = _projectAddress;
    }
    
    /// @dev Function to allow the committee room to add a project when ordering
    /// @param _projectAddress The address of the project
    function addProject(address _projectAddress) onlyPassCommitteeRoom {

        if (projectID[_projectAddress] == 0) {

            uint _projectID = projects.length++;
            project p = projects[_projectID];
        
            projectID[_projectAddress] = _projectID;
            p.contractAddress = _projectAddress; 
            p.startDate = now;
            
            NewProject(_projectAddress);
        }
    }
    
}

pragma solidity ^0.4.8;

/*
 *
 * This file is part of Pass DAO.
 *
 * The Manager smart contract is used for the management of shares and tokens.
 *
*/

/// @title Token Manager smart contract of the Pass Decentralized Autonomous Organisation
contract PassTokenManagerInterface {

    // The Pass Dao smart contract
    PassDao public passDao;
    // The adress of the creator of this smart contract
    address creator;
    
    // The token name for display purpose
    string public name;
    // The token symbol for display purpose
    string public symbol;
    // The quantity of decimals for display purpose
    uint8 public decimals;
    // Total amount of tokens
    uint256 totalTokenSupply;

    // True if tokens, false if Dao shares
    bool token;
    // If true, the shares or tokens can be transferred
    bool transferable;

    // The address of the last Manager before cloning
    address public clonedFrom;
    // True if the initial token supply is over
    bool initialTokenSupplyDone;

    // Array of token or share holders (used for cloning)
    address[] holders;
    // Map with the indexes of the holders (used for cloning)
    mapping (address => uint) holderID;
    
    // Array with all balances
    mapping (address => uint256) balances;
    // Array with all allowances
    mapping (address => mapping (address => uint256)) allowed;

    struct funding {
        // The address which sets partners and manages the funding (not mandatory)
        address moderator;
        // The amount (in wei) of the funding
        uint amountToFund;
        // The funded amount (in wei)
        uint fundedAmount;
        // A unix timestamp, denoting the start time of the funding
        uint startTime; 
        // A unix timestamp, denoting the closing time of the funding
        uint closingTime;  
        // The price multiplier for a share or a token without considering the inflation rate
        uint initialPriceMultiplier;
        // Rate per year in percentage applied to the share or token price 
        uint inflationRate; 
        // The total amount of wei given
        uint totalWeiGiven;
    } 
    // Map with the fundings rules for each Dao proposal
    mapping (uint => funding) public fundings;

    // The index of the last funding and proposal
    uint lastProposalID;
    // The index of the last fueled funding and proposal
    uint public lastFueledFundingID;
    
    struct amountsGiven {
        uint weiAmount;
        uint tokenAmount;
    }
    // Map with the amounts given for each proposal 
    mapping (uint => mapping (address => amountsGiven)) public Given;
    
    // Map of blocked Dao share accounts. Points to the date when the share holder can transfer shares
    mapping (address => uint) public blockedDeadLine; 

    // @return The client of this manager
    function Client() constant returns (address);
    
    /// @return The total supply of shares or tokens 
    function totalSupply() constant external returns (uint256);

    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
     function balanceOf(address _owner) constant external returns (uint256 balance);

    /// @return True if tokens can be transferred
    function Transferable() constant external returns (bool);
    
    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Quantity of remaining tokens of _owner that _spender is allowed to spend
    function allowance(address _owner, address _spender) constant external returns (uint256 remaining);
    
    /// @param _proposalID Index of the funding or proposal
    /// @return The result (in wei) of the funding
    function FundedAmount(uint _proposalID) constant external returns (uint);

    /// @param _proposalID Index of the funding or proposal
    /// @return The amount to fund
    function AmountToFund(uint _proposalID) constant external returns (uint);
    
    /// @param _proposalID Index of the funding or proposal
    /// @return the token price multiplier
    function priceMultiplier(uint _proposalID) constant internal returns (uint);
    
    /// @param _proposalID Index of the funding or proposal
    /// @param _saleDate in case of presale, the date of the presale
    /// @return the share or token price divisor condidering the sale date and the inflation rate
    function priceDivisor(
        uint _proposalID, 
        uint _saleDate) constant internal returns (uint);
    
    /// @param _proposalID Index of the funding or proposal
    /// @return the actual price divisor of a share or token
    function actualPriceDivisor(uint _proposalID) constant internal returns (uint);

    /// @dev Internal function to calculate the amount in tokens according to a price    
    /// @param _weiAmount The amount (in wei)
    /// @param _priceMultiplier The price multiplier
    /// @param _priceDivisor The price divisor
    /// @return the amount in tokens 
    function TokenAmount(
        uint _weiAmount,
        uint _priceMultiplier, 
        uint _priceDivisor) constant internal returns (uint);

    /// @dev Internal function to calculate the amount in wei according to a price    
    /// @param _tokenAmount The amount (in wei)
    /// @param _priceMultiplier The price multiplier
    /// @param _priceDivisor The price divisor
    /// @return the amount in wei
    function weiAmount(
        uint _tokenAmount, 
        uint _priceMultiplier, 
        uint _priceDivisor) constant internal returns (uint);
        
    /// @param _tokenAmount The amount in tokens
    /// @param _proposalID Index of the client proposal. 0 if not linked to a proposal.
    /// @return the actual token price in wei
    function TokenPriceInWei(uint _tokenAmount, uint _proposalID) constant returns (uint);
    
    /// @return The index of the last funding and client's proposal 
    function LastProposalID() constant returns (uint);

    /// @return The number of share or token holders (used for cloning)
    function numberOfHolders() constant returns (uint);

    /// @param _index The index of the holder
    /// @return the address of the holder
    function HolderAddress(uint _index) constant external returns (address);
   
    /// @dev The constructor function
    /// @param _passDao Address of the pass Dao smart contract
    /// @param _clonedFrom The address of the last Manager before cloning
    /// @param _tokenName The token name for display purpose
    /// @param _tokenSymbol The token symbol for display purpose
    /// @param _tokenDecimals The quantity of decimals for display purpose
    /// @param  _token True if tokens, false if shares
    /// @param  _transferable True if tokens can be transferred
    /// @param _initialPriceMultiplier Price multiplier without considering any inflation rate
    /// @param _inflationRate If 0, the token price doesn't change during the funding
    //function PassTokenManager(
    //    address _passDao,
    //    address _clonedFrom,
    //    string _tokenName,
    //    string _tokenSymbol,
    //    uint8 _tokenDecimals,
    //    bool _token,
    //    bool _transferable,
    //    uint _initialPriceMultiplier,
    //    uint _inflationRate);
    
    /// @dev Function to create initial tokens    
    /// @param _recipient The beneficiary of the created tokens
    /// @param _quantity The quantity of tokens to create    
    /// @param _last True if the initial token suppy is over
    /// @return Whether the function was successful or not     
    function initialTokenSupply(
        address _recipient, 
        uint _quantity,
        bool _last) returns (bool success);
        
    /// @notice Function to clone tokens before upgrading
    /// @param _from The index of the first holder
    /// @param _to The index of the last holder
    /// @return Whether the function was successful or not 
    function cloneTokens(
        uint _from,
        uint _to) returns (bool success);

    /// @dev Internal function to add a new token or share holder
    /// @param _holder The address of the token or share holder
    function addHolder(address _holder) internal;
    
    /// @dev Internal function to create initial tokens    
    /// @param _holder The beneficiary of the created tokens
    /// @param _tokenAmount The amount in tokens to create
    function createTokens(
        address _holder, 
        uint _tokenAmount) internal;
        
    /// @notice Function used by the client to pay with shares or tokens
    /// @param _recipient The address of the recipient of shares or tokens
    /// @param _amount The amount (in Wei) to calculate the quantity of shares or tokens to create
    /// @return the rewarded amount in tokens or shares
    function rewardTokensForClient(
        address _recipient, 
        uint _amount) external  returns (uint);
        
    /// @notice Function to set a funding
    /// @param _moderator The address of the smart contract to manage a private funding
    /// @param _initialPriceMultiplier Price multiplier without considering any inflation rate
    /// @param _amountToFund The amount (in wei) of the funding
    /// @param _minutesFundingPeriod Period in minutes of the funding
    /// @param _inflationRate If 0, the token price doesn't change during the funding
    /// @param _proposalID Index of the client proposal
    function setFundingRules(
        address _moderator,
        uint _initialPriceMultiplier,
        uint _amountToFund,
        uint _minutesFundingPeriod, 
        uint _inflationRate,
        uint _proposalID) external;

    /// @dev Internal function for the sale of shares or tokens
    /// @param _proposalID Index of the client proposal
    /// @param _recipient The recipient address of shares or tokens
    /// @param _amount The funded amount (in wei)
    /// @param _saleDate In case of presale, the date of the presale
    /// @param _presale True if presale
    /// @return Whether the creation was successful or not
    function sale(
        uint _proposalID,
        address _recipient, 
        uint _amount,
        uint _saleDate,
        bool _presale
    ) internal returns (bool success);
    
    /// @dev Internal function to close the actual funding
    /// @param _proposalID Index of the client proposal
    function closeFunding(uint _proposalID) internal;
   
    /// @notice Function to send tokens or refund after the closing time of the funding proposals
    /// @param _from The first proposal. 0 if not linked to a proposal
    /// @param _to The last proposal
    /// @param _buyer The address of the buyer
    /// @return Whether the function was successful or not 
    function sendPendingAmounts(        
        uint _from,
        uint _to,
        address _buyer) returns (bool);
        
    /// @notice Function to get fees, shares or refund after the closing time of the funding proposals
    /// @return Whether the function was successful or not
    function withdrawPendingAmounts() returns (bool);
    
    /// @notice Function used by the main partner to set the start time of the funding
    /// @param _proposalID Index of the client proposal
    /// @param _startTime The unix start date of the funding 
    function setFundingStartTime(
        uint _proposalID, 
        uint _startTime) external;
    
    /// @notice Function used by the main partner to set the funding fueled
    /// @param _proposalID Index of the client proposal
    function setFundingFueled(uint _proposalID) external;

    /// @notice Function to able the transfer of Dao shares or contractor tokens
    function ableTransfer();

    /// @notice Function to disable the transfer of Dao shares
    function disableTransfer();

    /// @notice Function used by the client to block the transfer of shares from and to a share holder
    /// @param _shareHolder The address of the share holder
    /// @param _deadLine When the account will be unblocked
    function blockTransfer(
        address _shareHolder, 
        uint _deadLine) external;
    
    /// @dev Internal function to send `_value` token to `_to` from `_From`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The quantity of shares or tokens to be transferred
    /// @return Whether the function was successful or not 
    function transferFromTo(
        address _from,
        address _to, 
        uint256 _value
        ) internal returns (bool success);
    
    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The quantity of shares or tokens to be transferred
    /// @return Whether the function was successful or not 
    function transfer(address _to, uint256 _value) returns (bool success);

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The quantity of shares or tokens to be transferred
    function transferFrom(
        address _from, 
        address _to, 
        uint256 _value
        ) 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 _value The amount of tokens to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(
        address _spender, 
        uint256 _value) returns (bool success);
    
    event TokensCreated(address indexed Sender, address indexed TokenHolder, uint TokenAmount);
    event FundingRulesSet(address indexed Moderator, uint indexed ProposalId, uint AmountToFund, uint indexed StartTime, uint ClosingTime);
    event FundingFueled(uint indexed ProposalID, uint FundedAmount);
    event TransferAble();
    event TransferDisable();
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Refund(address indexed Buyer, uint Amount);
    
}    

contract PassTokenManager is PassTokenManagerInterface {

// Constant functions

    function Client() constant returns (address) {
        return passDao.ActualCommitteeRoom();
    }
   
    function totalSupply() constant external returns (uint256) {
        return totalTokenSupply;
    }
    
    function balanceOf(address _owner) constant external returns (uint256 balance) {
        return balances[_owner];
    }
     
    function Transferable() constant external returns (bool) {
        return transferable;
    }
 
    function allowance(
        address _owner, 
        address _spender) constant external returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    function FundedAmount(uint _proposalID) constant external returns (uint) {
        return fundings[_proposalID].fundedAmount;
    }
  
    function AmountToFund(uint _proposalID) constant external returns (uint) {

        if (now > fundings[_proposalID].closingTime
            || now < fundings[_proposalID].startTime) {
            return 0;   
            } else return fundings[_proposalID].amountToFund;
    }
    
    function priceMultiplier(uint _proposalID) constant internal returns (uint) {
        return fundings[_proposalID].initialPriceMultiplier;
    }
    
    function priceDivisor(uint _proposalID, uint _saleDate) constant internal returns (uint) {
        uint _date = _saleDate;
        
        if (_saleDate > fundings[_proposalID].closingTime) _date = fundings[_proposalID].closingTime;
        if (_saleDate < fundings[_proposalID].startTime) _date = fundings[_proposalID].startTime;

        return 100 + 100*fundings[_proposalID].inflationRate*(_date - fundings[_proposalID].startTime)/(100*365 days);
    }
    
    function actualPriceDivisor(uint _proposalID) constant internal returns (uint) {
        return priceDivisor(_proposalID, now);
    }
    
    function TokenAmount(
        uint _weiAmount, 
        uint _priceMultiplier, 
        uint _priceDivisor) constant internal returns (uint) {
        
        uint _a = _weiAmount*_priceMultiplier;
        uint _multiplier = 100*_a;
        uint _amount = _multiplier/_priceDivisor;
        if (_a/_weiAmount != _priceMultiplier
            || _multiplier/100 != _a) return 0; 
        
        return _amount;
    }
    
    function weiAmount(
        uint _tokenAmount, 
        uint _priceMultiplier, 
        uint _priceDivisor) constant internal returns (uint) {
        
        uint _multiplier = _tokenAmount*_priceDivisor;
        uint _divisor = 100*_priceMultiplier;
        uint _amount = _multiplier/_divisor;
        if (_multiplier/_tokenAmount != _priceDivisor
            || _divisor/100 != _priceMultiplier) return 0; 

        return _amount;
    }
    
    function TokenPriceInWei(uint _tokenAmount, uint _proposalID) constant returns (uint) {
        return weiAmount(_tokenAmount, priceMultiplier(_proposalID), actualPriceDivisor(_proposalID));
    }
    
    function LastProposalID() constant returns (uint) {
        return lastProposalID;
    }
    
    function numberOfHolders() constant returns (uint) {
        return holders.length - 1;
    }
    
    function HolderAddress(uint _index) constant external returns (address) {
        return holders[_index];
    }

// Modifiers

    // Modifier that allows only the client ..
    modifier onlyClient {if (msg.sender != Client()) throw; _;}
      
    // Modifier for share Manager functions
    modifier onlyShareManager {if (token) throw; _;}

    // Modifier for token Manager functions
    modifier onlyTokenManager {if (!token) throw; _;}
  
// Constructor function

    function PassTokenManager(
        PassDao _passDao,
        address _clonedFrom,
        string _tokenName,
        string _tokenSymbol,
        uint8 _tokenDecimals,
        bool _token,
        bool _transferable,
        uint _initialPriceMultiplier,
        uint _inflationRate) {

        passDao = _passDao;
        creator = msg.sender;
        
        clonedFrom = _clonedFrom;            

        name = _tokenName;
        symbol = _tokenSymbol;
        decimals = _tokenDecimals;

        token = _token;
        transferable = _transferable;

        fundings[0].initialPriceMultiplier = _initialPriceMultiplier;
        fundings[0].inflationRate = _inflationRate;

        holders.length = 1;
    }

// Setting functions

    function initialTokenSupply(
        address _recipient, 
        uint _quantity,
        bool _last) returns (bool success) {

        if (initialTokenSupplyDone) throw;
        
        addHolder(_recipient);
        if (_recipient != 0 && _quantity != 0) createTokens(_recipient, _quantity);
        
        if (_last) initialTokenSupplyDone = true;
        
        return true;
    }

    function cloneTokens(
        uint _from,
        uint _to) returns (bool success) {
        
        initialTokenSupplyDone = true;
        if (_from == 0) _from = 1;
        
        PassTokenManager _clonedFrom = PassTokenManager(clonedFrom);
        uint _numberOfHolders = _clonedFrom.numberOfHolders();
        if (_to == 0 || _to > _numberOfHolders) _to = _numberOfHolders;
        
        address _holder;
        uint _balance;

        for (uint i = _from; i <= _to; i++) {
            _holder = _clonedFrom.HolderAddress(i);
            _balance = _clonedFrom.balanceOf(_holder);
            if (balances[_holder] == 0 && _balance != 0) {
                addHolder(_holder);
                createTokens(_holder, _balance);
            }
        }
    }
        
// Token creation

    function addHolder(address _holder) internal {
        
        if (holderID[_holder] == 0) {
            
            uint _holderID = holders.length++;
            holders[_holderID] = _holder;
            holderID[_holder] = _holderID;
        }
    }

    function createTokens(
        address _holder, 
        uint _tokenAmount) internal {

        balances[_holder] += _tokenAmount; 
        totalTokenSupply += _tokenAmount;
        TokensCreated(msg.sender, _holder, _tokenAmount);
    }
    
    function rewardTokensForClient(
        address _recipient, 
        uint _amount
        ) external onlyClient returns (uint) {

        uint _tokenAmount = TokenAmount(_amount, priceMultiplier(0), actualPriceDivisor(0));
        if (_tokenAmount == 0) throw;

        addHolder(_recipient);
        createTokens(_recipient, _tokenAmount);

        return _tokenAmount;
    }
    
    function setFundingRules(
        address _moderator,
        uint _initialPriceMultiplier,
        uint _amountToFund,
        uint _minutesFundingPeriod, 
        uint _inflationRate,
        uint _proposalID
    ) external onlyClient {

        if (_moderator == address(this)
            || _moderator == Client()
            || _amountToFund == 0
            || _minutesFundingPeriod == 0
            || fundings[_proposalID].totalWeiGiven != 0
            ) throw;
            
        fundings[_proposalID].moderator = _moderator;

        fundings[_proposalID].amountToFund = _amountToFund;
        fundings[_proposalID].fundedAmount = 0;

        if (_initialPriceMultiplier == 0) {
            if (now < fundings[0].closingTime) {
                fundings[_proposalID].initialPriceMultiplier = 100*priceMultiplier(lastProposalID)/actualPriceDivisor(lastProposalID);
            } else {
                fundings[_proposalID].initialPriceMultiplier = 100*priceMultiplier(lastFueledFundingID)/actualPriceDivisor(lastFueledFundingID);
            }
            fundings[0].initialPriceMultiplier = fundings[_proposalID].initialPriceMultiplier;
        }
        else {
            fundings[_proposalID].initialPriceMultiplier = _initialPriceMultiplier;
            fundings[0].initialPriceMultiplier = _initialPriceMultiplier;
        }
        
        if (_inflationRate == 0) fundings[_proposalID].inflationRate = fundings[0].inflationRate;
        else {
            fundings[_proposalID].inflationRate = _inflationRate;
            fundings[0].inflationRate = _inflationRate;
        }
        
        fundings[_proposalID].startTime = now;
        fundings[0].startTime = now;
        
        fundings[_proposalID].closingTime = now + _minutesFundingPeriod * 1 minutes;
        fundings[0].closingTime = fundings[_proposalID].closingTime;
        
        fundings[_proposalID].totalWeiGiven = 0;
        
        lastProposalID = _proposalID;
        
        FundingRulesSet(_moderator, _proposalID,  _amountToFund, fundings[_proposalID].startTime, fundings[_proposalID].closingTime);
    } 
    
    function sale(
        uint _proposalID,
        address _recipient, 
        uint _amount,
        uint _saleDate,
        bool _presale) internal returns (bool success) {

        if (_saleDate == 0) _saleDate = now;

        if (_saleDate > fundings[_proposalID].closingTime
            || _saleDate < fundings[_proposalID].startTime
            || fundings[_proposalID].totalWeiGiven + _amount > fundings[_proposalID].amountToFund) return;

        uint _tokenAmount = TokenAmount(_amount, priceMultiplier(_proposalID), priceDivisor(_proposalID, _saleDate));
        if (_tokenAmount == 0) return;
        
        addHolder(_recipient);
        if (_presale) {
            Given[_proposalID][_recipient].tokenAmount += _tokenAmount;
        }
        else createTokens(_recipient, _tokenAmount);

        return true;
    }

    function closeFunding(uint _proposalID) internal {
        fundings[_proposalID].fundedAmount = fundings[_proposalID].totalWeiGiven;
        lastFueledFundingID = _proposalID;
        fundings[_proposalID].closingTime = now;
        FundingFueled(_proposalID, fundings[_proposalID].fundedAmount);
    }

    function sendPendingAmounts(        
        uint _from,
        uint _to,
        address _buyer) returns (bool) {
        
        if (_from == 0) _from = 1;
        if (_to == 0) _to = lastProposalID;
        if (_buyer == 0) _buyer = msg.sender;

        uint _amount;
        uint _tokenAmount;
        
        for (uint i = _from; i <= _to; i++) {

            if (now > fundings[i].closingTime && Given[i][_buyer].weiAmount != 0) {
                
                if (fundings[i].fundedAmount == 0) _amount += Given[i][_buyer].weiAmount;
                else _tokenAmount += Given[i][_buyer].tokenAmount;

                fundings[i].totalWeiGiven -= Given[i][_buyer].weiAmount;
                Given[i][_buyer].tokenAmount = 0;
                Given[i][_buyer].weiAmount = 0;
            }
        }

        if (_tokenAmount > 0) {
            createTokens(_buyer, _tokenAmount);
            return true;
        }
        
        if (_amount > 0) {
            if (!_buyer.send(_amount)) throw;
            Refund(_buyer, _amount);
        } else return true;
    }
    

    function withdrawPendingAmounts() returns (bool) {
        
        return sendPendingAmounts(0, 0, msg.sender);
    }        

// Funding Moderator functions

    function setFundingStartTime(uint _proposalID, uint _startTime) external {
        if ((msg.sender !=  fundings[_proposalID].moderator) || now > fundings[_proposalID].closingTime) throw;
        fundings[_proposalID].startTime = _startTime;
    }

    function setFundingFueled(uint _proposalID) external {

        if ((msg.sender !=  fundings[_proposalID].moderator) || now > fundings[_proposalID].closingTime) throw;

        closeFunding(_proposalID);
    }
    
// Tokens transfer management    
    
    function ableTransfer() onlyClient {
        if (!transferable) {
            transferable = true;
            TransferAble();
        }
    }

    function disableTransfer() onlyClient {
        if (transferable) {
            transferable = false;
            TransferDisable();
        }
    }
    
    function blockTransfer(address _shareHolder, uint _deadLine) external onlyClient onlyShareManager {
        if (_deadLine > blockedDeadLine[_shareHolder]) {
            blockedDeadLine[_shareHolder] = _deadLine;
        }
    }
    
    function transferFromTo(
        address _from,
        address _to, 
        uint256 _value
        ) internal returns (bool success) {  

        if ((transferable)
            && now > blockedDeadLine[_from]
            && now > blockedDeadLine[_to]
            && _to != address(this)
            && balances[_from] >= _value
            && balances[_to] + _value > balances[_to]) {

            addHolder(_to);
            balances[_from] -= _value;
            balances[_to] += _value;
            Transfer(_from, _to, _value);
            return true;

        } else return false;
    }
    
    function transfer(address _to, uint256 _value) returns (bool success) {  
        if (!transferFromTo(msg.sender, _to, _value)) throw;
        return true;
    }

    function transferFrom(
        address _from, 
        address _to, 
        uint256 _value
        ) returns (bool success) { 
        
        if (allowed[_from][msg.sender] < _value
            || !transferFromTo(_from, _to, _value)) throw;
            
        allowed[_from][msg.sender] -= _value;
        return true;
    }

    function approve(address _spender, uint256 _value) returns (bool success) {
        allowed[msg.sender][_spender] = _value;
        return true;
    }
    
}
    


pragma solidity ^0.4.8;

/*
 *
 * This file is part of Pass DAO.
 *
 * The Manager smart contract is used for the management of the Dao account, shares and tokens.
 *
*/

/// @title Manager smart contract of the Pass Decentralized Autonomous Organisation
contract PassManager is PassTokenManager {
    
    struct order {
        address buyer;
        uint weiGiven;
    }
    // Orders to buy tokens
    order[] public orders;
    // Number or orders to buy tokens
    uint numberOfOrders;

    // Map to know if an order was cloned from the precedent manager after an upgrade
    mapping (uint => bool) orderCloned;
    
    function PassManager(
        PassDao _passDao,
        address _clonedFrom,
        string _tokenName,
        string _tokenSymbol,
        uint8 _tokenDecimals,
        bool _token,
        bool _transferable,
        uint _initialPriceMultiplier,
        uint _inflationRate) 
        PassTokenManager( _passDao, _clonedFrom, _tokenName, _tokenSymbol, _tokenDecimals, 
            _token, _transferable, _initialPriceMultiplier, _inflationRate) { }
    
    /// @notice Function to receive payments
    function () payable onlyShareManager { }
    
    /// @notice Function used by the client to send ethers
    /// @param _recipient The address to send to
    /// @param _amount The amount (in wei) to send
    /// @return Whether the transfer was successful or not
    function sendTo(
        address _recipient,
        uint _amount
    ) external onlyClient returns (bool) {

        if (_recipient.send(_amount)) return true;
        else return false;
    }

    /// @dev Internal function to buy tokens and promote a proposal 
    /// @param _proposalID The index of the proposal
    /// @param _buyer The address of the buyer
    /// @param _date The unix date to consider for the share or token price calculation
    /// @param _presale True if presale
    /// @return Whether the function was successful or not 
    function buyTokensFor(
        uint _proposalID,
        address _buyer, 
        uint _date,
        bool _presale) internal returns (bool) {

        if (_proposalID == 0 || !sale(_proposalID, _buyer, msg.value, _date, _presale)) throw;

        fundings[_proposalID].totalWeiGiven += msg.value;        
        if (fundings[_proposalID].totalWeiGiven == fundings[_proposalID].amountToFund) closeFunding(_proposalID);

        Given[_proposalID][_buyer].weiAmount += msg.value;
        
        return true;
    }
    
    /// @notice Function to buy tokens and promote a proposal 
    /// @param _proposalID The index of the proposal
    /// @param _buyer The address of the buyer (not mandatory, msg.sender if 0)
    /// @return Whether the function was successful or not 
    function buyTokensForProposal(
        uint _proposalID, 
        address _buyer) payable returns (bool) {

        if (_buyer == 0) _buyer = msg.sender;

        if (fundings[_proposalID].moderator != 0) throw;

        return buyTokensFor(_proposalID, _buyer, now, true);
    }

    /// @notice Function used by the moderator to buy shares or tokens
    /// @param _proposalID Index of the client proposal
    /// @param _buyer The address of the recipient of shares or tokens
    /// @param _date The unix date to consider for the share or token price calculation
    /// @param _presale True if presale
    /// @return Whether the function was successful or not 
    function buyTokenFromModerator(
        uint _proposalID,
        address _buyer, 
        uint _date,
        bool _presale) payable external returns (bool){

        if (msg.sender != fundings[_proposalID].moderator) throw;

        return buyTokensFor(_proposalID, _buyer, _date, _presale);
    }

    /// @dev Internal function to create a buy order
    /// @param _buyer The address of the buyer
    /// @param _weiGiven The amount in wei given by the buyer
    function addOrder(
        address _buyer, 
        uint _weiGiven) internal {

        uint i;
        numberOfOrders += 1;

        if (numberOfOrders > orders.length) i = orders.length++;
        else i = numberOfOrders - 1;
        
        orders[i].buyer = _buyer;
        orders[i].weiGiven = _weiGiven;
    }

    /// @dev Internal function to remove a buy order
    /// @param _order The index of the order to remove
    function removeOrder(uint _order) internal {
        
        if (numberOfOrders - 1 < _order) return;

        numberOfOrders -= 1;
        if (numberOfOrders > 0) {
            for (uint i = _order; i <= numberOfOrders - 1; i++) {
                orders[i].buyer = orders[i+1].buyer;
                orders[i].weiGiven = orders[i+1].weiGiven;
            }
        }
        orders[numberOfOrders].buyer = 0;
        orders[numberOfOrders].weiGiven = 0;
    }
    
    /// @notice Function to create orders to buy tokens
    /// @return Whether the function was successful or not
    function buyTokens() payable returns (bool) {

        if (!transferable || msg.value < 100 finney) throw;
        
        addOrder(msg.sender, msg.value);
        
        return true;
    }
    
    /// @notice Function to sell tokens
    /// @param _tokenAmount in tokens to sell
    /// @param _from Index of the first order
    /// @param _to Index of the last order
    /// @return the revenue in wei
    function sellTokens(
        uint _tokenAmount,
        uint _from,
        uint _to) returns (uint) {

        if (!transferable 
            || uint(balances[msg.sender]) < _amount 
            || numberOfOrders == 0) throw;
        
        if (_to == 0 || _to > numberOfOrders - 1) _to = numberOfOrders - 1;
        
        
        uint _tokenAmounto;
        uint _amount;
        uint _totalAmount;
        uint o = _from;

        for (uint i = _from; i <= _to; i++) {

            if (_tokenAmount > 0 && orders[o].buyer != msg.sender) {

                _tokenAmounto = TokenAmount(orders[o].weiGiven, priceMultiplier(0), actualPriceDivisor(0));

                if (_tokenAmount >= _tokenAmounto 
                    && transferFromTo(msg.sender, orders[o].buyer, _tokenAmounto)) {
                            
                    _tokenAmount -= _tokenAmounto;
                    _totalAmount += orders[o].weiGiven;
                    removeOrder(o);
                }
                else if (_tokenAmount < _tokenAmounto
                    && transferFromTo(msg.sender, orders[o].buyer, _tokenAmount)) {
                        
                    _amount = weiAmount(_tokenAmount, priceMultiplier(0), actualPriceDivisor(0));
                    orders[o].weiGiven -= _amount;
                    _totalAmount += _amount;
                    i = _to + 1;
                }
                else o += 1;
            } 
            else o += 1;
        }
        
        if (!msg.sender.send(_totalAmount)) throw;
        else return _totalAmount;
    }    

    /// @notice Function to remove your orders and refund
    /// @param _from Index of the first order
    /// @param _to Index of the last order
    /// @return Whether the function was successful or not
    function removeOrders(
        uint _from,
        uint _to) returns (bool) {

        if (_to == 0 || _to > numberOfOrders) _to = numberOfOrders -1;
        
        uint _totalAmount;
        uint o = _from;

        for (uint i = _from; i <= _to; i++) {

            if (orders[o].buyer == msg.sender) {
                
                _totalAmount += orders[o].weiGiven;
                removeOrder(o);

            } else o += 1;
        }

        if (!msg.sender.send(_totalAmount)) throw;
        else return true;
    }
    
}    


pragma solidity ^0.4.8;

/*
 *
 * This file is part of Pass DAO.
 *
 * The Project smart contract is used for the management of the Pass Dao projects.
 *
*/

/// @title Project smart contract of the Pass Decentralized Autonomous Organisation
contract PassProject {

    // The Pass Dao smart contract
    PassDao public passDao;
    
    // The project name
    string public name;
    // The project description
    string public description;
    // The Hash Of the project Document
    bytes32 public hashOfTheDocument;
    // The project manager smart contract
    address projectManager;

    struct order {
        // The address of the contractor smart contract
        address contractorAddress;
        // The index of the contractor proposal
        uint contractorProposalID;
        // The amount of the order
        uint amount;
        // The date of the order
        uint orderDate;
    }
    // The orders of the Dao for this project
    order[] public orders;
    
    // The total amount of orders in wei for this project
    uint public totalAmountOfOrders;

    struct resolution {
        // The name of the resolution
        string name;
        // A description of the resolution
        string description;
        // The date of the resolution
        uint creationDate;
    }
    // Resolutions of the Dao for this project
    resolution[] public resolutions;
    
// Events

    event OrderAdded(address indexed Client, address indexed ContractorAddress, uint indexed ContractorProposalID, uint Amount, uint OrderDate);
    event ProjectDescriptionUpdated(address indexed By, string NewDescription, bytes32 NewHashOfTheDocument);
    event ResolutionAdded(address indexed Client, uint indexed ResolutionID, string Name, string Description);

// Constant functions  

    /// @return the actual committee room of the Dao   
    function Client() constant returns (address) {
        return passDao.ActualCommitteeRoom();
    }
    
    /// @return The number of orders 
    function numberOfOrders() constant returns (uint) {
        return orders.length - 1;
    }
    
    /// @return The project Manager address
    function ProjectManager() constant returns (address) {
        return projectManager;
    }

    /// @return The number of resolutions 
    function numberOfResolutions() constant returns (uint) {
        return resolutions.length - 1;
    }
    
// modifiers

    // Modifier for project manager functions 
    modifier onlyProjectManager {if (msg.sender != projectManager) throw; _;}

    // Modifier for the Dao functions 
    modifier onlyClient {if (msg.sender != Client()) throw; _;}

// Constructor function

    function PassProject(
        PassDao _passDao, 
        string _name,
        string _description,
        bytes32 _hashOfTheDocument) {

        passDao = _passDao;
        name = _name;
        description = _description;
        hashOfTheDocument = _hashOfTheDocument;
        
        orders.length = 1;
        resolutions.length = 1;
    }
    
// Internal functions

    /// @dev Internal function to register a new order
    /// @param _contractorAddress The address of the contractor smart contract
    /// @param _contractorProposalID The index of the contractor proposal
    /// @param _amount The amount in wei of the order
    /// @param _orderDate The date of the order 
    function addOrder(

        address _contractorAddress, 
        uint _contractorProposalID, 
        uint _amount, 
        uint _orderDate) internal {

        uint _orderID = orders.length++;
        order d = orders[_orderID];
        d.contractorAddress = _contractorAddress;
        d.contractorProposalID = _contractorProposalID;
        d.amount = _amount;
        d.orderDate = _orderDate;
        
        totalAmountOfOrders += _amount;
        
        OrderAdded(msg.sender, _contractorAddress, _contractorProposalID, _amount, _orderDate);
    }
    
// Setting functions

    /// @notice Function to allow cloning orders in case of upgrade
    /// @param _contractorAddress The address of the contractor smart contract
    /// @param _contractorProposalID The index of the contractor proposal
    /// @param _orderAmount The amount in wei of the order
    /// @param _lastOrderDate The unix date of the last order 
    function cloneOrder(
        address _contractorAddress, 
        uint _contractorProposalID, 
        uint _orderAmount, 
        uint _lastOrderDate) {
        
        if (projectManager != 0) throw;
        
        addOrder(_contractorAddress, _contractorProposalID, _orderAmount, _lastOrderDate);
    }
    
    /// @notice Function to set the project manager
    /// @param _projectManager The address of the project manager smart contract
    /// @return True if successful
    function setProjectManager(address _projectManager) returns (bool) {

        if (_projectManager == 0 || projectManager != 0) return;
        
        projectManager = _projectManager;
        
        return true;
    }

// Project manager functions

    /// @notice Function to allow the project manager updating the description of the project
    /// @param _projectDescription A description of the project
    /// @param _hashOfTheDocument The hash of the last document
    function updateDescription(string _projectDescription, bytes32 _hashOfTheDocument) onlyProjectManager {
        description = _projectDescription;
        hashOfTheDocument = _hashOfTheDocument;
        ProjectDescriptionUpdated(msg.sender, _projectDescription, _hashOfTheDocument);
    }

// Client functions

    /// @dev Function to allow the Dao to register a new order
    /// @param _contractorAddress The address of the contractor smart contract
    /// @param _contractorProposalID The index of the contractor proposal
    /// @param _amount The amount in wei of the order
    function newOrder(
        address _contractorAddress, 
        uint _contractorProposalID, 
        uint _amount) onlyClient {
            
        addOrder(_contractorAddress, _contractorProposalID, _amount, now);
    }
    
    /// @dev Function to allow the Dao to register a new resolution
    /// @param _name The name of the resolution
    /// @param _description The description of the resolution
    function newResolution(
        string _name, 
        string _description) onlyClient {

        uint _resolutionID = resolutions.length++;
        resolution d = resolutions[_resolutionID];
        
        d.name = _name;
        d.description = _description;
        d.creationDate = now;

        ResolutionAdded(msg.sender, _resolutionID, d.name, d.description);
    }
}

contract PassProjectCreator {
    
    event NewPassProject(PassDao indexed Dao, PassProject indexed Project, string Name, string Description, bytes32 HashOfTheDocument);

    /// @notice Function to create a new Pass project
    /// @param _passDao The Pass Dao smart contract
    /// @param _name The project name
    /// @param _description The project description (not mandatory, can be updated after by the creator)
    /// @param _hashOfTheDocument The Hash Of the project Document (not mandatory, can be updated after by the creator)
    function createProject(
        PassDao _passDao,
        string _name, 
        string _description, 
        bytes32 _hashOfTheDocument
        ) returns (PassProject) {

        PassProject _passProject = new PassProject(_passDao, _name, _description, _hashOfTheDocument);

        NewPassProject(_passDao, _passProject, _name, _description, _hashOfTheDocument);

        return _passProject;
    }
}
    

pragma solidity ^0.4.8;

/*
 *
 * This file is part of Pass DAO.
 *
 * The Project smart contract is used for the management of the Pass Dao projects.
 *
*/

/// @title Contractor smart contract of the Pass Decentralized Autonomous Organisation
contract PassContractor {
    
    // The project smart contract
    PassProject passProject;
    
    // The address of the creator of this smart contract
    address public creator;
    // Address of the recipient;
    address public recipient;

    // End date of the setup procedure
    uint public smartContractStartDate;

    struct proposal {
        // Amount (in wei) of the proposal
        uint amount;
        // A description of the proposal
        string description;
        // The hash of the proposal's document
        bytes32 hashOfTheDocument;
        // A unix timestamp, denoting the date when the proposal was created
        uint dateOfProposal;
        // The amount submitted to a vote
        uint submittedAmount;
        // The sum amount (in wei) ordered for this proposal 
        uint orderAmount;
        // A unix timestamp, denoting the date of the last order for the approved proposal
        uint dateOfLastOrder;
    }
    // Proposals to work for Pass Dao
    proposal[] public proposals;

// Events

    event RecipientUpdated(address indexed By, address LastRecipient, address NewRecipient);
    event Withdrawal(address indexed By, address indexed Recipient, uint Amount);
    event ProposalAdded(address Creator, uint indexed ProposalID, uint Amount, string Description, bytes32 HashOfTheDocument);
    event ProposalSubmitted(address indexed Client, uint Amount);
    event Order(address indexed Client, uint indexed ProposalID, uint Amount);

// Constant functions

    /// @return the actual committee room of the Dao
    function Client() constant returns (address) {
        return passProject.Client();
    }

    /// @return the project smart contract
    function Project() constant returns (PassProject) {
        return passProject;
    }
    
    /// @notice Function used by the client to check the proposal before submitting
    /// @param _sender The creator of the Dao proposal
    /// @param _proposalID The index of the proposal
    /// @param _amount The amount of the proposal
    /// @return true if the proposal can be submitted
    function proposalChecked(
        address _sender,
        uint _proposalID, 
        uint _amount) constant external onlyClient returns (bool) {
        if (_sender != recipient && _sender != creator) return;
        if (_amount <= proposals[_proposalID].amount - proposals[_proposalID].submittedAmount) return true;
    }

    /// @return The number of proposals     
    function numberOfProposals() constant returns (uint) {
        return proposals.length - 1;
    }


// Modifiers

    // Modifier for contractor functions
    modifier onlyContractor {if (msg.sender != recipient) throw; _;}
    
    // Modifier for client functions
    modifier onlyClient {if (msg.sender != Client()) throw; _;}

// Constructor function

    function PassContractor(
        address _creator, 
        PassProject _passProject, 
        address _recipient,
        bool _restore) { 

        if (address(_passProject) == 0) throw;
        
        creator = _creator;
        if (_recipient == 0) _recipient = _creator;
        recipient = _recipient;
        
        passProject = _passProject;
        
        if (!_restore) smartContractStartDate = now;

        proposals.length = 1;
    }

// Setting functions

    /// @notice Function to clone a proposal from the last contractor
    /// @param _amount Amount (in wei) of the proposal
    /// @param _description A description of the proposal
    /// @param _hashOfTheDocument The hash of the proposal's document
    /// @param _dateOfProposal A unix timestamp, denoting the date when the proposal was created
    /// @param _orderAmount The sum amount (in wei) ordered for this proposal 
    /// @param _dateOfOrder A unix timestamp, denoting the date of the last order for the approved proposal
    /// @param _cloneOrder True if the order has to be cloned in the project smart contract
    /// @return Whether the function was successful or not 
    function cloneProposal(
        uint _amount,
        string _description,
        bytes32 _hashOfTheDocument,
        uint _dateOfProposal,
        uint _orderAmount,
        uint _dateOfOrder,
        bool _cloneOrder
    ) returns (bool success) {
            
        if (smartContractStartDate != 0 || recipient == 0
        || msg.sender != creator) throw;
        
        uint _proposalID = proposals.length++;
        proposal c = proposals[_proposalID];

        c.amount = _amount;
        c.description = _description;
        c.hashOfTheDocument = _hashOfTheDocument; 
        c.dateOfProposal = _dateOfProposal;
        c.orderAmount = _orderAmount;
        c.dateOfLastOrder = _dateOfOrder;

        ProposalAdded(msg.sender, _proposalID, _amount, _description, _hashOfTheDocument);
        
        if (_cloneOrder) passProject.cloneOrder(address(this), _proposalID, _orderAmount, _dateOfOrder);
        
        return true;
    }

    /// @notice Function to close the setting procedure and start to use this smart contract
    /// @return True if successful
    function closeSetup() returns (bool) {
        
        if (smartContractStartDate != 0 
            || (msg.sender != creator && msg.sender != Client())) return;

        smartContractStartDate = now;

        return true;
    }
    
// Account Management

    /// @notice Function to update the recipent address
    /// @param _newRecipient The adress of the recipient
    function updateRecipient(address _newRecipient) onlyContractor {

        if (_newRecipient == 0) throw;

        RecipientUpdated(msg.sender, recipient, _newRecipient);
        recipient = _newRecipient;
    } 

    /// @notice Function to receive payments
    function () payable { }
    
    /// @notice Function to allow contractors to withdraw ethers
    /// @param _amount The amount (in wei) to withdraw
    function withdraw(uint _amount) onlyContractor {
        if (!recipient.send(_amount)) throw;
        Withdrawal(msg.sender, recipient, _amount);
    }
    
// Project Manager Functions    

    /// @notice Function to allow the project manager updating the description of the project
    /// @param _projectDescription A description of the project
    /// @param _hashOfTheDocument The hash of the last document
    function updateProjectDescription(string _projectDescription, bytes32 _hashOfTheDocument) onlyContractor {
        passProject.updateDescription(_projectDescription, _hashOfTheDocument);
    }
    
// Management of proposals

    /// @notice Function to make a proposal to work for the client
    /// @param _creator The address of the creator of the proposal
    /// @param _amount The amount (in wei) of the proposal
    /// @param _description String describing the proposal
    /// @param _hashOfTheDocument The hash of the proposal document
    /// @return The index of the contractor proposal
    function newProposal(
        address _creator,
        uint _amount,
        string _description, 
        bytes32 _hashOfTheDocument
    ) external returns (uint) {
        
        if (msg.sender == Client() && _creator != recipient && _creator != creator) throw;
        if (msg.sender != Client() && msg.sender != recipient && msg.sender != creator) throw;

        if (_amount == 0) throw;
        
        uint _proposalID = proposals.length++;
        proposal c = proposals[_proposalID];

        c.amount = _amount;
        c.description = _description;
        c.hashOfTheDocument = _hashOfTheDocument; 
        c.dateOfProposal = now;
        
        ProposalAdded(msg.sender, _proposalID, c.amount, c.description, c.hashOfTheDocument);
        
        return _proposalID;
    }
    
    /// @notice Function used by the client to infor about the submitted amount
    /// @param _sender The address of the sender who submits the proposal
    /// @param _proposalID The index of the contractor proposal
    /// @param _amount The amount (in wei) submitted
    function submitProposal(
        address _sender, 
        uint _proposalID, 
        uint _amount) onlyClient {

        if (_sender != recipient && _sender != creator) throw;    
        proposals[_proposalID].submittedAmount += _amount;
        ProposalSubmitted(msg.sender, _amount);
    }

    /// @notice Function used by the client to order according to the contractor proposal
    /// @param _proposalID The index of the contractor proposal
    /// @param _orderAmount The amount (in wei) of the order
    /// @return Whether the order was made or not
    function order(
        uint _proposalID,
        uint _orderAmount
    ) external onlyClient returns (bool) {
    
        proposal c = proposals[_proposalID];
        
        uint _sum = c.orderAmount + _orderAmount;
        if (_sum > c.amount
            || _sum < c.orderAmount
            || _sum < _orderAmount) return; 

        c.orderAmount = _sum;
        c.dateOfLastOrder = now;
        
        Order(msg.sender, _proposalID, _orderAmount);
        
        return true;
    }
    
}

contract PassContractorCreator {
    
    // Address of the pass Dao smart contract
    PassDao public passDao;
    // Address of the Pass Project creator
    PassProjectCreator public projectCreator;
    
    struct contractor {
        // The address of the creator of the contractor
        address creator;
        // The contractor smart contract
        PassContractor contractor;
        // The address of the recipient for withdrawals
        address recipient;
        // True if meta project
        bool metaProject;
        // The address of the existing project smart contract
        PassProject passProject;
        // The name of the project (if the project smart contract doesn't exist)
        string projectName;
        // A description of the project (can be updated after)
        string projectDescription;
        // The unix creation date of the contractor
        uint creationDate;
    }
    // contractors created to work for Pass Dao
    contractor[] public contractors;
    
    event NewPassContractor(address indexed Creator, address indexed Recipient, PassProject indexed Project, PassContractor Contractor);

    function PassContractorCreator(PassDao _passDao, PassProjectCreator _projectCreator) {
        passDao = _passDao;
        projectCreator = _projectCreator;
        contractors.length = 0;
    }

    /// @return The number of created contractors 
    function numberOfContractors() constant returns (uint) {
        return contractors.length;
    }
    
    /// @notice Function to create a contractor smart contract
    /// @param _creator The address of the creator of the contractor
    /// @param _recipient The address of the recipient for withdrawals
    /// @param _metaProject True if meta project
    /// @param _passProject The address of the existing project smart contract
    /// @param _projectName The name of the project (if the project smart contract doesn't exist)
    /// @param _projectDescription A description of the project (can be updated after)
    /// @param _restore True if orders or proposals are to be cloned from other contracts
    /// @return The address of the created contractor smart contract
    function createContractor(
        address _creator,
        address _recipient, 
        bool _metaProject,
        PassProject _passProject,
        string _projectName, 
        string _projectDescription,
        bool _restore) returns (PassContractor) {
 
        PassProject _project;

        if (_creator == 0) _creator = msg.sender;
        
        if (_metaProject) _project = PassProject(passDao.MetaProject());
        else if (address(_passProject) == 0) 
            _project = projectCreator.createProject(passDao, _projectName, _projectDescription, 0);
        else _project = _passProject;

        PassContractor _contractor = new PassContractor(_creator, _project, _recipient, _restore);
        if (!_metaProject && address(_passProject) == 0 && !_restore) _project.setProjectManager(address(_contractor));
        
        uint _contractorID = contractors.length++;
        contractor c = contractors[_contractorID];
        c.creator = _creator;
        c.contractor = _contractor;
        c.recipient = _recipient;
        c.metaProject = _metaProject;
        c.passProject = _passProject;
        c.projectName = _projectName;
        c.projectDescription = _projectDescription;
        c.creationDate = now;

        NewPassContractor(_creator, _recipient, _project, _contractor);
 
        return _contractor;
    }
    
}


pragma solidity ^0.4.8;

/*
 *
 * This file is part of Pass DAO.
 *

/*
Smart contract for a Decentralized Autonomous Organization (DAO)
to automate organizational governance and decision-making.
*/

/// @title Pass Committee Room
contract PassCommitteeRoomInterface {

    // The Pass Dao smart contract
    PassDao public passDao;

    enum ProposalTypes { contractor, resolution, rules, upgrade }

    struct Committee {        
        // Address of the creator of the committee
        address creator;  
        // The type of the proposal
        ProposalTypes proposalType;
        // Index to identify the proposal
        uint proposalID;
        // unix timestamp, denoting the end of the set period of a proposal before the committee 
        uint setDeadline;
        // Fees (in wei) paid by the creator of the proposal
        uint fees;
        // Total of fees (in wei) rewarded to the voters
        uint totalRewardedAmount;
        // A unix timestamp, denoting the end of the voting period
        uint votingDeadline;
        // True if the proposal's votes have yet to be counted, otherwise False
        bool open; 
        // A unix timestamp, denoting the date of the execution of the approved proposal
        uint dateOfExecution;
        // Number of shares in favor of the proposal
        uint yea; 
        // Number of shares opposed to the proposal
        uint nay; 
    }
    // Committees organized to vote for or against a proposal
    Committee[] public Committees; 
    // mapping to indicate if a shareholder has voted at a committee or not
    mapping (uint => mapping (address => bool)) hasVoted;

    struct Proposal {
        // Index to identify the committee
        uint committeeID;
        // The contractor smart contract (not mandatory if funding)
        PassContractor contractor;
        // The index of the contractor proposal in the contractor contract (not mandatory if funding)
        uint contractorProposalID;
        // The amount of the proposal from the share manager balance (for funding or contractor proposals)
        uint amount;
        // The address which sets partners and manages the funding (not mandatory)
        address moderator;
        // Amount from the sale of shares (for funding or contractor proposals)
        uint amountForShares;
        // The initial price multiplier of Dao shares at the beginning of the funding (not mandatory)
        uint initialSharePriceMultiplier; 
        // Amount from the sale of tokens (for project manager proposals)
        uint amountForTokens;
        // A unix timestamp, denoting the start time of the funding
        uint minutesFundingPeriod;
        // True if the proposal is closed
        bool open; 
    }
    // Proposals to pay a contractor or/and fund the Dao
    Proposal[] public Proposals;

    struct Question {
        // Index to identify a committee
        uint committeeID; 
        // The project smart contract
        PassProject project;
        // The name of the question for display purpose
        string name;
        // A description of the question
        string description;
    }
    // Questions submitted to a vote by the shareholders 
    Question[] public ResolutionProposals;
    
    struct Rules {
        // Index to identify a committee
        uint committeeID; 
        // The quorum needed for each proposal is calculated by totalSupply / minQuorumDivisor
        uint minQuorumDivisor;  
        // Minimum fees (in wei) to create a proposal
        uint minCommitteeFees; 
        // Minimum percentage of votes for a proposal to reward the creator
        uint minPercentageOfLikes;
        // Period in minutes to consider or set a proposal before the voting procedure
        uint minutesSetProposalPeriod; 
        // The minimum debate period in minutes that a generic proposal can have
        uint minMinutesDebatePeriod;
        // The inflation rate to calculate the reward of fees to voters
        uint feesRewardInflationRate;
        // The inflation rate to calculate the token price (for project manager proposals) 
        uint tokenPriceInflationRate;
        // The default minutes funding period
        uint defaultMinutesFundingPeriod;
    } 
    // Proposals to update the committee rules
    Rules[] public rulesProposals;

    struct Upgrade {
        // Index to identify a committee
        uint committeeID; 
        // Address of the proposed Committee Room smart contract
        address newCommitteeRoom;
        // Address of the proposed share manager smart contract
        address newShareManager;
        // Address of the proposed token manager smart contract
        address newTokenManager;
    }
    // Proposals to upgrade
    Upgrade[] public UpgradeProposals;
    
    // The minimum periods in minutes 
    uint minMinutesPeriods;
    // The maximum inflation rate for token price or rewards to voters
    uint maxInflationRate;
    
    /// @return the effective share manager
    function ShareManager() constant returns (PassManager);

    /// @return the effective token manager
    function TokenManager() constant returns (PassManager);

    /// return the balance of the DAO
    function Balance() constant returns (uint);
    
    /// @param _committeeID The index of the committee
    /// @param _shareHolder The shareholder (not mandatory, default : msg.sender)
    /// @return true if the shareholder has voted at the committee
    function HasVoted(
        uint _committeeID, 
        address _shareHolder) constant external returns (bool);
    
    /// @return The minimum quorum for proposals to pass 
    function minQuorum() constant returns (uint);

    /// @return The number of committees 
    function numberOfCommittees() constant returns (uint);
    
    /// @dev The constructor function
    /// @param _passDao Address of Pass Dao
    //function PassCommitteeRoom(address _passDao);

    /// @notice Function to init an set the committee rules
    /// @param _maxInflationRate The maximum inflation rate for contractor and funding proposals
    /// @param _minMinutesPeriods The minimum periods in minutes
    /// @param _minQuorumDivisor The initial minimum quorum divisor for the proposals
    /// @param _minCommitteeFees The minimum amount (in wei) to make a proposal
    /// @param _minPercentageOfLikes Minimum percentage of votes for a proposal to reward the creator
    /// @param _minutesSetProposalPeriod The minimum period in minutes before a committee
    /// @param _minMinutesDebatePeriod The minimum period in minutes of the board meetings
    /// @param _feesRewardInflationRate The inflation rate to calculate the reward of fees to voters during a committee
    /// @param _tokenPriceInflationRate The inflation rate to calculate the token price for project manager proposals
    /// @param _defaultMinutesFundingPeriod Default period in minutes of the funding
    function init(
        uint _maxInflationRate,
        uint _minMinutesPeriods,
        uint _minQuorumDivisor,
        uint _minCommitteeFees,
        uint _minPercentageOfLikes,
        uint _minutesSetProposalPeriod,
        uint _minMinutesDebatePeriod,
        uint _feesRewardInflationRate,
        uint _tokenPriceInflationRate,
        uint _defaultMinutesFundingPeriod);

    /// @notice Function to create a contractor smart contract
    /// @param _contractorCreator The contractor creator smart contract
    /// @param _recipient The recipient of the contractor smart contract
    /// @param _metaProject True if meta project
    /// @param _passProject The project smart contract (not mandatory)
    /// @param _projectName The name of the project (if the project smart contract doesn't exist)
    /// @param _projectDescription A description of the project (not mandatory, can be updated after)
    /// @return The contractor smart contract
    function createContractor(
        PassContractorCreator _contractorCreator,
        address _recipient,
        bool _metaProject,
        PassProject _passProject,
        string _projectName, 
        string _projectDescription) returns (PassContractor);
    
    /// @notice Function to make a proposal to pay a contractor or/and fund the Dao
    /// @param _amount Amount of the proposal
    /// @param _contractor The contractor smart contract
    /// @param _contractorProposalID Index of the contractor proposal in the contractor smart contract (not mandatory)
    /// @param _proposalDescription String describing the proposal (if not existing proposal)
    /// @param _hashOfTheContractorProposalDocument The hash of the Contractor proposal document (if not existing proposal)
    /// @param _moderator The address which sets partners and manage the funding (not mandatory)
    /// @param _initialSharePriceMultiplier The initial price multiplier of shares (for funding or contractor proposals)
    /// @param _minutesFundingPeriod Period in minutes of the funding (not mandatory)
    /// @param _minutesDebatingPeriod Period in minutes of the board meeting to vote on the proposal (not mandatory)
    /// @return The index of the proposal
    function contractorProposal(
        uint _amount,
        PassContractor _contractor,
        uint _contractorProposalID,
        string _proposalDescription, 
        bytes32 _hashOfTheContractorProposalDocument,
        address _moderator,
        uint _initialSharePriceMultiplier, 
        uint _minutesFundingPeriod,
        uint _minutesDebatingPeriod) payable returns (uint);

    /// @notice Function to submit a question
    /// @param _name Name of the question for display purpose
    /// @param _description A description of the question
    /// @param _project The project smart contract
    /// @param _minutesDebatingPeriod Period in minutes of the board meeting to vote on the proposal
    /// @return The index of the proposal
    function resolutionProposal(
        string _name,
        string _description,
        PassProject _project,
        uint _minutesDebatingPeriod) payable returns (uint);
        
    /// @notice Function to make a proposal to change the rules of the committee room 
    /// @param _minQuorumDivisor If 5, the minimum quorum is 20%
    /// @param _minCommitteeFees The minimum amount (in wei) to make a proposal
    /// @param _minPercentageOfLikes Minimum percentage of votes for a proposal to reward the creator
    /// @param _minutesSetProposalPeriod Minimum period in minutes before a committee
    /// @param _minMinutesDebatePeriod The minimum period in minutes of the committees
    /// @param _feesRewardInflationRate The inflation rate to calculate the reward of fees to voters during a committee
    /// @param _defaultMinutesFundingPeriod Period in minutes of the funding
    /// @param _tokenPriceInflationRate The inflation rate to calculate the token price for project manager proposals
    /// @return The index of the proposal
    function rulesProposal(
        uint _minQuorumDivisor, 
        uint _minCommitteeFees,
        uint _minPercentageOfLikes,
        uint _minutesSetProposalPeriod,
        uint _minMinutesDebatePeriod,
        uint _feesRewardInflationRate,
        uint _defaultMinutesFundingPeriod,
        uint _tokenPriceInflationRate) payable returns (uint);
    
    /// @notice Function to make a proposal to upgrade the application
    /// @param _newCommitteeRoom Address of a new Committee Room smart contract (not mandatory)   
    /// @param _newShareManager Address of a new share manager smart contract (not mandatory)
    /// @param _newTokenManager Address of a new token manager smart contract (not mandatory)
    /// @param _minutesDebatingPeriod Period in minutes of the committee to vote on the proposal (not mandatory)
    /// @return The index of the proposal
    function upgradeProposal(
        address _newCommitteeRoom,
        address _newShareManager,
        address _newTokenManager,
        uint _minutesDebatingPeriod) payable returns (uint);

    /// @dev Internal function to create a committee
    /// @param _proposalType The type of the proposal
    /// @param _proposalID The index of the proposal
    /// @param _minutesDebatingPeriod The duration in minutes of the committee
    /// @return the index of the board meeting
    function newCommittee(
        ProposalTypes _proposalType,
        uint _proposalID, 
        uint _minutesDebatingPeriod) internal returns (uint);
        
    /// @notice Function to vote for or against a proposal during a committee
    /// @param _committeeID The index of the committee
    /// @param _supportsProposal True if the proposal is supported
    function vote(
        uint _committeeID, 
        bool _supportsProposal);
    
    /// @notice Function to execute a decision and close the committee
    /// @param _committeeID The index of the committee
    /// @return Whether the proposal was executed or not
    function executeDecision(uint _committeeID) returns (bool);
    
    /// @notice Function to order to a contractor and close a contractor proposal
    /// @param _proposalID The index of the proposal
    /// @return Whether the proposal was ordered and the proposal amount sent or not
    function orderToContractor(uint _proposalID) returns (bool);   

    /// @notice Function to buy shares and or/and promote a contractor proposal 
    /// @param _proposalID The index of the proposal
    /// @return Whether the function was successful or not
    function buySharesForProposal(uint _proposalID) payable returns (bool);
    
    /// @notice Function to send tokens or refund after the closing time of the funding proposals
    /// @param _from The first proposal. 0 if not linked to a proposal
    /// @param _to The last proposal
    /// @param _buyer The address of the buyer
    /// @return Whether the function was successful or not 
    function sendPendingAmounts(        
        uint _from,
        uint _to,
        address _buyer) returns (bool);
        
    /// @notice Function to receive tokens or refund after the closing time of the funding proposals
    /// @return Whether the function was successful or not
    function withdrawPendingAmounts() returns (bool);

    event CommitteeLimits(uint maxInflationRate, uint minMinutesPeriods);
    
    event ContractorCreated(PassContractorCreator Creator, address indexed Sender, PassContractor Contractor, address Recipient);

    event ProposalSubmitted(uint indexed ProposalID, uint CommitteeID, PassContractor indexed Contractor, uint indexed ContractorProposalID, 
        uint Amount, string Description, address Moderator, uint SharePriceMultiplier, uint MinutesFundingPeriod);
    event ResolutionProposalSubmitted(uint indexed QuestionID, uint indexed CommitteeID, PassProject indexed Project, string Name, string Description);
    event RulesProposalSubmitted(uint indexed rulesProposalID, uint CommitteeID, uint MinQuorumDivisor, uint MinCommitteeFees, uint MinPercentageOfLikes, 
        uint MinutesSetProposalPeriod, uint MinMinutesDebatePeriod, uint FeesRewardInflationRate, uint DefaultMinutesFundingPeriod, uint TokenPriceInflationRate);
    event UpgradeProposalSubmitted(uint indexed UpgradeProposalID, uint indexed CommitteeID, address NewCommitteeRoom, 
        address NewShareManager, address NewTokenManager);

    event Voted(uint indexed CommitteeID, bool Position, address indexed Voter, uint RewardedAmount);

    event ProposalClosed(uint indexed ProposalID, ProposalTypes indexed ProposalType, uint CommitteeID, 
        uint TotalRewardedAmount, bool ProposalExecuted, uint RewardedSharesAmount, uint SentToManager);
    event ContractorProposalClosed(uint indexed ProposalID, uint indexed ContractorProposalID, PassContractor indexed Contractor, uint AmountSent);
    event DappUpgraded(address NewCommitteeRoom, address NewShareManager, address NewTokenManager);

}

contract PassCommitteeRoom is PassCommitteeRoomInterface {

// Constant functions

    function ShareManager() constant returns (PassManager) {
        return PassManager(passDao.ActualShareManager());
    }
    
    function TokenManager() constant returns (PassManager) {
        return PassManager(passDao.ActualTokenManager());
    }
    
    function Balance() constant returns (uint) {
        return passDao.ActualShareManager().balance;
    }

    function HasVoted(
        uint _committeeID, 
        address _shareHolder) constant external returns (bool) {

        if (_shareHolder == 0) return hasVoted[_committeeID][msg.sender];
        else return hasVoted[_committeeID][_shareHolder];
    }
    
    function minQuorum() constant returns (uint) {
        return (uint(ShareManager().totalSupply()) / rulesProposals[0].minQuorumDivisor);
    }

    function numberOfCommittees() constant returns (uint) {
        return Committees.length - 1;
    }
    
// Constructor and init functions

    function PassCommitteeRoom(address _passDao) {

        passDao = PassDao(_passDao);
        rulesProposals.length = 1; 
        Committees.length = 1;
        Proposals.length = 1;
        ResolutionProposals.length = 1;
        UpgradeProposals.length = 1;
    }
    
    function init(
        uint _maxInflationRate,
        uint _minMinutesPeriods,
        uint _minQuorumDivisor,
        uint _minCommitteeFees,
        uint _minPercentageOfLikes,
        uint _minutesSetProposalPeriod,
        uint _minMinutesDebatePeriod,
        uint _feesRewardInflationRate,
        uint _tokenPriceInflationRate,
        uint _defaultMinutesFundingPeriod) {

        maxInflationRate = _maxInflationRate;
        minMinutesPeriods = _minMinutesPeriods;
        CommitteeLimits(maxInflationRate, minMinutesPeriods);
        
        if (rulesProposals[0].minQuorumDivisor != 0) throw;
        rulesProposals[0].minQuorumDivisor = _minQuorumDivisor;
        rulesProposals[0].minCommitteeFees = _minCommitteeFees;
        rulesProposals[0].minPercentageOfLikes = _minPercentageOfLikes;
        rulesProposals[0].minutesSetProposalPeriod = _minutesSetProposalPeriod;
        rulesProposals[0].minMinutesDebatePeriod = _minMinutesDebatePeriod;
        rulesProposals[0].feesRewardInflationRate = _feesRewardInflationRate;
        rulesProposals[0].tokenPriceInflationRate = _tokenPriceInflationRate;
        rulesProposals[0].defaultMinutesFundingPeriod = _defaultMinutesFundingPeriod;

    }

// Project manager and contractor management

    function createContractor(
        PassContractorCreator _contractorCreator,
        address _recipient,
        bool _metaProject,
        PassProject _passProject,
        string _projectName, 
        string _projectDescription) returns (PassContractor) {

        PassContractor _contractor = _contractorCreator.createContractor(msg.sender, _recipient, 
            _metaProject, _passProject, _projectName, _projectDescription, false);
        ContractorCreated(_contractorCreator, msg.sender, _contractor, _recipient);
        return _contractor;
    }   

// Proposals Management

    function contractorProposal(
        uint _amount,
        PassContractor _contractor,
        uint _contractorProposalID,
        string _proposalDescription, 
        bytes32 _hashOfTheContractorProposalDocument,        
        address _moderator,
        uint _initialSharePriceMultiplier, 
        uint _minutesFundingPeriod,
        uint _minutesDebatingPeriod
    ) payable returns (uint) {

        if (_minutesFundingPeriod == 0) _minutesFundingPeriod = rulesProposals[0].defaultMinutesFundingPeriod;

        if (address(_contractor) != 0 && _contractorProposalID != 0) {
            if (_hashOfTheContractorProposalDocument != 0 
                ||!_contractor.proposalChecked(msg.sender, _contractorProposalID, _amount)) throw;
            else _proposalDescription = "Proposal checked";
        }

        if ((address(_contractor) != 0 && _contractorProposalID == 0 && _hashOfTheContractorProposalDocument == 0)
            || _amount == 0
            || _minutesFundingPeriod < minMinutesPeriods) throw;

        uint _proposalID = Proposals.length++;
        Proposal p = Proposals[_proposalID];

        p.contractor = _contractor;
        
        if (_contractorProposalID == 0 && _hashOfTheContractorProposalDocument != 0) {
            _contractorProposalID = _contractor.newProposal(msg.sender, _amount, _proposalDescription, _hashOfTheContractorProposalDocument);
        }
        p.contractorProposalID = _contractorProposalID;

        if (address(_contractor) == 0) p.amountForShares = _amount;
        else {
            _contractor.submitProposal(msg.sender, _contractorProposalID, _amount);
            if (_contractor.Project().ProjectManager() == address(_contractor)) p.amountForTokens = _amount;
            else {
                p.amount = Balance();
                if (_amount > p.amount) p.amountForShares = _amount - p.amount;
                else p.amount = _amount;
            }
        }
        
        p.moderator = _moderator;

        p.initialSharePriceMultiplier = _initialSharePriceMultiplier;

        p.minutesFundingPeriod = _minutesFundingPeriod;

        p.committeeID = newCommittee(ProposalTypes.contractor, _proposalID, _minutesDebatingPeriod);   

        p.open = true;
        
        ProposalSubmitted(_proposalID, p.committeeID, p.contractor, p.contractorProposalID, p.amount+p.amountForShares+p.amountForTokens, 
            _proposalDescription, p.moderator, p.initialSharePriceMultiplier, p.minutesFundingPeriod);

        return _proposalID;
    }

    function resolutionProposal(
        string _name,
        string _description,
        PassProject _project,
        uint _minutesDebatingPeriod) payable returns (uint) {
        
        if (address(_project) == 0) _project = PassProject(passDao.MetaProject());
        
        uint _questionID = ResolutionProposals.length++;
        Question q = ResolutionProposals[_questionID];
        
        q.project = _project;
        q.name = _name;
        q.description = _description;
        
        q.committeeID = newCommittee(ProposalTypes.resolution, _questionID, _minutesDebatingPeriod);
        
        ResolutionProposalSubmitted(_questionID, q.committeeID, q.project, q.name, q.description);
        
        return _questionID;
    }

    function rulesProposal(
        uint _minQuorumDivisor, 
        uint _minCommitteeFees,
        uint _minPercentageOfLikes,
        uint _minutesSetProposalPeriod,
        uint _minMinutesDebatePeriod,
        uint _feesRewardInflationRate,
        uint _defaultMinutesFundingPeriod,
        uint _tokenPriceInflationRate) payable returns (uint) {

    
        if (_minQuorumDivisor <= 1
            || _minQuorumDivisor > 10
            || _minutesSetProposalPeriod < minMinutesPeriods
            || _minMinutesDebatePeriod < minMinutesPeriods
            || _feesRewardInflationRate > maxInflationRate
            || _tokenPriceInflationRate > maxInflationRate
            || _defaultMinutesFundingPeriod < minMinutesPeriods) throw; 
        
        uint _rulesProposalID = rulesProposals.length++;
        Rules r = rulesProposals[_rulesProposalID];

        r.minQuorumDivisor = _minQuorumDivisor;
        r.minCommitteeFees = _minCommitteeFees;
        r.minPercentageOfLikes = _minPercentageOfLikes;
        r.minutesSetProposalPeriod = _minutesSetProposalPeriod;
        r.minMinutesDebatePeriod = _minMinutesDebatePeriod;
        r.feesRewardInflationRate = _feesRewardInflationRate;
        r.defaultMinutesFundingPeriod = _defaultMinutesFundingPeriod;
        r.tokenPriceInflationRate = _tokenPriceInflationRate;

        r.committeeID = newCommittee(ProposalTypes.rules, _rulesProposalID, 0);

        RulesProposalSubmitted(_rulesProposalID, r.committeeID, _minQuorumDivisor, _minCommitteeFees, 
            _minPercentageOfLikes, _minutesSetProposalPeriod, _minMinutesDebatePeriod, 
            _feesRewardInflationRate, _defaultMinutesFundingPeriod, _tokenPriceInflationRate);

        return _rulesProposalID;
    }
    
    function upgradeProposal(
        address _newCommitteeRoom,
        address _newShareManager,
        address _newTokenManager,
        uint _minutesDebatingPeriod
    ) payable returns (uint) {
        
        uint _upgradeProposalID = UpgradeProposals.length++;
        Upgrade u = UpgradeProposals[_upgradeProposalID];
        
        u.newCommitteeRoom = _newCommitteeRoom;
        u.newShareManager = _newShareManager;
        u.newTokenManager = _newTokenManager;

        u.committeeID = newCommittee(ProposalTypes.upgrade, _upgradeProposalID, _minutesDebatingPeriod);
        
        UpgradeProposalSubmitted(_upgradeProposalID, u.committeeID, u.newCommitteeRoom, u.newShareManager, u.newTokenManager);
        
        return _upgradeProposalID;
    }
    
// Committees management

    function newCommittee(
        ProposalTypes _proposalType,
        uint _proposalID, 
        uint _minutesDebatingPeriod
    ) internal returns (uint) {

        if (_minutesDebatingPeriod == 0) _minutesDebatingPeriod = rulesProposals[0].minMinutesDebatePeriod;
        
        if (passDao.ActualCommitteeRoom() != address(this)
            || msg.value < rulesProposals[0].minCommitteeFees
            || now + ((rulesProposals[0].minutesSetProposalPeriod + _minutesDebatingPeriod) * 1 minutes) < now
            || _minutesDebatingPeriod < rulesProposals[0].minMinutesDebatePeriod
            || msg.sender == address(this)) throw;

        uint _committeeID = Committees.length++;
        Committee b = Committees[_committeeID];

        b.creator = msg.sender;

        b.proposalType = _proposalType;
        b.proposalID = _proposalID;

        b.fees = msg.value;
        
        b.setDeadline = now + (rulesProposals[0].minutesSetProposalPeriod * 1 minutes);        
        b.votingDeadline = b.setDeadline + (_minutesDebatingPeriod * 1 minutes); 

        b.open = true; 

        return _committeeID;
    }
    
    function vote(
        uint _committeeID, 
        bool _supportsProposal) {
        
        Committee b = Committees[_committeeID];

        if (hasVoted[_committeeID][msg.sender] 
            || now < b.setDeadline
            || now > b.votingDeadline) throw;
            
        PassManager _shareManager = ShareManager();

        uint _balance = uint(_shareManager.balanceOf(msg.sender));
        if (_balance == 0) throw;
        
        hasVoted[_committeeID][msg.sender] = true;

        _shareManager.blockTransfer(msg.sender, b.votingDeadline);

        if (_supportsProposal) b.yea += _balance;
        else b.nay += _balance; 

        uint _a = 100*b.fees;
        if ((_a/100 != b.fees) || ((_a*_balance)/_a != _balance)) throw;
        uint _multiplier = (_a*_balance)/uint(_shareManager.totalSupply());
        uint _divisor = 100 + 100*rulesProposals[0].feesRewardInflationRate*(now - b.setDeadline)/(100*365 days);
        uint _rewardedamount = _multiplier/_divisor;
        if (b.totalRewardedAmount + _rewardedamount > b.fees) _rewardedamount = b.fees - b.totalRewardedAmount;
        b.totalRewardedAmount += _rewardedamount;
        if (!msg.sender.send(_rewardedamount)) throw;

        Voted(_committeeID, _supportsProposal, msg.sender, _rewardedamount);    
}

// Decisions management

    function executeDecision(uint _committeeID) returns (bool) {

        Committee b = Committees[_committeeID];
        
        if (now < b.votingDeadline || !b.open) return;
        
        b.open = false;

        PassManager _shareManager = ShareManager();
        uint _quantityOfShares;
        PassManager _tokenManager = TokenManager();

        if (100*b.yea > rulesProposals[0].minPercentageOfLikes * uint(_shareManager.totalSupply())) {       
            _quantityOfShares = _shareManager.rewardTokensForClient(b.creator, rulesProposals[0].minCommitteeFees);
        }        

        uint _sentToDaoManager = b.fees - b.totalRewardedAmount;
        if (_sentToDaoManager > 0) {
            if (!address(_shareManager).send(_sentToDaoManager)) throw;
        }
        
        if (b.yea + b.nay < minQuorum() || b.yea <= b.nay) {
            if (b.proposalType == ProposalTypes.contractor) Proposals[b.proposalID].open = false;
            ProposalClosed(b.proposalID, b.proposalType, _committeeID, b.totalRewardedAmount, false, _quantityOfShares, _sentToDaoManager);
            return;
        }

        b.dateOfExecution = now;

        if (b.proposalType == ProposalTypes.contractor) {

            Proposal p = Proposals[b.proposalID];
    
            if (p.contractorProposalID == 0) p.open = false;
            
            if (p.amountForShares == 0 && p.amountForTokens == 0) orderToContractor(b.proposalID);
            else {
                if (p.amountForShares != 0) {
                    _shareManager.setFundingRules(p.moderator, p.initialSharePriceMultiplier, p.amountForShares, p.minutesFundingPeriod, 0, b.proposalID);
                }

                if (p.amountForTokens != 0) {
                    _tokenManager.setFundingRules(p.moderator, 0, p.amountForTokens, p.minutesFundingPeriod, rulesProposals[0].tokenPriceInflationRate, b.proposalID);
                }
            }

        } else if (b.proposalType == ProposalTypes.resolution) {
            
            Question q = ResolutionProposals[b.proposalID];
            
            q.project.newResolution(q.name, q.description);
            
        } else if (b.proposalType == ProposalTypes.rules) {

            Rules r = rulesProposals[b.proposalID];
            
            rulesProposals[0].committeeID = r.committeeID;
            rulesProposals[0].minQuorumDivisor = r.minQuorumDivisor;
            rulesProposals[0].minMinutesDebatePeriod = r.minMinutesDebatePeriod; 
            rulesProposals[0].minCommitteeFees = r.minCommitteeFees;
            rulesProposals[0].minPercentageOfLikes = r.minPercentageOfLikes;
            rulesProposals[0].minutesSetProposalPeriod = r.minutesSetProposalPeriod;
            rulesProposals[0].feesRewardInflationRate = r.feesRewardInflationRate;
            rulesProposals[0].tokenPriceInflationRate = r.tokenPriceInflationRate;
            rulesProposals[0].defaultMinutesFundingPeriod = r.defaultMinutesFundingPeriod;

        } else if (b.proposalType == ProposalTypes.upgrade) {

            Upgrade u = UpgradeProposals[b.proposalID];

            if ((u.newShareManager != 0) && (u.newShareManager != address(_shareManager))) {
                _shareManager.disableTransfer();
                if (_shareManager.balance > 0) {
                    if (!_shareManager.sendTo(u.newShareManager, _shareManager.balance)) throw;
                }
            }

            if ((u.newTokenManager != 0) && (u.newTokenManager != address(_tokenManager))) {
                _tokenManager.disableTransfer();
            }

            passDao.upgrade(u.newCommitteeRoom, u.newShareManager, u.newTokenManager);
                
            DappUpgraded(u.newCommitteeRoom, u.newShareManager, u.newTokenManager);
            
        }

        ProposalClosed(b.proposalID, b.proposalType, _committeeID , b.totalRewardedAmount, true, _quantityOfShares, _sentToDaoManager);
            
        return true;
    }
    
    function orderToContractor(uint _proposalID) returns (bool) {
        
        Proposal p = Proposals[_proposalID];
        Committee b = Committees[p.committeeID];

        if (b.open || !p.open) return;
        
        uint _amountForShares;
        uint _amountForTokens;

        if (p.amountForShares != 0) {
            _amountForShares = ShareManager().FundedAmount(_proposalID);
            if (_amountForShares == 0 && now <= b.dateOfExecution + (p.minutesFundingPeriod * 1 minutes)) return;
        }

        if (p.amountForTokens != 0) {
            _amountForTokens = TokenManager().FundedAmount(_proposalID);
            if (_amountForTokens == 0 && now <= b.dateOfExecution + (p.minutesFundingPeriod * 1 minutes)) return;
        }
        
        p.open = false;   

        uint _amount = p.amount + _amountForShares + _amountForTokens;

        PassProject _project = PassProject(p.contractor.Project());

        if (_amount == 0) {
            ContractorProposalClosed(_proposalID, p.contractorProposalID, p.contractor, 0);
            return;
        }    

        if (!p.contractor.order(p.contractorProposalID, _amount)) throw;
        
        if (p.amount + _amountForShares > 0) {
            if (!ShareManager().sendTo(p.contractor, p.amount + _amountForShares)) throw;
        }
        if (_amountForTokens > 0) {
            if (!TokenManager().sendTo(p.contractor, _amountForTokens)) throw;
        }

        ContractorProposalClosed(_proposalID, p.contractorProposalID, p.contractor, _amount);
        
        passDao.addProject(_project);
        _project.newOrder(p.contractor, p.contractorProposalID, _amount);
        
        return true;
    }

// Holder Account management

    function buySharesForProposal(uint _proposalID) payable returns (bool) {
        
        return ShareManager().buyTokensForProposal.value(msg.value)(_proposalID, msg.sender);
    }   

    function sendPendingAmounts(
        uint _from,
        uint _to,
        address _buyer) returns (bool) {
        
        return ShareManager().sendPendingAmounts(_from, _to, _buyer);
    }        
    
    function withdrawPendingAmounts() returns (bool) {
        
        if (!ShareManager().sendPendingAmounts(0, 0, msg.sender)) throw;
    }        
            
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"}],"name":"buySharesForProposal","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"Committees","outputs":[{"name":"creator","type":"address"},{"name":"proposalType","type":"uint8"},{"name":"proposalID","type":"uint256"},{"name":"setDeadline","type":"uint256"},{"name":"fees","type":"uint256"},{"name":"totalRewardedAmount","type":"uint256"},{"name":"votingDeadline","type":"uint256"},{"name":"open","type":"bool"},{"name":"dateOfExecution","type":"uint256"},{"name":"yea","type":"uint256"},{"name":"nay","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"Balance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ResolutionProposals","outputs":[{"name":"committeeID","type":"uint256"},{"name":"project","type":"address"},{"name":"name","type":"string"},{"name":"description","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_committeeID","type":"uint256"},{"name":"_shareHolder","type":"address"}],"name":"HasVoted","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_committeeID","type":"uint256"}],"name":"executeDecision","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_maxInflationRate","type":"uint256"},{"name":"_minMinutesPeriods","type":"uint256"},{"name":"_minQuorumDivisor","type":"uint256"},{"name":"_minCommitteeFees","type":"uint256"},{"name":"_minPercentageOfLikes","type":"uint256"},{"name":"_minutesSetProposalPeriod","type":"uint256"},{"name":"_minMinutesDebatePeriod","type":"uint256"},{"name":"_feesRewardInflationRate","type":"uint256"},{"name":"_tokenPriceInflationRate","type":"uint256"},{"name":"_defaultMinutesFundingPeriod","type":"uint256"}],"name":"init","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"passDao","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"uint256"},{"name":"_to","type":"uint256"},{"name":"_buyer","type":"address"}],"name":"sendPendingAmounts","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"numberOfCommittees","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"withdrawPendingAmounts","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"},{"name":"_contractor","type":"address"},{"name":"_contractorProposalID","type":"uint256"},{"name":"_proposalDescription","type":"string"},{"name":"_hashOfTheContractorProposalDocument","type":"bytes32"},{"name":"_moderator","type":"address"},{"name":"_initialSharePriceMultiplier","type":"uint256"},{"name":"_minutesFundingPeriod","type":"uint256"},{"name":"_minutesDebatingPeriod","type":"uint256"}],"name":"contractorProposal","outputs":[{"name":"","type":"uint256"}],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"_minQuorumDivisor","type":"uint256"},{"name":"_minCommitteeFees","type":"uint256"},{"name":"_minPercentageOfLikes","type":"uint256"},{"name":"_minutesSetProposalPeriod","type":"uint256"},{"name":"_minMinutesDebatePeriod","type":"uint256"},{"name":"_feesRewardInflationRate","type":"uint256"},{"name":"_defaultMinutesFundingPeriod","type":"uint256"},{"name":"_tokenPriceInflationRate","type":"uint256"}],"name":"rulesProposal","outputs":[{"name":"","type":"uint256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"rulesProposals","outputs":[{"name":"committeeID","type":"uint256"},{"name":"minQuorumDivisor","type":"uint256"},{"name":"minCommitteeFees","type":"uint256"},{"name":"minPercentageOfLikes","type":"uint256"},{"name":"minutesSetProposalPeriod","type":"uint256"},{"name":"minMinutesDebatePeriod","type":"uint256"},{"name":"feesRewardInflationRate","type":"uint256"},{"name":"tokenPriceInflationRate","type":"uint256"},{"name":"defaultMinutesFundingPeriod","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"},{"name":"_description","type":"string"},{"name":"_project","type":"address"},{"name":"_minutesDebatingPeriod","type":"uint256"}],"name":"resolutionProposal","outputs":[{"name":"","type":"uint256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"UpgradeProposals","outputs":[{"name":"committeeID","type":"uint256"},{"name":"newCommitteeRoom","type":"address"},{"name":"newShareManager","type":"address"},{"name":"newTokenManager","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minQuorum","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_proposalID","type":"uint256"}],"name":"orderToContractor","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"TokenManager","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_committeeID","type":"uint256"},{"name":"_supportsProposal","type":"bool"}],"name":"vote","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"Proposals","outputs":[{"name":"committeeID","type":"uint256"},{"name":"contractor","type":"address"},{"name":"contractorProposalID","type":"uint256"},{"name":"amount","type":"uint256"},{"name":"moderator","type":"address"},{"name":"amountForShares","type":"uint256"},{"name":"initialSharePriceMultiplier","type":"uint256"},{"name":"amountForTokens","type":"uint256"},{"name":"minutesFundingPeriod","type":"uint256"},{"name":"open","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newCommitteeRoom","type":"address"},{"name":"_newShareManager","type":"address"},{"name":"_newTokenManager","type":"address"},{"name":"_minutesDebatingPeriod","type":"uint256"}],"name":"upgradeProposal","outputs":[{"name":"","type":"uint256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"ShareManager","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_contractorCreator","type":"address"},{"name":"_recipient","type":"address"},{"name":"_metaProject","type":"bool"},{"name":"_passProject","type":"address"},{"name":"_projectName","type":"string"},{"name":"_projectDescription","type":"string"}],"name":"createContractor","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[{"name":"_passDao","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"maxInflationRate","type":"uint256"},{"indexed":false,"name":"minMinutesPeriods","type":"uint256"}],"name":"CommitteeLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"Creator","type":"address"},{"indexed":true,"name":"Sender","type":"address"},{"indexed":false,"name":"Contractor","type":"address"},{"indexed":false,"name":"Recipient","type":"address"}],"name":"ContractorCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ProposalID","type":"uint256"},{"indexed":false,"name":"CommitteeID","type":"uint256"},{"indexed":true,"name":"Contractor","type":"address"},{"indexed":true,"name":"ContractorProposalID","type":"uint256"},{"indexed":false,"name":"Amount","type":"uint256"},{"indexed":false,"name":"Description","type":"string"},{"indexed":false,"name":"Moderator","type":"address"},{"indexed":false,"name":"SharePriceMultiplier","type":"uint256"},{"indexed":false,"name":"MinutesFundingPeriod","type":"uint256"}],"name":"ProposalSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"QuestionID","type":"uint256"},{"indexed":true,"name":"CommitteeID","type":"uint256"},{"indexed":true,"name":"Project","type":"address"},{"indexed":false,"name":"Name","type":"string"},{"indexed":false,"name":"Description","type":"string"}],"name":"ResolutionProposalSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"rulesProposalID","type":"uint256"},{"indexed":false,"name":"CommitteeID","type":"uint256"},{"indexed":false,"name":"MinQuorumDivisor","type":"uint256"},{"indexed":false,"name":"MinCommitteeFees","type":"uint256"},{"indexed":false,"name":"MinPercentageOfLikes","type":"uint256"},{"indexed":false,"name":"MinutesSetProposalPeriod","type":"uint256"},{"indexed":false,"name":"MinMinutesDebatePeriod","type":"uint256"},{"indexed":false,"name":"FeesRewardInflationRate","type":"uint256"},{"indexed":false,"name":"DefaultMinutesFundingPeriod","type":"uint256"},{"indexed":false,"name":"TokenPriceInflationRate","type":"uint256"}],"name":"RulesProposalSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"UpgradeProposalID","type":"uint256"},{"indexed":true,"name":"CommitteeID","type":"uint256"},{"indexed":false,"name":"NewCommitteeRoom","type":"address"},{"indexed":false,"name":"NewShareManager","type":"address"},{"indexed":false,"name":"NewTokenManager","type":"address"}],"name":"UpgradeProposalSubmitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"CommitteeID","type":"uint256"},{"indexed":false,"name":"Position","type":"bool"},{"indexed":true,"name":"Voter","type":"address"},{"indexed":false,"name":"RewardedAmount","type":"uint256"}],"name":"Voted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ProposalID","type":"uint256"},{"indexed":true,"name":"ProposalType","type":"uint8"},{"indexed":false,"name":"CommitteeID","type":"uint256"},{"indexed":false,"name":"TotalRewardedAmount","type":"uint256"},{"indexed":false,"name":"ProposalExecuted","type":"bool"},{"indexed":false,"name":"RewardedSharesAmount","type":"uint256"},{"indexed":false,"name":"SentToManager","type":"uint256"}],"name":"ProposalClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"ProposalID","type":"uint256"},{"indexed":true,"name":"ContractorProposalID","type":"uint256"},{"indexed":true,"name":"Contractor","type":"address"},{"indexed":false,"name":"AmountSent","type":"uint256"}],"name":"ContractorProposalClosed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"NewCommitteeRoom","type":"address"},{"indexed":false,"name":"NewShareManager","type":"address"},{"indexed":false,"name":"NewTokenManager","type":"address"}],"name":"DappUpgraded","type":"event"}]

606060405234620000005760405160208062003b1c83398101604052515b60008054600160a060020a031916600160a060020a038316179055600580546001808355919082908015829011620000bc57600902816009028360005260206000209182019101620000bc91905b80821115620000b85760008082556001820181905560028201819055600382018190556004820181905560058201819055600682018190556007820181905560088201556009016200006b565b5090565b5b5050505060016001818154818355818115116200015857600a0281600a0283600052602060002091820191016200015891905b80821115620000b8578054600160a860020a03191681556000600182018190556002820181905560038201819055600482018190556005820181905560068201805460ff1916905560078201819055600882018190556009820155600a01620000f0565b5090565b5b505050506001600381815481835581811511620001fb57600a0281600a028360005260206000209182019101620001fb91905b80821115620000b8576000808255600182018054600160a060020a031990811690915560028301829055600383018290556004830180549091169055600582018190556006820181905560078201819055600882015560098101805460ff19169055600a016200018c565b5090565b5b50505050600160048181548183558181151162000321576004028160040283600052602060002091820191016200032191905b80821115620000b857600080825560018083018054600160a060020a031916905560028084018054848255909281161561010002600019011604601f8190106200027a5750620002af565b601f016020900490600052602060002090810190620002af91905b80821115620000b8576000815560010162000295565b5090565b5b5060038201805460018160011615610100020316600290046000825580601f10620002dc575062000311565b601f0160209004906000526020600020908101906200031191905b80821115620000b8576000815560010162000295565b5090565b5b50506004016200022f565b5090565b5b50505050600160068181548183558181151162000399576004028160040283600052602060002091820191016200039991905b80821115620000b85760008155600181018054600160a060020a031990811690915560028201805482169055600382018054909116905560040162000355565b5090565b5b505050505b505b61376b80620003b16000396000f300606060405236156101225763ffffffff60e060020a6000350416630746bfd981146101275780630b84cc4a146101465780630ef67887146101c857806326d0d75a146101e75780633b03eb8b14610312578063403de107146103425780634be7183a146103665780635156352714610395578063606224f8146103be57806369306f24146103f15780636dcd6eb9146104105780636ea7064b1461043157806374e74f24146104c157806375cbe239146104f35780638bce09fa1461054a5780638ee5a8b3146105f7578063b5a127e514610638578063bbc42b3f14610657578063c509c2621461067b578063c9d27afe146106a4578063d1dbe7d8146106bb578063d91444481461072d578063e22938bd14610762578063f1bcb6e51461078b575b610000565b610132600435610852565b604080519115158252519081900360200190f35b34610000576101566004356108da565b604051600160a060020a038c168152602081018b600381116100005760ff168152602081019a909a52506040808a01989098526060890196909652608088019490945260a0870192909252151560c086015260e085015261010084015261012083015251908190036101400192509050f35b34610000576101d5610954565b60408051918252519081900360200190f35b34610000576101f76004356109be565b60408051858152600160a060020a038516602082015260809181018281528454600260001961010060018416150201909116049282018390529091606083019060a08401908690801561028b5780601f106102605761010080835404028352916020019161028b565b820191906000526020600020905b81548152906001019060200180831161026e57829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156102ff5780601f106102d4576101008083540402835291602001916102ff565b820191906000526020600020905b8154815290600101906020018083116102e257829003601f168201915b5050965050505050505060405180910390f35b3461000057610132600435600160a060020a03602435166109fb565b604080519115158252519081900360200190f35b3461000057610132600435610a68565b604080519115158252519081900360200190f35b346100005761039360043560243560443560643560843560a43560c43560e4356101043561012435611608565b005b34610000576103a26117bc565b60408051600160a060020a039092168252519081900360200190f35b3461000057610132600435602435600160a060020a03604435166117cb565b604080519115158252519081900360200190f35b34610000576101d561185c565b60408051918252519081900360200190f35b3461000057610132611867565b604080519115158252519081900360200190f35b604080516020600460643581810135601f81018490048402850184019095528484526101d59482359460248035600160a060020a031695604435959460849492019190819084018382808284375094965050843594600160a060020a0360208201351694506040810135935060608101359250608001359050611900565b60408051918252519081900360200190f35b6101d560043560243560443560643560843560a43560c43560e435611f8c565b60408051918252519081900360200190f35b3461000057610503600435612158565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b6101d5600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965050600160a060020a03853516946020013593506121b192505050565b60408051918252519081900360200190f35b3461000057610607600435612634565b60408051948552600160a060020a039384166020860152918316848301529091166060830152519081900360800190f35b34610000576101d561267a565b60408051918252519081900360200190f35b3461000057610132600435612708565b604080519115158252519081900360200190f35b34610000576103a2612c8a565b60408051600160a060020a039092168252519081900360200190f35b34610000576103936004356024351515612d00565b005b34610000576106cb60043561303f565b604080519a8b52600160a060020a03998a1660208c01528a81019890985260608a019690965293909616608088015260a087019190915260c086015260e085019390935261010084019290925290151561012083015251908190036101400190f35b6101d5600160a060020a03600435811690602435811690604435166064356130b0565b60408051918252519081900360200190f35b34610000576103a261320e565b60408051600160a060020a039092168252519081900360200190f35b3461000057604080516020601f6084356004818101359283018490048402850184019095528184526103a294600160a060020a038135811695602480358316966044351515966064359094169560a49492019190819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965061326e95505050505050565b60408051600160a060020a039092168252519081900360200190f35b600061085c61320e565b600160a060020a031662b172d73484336000604051602001526040518463ffffffff1660e060020a0281526004018083815260200182600160a060020a0316600160a060020a03168152602001925050506020604051808303818588803b156100005761235a5a03f11561000057505060405151925050505b919050565b60018181548110156100005790600052602060002090600a020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008890154600990990154600160a060020a0389169a5060a060020a90980460ff908116999798969795969495939492169290918b565b60008054604080516020908101849052815160e060020a63be67f4fd0281529151600160a060020a039093169263be67f4fd92600480820193929182900301818787803b156100005760325a03f11561000057505060405151600160a060020a0316319150505b90565b600481815481101561000057906000526020600020906004020160005b5080546001820154909250600160a060020a031690600281019060030184565b6000600160a060020a0382161515610a3957506000828152600260209081526040808320600160a060020a033316845290915290205460ff16610a61565b506000828152600260209081526040808320600160a060020a038516845290915290205460ff165b5b92915050565b600060006000600060006000600060006000600060018b81548110156100005790600052602060002090600a020160005b5098508860050154421080610ab35750600689015460ff16155b15610abd576115fa565b60068901805460ff19169055610ad161320e565b9750610adb612c8a565b955087600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050506040518051905060056000815481101561000057906000526020600020906009020160005b50600301540289600801546064021115610c0957885460058054600160a060020a03808c16936332990ad29391169160009081101561000057906000526020600020906009020160005b50600201546000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051519750505b886004015489600301540394506000851115610c4f57604051600160a060020a0389169086156108fc029087906000818181858888f193505050501515610c4f57610000565b5b610c5861267a565b89600901548a60080154011080610c7757508860090154896008015411155b15610d41576000895460ff60a060020a9091041660038111610000571415610cd057600060038a6001015481548110156100005790600052602060002090600a020160005b50600901805460ff19169115159190911790555b885460a060020a900460ff16600381116100005760018a015460048b0154604080518f81526020810192909252600082820152606082018b905260808201899052517f9a8e7b022cce1425bffd1ed1b929039e3e0854a224232bc0a9c8a3241aa6a47b9181900360a00190a36115fa565b4260078a01556000895460ff60a060020a9091041660038111610000571415610f60576003896001015481548110156100005790600052602060002090600a020160005b509350836002015460001415610da25760098401805460ff191690555b6005840154158015610db657506007840154155b15610dce57610dc88960010154612708565b50610f5a565b600584015415610e805760048085015460068601546005870154600888015460018e0154604080517f47ad396b000000000000000000000000000000000000000000000000000000008152600160a060020a039687169781019790975260248701949094526044860192909252606485015260006084850181905260a48501919091529051918b16926347ad396b9260c4808301939282900301818387803b156100005760325a03f115610000575050505b600784015415610f5a5785600160a060020a03166347ad396b8560040160009054906101000a9004600160a060020a031660008760070154886008015460056000815481101561000057906000526020600020906009020160005b50600701548f600101546040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a031681526020018681526020018581526020018481526020018381526020018281526020019650505050505050600060405180830381600087803b156100005760325a03f115610000575050505b5b611579565b6001895460ff60a060020a909104166003811161000057141561110d5760048960010154815481101561000057906000526020600020906004020160005b50600180820154604080517fbf31464000000000000000000000000000000000000000000000000000000000815260048101918252600280860180546000199681161561010002969096019095160460448201819052949750600160a060020a039092169363bf3146409392600389019291829160248101916064909101908690801561106c5780601f106110415761010080835404028352916020019161106c565b820191906000526020600020905b81548152906001019060200180831161104f57829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110e05780601f106110b5576101008083540402835291602001916110e0565b820191906000526020600020905b8154815290600101906020018083116110c357829003601f168201915b5050945050505050600060405180830381600087803b156100005760325a03f11561000057505050611579565b6002895460ff60a060020a90910416600381116100005714156112c45760058960010154815481101561000057906000526020600020906009020160005b509150816000015460056000815481101561000057906000526020600020906009020160005b505560018201546005805460009081101561000057906000526020600020906009020160005b5060010181905550816005015460056000815481101561000057906000526020600020906009020160005b5060050181905550816002015460056000815481101561000057906000526020600020906009020160005b506002015560038201546005805460009081101561000057906000526020600020906009020160005b506003015560048201546005805460009081101561000057906000526020600020906009020160005b506004015560068201546005805460009081101561000057906000526020600020906009020160005b506006015560078201546005805460009081101561000057906000526020600020906009020160005b506007015560088201546005805460009081101561000057906000526020600020906009020160005b5060080155611579565b6003895460ff60a060020a90910416600381116100005714156115795760068960010154815481101561000057906000526020600020906004020160005b506002810154909150600160a060020a03161580159061133257506002810154600160a060020a03898116911614155b1561140c5787600160a060020a031663b187984f6040518163ffffffff1660e060020a028152600401809050600060405180830381600087803b156100005760325a03f11561000057505050600088600160a060020a031631111561140c5760028101546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a039485166004820152938c168031602486015292519293639e1a00aa936044808301949391928390030190829087803b156100005760325a03f115610000575050604051511515905061140c57610000565b5b5b6003810154600160a060020a03161580159061143a57506003810154600160a060020a03878116911614155b156114875785600160a060020a031663b187984f6040518163ffffffff1660e060020a028152600401809050600060405180830381600087803b156100005760325a03f115610000575050505b6000805460018301546002840154600385015460408051602090810187905281517ff000999e000000000000000000000000000000000000000000000000000000008152600160a060020a0395861660048201529385166024850152918416604484015251929093169363f000999e9360648084019491939192918390030190829087803b156100005760325a03f11561000057505060408051600184015460028501546003860154600160a060020a0392831684529082166020840152168183015290517f84934e40f2e8884b5eec18d0f900201726cf4318036c5003336b9a9ad8faa9e592509081900360600190a15b5b5b5b885460a060020a900460ff16600381116100005789600101547f9a8e7b022cce1425bffd1ed1b929039e3e0854a224232bc0a9c8a3241aa6a47b8d8c6004015460018c8b60405180868152602001858152602001841515151581526020018381526020018281526020019550505050505060405180910390a3600199505b505050505050505050919050565b60088a90556007899055604080518b8152602081018b905281517f8cbe898d697a7b55e663aed9a790395a03a86162bb6e5133fea4ccf4eddff225929181900390910190a160056000815481101561000057906000526020600020906009020160005b50600101541561167a57610000565b8760056000815481101561000057906000526020600020906009020160005b50600101819055508660056000815481101561000057906000526020600020906009020160005b50600201819055508560056000815481101561000057906000526020600020906009020160005b50600301819055508460056000815481101561000057906000526020600020906009020160005b50600401819055508360056000815481101561000057906000526020600020906009020160005b50600501819055508260056000815481101561000057906000526020600020906009020160005b50600601819055508160056000815481101561000057906000526020600020906009020160005b50600701819055508060056000815481101561000057906000526020600020906009020160005b50600801555b50505050505050505050565b600054600160a060020a031681565b60006117d561320e565b600160a060020a031663606224f88585856000604051602001526040518463ffffffff1660e060020a0281526004018084815260200183815260200182600160a060020a0316600160a060020a031681526020019350505050602060405180830381600087803b156100005760325a03f115610000575050604051519150505b9392505050565b600154600019015b90565b600061187161320e565b600160a060020a031663606224f860006000336000604051602001526040518463ffffffff1660e060020a0281526004018084815260200183815260200182600160a060020a0316600160a060020a031681526020019350505050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506109bb57610000565b5b90565b600080808415156119315760056000815481101561000057906000526020600020906009020160005b506008015494505b600160a060020a038b161580159061194857508915155b15611a1857871515806119d757508a600160a060020a031663f3bf6b73338c8f6000604051602001526040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a031681526020018381526020018281526020019350505050602060405180830381600087803b156100005760325a03f115610000575050604051511590505b156119e157610000565b60408051808201909152601081527f50726f706f73616c20636865636b656400000000000000000000000000000000602082015298505b5b600160a060020a038b1615801590611a2f575089155b8015611a39575087155b80611a4257508b155b80611a4e575060075485105b15611a5857610000565b60038054809190600101815481835581811511611af757600a0281600a028360005260206000209182019101611af791905b80821115611af3576000808255600182018054600160a060020a031990811690915560028301829055600383018290556004830180549091169055600582018190556006820181905560078201819055600882015560098101805460ff19169055600a01611a8a565b5090565b5b505050915060038281548110156100005790600052602060002090600a020160005b50600181018054600160a060020a031916600160a060020a038e16179055905089158015611b4757508715155b15611c4c578a600160a060020a031663cae8e284338e8c8c6000604051602001526040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a03168152602001848152602001806020018360001916600019168152602001828103825284818151815260200191508051906020019080838360008314611bf1575b805182526020831115611bf157601f199092019160209182019101611bd1565b505050905090810190601f168015611c1d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b156100005760325a03f115610000575050604051519a50505b600281018a9055600160a060020a038b161515611c6f57600581018c9055611de1565b8a600160a060020a031663f98b26a9338c8f6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a031681526020018381526020018281526020019350505050600060405180830381600087803b156100005760325a03f115610000575050508a600160a060020a03168b600160a060020a03166315bf430d6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a031663ad98ebaf6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a03161415611db257600781018c9055611de1565b611dba610954565b600382018190558c1115611dd95760038101548c036005820155611de1565b600381018c90555b5b5b600481018054600160a060020a031916600160a060020a0389161790556006810186905560088101859055611e1a60008386613460565b816000018190555060018160090160006101000a81548160ff02191690831515021790555080600201548160010160009054906101000a9004600160a060020a0316600160a060020a0316837f7648f99bfdb7dae3232195645b021b473f0a88f9013b944b382745de7f83cb44846000015485600701548660050154876003015401018e8760040160009054906101000a9004600160a060020a031688600601548960080154604051808781526020018681526020018060200185600160a060020a0316600160a060020a03168152602001848152602001838152602001828103825286818151815260200191508051906020019080838360008314611f3b575b805182526020831115611f3b57601f199092019160209182019101611f1b565b505050905090810190601f168015611f675780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a48192505b50509998505050505050505050565b60006000600060018b111580611fa25750600a8b115b80611fae575060075488105b80611fba575060075487105b80611fc6575060085486115b80611fd2575060085484115b80611fde575060075485105b15611fe857610000565b600580548091906001018154818355818115116120695760090281600902836000526020600020918201910161206991905b80821115611af357600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560078201819055600882015560090161201a565b5090565b5b5050509150600582815481101561000057906000526020600020906009020160005b50600181018c905560028082018c9055600382018b9055600482018a9055600582018990556006820188905560088201879055600782018690559091506120d590836000613460565b80825560408051918252602082018d90528181018c9052606082018b9052608082018a905260a0820189905260c0820188905260e0820187905261010082018690525183917fb87d87120b86acd01c4793ccca8a8c326091867ec0d958a9f44b0e5e3d36085a91908190036101200190a28192505b505098975050505050505050565b600581815481101561000057906000526020600020906009020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008909801549698509496939592949193909289565b60008080600160a060020a038516151561223157600060009054906101000a9004600160a060020a0316600160a060020a0316637952a0ed6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604051519550505b600480548091906001018154818355818115116123495760040281600402836000526020600020918201910161234991905b80821115611af357600080825560018083018054600160a060020a031916905560028084018054848255909281161561010002600019011604601f8190106122ab57506122dd565b601f0160209004906000526020600020908101906122dd91905b80821115611af357600081556001016122c5565b5090565b5b5060038201805460018160011615610100020316600290046000825580601f10612308575061233a565b601f01602090049060005260206000209081019061233a91905b80821115611af357600081556001016122c5565b5090565b5b5050600401612263565b5090565b5b5050509150600482815481101561000057906000526020600020906004020160005b509050848160010160006101000a815481600160a060020a030219169083600160a060020a0316021790555086816002019080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106123e657805160ff1916838001178555612413565b82800160010185558215612413579182015b828111156124135782518255916020019190600101906123f8565b5b506124349291505b80821115611af357600081556001016122c5565b5090565b505085816003019080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061248457805160ff19168380011785556124b1565b828001600101855582156124b1579182015b828111156124b1578251825591602001919060010190612496565b5b506124d29291505b80821115611af357600081556001016122c5565b5090565b50506124e060018386613460565b808255600180830154604080518181526002808701805460001996811615610100029690960190951604918101829052600160a060020a03909216939286927f7755a0f5971a9ffb9b491b16f8215a77d3278c3561fc09e0c1cdc9f5175d54ff92600388019190819060208201906060830190869080156125a25780601f10612577576101008083540402835291602001916125a2565b820191906000526020600020905b81548152906001019060200180831161258557829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156126165780601f106125eb57610100808354040283529160200191612616565b820191906000526020600020905b8154815290600101906020018083116125f957829003601f168201915b505094505050505060405180910390a48192505b5050949350505050565b600681815481101561000057906000526020600020906004020160005b50805460018201546002830154600390930154919350600160a060020a03908116928116911684565b600060056000815481101561000057906000526020600020906009020160005b50600101546126a761320e565b600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750506040515190508115610000570490505b90565b600060006000600060006000600060038881548110156100005790600052602060002090600a020160005b5095506001866000015481548110156100005790600052602060002090600a020160005b50600681015490955060ff16806127735750600986015460ff16155b1561277d57612c7f565b6005860154156128115761278f61320e565b600160a060020a03166364cb5338896000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519450508315801561280757508560080154603c028560070154014211155b1561281157612c7f565b5b6007860154156128a657612824612c8a565b600160a060020a03166364cb5338896000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519350508215801561289c57508560080154603c028560070154014211155b156128a657612c7f565b5b60098601805460ff1916905560038601546001870154604080516000602091820181905282517f15bf430d000000000000000000000000000000000000000000000000000000008152925194890188019650600160a060020a03909316936315bf430d936004808501948390030190829087803b156100005760325a03f1156100005750506040515191505081151561298c576001860154600287015460408051600081529051600160a060020a03909316928b917f51e1ee120eed90faf617e1c2242c832888779adb79a985d80e46856e1f7afe9c919081900360200190a4612c7f565b60018601546002870154604080516000602091820181905282517f33863ed90000000000000000000000000000000000000000000000000000000081526004810194909452602484018790529151600160a060020a03909416936333863ed993604480820194918390030190829087803b156100005760325a03f1156100005750506040515115159050612a1f57610000565b6000848760030154011115612ab757612a3661320e565b600187015460038801546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a039586166004820152938a01602485015291519490931693639e1a00aa936044808501949193918390030190829087803b156100005760325a03f1156100005750506040515115159050612ab757610000565b5b6000831115612b4157612ac9612c8a565b60018701546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a0394851660048201526024810189905292519490931693639e1a00aa936044808501948390030190829087803b156100005760325a03f1156100005750506040515115159050612b4157610000565b5b60018601546002870154604080518581529051600160a060020a03909316928b917f51e1ee120eed90faf617e1c2242c832888779adb79a985d80e46856e1f7afe9c919081900360200190a460008054604080517f7c56b798000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015291519190921692637c56b798926024808201939182900301818387803b156100005760325a03f1156100005750505060018601546002870154604080517fbe4a6bad000000000000000000000000000000000000000000000000000000008152600160a060020a039384166004820152602481019290925260448201859052519183169163be4a6bad9160648082019260009290919082900301818387803b156100005760325a03f11561000057505050600196505b505050505050919050565b6000805460408051602090810184905281517fcbbe21990000000000000000000000000000000000000000000000000000000081529151600160a060020a039093169263cbbe219992600480820193929182900301818787803b156100005760325a03f115610000575050604051519150505b90565b600060006000600060006000600060018981548110156100005790600052602060002090600a020160005b5060008a8152600260209081526040808320600160a060020a033316845290915290205490975060ff1680612d635750866002015442105b80612d715750866005015442115b15612d7b57610000565b612d8361320e565b955085600160a060020a03166370a08231336000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f11561000057505060405151955050841515612e0157610000565b6000898152600260209081526040808320600160a060020a0333811680865291909352818420805460ff1916600117905560058b015482517f48d9a374000000000000000000000000000000000000000000000000000000008152600481019290925260248201529051918916926348d9a3749260448084019382900301818387803b156100005760325a03f115610000575050508715612eab5760088701805486019055612eb6565b600987018054860190555b6003870154606480820295508504141580612edb575084848686028115610000570414155b15612ee557610000565b85600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151905084860281156100005704925063bbf81e008760020154420360056000815481101561000057906000526020600020906009020160005b50600601546064020281156100005704606401915081838115610000570490508660030154818860040154011115612faf575060048601546003870154035b60048701805482019055604051600160a060020a0333169082156108fc029083906000818181858888f193505050501515612fe957610000565b604080518915158152602081018390528151600160a060020a033316928c927f911ef2e98570b1d96c0e8ef81107a33d5b8e844aeb8f9710f9bc76c3b3fef40e929081900390910190a35b505050505050505050565b60038181548110156100005790600052602060002090600a020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008890154600990990154979950600160a060020a0396871698959794969093169491939092919060ff168a565b6000600060006006805480919060010181548183558181151161312a5760040281600402836000526020600020918201910161312a91905b80821115611af35760008155600181018054600160a060020a03199081169091556002820180548216905560038201805490911690556004016130e8565b5090565b5b5050509150600682815481101561000057906000526020600020906004020160005b50600181018054600160a060020a03808b16600160a060020a0319928316179092556002830180548a841690831617905560038084018054938a16939092169290921790559091506131a0908386613460565b80825560018201546002830154600384015460408051600160a060020a0394851681529284166020840152921681830152905184917f8fd90960f17db93e8b1bd6f7390e2961fb081a562e9fbb64b0063903d0b2ac29919081900360600190a38192505b5050949350505050565b60008054604080516020908101849052815160e060020a63be67f4fd0281529151600160a060020a039093169263be67f4fd92600480820193929182900301818787803b156100005760325a03f115610000575050604051519150505b90565b604080516000602091820181905291517f6c054ad0000000000000000000000000000000000000000000000000000000008152600160a060020a0333818116600484019081528a831660248501528915156044850152888316606485015260c4840186905260e060848501908152885160e486015288518796948e1695636c054ad0958e948e948e948e948e948d94939260a483019261010401918801908083838215613336575b80518252602083111561333657601f199092019160209182019101613316565b505050905090810190601f1680156133625780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838382156133a1575b8051825260208311156133a157601f199092019160209182019101613381565b505050905090810190601f1680156133cd5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b156100005760325a03f115610000575050604080518051600160a060020a038c8116835280821660208401528b8116838501529251909450339290921692507f5b378d396631e3c19d6a30fc6a010e098b02262459297b34cb399d12f52e91fe919081900360600190a28091505b509695505050505050565b600080808315156134915760056000815481101561000057906000526020600020906009020160005b506005015493505b30600160a060020a0316600060009054906101000a9004600160a060020a0316600160a060020a031663e934ab0c6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a031614158061353e575060056000815481101561000057906000526020600020906009020160005b506002015434105b806135715750428460056000815481101561000057906000526020600020906009020160005b506004015401603c024201105b8061359d575060056000815481101561000057906000526020600020906009020160005b506005015484105b806135b9575030600160a060020a031633600160a060020a0316145b156135c357610000565b6001805480919060010181548183558181151161366957600a0281600a02836000526020600020918201910161366991905b80821115611af357805474ffffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820181905560038201819055600482018190556005820181905560068201805460ff1916905560078201819055600882018190556009820155600a016135f5565b5090565b5b505050915060018281548110156100005790600052602060002090600a020160005b508054600160a060020a03191633600160a060020a0316178082559091508690829074ff0000000000000000000000000000000000000000191660a060020a8360038111610000570217905550600181018590553460038201556005805460009081101561000057906000526020600020906009020160005b506004015442603c918202016002830181905590850201600582015560068101805460ff1916600117905590915081905b505093925050505600a165627a7a7230582015045f8597bb52bec234682d2c2015fdf1afa695f3a5133afee09f126ea882930029

Deployed Bytecode

0x606060405236156101225763ffffffff60e060020a6000350416630746bfd981146101275780630b84cc4a146101465780630ef67887146101c857806326d0d75a146101e75780633b03eb8b14610312578063403de107146103425780634be7183a146103665780635156352714610395578063606224f8146103be57806369306f24146103f15780636dcd6eb9146104105780636ea7064b1461043157806374e74f24146104c157806375cbe239146104f35780638bce09fa1461054a5780638ee5a8b3146105f7578063b5a127e514610638578063bbc42b3f14610657578063c509c2621461067b578063c9d27afe146106a4578063d1dbe7d8146106bb578063d91444481461072d578063e22938bd14610762578063f1bcb6e51461078b575b610000565b610132600435610852565b604080519115158252519081900360200190f35b34610000576101566004356108da565b604051600160a060020a038c168152602081018b600381116100005760ff168152602081019a909a52506040808a01989098526060890196909652608088019490945260a0870192909252151560c086015260e085015261010084015261012083015251908190036101400192509050f35b34610000576101d5610954565b60408051918252519081900360200190f35b34610000576101f76004356109be565b60408051858152600160a060020a038516602082015260809181018281528454600260001961010060018416150201909116049282018390529091606083019060a08401908690801561028b5780601f106102605761010080835404028352916020019161028b565b820191906000526020600020905b81548152906001019060200180831161026e57829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156102ff5780601f106102d4576101008083540402835291602001916102ff565b820191906000526020600020905b8154815290600101906020018083116102e257829003601f168201915b5050965050505050505060405180910390f35b3461000057610132600435600160a060020a03602435166109fb565b604080519115158252519081900360200190f35b3461000057610132600435610a68565b604080519115158252519081900360200190f35b346100005761039360043560243560443560643560843560a43560c43560e4356101043561012435611608565b005b34610000576103a26117bc565b60408051600160a060020a039092168252519081900360200190f35b3461000057610132600435602435600160a060020a03604435166117cb565b604080519115158252519081900360200190f35b34610000576101d561185c565b60408051918252519081900360200190f35b3461000057610132611867565b604080519115158252519081900360200190f35b604080516020600460643581810135601f81018490048402850184019095528484526101d59482359460248035600160a060020a031695604435959460849492019190819084018382808284375094965050843594600160a060020a0360208201351694506040810135935060608101359250608001359050611900565b60408051918252519081900360200190f35b6101d560043560243560443560643560843560a43560c43560e435611f8c565b60408051918252519081900360200190f35b3461000057610503600435612158565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e084015261010083015251908190036101200190f35b6101d5600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965050600160a060020a03853516946020013593506121b192505050565b60408051918252519081900360200190f35b3461000057610607600435612634565b60408051948552600160a060020a039384166020860152918316848301529091166060830152519081900360800190f35b34610000576101d561267a565b60408051918252519081900360200190f35b3461000057610132600435612708565b604080519115158252519081900360200190f35b34610000576103a2612c8a565b60408051600160a060020a039092168252519081900360200190f35b34610000576103936004356024351515612d00565b005b34610000576106cb60043561303f565b604080519a8b52600160a060020a03998a1660208c01528a81019890985260608a019690965293909616608088015260a087019190915260c086015260e085019390935261010084019290925290151561012083015251908190036101400190f35b6101d5600160a060020a03600435811690602435811690604435166064356130b0565b60408051918252519081900360200190f35b34610000576103a261320e565b60408051600160a060020a039092168252519081900360200190f35b3461000057604080516020601f6084356004818101359283018490048402850184019095528184526103a294600160a060020a038135811695602480358316966044351515966064359094169560a49492019190819084018382808284375050604080516020601f89358b0180359182018390048302840183019094528083529799988101979196509182019450925082915084018382808284375094965061326e95505050505050565b60408051600160a060020a039092168252519081900360200190f35b600061085c61320e565b600160a060020a031662b172d73484336000604051602001526040518463ffffffff1660e060020a0281526004018083815260200182600160a060020a0316600160a060020a03168152602001925050506020604051808303818588803b156100005761235a5a03f11561000057505060405151925050505b919050565b60018181548110156100005790600052602060002090600a020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008890154600990990154600160a060020a0389169a5060a060020a90980460ff908116999798969795969495939492169290918b565b60008054604080516020908101849052815160e060020a63be67f4fd0281529151600160a060020a039093169263be67f4fd92600480820193929182900301818787803b156100005760325a03f11561000057505060405151600160a060020a0316319150505b90565b600481815481101561000057906000526020600020906004020160005b5080546001820154909250600160a060020a031690600281019060030184565b6000600160a060020a0382161515610a3957506000828152600260209081526040808320600160a060020a033316845290915290205460ff16610a61565b506000828152600260209081526040808320600160a060020a038516845290915290205460ff165b5b92915050565b600060006000600060006000600060006000600060018b81548110156100005790600052602060002090600a020160005b5098508860050154421080610ab35750600689015460ff16155b15610abd576115fa565b60068901805460ff19169055610ad161320e565b9750610adb612c8a565b955087600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050506040518051905060056000815481101561000057906000526020600020906009020160005b50600301540289600801546064021115610c0957885460058054600160a060020a03808c16936332990ad29391169160009081101561000057906000526020600020906009020160005b50600201546000604051602001526040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b156100005760325a03f115610000575050604051519750505b886004015489600301540394506000851115610c4f57604051600160a060020a0389169086156108fc029087906000818181858888f193505050501515610c4f57610000565b5b610c5861267a565b89600901548a60080154011080610c7757508860090154896008015411155b15610d41576000895460ff60a060020a9091041660038111610000571415610cd057600060038a6001015481548110156100005790600052602060002090600a020160005b50600901805460ff19169115159190911790555b885460a060020a900460ff16600381116100005760018a015460048b0154604080518f81526020810192909252600082820152606082018b905260808201899052517f9a8e7b022cce1425bffd1ed1b929039e3e0854a224232bc0a9c8a3241aa6a47b9181900360a00190a36115fa565b4260078a01556000895460ff60a060020a9091041660038111610000571415610f60576003896001015481548110156100005790600052602060002090600a020160005b509350836002015460001415610da25760098401805460ff191690555b6005840154158015610db657506007840154155b15610dce57610dc88960010154612708565b50610f5a565b600584015415610e805760048085015460068601546005870154600888015460018e0154604080517f47ad396b000000000000000000000000000000000000000000000000000000008152600160a060020a039687169781019790975260248701949094526044860192909252606485015260006084850181905260a48501919091529051918b16926347ad396b9260c4808301939282900301818387803b156100005760325a03f115610000575050505b600784015415610f5a5785600160a060020a03166347ad396b8560040160009054906101000a9004600160a060020a031660008760070154886008015460056000815481101561000057906000526020600020906009020160005b50600701548f600101546040518763ffffffff1660e060020a0281526004018087600160a060020a0316600160a060020a031681526020018681526020018581526020018481526020018381526020018281526020019650505050505050600060405180830381600087803b156100005760325a03f115610000575050505b5b611579565b6001895460ff60a060020a909104166003811161000057141561110d5760048960010154815481101561000057906000526020600020906004020160005b50600180820154604080517fbf31464000000000000000000000000000000000000000000000000000000000815260048101918252600280860180546000199681161561010002969096019095160460448201819052949750600160a060020a039092169363bf3146409392600389019291829160248101916064909101908690801561106c5780601f106110415761010080835404028352916020019161106c565b820191906000526020600020905b81548152906001019060200180831161104f57829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156110e05780601f106110b5576101008083540402835291602001916110e0565b820191906000526020600020905b8154815290600101906020018083116110c357829003601f168201915b5050945050505050600060405180830381600087803b156100005760325a03f11561000057505050611579565b6002895460ff60a060020a90910416600381116100005714156112c45760058960010154815481101561000057906000526020600020906009020160005b509150816000015460056000815481101561000057906000526020600020906009020160005b505560018201546005805460009081101561000057906000526020600020906009020160005b5060010181905550816005015460056000815481101561000057906000526020600020906009020160005b5060050181905550816002015460056000815481101561000057906000526020600020906009020160005b506002015560038201546005805460009081101561000057906000526020600020906009020160005b506003015560048201546005805460009081101561000057906000526020600020906009020160005b506004015560068201546005805460009081101561000057906000526020600020906009020160005b506006015560078201546005805460009081101561000057906000526020600020906009020160005b506007015560088201546005805460009081101561000057906000526020600020906009020160005b5060080155611579565b6003895460ff60a060020a90910416600381116100005714156115795760068960010154815481101561000057906000526020600020906004020160005b506002810154909150600160a060020a03161580159061133257506002810154600160a060020a03898116911614155b1561140c5787600160a060020a031663b187984f6040518163ffffffff1660e060020a028152600401809050600060405180830381600087803b156100005760325a03f11561000057505050600088600160a060020a031631111561140c5760028101546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a039485166004820152938c168031602486015292519293639e1a00aa936044808301949391928390030190829087803b156100005760325a03f115610000575050604051511515905061140c57610000565b5b5b6003810154600160a060020a03161580159061143a57506003810154600160a060020a03878116911614155b156114875785600160a060020a031663b187984f6040518163ffffffff1660e060020a028152600401809050600060405180830381600087803b156100005760325a03f115610000575050505b6000805460018301546002840154600385015460408051602090810187905281517ff000999e000000000000000000000000000000000000000000000000000000008152600160a060020a0395861660048201529385166024850152918416604484015251929093169363f000999e9360648084019491939192918390030190829087803b156100005760325a03f11561000057505060408051600184015460028501546003860154600160a060020a0392831684529082166020840152168183015290517f84934e40f2e8884b5eec18d0f900201726cf4318036c5003336b9a9ad8faa9e592509081900360600190a15b5b5b5b885460a060020a900460ff16600381116100005789600101547f9a8e7b022cce1425bffd1ed1b929039e3e0854a224232bc0a9c8a3241aa6a47b8d8c6004015460018c8b60405180868152602001858152602001841515151581526020018381526020018281526020019550505050505060405180910390a3600199505b505050505050505050919050565b60088a90556007899055604080518b8152602081018b905281517f8cbe898d697a7b55e663aed9a790395a03a86162bb6e5133fea4ccf4eddff225929181900390910190a160056000815481101561000057906000526020600020906009020160005b50600101541561167a57610000565b8760056000815481101561000057906000526020600020906009020160005b50600101819055508660056000815481101561000057906000526020600020906009020160005b50600201819055508560056000815481101561000057906000526020600020906009020160005b50600301819055508460056000815481101561000057906000526020600020906009020160005b50600401819055508360056000815481101561000057906000526020600020906009020160005b50600501819055508260056000815481101561000057906000526020600020906009020160005b50600601819055508160056000815481101561000057906000526020600020906009020160005b50600701819055508060056000815481101561000057906000526020600020906009020160005b50600801555b50505050505050505050565b600054600160a060020a031681565b60006117d561320e565b600160a060020a031663606224f88585856000604051602001526040518463ffffffff1660e060020a0281526004018084815260200183815260200182600160a060020a0316600160a060020a031681526020019350505050602060405180830381600087803b156100005760325a03f115610000575050604051519150505b9392505050565b600154600019015b90565b600061187161320e565b600160a060020a031663606224f860006000336000604051602001526040518463ffffffff1660e060020a0281526004018084815260200183815260200182600160a060020a0316600160a060020a031681526020019350505050602060405180830381600087803b156100005760325a03f11561000057505060405151151590506109bb57610000565b5b90565b600080808415156119315760056000815481101561000057906000526020600020906009020160005b506008015494505b600160a060020a038b161580159061194857508915155b15611a1857871515806119d757508a600160a060020a031663f3bf6b73338c8f6000604051602001526040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a031681526020018381526020018281526020019350505050602060405180830381600087803b156100005760325a03f115610000575050604051511590505b156119e157610000565b60408051808201909152601081527f50726f706f73616c20636865636b656400000000000000000000000000000000602082015298505b5b600160a060020a038b1615801590611a2f575089155b8015611a39575087155b80611a4257508b155b80611a4e575060075485105b15611a5857610000565b60038054809190600101815481835581811511611af757600a0281600a028360005260206000209182019101611af791905b80821115611af3576000808255600182018054600160a060020a031990811690915560028301829055600383018290556004830180549091169055600582018190556006820181905560078201819055600882015560098101805460ff19169055600a01611a8a565b5090565b5b505050915060038281548110156100005790600052602060002090600a020160005b50600181018054600160a060020a031916600160a060020a038e16179055905089158015611b4757508715155b15611c4c578a600160a060020a031663cae8e284338e8c8c6000604051602001526040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a03168152602001848152602001806020018360001916600019168152602001828103825284818151815260200191508051906020019080838360008314611bf1575b805182526020831115611bf157601f199092019160209182019101611bd1565b505050905090810190601f168015611c1d5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b156100005760325a03f115610000575050604051519a50505b600281018a9055600160a060020a038b161515611c6f57600581018c9055611de1565b8a600160a060020a031663f98b26a9338c8f6040518463ffffffff1660e060020a0281526004018084600160a060020a0316600160a060020a031681526020018381526020018281526020019350505050600060405180830381600087803b156100005760325a03f115610000575050508a600160a060020a03168b600160a060020a03166315bf430d6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a031663ad98ebaf6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a03161415611db257600781018c9055611de1565b611dba610954565b600382018190558c1115611dd95760038101548c036005820155611de1565b600381018c90555b5b5b600481018054600160a060020a031916600160a060020a0389161790556006810186905560088101859055611e1a60008386613460565b816000018190555060018160090160006101000a81548160ff02191690831515021790555080600201548160010160009054906101000a9004600160a060020a0316600160a060020a0316837f7648f99bfdb7dae3232195645b021b473f0a88f9013b944b382745de7f83cb44846000015485600701548660050154876003015401018e8760040160009054906101000a9004600160a060020a031688600601548960080154604051808781526020018681526020018060200185600160a060020a0316600160a060020a03168152602001848152602001838152602001828103825286818151815260200191508051906020019080838360008314611f3b575b805182526020831115611f3b57601f199092019160209182019101611f1b565b505050905090810190601f168015611f675780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a48192505b50509998505050505050505050565b60006000600060018b111580611fa25750600a8b115b80611fae575060075488105b80611fba575060075487105b80611fc6575060085486115b80611fd2575060085484115b80611fde575060075485105b15611fe857610000565b600580548091906001018154818355818115116120695760090281600902836000526020600020918201910161206991905b80821115611af357600080825560018201819055600282018190556003820181905560048201819055600582018190556006820181905560078201819055600882015560090161201a565b5090565b5b5050509150600582815481101561000057906000526020600020906009020160005b50600181018c905560028082018c9055600382018b9055600482018a9055600582018990556006820188905560088201879055600782018690559091506120d590836000613460565b80825560408051918252602082018d90528181018c9052606082018b9052608082018a905260a0820189905260c0820188905260e0820187905261010082018690525183917fb87d87120b86acd01c4793ccca8a8c326091867ec0d958a9f44b0e5e3d36085a91908190036101200190a28192505b505098975050505050505050565b600581815481101561000057906000526020600020906009020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008909801549698509496939592949193909289565b60008080600160a060020a038516151561223157600060009054906101000a9004600160a060020a0316600160a060020a0316637952a0ed6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f115610000575050604051519550505b600480548091906001018154818355818115116123495760040281600402836000526020600020918201910161234991905b80821115611af357600080825560018083018054600160a060020a031916905560028084018054848255909281161561010002600019011604601f8190106122ab57506122dd565b601f0160209004906000526020600020908101906122dd91905b80821115611af357600081556001016122c5565b5090565b5b5060038201805460018160011615610100020316600290046000825580601f10612308575061233a565b601f01602090049060005260206000209081019061233a91905b80821115611af357600081556001016122c5565b5090565b5b5050600401612263565b5090565b5b5050509150600482815481101561000057906000526020600020906004020160005b509050848160010160006101000a815481600160a060020a030219169083600160a060020a0316021790555086816002019080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106123e657805160ff1916838001178555612413565b82800160010185558215612413579182015b828111156124135782518255916020019190600101906123f8565b5b506124349291505b80821115611af357600081556001016122c5565b5090565b505085816003019080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061248457805160ff19168380011785556124b1565b828001600101855582156124b1579182015b828111156124b1578251825591602001919060010190612496565b5b506124d29291505b80821115611af357600081556001016122c5565b5090565b50506124e060018386613460565b808255600180830154604080518181526002808701805460001996811615610100029690960190951604918101829052600160a060020a03909216939286927f7755a0f5971a9ffb9b491b16f8215a77d3278c3561fc09e0c1cdc9f5175d54ff92600388019190819060208201906060830190869080156125a25780601f10612577576101008083540402835291602001916125a2565b820191906000526020600020905b81548152906001019060200180831161258557829003601f168201915b50508381038252845460026000196101006001841615020190911604808252602090910190859080156126165780601f106125eb57610100808354040283529160200191612616565b820191906000526020600020905b8154815290600101906020018083116125f957829003601f168201915b505094505050505060405180910390a48192505b5050949350505050565b600681815481101561000057906000526020600020906004020160005b50805460018201546002830154600390930154919350600160a060020a03908116928116911684565b600060056000815481101561000057906000526020600020906009020160005b50600101546126a761320e565b600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750506040515190508115610000570490505b90565b600060006000600060006000600060038881548110156100005790600052602060002090600a020160005b5095506001866000015481548110156100005790600052602060002090600a020160005b50600681015490955060ff16806127735750600986015460ff16155b1561277d57612c7f565b6005860154156128115761278f61320e565b600160a060020a03166364cb5338896000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519450508315801561280757508560080154603c028560070154014211155b1561281157612c7f565b5b6007860154156128a657612824612c8a565b600160a060020a03166364cb5338896000604051602001526040518263ffffffff1660e060020a02815260040180828152602001915050602060405180830381600087803b156100005760325a03f115610000575050604051519350508215801561289c57508560080154603c028560070154014211155b156128a657612c7f565b5b60098601805460ff1916905560038601546001870154604080516000602091820181905282517f15bf430d000000000000000000000000000000000000000000000000000000008152925194890188019650600160a060020a03909316936315bf430d936004808501948390030190829087803b156100005760325a03f1156100005750506040515191505081151561298c576001860154600287015460408051600081529051600160a060020a03909316928b917f51e1ee120eed90faf617e1c2242c832888779adb79a985d80e46856e1f7afe9c919081900360200190a4612c7f565b60018601546002870154604080516000602091820181905282517f33863ed90000000000000000000000000000000000000000000000000000000081526004810194909452602484018790529151600160a060020a03909416936333863ed993604480820194918390030190829087803b156100005760325a03f1156100005750506040515115159050612a1f57610000565b6000848760030154011115612ab757612a3661320e565b600187015460038801546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a039586166004820152938a01602485015291519490931693639e1a00aa936044808501949193918390030190829087803b156100005760325a03f1156100005750506040515115159050612ab757610000565b5b6000831115612b4157612ac9612c8a565b60018701546040805160006020918201819052825160e160020a634f0d0055028152600160a060020a0394851660048201526024810189905292519490931693639e1a00aa936044808501948390030190829087803b156100005760325a03f1156100005750506040515115159050612b4157610000565b5b60018601546002870154604080518581529051600160a060020a03909316928b917f51e1ee120eed90faf617e1c2242c832888779adb79a985d80e46856e1f7afe9c919081900360200190a460008054604080517f7c56b798000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015291519190921692637c56b798926024808201939182900301818387803b156100005760325a03f1156100005750505060018601546002870154604080517fbe4a6bad000000000000000000000000000000000000000000000000000000008152600160a060020a039384166004820152602481019290925260448201859052519183169163be4a6bad9160648082019260009290919082900301818387803b156100005760325a03f11561000057505050600196505b505050505050919050565b6000805460408051602090810184905281517fcbbe21990000000000000000000000000000000000000000000000000000000081529151600160a060020a039093169263cbbe219992600480820193929182900301818787803b156100005760325a03f115610000575050604051519150505b90565b600060006000600060006000600060018981548110156100005790600052602060002090600a020160005b5060008a8152600260209081526040808320600160a060020a033316845290915290205490975060ff1680612d635750866002015442105b80612d715750866005015442115b15612d7b57610000565b612d8361320e565b955085600160a060020a03166370a08231336000604051602001526040518263ffffffff1660e060020a0281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b156100005760325a03f11561000057505060405151955050841515612e0157610000565b6000898152600260209081526040808320600160a060020a0333811680865291909352818420805460ff1916600117905560058b015482517f48d9a374000000000000000000000000000000000000000000000000000000008152600481019290925260248201529051918916926348d9a3749260448084019382900301818387803b156100005760325a03f115610000575050508715612eab5760088701805486019055612eb6565b600987018054860190555b6003870154606480820295508504141580612edb575084848686028115610000570414155b15612ee557610000565b85600160a060020a03166318160ddd6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f11561000057505060405151905084860281156100005704925063bbf81e008760020154420360056000815481101561000057906000526020600020906009020160005b50600601546064020281156100005704606401915081838115610000570490508660030154818860040154011115612faf575060048601546003870154035b60048701805482019055604051600160a060020a0333169082156108fc029083906000818181858888f193505050501515612fe957610000565b604080518915158152602081018390528151600160a060020a033316928c927f911ef2e98570b1d96c0e8ef81107a33d5b8e844aeb8f9710f9bc76c3b3fef40e929081900390910190a35b505050505050505050565b60038181548110156100005790600052602060002090600a020160005b50805460018201546002830154600384015460048501546005860154600687015460078801546008890154600990990154979950600160a060020a0396871698959794969093169491939092919060ff168a565b6000600060006006805480919060010181548183558181151161312a5760040281600402836000526020600020918201910161312a91905b80821115611af35760008155600181018054600160a060020a03199081169091556002820180548216905560038201805490911690556004016130e8565b5090565b5b5050509150600682815481101561000057906000526020600020906004020160005b50600181018054600160a060020a03808b16600160a060020a0319928316179092556002830180548a841690831617905560038084018054938a16939092169290921790559091506131a0908386613460565b80825560018201546002830154600384015460408051600160a060020a0394851681529284166020840152921681830152905184917f8fd90960f17db93e8b1bd6f7390e2961fb081a562e9fbb64b0063903d0b2ac29919081900360600190a38192505b5050949350505050565b60008054604080516020908101849052815160e060020a63be67f4fd0281529151600160a060020a039093169263be67f4fd92600480820193929182900301818787803b156100005760325a03f115610000575050604051519150505b90565b604080516000602091820181905291517f6c054ad0000000000000000000000000000000000000000000000000000000008152600160a060020a0333818116600484019081528a831660248501528915156044850152888316606485015260c4840186905260e060848501908152885160e486015288518796948e1695636c054ad0958e948e948e948e948e948d94939260a483019261010401918801908083838215613336575b80518252602083111561333657601f199092019160209182019101613316565b505050905090810190601f1680156133625780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838382156133a1575b8051825260208311156133a157601f199092019160209182019101613381565b505050905090810190601f1680156133cd5780820380516001836020036101000a031916815260200191505b509950505050505050505050602060405180830381600087803b156100005760325a03f115610000575050604080518051600160a060020a038c8116835280821660208401528b8116838501529251909450339290921692507f5b378d396631e3c19d6a30fc6a010e098b02262459297b34cb399d12f52e91fe919081900360600190a28091505b509695505050505050565b600080808315156134915760056000815481101561000057906000526020600020906009020160005b506005015493505b30600160a060020a0316600060009054906101000a9004600160a060020a0316600160a060020a031663e934ab0c6000604051602001526040518163ffffffff1660e060020a028152600401809050602060405180830381600087803b156100005760325a03f1156100005750505060405180519050600160a060020a031614158061353e575060056000815481101561000057906000526020600020906009020160005b506002015434105b806135715750428460056000815481101561000057906000526020600020906009020160005b506004015401603c024201105b8061359d575060056000815481101561000057906000526020600020906009020160005b506005015484105b806135b9575030600160a060020a031633600160a060020a0316145b156135c357610000565b6001805480919060010181548183558181151161366957600a0281600a02836000526020600020918201910161366991905b80821115611af357805474ffffffffffffffffffffffffffffffffffffffffff191681556000600182018190556002820181905560038201819055600482018190556005820181905560068201805460ff1916905560078201819055600882018190556009820155600a016135f5565b5090565b5b505050915060018281548110156100005790600052602060002090600a020160005b508054600160a060020a03191633600160a060020a0316178082559091508690829074ff0000000000000000000000000000000000000000191660a060020a8360038111610000570217905550600181018590553460038201556005805460009081101561000057906000526020600020906009020160005b506004015442603c918202016002830181905590850201600582015560068101805460ff1916600117905590915081905b505093925050505600a165627a7a7230582015045f8597bb52bec234682d2c2015fdf1afa695f3a5133afee09f126ea882930029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ad2d970edff30d8f166989470aaf4be3ff6375ae

-----Decoded View---------------
Arg [0] : _passDao (address): 0xad2D970EDFF30d8f166989470aaF4BE3Ff6375aE

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ad2d970edff30d8f166989470aaf4be3ff6375ae


Swarm Source

bzzr://15045f8597bb52bec234682d2c2015fdf1afa695f3a5133afee09f126ea88293

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.