Sponsored Link:  Download the Monaco app for Android and iOS on Aug 31 - www.mona.co
Contract Overview
ETH Balance: 0 Ether
ETH USD Value: $0
No Of Transactions: 4 txns
  Latest 4 txns

TxHash Age From To Value [TxFee]
0x8ee11440742dc60bdd3b926782d8420b0d405504719d4f61f907ed07a980c446254 days 20 hrs ago0xc1c0b0dbbae549dc41b4e07d9e1fa1e857459a5f  IN   0xad2d970edff30d8f166989470aaf4be3ff6375ae0 Ether0.017661872
0x38a53a86808f8b807f23ecfffb9aa85d801876588d81d2fd11f1ac245f263d69254 days 21 hrs ago0xc1c0b0dbbae549dc41b4e07d9e1fa1e857459a5f  IN   0xad2d970edff30d8f166989470aaf4be3ff6375ae0 Ether0.008193518
0x36fb730d9da7a49cd9f2d064488ab812e6dcd6239a5b41d3e910b5b271a04f9b254 days 21 hrs ago0xc1c0b0dbbae549dc41b4e07d9e1fa1e857459a5f  IN   0xad2d970edff30d8f166989470aaf4be3ff6375ae0 Ether0.003957741
0xdade84b978e7fdd39ae4ea2c97c76c535b08d0a8554a9d5c47fa38f4f481554c255 days 6 hrs ago0xc1c0b0dbbae549dc41b4e07d9e1fa1e857459a5f  IN    Contract Creation0 Ether0.01378004
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Name: PassDao
Compiler Version: v0.4.8+commit.60cc1668
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts
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);
        }
    }
    
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_projectAddress","type":"address"}],"name":"addMetaProject","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"revisions","outputs":[{"name":"committeeRoom","type":"address"},{"name":"shareManager","type":"address"},{"name":"tokenManager","type":"address"},{"name":"startDate","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"projects","outputs":[{"name":"contractAddress","type":"address"},{"name":"startDate","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"MetaProject","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_projectAddress","type":"address"}],"name":"addProject","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ActualShareManager","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ActualTokenManager","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ActualCommitteeRoom","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_newCommitteeRoom","type":"address"},{"name":"_newShareManager","type":"address"},{"name":"_newTokenManager","type":"address"}],"name":"upgrade","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"RevisionID","type":"uint256"},{"indexed":false,"name":"CommitteeRoom","type":"address"},{"indexed":false,"name":"ShareManager","type":"address"},{"indexed":false,"name":"TokenManager","type":"address"}],"name":"Upgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"Project","type":"address"}],"name":"NewProject","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405234610000575b60016001818154818355818115116100605760020281600202836000526020600020918201910161006091905b8082111561005c578054600160a060020a031916815560006001820155600201610037565b5090565b5b5050505060016000818154818355818115116100d2576004028160040283600052602060002091820191016100d291905b8082111561005c578054600160a060020a0319908116825560018201805482169055600282018054909116905560006003820155600401610092565b5090565b5b505050505b5b61089e806100e86000396000f3006060604052361561007d5763ffffffff60e060020a60003504166307e3310781146100825780630ef486d11461009d578063107046bd146100e25780637952a0ed146101155780637c56b7981461013e578063be67f4fd14610159578063cbbe219914610182578063e934ab0c146101ab578063f000999e146101d4575b610000565b346100005761009b600160a060020a036004351661020b565b005b34610000576100ad600435610298565b60408051600160a060020a03958616815293851660208501529190931682820152606082019290925290519081900360800190f35b34610000576100f26004356102e0565b60408051600160a060020a03909316835260208301919091528051918290030190f35b3461000057610122610316565b60408051600160a060020a039092168252519081900360200190f35b346100005761009b600160a060020a0360043516610326565b005b34610000576101226104a5565b60408051600160a060020a039092168252519081900360200190f35b34610000576101226104d9565b60408051600160a060020a039092168252519081900360200190f35b346100005761012261050d565b60408051600160a060020a039092168252519081900360200190f35b34610000576101f9600160a060020a036004358116906024358116906044351661053e565b60408051918252519081900360200190f35b60006000815481101561000057906000526020600020906004020160005b505433600160a060020a0390811691161480159061026e575060006000815481101561000057906000526020600020906004020160005b5054600160a060020a031615155b1561027857610000565b60038054600160a060020a031916600160a060020a0383161790555b5b50565b600081815481101561000057906000526020600020906004020160005b50805460018201546002830154600390930154600160a060020a039283169450908216929091169084565b600181815481101561000057906000526020600020906002020160005b508054600190910154600160a060020a03909116915082565b600354600160a060020a03165b90565b6000600060006000815481101561000057906000526020600020906004020160005b505433600160a060020a0390811691161480159061038d575060006000815481101561000057906000526020600020906004020160005b5054600160a060020a031615155b1561039757610000565b600160a060020a038316600090815260026020526040902054151561049e57600180548091906001018154818355818115116104115760020281600202836000526020600020918201910161041191905b8082111561040d578054600160a060020a0319168155600060018201556002016103e8565b5090565b5b5050509150600182815481101561000057906000526020600020906002020160005b50600160a060020a0384166000818152600260209081526040918290208690558354600160a060020a03191683178455426001850155815192835290519293507f68365eb7cc3ad309735136b92b0742f9588ae91c706315a4088a06ec255dd29292918290030190a15b5b5b505050565b600060006000815481101561000057906000526020600020906004020160005b5060010154600160a060020a031690505b90565b600060006000815481101561000057906000526020600020906004020160005b5060020154600160a060020a031690505b90565b600060006000815481101561000057906000526020600020906004020160005b5054600160a060020a031690505b90565b60006000600060006000815481101561000057906000526020600020906004020160005b505433600160a060020a039081169116148015906105a7575060006000815481101561000057906000526020600020906004020160005b5054600160a060020a031615155b156105b157610000565b600080548091906001018154818355818115116106235760040281600402836000526020600020918201910161062391905b8082111561040d578054600160a060020a03199081168255600182018054821690556002820180549091169055600060038201556004016105e3565b5090565b5b5050509150600082815481101561000057906000526020600020906004020160005b509050600160a060020a03861615610676578054600160a060020a031916600160a060020a0387161781556106b1565b60006000815481101561000057906000526020600020906004020160005b50548154600160a060020a031916600160a060020a039091161781555b600160a060020a038516156106e257600181018054600160a060020a031916600160a060020a038716179055610728565b60006000815481101561000057906000526020600020906004020160005b506001908101549082018054600160a060020a031916600160a060020a039092169190911790555b600160a060020a0384161561075957600281018054600160a060020a031916600160a060020a03861617905561079f565b60006000815481101561000057906000526020600020906004020160005b506002908101549082018054600160a060020a031916600160a060020a039092169190911790555b4281600301819055508060006000815481101561000057906000526020600020906004020160005b5081548154600160a060020a0319908116600160a060020a0392831617835560018085015490840180548316918416919091179055600280850154908401805490921690831617905560039283015492909101919091556040805188831681528783166020820152918616828201525183917fa3934de43e8558341f8fe42c470cd4e28f1b043fcdc82e8a028bfdb0bcd5b8e7919081900360600190a28192505b5b505093925050505600a165627a7a72305820511029cd99281f25f53b5865594e405d244ebce4406a521a4cff696e753d53c10029

   Swarm Source:
bzzr://511029cd99281f25f53b5865594e405d244ebce4406a521a4cff696e753d53c1
View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.