[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0xdbe59fd565806b9c2a5c1ed31831a326b0a0f537233efefe7aff33a86353dd48385569710 days 10 hrs ago0xe5ce541ed44c4c020b111df395c5d4a857d3297d0x4fbfbec2faf7422c0af330e5293df6840813a0100 Ether
[ Download CSV Export  ] 
Contract Name: ENS
Compiler Version: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.11;

contract AbstractENS {
    function owner(bytes32 node) public  returns(address);
    function resolver(bytes32 node) public  returns(address);
    function ttl(bytes32 node) public  returns(uint64);
    function setOwner(bytes32 node, address owner) public;
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) public;
    function setResolver(bytes32 node, address resolver) public;
    function setTTL(bytes32 node, uint64 ttl) public;

    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);

    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);

    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);
}

/**
 * The ENS registry contract.
 */
contract ENS is AbstractENS {
    address public contractOwner ;
     struct Record {
        address owner;
        address resolver;
        uint64 ttl;
    }

    mapping(bytes32=>Record) public records;

    // Permits modifications only by the owner of the specified node.
    modifier only_owner(bytes32 node) {
        if(records[node].owner != msg.sender) throw;
        _;
    }

    /**
     * Constructs a new ENS registrar.
     */
    function ENS  ( ) public {
        records[ bytes32(0) ].owner = msg.sender;
        contractOwner = msg.sender;
    }

    /**
     * Returns the address that owns the specified node.
     */
    function owner(bytes32 node) public  returns (address) {
        return records[node].owner;
    }

    /**
     * Returns the address of the resolver for the specified node.
     */
    function resolver(bytes32 node) public  returns (address) {
        return records[node].resolver;
    }

    /**
     * Returns the TTL of a node, and any records associated with it.
     */
    function ttl(bytes32 node) public  returns (uint64) {
        return records[node].ttl;
    }

    /**
     * Transfers ownership of a node to a new address. May only be called by the current
     * owner of the node.
     * @param node The node to transfer ownership of.
     * @param owner The address of the new owner.
     */
    function setOwner(bytes32 node, address owner) only_owner(node) public {
        Transfer(node, owner);
        records[node].owner = owner;
    }

    /**
     * Transfers ownership of a subnode sha3(node, label) to a new address. May only be
     * called by the owner of the parent node.
     * @param node The parent node.
     * @param label The hash of the label specifying the subnode.
     * @param owner The address of the new owner.
     */
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) only_owner(node) public {
        var subnode = sha3(node, label); 
        NewOwner(node, label, owner);
        records[subnode].owner = owner;
    }

    /**
     * Sets the resolver address for the specified node.
     * @param node The node to update.
     * @param resolver The address of the resolver.
     */
    function setResolver(bytes32 node, address resolver) only_owner(node) public {
        NewResolver(node, resolver);
        records[node].resolver = resolver;
    }

    /**
     * Sets the TTL for the specified node.
     * @param node The node to update.
     * @param ttl The TTL in seconds.
     */
    function setTTL(bytes32 node, uint64 ttl) only_owner(node) public {
        NewTTL(node, ttl);
        records[node].ttl = ttl;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"node","type":"bytes32"}],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"records","outputs":[{"name":"owner","type":"address"},{"name":"resolver","type":"address"},{"name":"ttl","type":"uint64"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"}],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"label","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setSubnodeOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"ttl","type":"uint64"}],"name":"setTTL","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"}],"name":"ttl","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"node","type":"bytes32"},{"name":"owner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"contractOwner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"NewOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"owner","type":"address"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"resolver","type":"address"}],"name":"NewResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"node","type":"bytes32"},{"indexed":false,"name":"ttl","type":"uint64"}],"name":"NewTTL","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b5b600080805260016020527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb498054600160a060020a033316600160a060020a031991821681179092558254161790555b5b6105f78061006c6000396000f300606060405236156100965763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630178b8bf811461009857806301e64725146100c757806302571be31461010e57806306ab59231461013d57806314ab90381461016157806316a25cbd146101835780631896f70a146101b35780635b0fc9c3146101d4578063ce606ee0146101f5575bfe5b34156100a057fe5b6100ab600435610221565b60408051600160a060020a039092168252519081900360200190f35b34156100cf57fe5b6100da600435610243565b60408051600160a060020a03948516815292909316602083015267ffffffffffffffff168183015290519081900360600190f35b341561011657fe5b6100ab60043561028d565b60408051600160a060020a039092168252519081900360200190f35b341561014557fe5b61015f600435602435600160a060020a03604435166102ab565b005b341561016957fe5b61015f60043567ffffffffffffffff60243516610369565b005b341561018b57fe5b610196600435610435565b6040805167ffffffffffffffff9092168252519081900360200190f35b34156101bb57fe5b61015f600435600160a060020a0360243516610470565b005b34156101dc57fe5b61015f600435600160a060020a0360243516610518565b005b34156101fd57fe5b6100ab6105bc565b60408051600160a060020a039092168252519081900360200190f35b60008181526001602081905260409091200154600160a060020a03165b919050565b60016020819052600091825260409091208054910154600160a060020a039182169181169074010000000000000000000000000000000000000000900467ffffffffffffffff1683565b600081815260016020526040902054600160a060020a03165b919050565b600083815260016020526040812054849033600160a060020a039081169116146102d55760006000fd5b60408051868152602080820187905282519182900383018220600160a060020a03871683529251929450869288927fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8292908290030190a36000828152600160205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385161790555b5b5050505050565b600082815260016020526040902054829033600160a060020a039081169116146103935760006000fd5b6040805167ffffffffffffffff84168152905184917f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa68919081900360200190a260008381526001602081905260409091200180547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8516021790555b5b505050565b6000818152600160208190526040909120015474010000000000000000000000000000000000000000900467ffffffffffffffff165b919050565b600082815260016020526040902054829033600160a060020a0390811691161461049a5760006000fd5b60408051600160a060020a0384168152905184917f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0919081900360200190a2600083815260016020819052604090912001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790555b5b505050565b600082815260016020526040902054829033600160a060020a039081169116146105425760006000fd5b60408051600160a060020a0384168152905184917fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d266919081900360200190a26000838152600160205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790555b5b505050565b600054600160a060020a0316815600a165627a7a7230582018c5ce3974b1a01ccd65a1d475c36a70188c35323ba02d55a9684d2963ca4de10029

   Swarm Source:
bzzr://18c5ce3974b1a01ccd65a1d475c36a70188c35323ba02d55a9684d2963ca4de1

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward