Sponsored:   Color Platform: Decentralized App Store - Special Airdrop For Everyone (~17 Sep), Register NOW!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 356 txns
 Latest 25 txns From a total of 356 Transactions

TxHash Age From To Value [TxFee]
0x762539a293c0ffbf5014e98cc0a83993227c3b619751466329362e35102ab3c735 days 11 hrs ago0xffd46b08e555e2d63174a7698d13888ca2c0b7a4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.005505439
0x85cec2bb43a4e219781e14788ba91eebce2bf076046a8d005ad487b28c283bd635 days 11 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000328340722
0x0bb3c96ad1a94f18d20bf12e0599a0e7bb619baa25885a001d2a931b3ec7631845 days 47 mins ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00069981
0x7e18b0e7c9b41a0114e1cf05176820cf375cbd74624f569d83f8692ebbdf235e47 days 32 mins ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00069981
0xa5aff5aa178bfbf491be8c21d7de19f01aac7dcc853effff9a17a1005bbe8a1447 days 17 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.005
0x9a9f1198c175ffdf87f284e371a5c793ca70cd9769378acee1dd5ccfaf423d8f47 days 17 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00071917
0x5e9a0b8817127ffa1cc02f6df2a398e44f47b02a77e859bca41365f4c540947955 days 5 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.0001679544
0xc739aae4144f982a7ca67bf96e400fd774135ae2b71e720001d123f26f7bfef257 days 11 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00014136162
0x533ef2d0f56ddebae115a74ebebebde4e99dbc805f97ce23e89ef43a2c9162f561 days 12 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000419886
0x5b6d7cfde7dbd60e80a718333a04673130a323750b7c026aa05800a67b754aee66 days 9 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0xccfa76ea00cd4904a0f1c1e8f33a79eae2835b57dc85bdc9f1877efcdb0b5f2066 days 10 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0x2a956095ec297fe7869f05ad522d965eb83d9a3e25cbcdd84737ca397071694b66 days 10 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000551310318
0x66b448c08263797b9c7e394ed30bda48a5646e7f51bc4d72fa7b26fef823fa0b66 days 12 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0x682e2fa1ab6384cba9ad5703a4cc9290d4aa21333483c2c37d523bb7520708fb66 days 14 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000153876
0xfd4ab9370abd927cd4fcd8905fc357af8bf0d573a116a2696044a30e84d600ca67 days 11 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0xe507aa99f5f88a71f20f16e5ac48341e8aed5e0363217a76c0c02e1afca9b1a167 days 12 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000419886
0xc252014894a8c62a7f48833843be843e4d3bb58154158a99bdcdce5216edef0a67 days 15 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000279924
0x895786ccae98b89dfcbfddd370ba520f957a618650321f565236c7ee3869370568 days 12 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000419886
0x7e1b6cb101576d904c6c4bb674a8ba46b44a8540b04b92c976cf7f8246bdf35068 days 12 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000337555236
0x3a3c50b2b2c2573fccf07d13f600feb5740e447067067bbb9e8122f31025b5e568 days 13 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.0004618746
0xff57502079a8ede65e43490f35207f2c67090c5348babf8eb1e58789900446b869 days 9 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0xd7fcc3c3707f76a06ec5a8493dbaf0f3f27886d06f8a706ff45759e5d6a43aa569 days 11 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.000559848
0x332999060f536a3d9eeccb1bc1636c1210be3d3b68317c3376193cc0811fb68b69 days 13 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00069981
0xd7bb0680e16299193829cd58875371fc5e5f4265ca05932d2b9343bfe64cd18f73 days 13 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00069981
0x12b1f1abbbf2777042d10a04eb5919be611a3f7fd88faa07359caf6de4410cf173 days 13 hrs ago0xd71b3542b3ec31a7f8c881980d8cb8c09b9310f4  IN   0x75d884981d814d676b4b6930038ee9887129b6390 Ether0.00069981
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Connections
Compiler Text: v0.4.19+commit.c4cbbb05
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity 0.4.19;


contract IConnections {
    // Forward = the connection is from the Connection creator to the specified recipient
    // Backwards = the connection is from the specified recipient to the Connection creator
    enum Direction {NotApplicable, Forwards, Backwards, Invalid}
    function createUser() external returns (address entityAddress);
    function createUserAndConnection(address _connectionTo, bytes32 _connectionType, Direction _direction) external returns (address entityAddress);
    function createVirtualEntity() external returns (address entityAddress);
    function createVirtualEntityAndConnection(address _connectionTo, bytes32 _connectionType, Direction _direction) external returns (address entityAddress);
    function editEntity(address _entity, bool _active, bytes32 _data) external;
    function transferEntityOwnerPush(address _entity, address _newOwner) external;
    function transferEntityOwnerPull(address _entity) external;
    function addConnection(address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction) public;
    function editConnection(address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction, bool _active, bytes32 _data, uint _expiration) external;
    function removeConnection(address _entity, address _connectionTo, bytes32 _connectionType) external;
    function isUser(address _entity) view public returns (bool isUserEntity);
    function getEntity(address _entity) view external returns (bool active, address transferOwnerTo, bytes32 data, address owner);
    function getConnection(address _entity, address _connectionTo, bytes32 _connectionType) view external returns (bool entityActive, bool connectionEntityActive, bool connectionActive, bytes32 data, Direction direction, uint expiration);

    // ################## Events ################## //
    event entityAdded(address indexed entity, address indexed owner);
    event entityModified(address indexed entity, address indexed owner, bool indexed active, bytes32 data);
    event entityOwnerChangeRequested(address indexed entity, address indexed oldOwner, address newOwner);
    event entityOwnerChanged(address indexed entity, address indexed oldOwner, address newOwner);
    event connectionAdded(address indexed entity, address indexed connectionTo, bytes32 connectionType, Direction direction);
    event connectionModified(address indexed entity, address indexed connectionTo, bytes32 indexed connectionType, Direction direction, bool active, uint expiration);
    event connectionRemoved(address indexed entity, address indexed connectionTo, bytes32 indexed connectionType);
    event entityResolved(address indexed entityRequested, address indexed entityResolved);    
}


/**
 * @title Connections v0.2
 * @dev The Connections contract records different connections between different types of entities.
 *
 * The contract has been designed for flexibility and scalability for use by anyone wishing to record different types of connections.
 *
 * Entities can be Users representing People, or Virtual Entities representing abstract types such as companies, objects, devices, robots etc...
 * User entities are special: each Ethereum address that creates or controls a User entity can only ever create one User Entity.
 * Each entity has an address to refer to it.
 *
 * Each entity has a number of connections to other entities, which are refered to using the entities address that the connection is to.
 * Modifying or removing entities, or adding, modifying or removing connections can only be done by the entity owner.
 *
 * Each connection also has a type, a direction and an expiration. The use of these fields is up to the Dapp to define and interprete.
 * Hashing a string of the connection name to create the connection type is suggested to obscure and diffuse types. Example bytes32 connection types:
 *     0x30ed9383ab64b27cb4b70035e743294fe1a1c83eaf57eca05033b523d1fa4261 = keccak256("isAdvisorOf")
 *     0xffe72ffb7d5cc4224f27ea8ad324f4b53b37835a76fc2b627b3d669180b75ecc = keccak256("isPartneredWith")
 *     0xa64b51178a7ee9735fb96d8e7ffdebb455b02beb3b1e17a709b5c1beef797405 = keccak256("isEmployeeOf")
 *     0x0079ca0c877589ba53b2e415a660827390d2c2a62123cef473009d003577b7f6 = keccak256("isColleagueOf")
 *
 */
contract Connections is IConnections {

    struct Entity {
        bool active;
        address transferOwnerTo;
        address owner;
        bytes32 data; // optional, this can link to IPFS or another off-chain storage location
        mapping (address => mapping (bytes32 => Connection)) connections;
    }

    // Connection has a type and direction
    struct Connection {
        bool active;
        bytes32 data; // optional, this can link to IPFS or another off-chain storage location
        Direction direction;
        uint expiration; // optional, unix timestamp or latest date to assume this connection is valid, 0 as no expiration
    }

    mapping (address => Entity) public entities;
    mapping (address => address) public entityOfUser;
    uint256 public virtualEntitiesCreated = 0;

    // ################## Constructor and Fallback function ################## //
    /**
     * Constructor
     */
    function Connections() public {}

    /**
     * Fallback function that cannot be called and will not accept Ether
     * Note that Ether can still be forced to this contract with a contract suicide()
     */
    function () external {
        revert();
    }


    // ################## External function ################## //
    /**
     * Creates a new user entity with an address of the msg.sender
     */
    function createUser() external returns (address entityAddress) {
        entityAddress = msg.sender;
        assert(entityOfUser[msg.sender] == address(0));
        createEntity(entityAddress, msg.sender);
        entityOfUser[msg.sender] = entityAddress;
    }

    /**
     * Creates a new user entity and a connection in one transaction
     * @param _connectionTo - the address of the entity to connect to
     * @param _connectionType - hash of the connection type
     * @param _direction - indicates the direction of the connection type
     */
    function createUserAndConnection(
        address _connectionTo,
        bytes32 _connectionType,
        Direction _direction
    )
        external returns (address entityAddress)
    {
        entityAddress = msg.sender;
        assert(entityOfUser[msg.sender] == address(0));
        createEntity(entityAddress, msg.sender);
        entityOfUser[msg.sender] = entityAddress;
        addConnection(entityAddress, _connectionTo, _connectionType, _direction);
    }

    /**
     * Creates a new virtual entity that is assigned to a unique address
     */
    function createVirtualEntity() external returns (address entityAddress) {
        entityAddress = createVirtualAddress();
        createEntity(entityAddress, msg.sender);
    }

    /**
     * Creates a new virtual entity and a connection in one transaction
     * @param _connectionTo - the address of the entity to connect to
     * @param _connectionType - hash of the connection type
     * @param _direction - indicates the direction of the connection type
     */
    function createVirtualEntityAndConnection(
        address _connectionTo,
        bytes32 _connectionType,
        Direction _direction
    )
        external returns (address entityAddress)
    {
        entityAddress = createVirtualAddress();
        createEntity(entityAddress, msg.sender);
        addConnection(entityAddress, _connectionTo, _connectionType, _direction);
    }

    /**
     * Edits data or active boolean of an entity that the msg sender is an owner of
     * This can be used to activate or deactivate an entity
     * @param _entity - the address of the entity to edit
     * @param _active - boolean to indicate if the entity is active or not
     * @param _data - data to be used to locate off-chain information about the user
     */
    function editEntity(address _entity, bool _active, bytes32 _data) external {
        address resolvedEntity = resolveEntityAddressAndOwner(_entity);
        Entity storage entity = entities[resolvedEntity];
        entity.active = _active;
        entity.data = _data;
        entityModified(_entity, msg.sender, _active, _data);
    }

    /**
     * Creates a request to transfer the ownership of an entity which must be accepted.
     * To cancel a request execute this function with _newOwner = address(0)
     * @param _entity - the address of the entity to transfer
     * @param _newOwner - the address of the new owner that will then have the exclusive permissions to control the entity
     */
    function transferEntityOwnerPush(address _entity, address _newOwner) external {
        address resolvedEntity = resolveEntityAddressAndOwner(_entity);
        entities[resolvedEntity].transferOwnerTo = _newOwner;
        entityOwnerChangeRequested(_entity, msg.sender, _newOwner);
    }

    /**
     * Accepts a request to transfer the ownership of an entity
     * @param _entity - the address of the entity to get ownership of
     */
    function transferEntityOwnerPull(address _entity) external {
        address resolvedEntity = resolveEntityAddress(_entity);
        emitEntityResolution(_entity, resolvedEntity);
        Entity storage entity = entities[resolvedEntity];
        require(entity.transferOwnerTo == msg.sender);
        if (isUser(resolvedEntity)) { // This is a user entity
            assert(entityOfUser[msg.sender] == address(0) ||
                   entityOfUser[msg.sender] == resolvedEntity);
            entityOfUser[msg.sender] = resolvedEntity;
        }
        address oldOwner = entity.owner;
        entity.owner = entity.transferOwnerTo;
        entity.transferOwnerTo = address(0);
        entityOwnerChanged(_entity, oldOwner, msg.sender);
    }

    /**
     * Edits a connection to another entity
     * @param _entity - the address of the entity to edit the connection of
     * @param _connectionTo - the address of the entity to connect to
     * @param _connectionType - hash of the connection type
     * @param _active - boolean to indicate if the connection is active or not
     * @param _direction - indicates the direction of the connection type
     * @param _expiration - number to indicate the expiration of the connection
     */
    function editConnection(
        address _entity,
        address _connectionTo,
        bytes32 _connectionType,
        Direction _direction,
        bool _active,
        bytes32 _data,
        uint _expiration
    )
        external
    {
        address resolvedEntity = resolveEntityAddressAndOwner(_entity);
        address resolvedConnectionEntity = resolveEntityAddress(_connectionTo);
        emitEntityResolution(_connectionTo, resolvedConnectionEntity);
        Entity storage entity = entities[resolvedEntity];
        Connection storage connection = entity.connections[resolvedConnectionEntity][_connectionType];
        connection.active = _active;
        connection.direction = _direction;
        connection.data = _data;
        connection.expiration = _expiration;
        connectionModified(_entity, _connectionTo, _connectionType, _direction, _active, _expiration);
    }

    /**
     * Removes a connection from the entities connections mapping.
     * If this is the last connection of any type to the _connectionTo address, then the removeConnection function should also be called to clean up the Entity
     * @param _entity - the address of the entity to edit the connection of
     * @param _connectionTo - the address of the entity to connect to
     * @param _connectionType - hash of the connection type
     */
    function removeConnection(address _entity, address _connectionTo, bytes32 _connectionType) external {
        address resolvedEntity = resolveEntityAddressAndOwner(_entity);
        address resolvedConnectionEntity = resolveEntityAddress(_connectionTo);
        emitEntityResolution(_connectionTo,resolvedConnectionEntity);
        Entity storage entity = entities[resolvedEntity];
        delete entity.connections[resolvedConnectionEntity][_connectionType];
        connectionRemoved(_entity, _connectionTo, _connectionType); // TBD: @haresh should we use resolvedEntity and resolvedConnectionEntity here?
    }

    /**
     * Returns the sha256 hash of a string. Useful for looking up the bytes32 values are for connection types.
     * Note this function is designed to be called off-chain for convenience, it is not used by any functions internally and does not change contract state
     * @param _string - string to hash
     * @return result - the hash of the string
     */
    function sha256ofString(string _string) external pure returns (bytes32 result) {
        result = keccak256(_string);
    }

    /**
     * Returns all the fields of an entity
     * @param _entity - the address of the entity to retrieve
     * @return (active, transferOwnerTo, data, owner) - a tuple containing the active flag, transfer status, data field and owner of an entity
     */
    function getEntity(address _entity) view external returns (bool active, address transferOwnerTo, bytes32 data, address owner) {
        address resolvedEntity = resolveEntityAddress(_entity);
        Entity storage entity = entities[resolvedEntity];
        return (entity.active, entity.transferOwnerTo, entity.data, entity.owner);
    }

    /**
     * Returns details of a connection
     * @param _entity - the address of the entity which created the
     * @return (entityActive, connectionEntityActive, connectionActive, data, direction, expiration)
     *                - tupple containing the entity active and the connection fields
     */
    function getConnection(
        address _entity,
        address _connectionTo,
        bytes32 _connectionType
    )
        view external returns (
            bool entityActive,
            bool connectionEntityActive,
            bool connectionActive,
            bytes32 data,
            Direction direction,
            uint expiration
    ){
        address resolvedEntity = resolveEntityAddress(_entity);
        address resolvedConnectionEntity = resolveEntityAddress(_connectionTo);
        Entity storage entity = entities[resolvedEntity];
        Connection storage connection = entity.connections[resolvedConnectionEntity][_connectionType];
        return (entity.active, entities[resolvedConnectionEntity].active, connection.active, connection.data, connection.direction, connection.expiration);
    }


    // ################## Public function ################## //
    /**
     * Creates a new connection to another entity
     * @param _entity - the address of the entity to add a connection to
     * @param _connectionTo - the address of the entity to connect to
     * @param _connectionType - hash of the connection type
     * @param _direction - indicates the direction of the connection type
     */
    function addConnection(
        address _entity,
        address _connectionTo,
        bytes32 _connectionType,
        Direction _direction
    )
        public
    {
        address resolvedEntity = resolveEntityAddressAndOwner(_entity);
        address resolvedEntityConnection = resolveEntityAddress(_connectionTo);
        emitEntityResolution(_connectionTo, resolvedEntityConnection);
        Entity storage entity = entities[resolvedEntity];
        assert(!entity.connections[resolvedEntityConnection][_connectionType].active);
        Connection storage connection = entity.connections[resolvedEntityConnection][_connectionType];
        connection.active = true;
        connection.direction = _direction;
        connectionAdded(_entity, _connectionTo, _connectionType, _direction);
    }

    /**
     * Returns true if an entity is a user, false if a virtual entity or fails if is not an entity
     * @param _entity - the address of the entity
     * @return isUserEntity - true if the entity was created with createUser(), false if the entity is created using createVirtualEntity()
     */
    function isUser(address _entity) view public returns (bool isUserEntity) {
        address resolvedEntity = resolveEntityAddress(_entity);
        assert(entities[resolvedEntity].active); // Make sure the user is active, otherwise this function call is invalid
        address owner = entities[resolvedEntity].owner;
        isUserEntity = (resolvedEntity == entityOfUser[owner]);
    }


    // ################## Internal functions ################## //
    /**
     * Creates a new entity at a specified address
     */
    function createEntity(address _entityAddress, address _owner) internal {
        require(!entities[_entityAddress].active); // Ensure the new entity address is not in use, prevents forceful takeover off addresses
        Entity storage entity = entities[_entityAddress];
        entity.active = true;
        entity.owner = _owner;
        entityAdded(_entityAddress, _owner);
    }

    /**
     * Returns a new unique deterministic address that has not been used before
     */
    function createVirtualAddress() internal returns (address virtualAddress) {
        virtualAddress = address(keccak256(safeAdd(virtualEntitiesCreated,block.number)));
        virtualEntitiesCreated = safeAdd(virtualEntitiesCreated,1);
    }

    /**
     * Emits an event if an entity resolution took place. Separated out as it would impact
     * view only functions which need entity resolution as well.
     */
    function emitEntityResolution(address _entity, address _resolvedEntity) internal {
        if (_entity != _resolvedEntity)
            entityResolved(_entity,_resolvedEntity);
    }

    /**
     * Returns the correct entity address resolved based on entityOfUser mapping
     */
    function resolveEntityAddress(address _entityAddress) internal view returns (address resolvedAddress) {
        if (entityOfUser[_entityAddress] != address(0) && entityOfUser[_entityAddress] != _entityAddress) {
            resolvedAddress = entityOfUser[_entityAddress];
        } else {
            resolvedAddress = _entityAddress;
        }
    }

    /**
     * Returns the correct entity address resolved based on entityOfUser mapping and also reverts if the
     * resolved if it is owned by the message sender
     * sender.
     */
    function resolveEntityAddressAndOwner(address _entityAddress) internal returns (address entityAddress) {
        entityAddress = resolveEntityAddress(_entityAddress);
        emitEntityResolution(_entityAddress, entityAddress);
        require(entities[entityAddress].owner == msg.sender);
    }

    /**
     * Adds two numbers and returns result throws in case an overflow occurs.
     */
    function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) {
      uint256 z = x + y;
      assert(z >= x);
      return z;
    }    

}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"entityOfUser","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"},{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"},{"name":"_direction","type":"uint8"},{"name":"_active","type":"bool"},{"name":"_data","type":"bytes32"},{"name":"_expiration","type":"uint256"}],"name":"editConnection","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"},{"name":"_active","type":"bool"},{"name":"_data","type":"bytes32"}],"name":"editEntity","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"entities","outputs":[{"name":"active","type":"bool"},{"name":"transferOwnerTo","type":"address"},{"name":"owner","type":"address"},{"name":"data","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"createUser","outputs":[{"name":"entityAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"},{"name":"_newOwner","type":"address"}],"name":"transferEntityOwnerPush","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_entity","type":"address"}],"name":"isUser","outputs":[{"name":"isUserEntity","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_string","type":"string"}],"name":"sha256ofString","outputs":[{"name":"result","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[],"name":"createVirtualEntity","outputs":[{"name":"entityAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"}],"name":"transferEntityOwnerPull","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_entity","type":"address"}],"name":"getEntity","outputs":[{"name":"active","type":"bool"},{"name":"transferOwnerTo","type":"address"},{"name":"data","type":"bytes32"},{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_entity","type":"address"},{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"}],"name":"getConnection","outputs":[{"name":"entityActive","type":"bool"},{"name":"connectionEntityActive","type":"bool"},{"name":"connectionActive","type":"bool"},{"name":"data","type":"bytes32"},{"name":"direction","type":"uint8"},{"name":"expiration","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"virtualEntitiesCreated","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"},{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"}],"name":"removeConnection","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_entity","type":"address"},{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"},{"name":"_direction","type":"uint8"}],"name":"addConnection","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"},{"name":"_direction","type":"uint8"}],"name":"createUserAndConnection","outputs":[{"name":"entityAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_connectionTo","type":"address"},{"name":"_connectionType","type":"bytes32"},{"name":"_direction","type":"uint8"}],"name":"createVirtualEntityAndConnection","outputs":[{"name":"entityAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"owner","type":"address"}],"name":"entityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"active","type":"bool"},{"indexed":false,"name":"data","type":"bytes32"}],"name":"entityModified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"entityOwnerChangeRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"entityOwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"connectionTo","type":"address"},{"indexed":false,"name":"connectionType","type":"bytes32"},{"indexed":false,"name":"direction","type":"uint8"}],"name":"connectionAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"connectionTo","type":"address"},{"indexed":true,"name":"connectionType","type":"bytes32"},{"indexed":false,"name":"direction","type":"uint8"},{"indexed":false,"name":"active","type":"bool"},{"indexed":false,"name":"expiration","type":"uint256"}],"name":"connectionModified","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entity","type":"address"},{"indexed":true,"name":"connectionTo","type":"address"},{"indexed":true,"name":"connectionType","type":"bytes32"}],"name":"connectionRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"entityRequested","type":"address"},{"indexed":true,"name":"entityResolved","type":"address"}],"name":"entityResolved","type":"event"}]

  Contract Creation Code Switch To Opcodes View
60606040526000600255341561001457600080fd5b611f81806100236000396000f3006060604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a9c29c5146101015780630aa4c8891461017a5780631d0192e11461020c5780631d8ee48a1461025d57806325ad91ce1461032357806339ea68ba146103785780634209fff1146103d057806366ae70e914610421578063693e26dd1461046b5780636f5da961146104c057806375894e8c146104f95780637858651e146105bf578063a6044f281461067d578063c173508b146106a6578063cf66785e1461070b578063d2d134731461077c578063e87b32661461080e575b34156100fc57600080fd5b600080fd5b341561010c57600080fd5b610138600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561018557600080fd5b61020a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff169060200190919080351515906020019091908035600019169060200190919080359060200190919050506108d3565b005b341561021757600080fd5b61025b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190803560001916906020019091905050610a85565b005b341561026857600080fd5b610294600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b73565b60405180851515151581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826000191660001916815260200194505050505060405180910390f35b341561032e57600080fd5b610336610bf0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561038357600080fd5b6103ce600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d17565b005b34156103db57600080fd5b610407600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e3a565b604051808215151515815260200191505060405180910390f35b341561042c57600080fd5b61044d60048080359060200190820180359060200191909192905050610f9c565b60405180826000191660001916815260200191505060405180910390f35b341561047657600080fd5b61047e610fc3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104cb57600080fd5b6104f7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fdc565b005b341561050457600080fd5b610530600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113b6565b60405180851515151581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b34156105ca57600080fd5b610622600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190505061147c565b60405180871515151581526020018615151515815260200185151515158152602001846000191660001916815260200183600381111561065e57fe5b60ff168152602001828152602001965050505050505060405180910390f35b341561068857600080fd5b6106906115e8565b6040518082815260200191505060405180910390f35b34156106b157600080fd5b610709600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035600019169060200190919050506115ee565b005b341561071657600080fd5b61077a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff1690602001909190505061174f565b005b341561078757600080fd5b6107cc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091905050611954565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561081957600080fd5b61085e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091905050611a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000806108e28b611ab4565b93506108ed8a611b6b565b92506108f98a84611d08565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a600019166000191681526020019081526020016000209050868160000160006101000a81548160ff021916908315150217905550878160020160006101000a81548160ff021916908360038111156109d157fe5b02179055508581600101816000191690555084816003018190555088600019168a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fc601f34497cd366cb21f7c70b02d1fdb924c28dc92447c12ce320013a9bc207c8b8b8a60405180846003811115610a5357fe5b60ff16815260200183151515158152602001828152602001935050505060405180910390a45050505050505050505050565b600080610a9185611ab4565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050838160000160006101000a81548160ff021916908315150217905550828160020181600019169055508315153373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fb4a44f49e7689d5d2cbcf64d78c6dc65de2300e3fc8192e134093dd9616615e28660405180826000191660001916815260200191505060405180910390a45050505050565b60006020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905084565b6000339050600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610c8c57fe5b610c968133611d9c565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090565b6000610d2283611ab4565b9050816000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f586001067cfd3cac9ff78f1fcea08b2a4df6297c24cb4fbcce33d58d18ed161084604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a3505050565b6000806000610e4884611b6b565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515610ea157fe5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161492505050919050565b60008282604051808383808284378201915050925050506040518091039020905092915050565b6000610fcd611ef8565b9050610fd98133611d9c565b90565b6000806000610fea84611b6b565b9250610ff68484611d08565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561109457600080fd5b61109d83610e3a565b1561124d57600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806111c657508273ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15156111ce57fe5b82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008260000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fa84707ed1a20537aa3545a97567a462fab29774dfcabf7c1337352c5099fb8ae33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b6000806000806000806113c887611b6b565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff168160000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600201548360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16955095509550955050509193509193565b6000806000806000806000806000806114948d611b6b565b935061149f8c611b6b565b92506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c6000191660001916815260200190815260200160002090508160000160009054906101000a900460ff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff168260000160009054906101000a900460ff1683600101548460020160009054906101000a900460ff1685600301549950995099509950995099505050505093975093979195509350565b60025481565b60008060006115fc86611ab4565b925061160785611b6b565b91506116138583611d08565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560001916600019168152602001908152602001600020600080820160006101000a81549060ff021916905560018201600090556002820160006101000a81549060ff02191690556003820160009055505083600019168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f4b238bcbf7cb21a3e4744d42aed7c0fae81b61207320ff3f547e542497e3120d60405160405180910390a4505050505050565b60008060008061175e88611ab4565b935061176987611b6b565b92506117758784611d08565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000876000191660001916815260200190815260200160002060000160009054906101000a900460ff1615151561182957fe5b8160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008760001916600019168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550848160020160006101000a81548160ff021916908360038111156118c257fe5b02179055508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f356e8b58ffa49eb58d48aa756231b01699dec71eb273a61c1ee94f1887a7c76c888860405180836000191660001916815260200182600381111561193657fe5b60ff1681526020019250505060405180910390a35050505050505050565b6000339050600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156119f057fe5b6119fa8133611d9c565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a848185858561174f565b9392505050565b6000611a95611ef8565b9050611aa18133611d9c565b611aad8185858561174f565b9392505050565b6000611abf82611b6b565b9050611acb8282611d08565b3373ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b6657600080fd5b919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015611c9357508173ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611cff57600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611d03565b8190505b919050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515611d98578073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f15687d9854ff02176ac79b483777770fb54b5a7350d9c33edf8b4762f9c2ebdf60405160405180910390a35b5050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151515611df957600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fbbb1598dca83166487facc52f9481f629b31e41e8f4d530378c58e86b05e843b60405160405180910390a3505050565b6000611f0660025443611f37565b604051808281526020019150506040518091039020600190049050611f2e6002546001611f37565b60028190555090565b6000808284019050838110151515611f4b57fe5b80915050929150505600a165627a7a7230582095b5964310a4a8cc53a2672d8f9c39508a6d2b9c274991668b14557fd57e12930029

   Swarm Source:
bzzr://95b5964310a4a8cc53a2672d8f9c39508a6d2b9c274991668b14557fd57e1293

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.