Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 892 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xcbf177a8487b4fcdb9014c64b9b51a1af83cc05dat txn 0xe685d16f57350166725d19b557a4cf70c1aa39f0413119390f1e89dd23f48841
 Latest 25 transactions from a total of 892 transactions

TxHash Age From To Value [TxFee]
0xbeb30694bd36d24650f46f1029c4d2d8d9656c80afbc808e3cd12f908717f0963 hrs 40 mins ago0x680d90addb54131e946e15cb1757ee98da4c54db  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000160025
0x9d47793e5ace3bf0beed0401709cf5fd123900139dbde7131ffa7bf70409fcd53 hrs 40 mins ago0x680d90addb54131e946e15cb1757ee98da4c54db  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000182841
0x2a163e821fb00b8cf33bff98da3bd15b0a198263f534369e237eefafa4be3b593 hrs 51 mins ago0x680d90addb54131e946e15cb1757ee98da4c54db  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70.003 Ether0.000413493
0x76814d6d225fc89793c58ef057521f6a8f629f283524761fa40ef1eccb36ff4123 hrs 27 mins ago0xf645410a9cf0bd97b98d0b1d81a716ae2956971d  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000243956
0x3ff88acc85cbe8592af202b2e43fe48b951daa044e2e0ec9f5a883a23602b8181 day 6 hrs ago0xfc18dc7cf9f1340c7d2aa6771176c6580abc2651  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70.005 Ether0.000414129
0xc042ec707f03878569425dc5f8a8b3f09e7ff18882d6cade227dd337076821e93 days 4 hrs ago0xbd6f210a624a792e7d30a2f7591dc7abce2f3c48  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000487064
0x6239d3021fbfcb54d066361c9d89bcebae862f43e40b79b5cfb26101e4f938c83 days 9 hrs ago0x4c2deb50fd4901682201c4ad494d061254a5d06d  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.00061075
0xb6355e48d8d8541e7957f63ec9c3df07795575005d6b9cdaaec5f5b45a0251cc3 days 22 hrs ago0x6b67b65146595daaec12c15ea7a0f7b85c84500c  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000490216
0x5ffb3d8d299c8fa245575270be8feb6cc5c5302f88b09d3dc483c9ddef448a9f4 days 1 hr ago0x69f857de1ae576c6278a4b99d7ea22f26c281aca  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.0002928528
0x0e8dc76ae802f24791e8950a8ebff47f4bf17a055793bddd37c916bec587b2d94 days 19 hrs ago0x3638ed27d6e2f9e3494ff3d78f309cea7d898ebc  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.00036459
0x9927740c654ce365ebad8376b3a0a3facc148db0af9dfcc2936add071bd0c5f48 days 21 hrs ago0x691b0d7833efb817196bfde285feaf9659a24907  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000365934
0x817d15ba36b194e3752a7c417b4e741990199e879d5d772aedadb763ee9f07b69 days 21 hrs ago0xd204eca5caa648f10618e74b068a0b4248255ae9  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000243532
0xa44ed17235c739ea3e43498b3892175ffa5609b2acda48781f41d299615b660010 days 17 hrs ago0x4c2824fdc68ef94115929356fddb6a58eefbb70f  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70.003 Ether0.000413301
0x83babe9761fe6288723a04243880927ee09602b35c7c1e1b688fb49bf86dbca411 days 8 hrs ago0x879b61908b56e0adb9e67a088426749761be2398  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000243404
0xe1ddef7f7846a4f6a44810092529fb3b621f3703a362b4cb74633e62c05140e911 days 20 hrs ago0x9b6c7bb87e4e49fab93ebc89d400b1e641ec4aae  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000364974
0x92a438bf9de6400dc6f37610a0c7daa92515b0c63cfafbaf6c622adadab57d0711 days 22 hrs ago0x17b83ec142be8c5054cd371644744c8048f006eb  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000365934
0x85f19fc1c7bfd50d6b566ed332ef7ecaf7e0e304b098cda3d4fdec84ee1b32c012 days 23 hrs ago0x1ea1115ec2adeae4aafb236e36771568d6599121  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000243316
0xedbbb1d4f285b6cce7b01d71f3dce51905ebbfa7342ccc896fab8ecb7ca7567b13 days 1 hr ago0x24db0cde484303b85197ed6c3ed345e627b4c840  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000243444
0x5719d8538638eb321781fc775b78b856de0ef4b0963a594c268fa9a3ba025b2715 days 12 hrs ago0x8e6443b3eafde653f754a0e47ef7e3fb671d1bb0  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000364974
0xc588aa32104dc2f8e39b4dffbb7ad4d44db42c63cb431015e39bbfc97b76473120 days 5 hrs ago0x0fad9b53469e6f2fa87d50c12e6b6de00573399f  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.000365742
0x440d1e72af25b8e44985b397bc76d2ce2513676b939ac8e15a0133766f95c07022 days 7 hrs ago0x161b930a6e782d90e591a97547a60e3c9bb0f274  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.00036555
0x08dba3b8dc87780bff55ed29dd6943d6287c9b817f4191051103d9193606fa9024 days 11 hrs ago0x4790f052214bb4d5bf8b02c1979ca7baef556fa0  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.004980106
0xb612c8a362c0e66f59588e12ee1883161e75562329cc4083b4d3b0ab71d7b02524 days 13 hrs ago0x4790f052214bb4d5bf8b02c1979ca7baef556fa0  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.004980106
0xcc6ad510c669886700aa5679ed7115d3029ad8471d8597c7449cec7386d2b10f24 days 13 hrs ago0x4790f052214bb4d5bf8b02c1979ca7baef556fa0  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.004980106
0xf161872429df7d0187b294d093e8c9db8a5265043cb2241a322df56e2b12a53c24 days 13 hrs ago0x4790f052214bb4d5bf8b02c1979ca7baef556fa0  IN   0xfa6512358d241b636edf5f8ccaaf86676dec21a70 Ether0.004980106
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x2a163e821fb00b8cf33bff98da3bd15b0a198263f534369e237eefafa4be3b5970990273 hrs 51 mins ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x2a163e821fb00b8cf33bff98da3bd15b0a198263f534369e237eefafa4be3b5970990273 hrs 51 mins ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x052cd8f0423759e025e1a77e244e87f62eab9b320.0003 Ether
0x3ff88acc85cbe8592af202b2e43fe48b951daa044e2e0ec9f5a883a23602b81870928351 day 6 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xcbf177a8487b4fcdb9014c64b9b51a1af83cc05d0.00475 Ether
0x3ff88acc85cbe8592af202b2e43fe48b951daa044e2e0ec9f5a883a23602b81870928351 day 6 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.00025 Ether
0xa44ed17235c739ea3e43498b3892175ffa5609b2acda48781f41d299615b6600703989010 days 17 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0xa44ed17235c739ea3e43498b3892175ffa5609b2acda48781f41d299615b6600703989010 days 17 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x052cd8f0423759e025e1a77e244e87f62eab9b320.0003 Ether
0xa400feb6914e50908e475c89c3a5599925ca8bfeb28f1ce56b50637ef354b40f694382927 days 8 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xcbf177a8487b4fcdb9014c64b9b51a1af83cc05d0.00475 Ether
0xa400feb6914e50908e475c89c3a5599925ca8bfeb28f1ce56b50637ef354b40f694382927 days 8 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.00025 Ether
0x0cc1f8aa0a28201ce74b4cdabe6b20fcb79f24f4d3e518b1f9e970ca2cd52660692830429 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x0cc1f8aa0a28201ce74b4cdabe6b20fcb79f24f4d3e518b1f9e970ca2cd52660692830429 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0xe659ad768d6a39e1bd33a2d142d3ccecf92aa8695b08a27e82272473cf5d71da692830429 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0xe659ad768d6a39e1bd33a2d142d3ccecf92aa8695b08a27e82272473cf5d71da692830429 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0x44a19deda282a51dbda548e0e42e26cf58b7734d87bff162eaa24aab4055e82a692829629 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x44a19deda282a51dbda548e0e42e26cf58b7734d87bff162eaa24aab4055e82a692829629 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0x6f3696fdc522bb986e0313b00b7c0331d8b342006e085ab9f6450d975a61cbbb692827729 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xf83defe97102b583671377cc444c92c32bcbc59b0.0095 Ether
0x6f3696fdc522bb986e0313b00b7c0331d8b342006e085ab9f6450d975a61cbbb692827729 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0005 Ether
0x7269396657284b592906ca29ea2b6f982a8b24c66106b285516fda65d13a35e6692826129 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x7269396657284b592906ca29ea2b6f982a8b24c66106b285516fda65d13a35e6692826129 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0x0c992d6aa944e66d4d17f27b74f0f416ba09ad42264ba932c5138b920e805436692826129 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xcbf177a8487b4fcdb9014c64b9b51a1af83cc05d0.00475 Ether
0x0c992d6aa944e66d4d17f27b74f0f416ba09ad42264ba932c5138b920e805436692826129 days 23 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.00025 Ether
0x6263b59b322b75269978015b9f1e9d6b5e057083d0e568ea5dc03cd586bd156b692751830 days 2 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x6263b59b322b75269978015b9f1e9d6b5e057083d0e568ea5dc03cd586bd156b692751830 days 2 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0x0de7c2b9ff16e4bd9f6ef831e86a88cf862d8a8af1094deeab5e6e3235b9ba8c692751530 days 2 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
0x0de7c2b9ff16e4bd9f6ef831e86a88cf862d8a8af1094deeab5e6e3235b9ba8c692751530 days 2 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70x0904dac3347ea47d208f3fd67402d039a3b998590.0003 Ether
0xe0a8b0aa4c33ca97c9b5476b3b349698a52b043c5821ec88ce4daab73ef54f76692751330 days 2 hrs ago0xfa6512358d241b636edf5f8ccaaf86676dec21a70xe08c5c6d17be3ab837b421723e9215bb9902c9f10.0027 Ether
[ Download CSV Export  ] 
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: SubdomainRegistrar
Compiler Text: v0.4.18+commit.9cf6e910
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.4;

/**
 * The ENS registry contract.
 */
contract ENS {
    // 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);

    struct Record {
        address owner;
        address resolver;
        uint64 ttl;
    }

    mapping(bytes32=>Record) 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() {
        records[0].owner = msg.sender;
    }

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

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

    /**
     * Returns the TTL of a node, and any records associated with it.
     */
    function ttl(bytes32 node) constant 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) {
        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) {
        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) {
        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) {
        NewTTL(node, ttl);
        records[node].ttl = ttl;
    }
}

/**
 * @dev A basic interface for ENS resolvers.
 */
contract Resolver {
  function supportsInterface(bytes4 interfaceID) public pure returns (bool);
  function addr(bytes32 node) public view returns (address);
  function setAddr(bytes32 node, address addr) public;
}

contract RegistrarInterface {
  event OwnerChanged(bytes32 indexed label, address indexed oldOwner, address indexed newOwner);
  event DomainConfigured(bytes32 indexed label);
  event DomainUnlisted(bytes32 indexed label);
  event NewRegistration(bytes32 indexed label, string subdomain, address indexed owner, address indexed referrer, uint price);
  event RentPaid(bytes32 indexed label, string subdomain, uint amount, uint expirationDate);

  // InterfaceID of these four methods is 0xc1b15f5a
  function query(bytes32 label, string subdomain) view returns(string domain, uint signupFee, uint rent, uint referralFeePPM);
  function register(bytes32 label, string subdomain, address owner, address referrer, address resolver) public payable;

  function rentDue(bytes32 label, string subdomain) public view returns(uint timestamp);
  function payRent(bytes32 label, string subdomain) public payable;
}
/**
 * @dev Implements an ENS registrar that sells subdomains on behalf of their owners.
 *
 * Users may register a subdomain by calling `register` with the name of the domain
 * they wish to register under, and the label hash of the subdomain they want to
 * register. They must also specify the new owner of the domain, and the referrer,
 * who is paid an optional finder's fee. The registrar then configures a simple
 * default resolver, which resolves `addr` lookups to the new owner, and sets
 * the `owner` account as the owner of the subdomain in ENS.
 *
 * New domains may be added by calling `configureDomain`, then transferring
 * ownership in the ENS registry to this contract. Ownership in the contract
 * may be transferred using `transfer`, and a domain may be unlisted for sale
 * using `unlistDomain`. There is (deliberately) no way to recover ownership
 * in ENS once the name is transferred to this registrar.
 *
 * Critically, this contract does not check two key properties of a listed domain:
 *
 * - Is the name UTS46 normalised?
 * - Is the Deed held by an appropriate custodian contract?
 *
 * User applications MUST check these two elements for each domain before
 * offering them to users for registration.
 *
 * Applications should additionally check that the domains they are offering to
 * register are controlled by this registrar, since calls to `register` will
 * fail if this is not the case.
 */
contract SubdomainRegistrar is RegistrarInterface {
  // namehash('eth')
  bytes32 constant public TLD_NODE = 0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae;

  ENS public ens;

  struct Domain {
    string name;
    address owner;
    uint price;
    uint referralFeePPM;
  }

  mapping(bytes32=>Domain) domains;

  function SubdomainRegistrar(ENS _ens) public {
    ens = _ens;
  }

  /**
   * @dev owner returns the address of the account that controls a domain.
   *      Initially this is the owner of the name in ENS. If the name has been
   *      transferred to this contract, then the internal mapping is consulted
   *      to determine who controls it.
   * @param label The label hash of the deed to check.
   * @return The address owning the deed.
   */
  function owner(bytes32 label) public view returns(address ret) {
      ret = ens.owner(keccak256(TLD_NODE, label));
      if(ret == address(this)) {
        ret = domains[label].owner;
      }
  }

  modifier owner_only(bytes32 label) {
      require(owner(label) == msg.sender);
      _;
  }

  /**
   * @dev Transfers internal control of a name to a new account. Does not update
   *      ENS.
   * @param name The name to transfer.
   * @param newOwner The address of the new owner.
   */
  function transfer(string name, address newOwner) public owner_only(keccak256(name)) {
    var label = keccak256(name);
    OwnerChanged(keccak256(name), domains[label].owner, newOwner);
    domains[label].owner = newOwner;
  }

  /**
   * @dev Sets the resolver record for a name in ENS.
   * @param name The name to set the resolver for.
   * @param resolver The address of the resolver
   */
  function setResolver(string name, address resolver) public owner_only(keccak256(name)) {
    var label = keccak256(name);
    var node = keccak256(TLD_NODE, label);
    ens.setResolver(node, resolver);
  }

  /**
   * @dev Configures a domain for sale.
   * @param name The name to configure.
   * @param price The price in wei to charge for subdomain registrations
   * @param referralFeePPM The referral fee to offer, in parts per million
   */
  function configureDomain(string name, uint price, uint referralFeePPM) public owner_only(keccak256(name)) {
    var label = keccak256(name);
    var domain = domains[label];

    if(keccak256(domain.name) != label) {
      // New listing
      domain.name = name;
    }
    if(domain.owner != msg.sender) {
      domain.owner = msg.sender;
    }
    domain.price = price;
    domain.referralFeePPM = referralFeePPM;
    DomainConfigured(label);
  }

  /**
   * @dev Unlists a domain
   * May only be called by the owner.
   * @param name The name of the domain to unlist.
   */
  function unlistDomain(string name) public owner_only(keccak256(name)) {
    var label = keccak256(name);
    var domain = domains[label];
    DomainUnlisted(label);

    domain.name = '';
    domain.owner = owner(label);
    domain.price = 0;
    domain.referralFeePPM = 0;
  }

  /**
   * @dev Returns information about a subdomain.
   * @param label The label hash for the domain.
   * @param subdomain The label for the subdomain.
   * @return domain The name of the domain, or an empty string if the subdomain
   *                is unavailable.
   * @return price The price to register a subdomain, in wei.
   * @return rent The rent to retain a subdomain, in wei per second.
   * @return referralFeePPM The referral fee for the dapp, in ppm.
   */
  function query(bytes32 label, string subdomain) view returns(string domain, uint price, uint rent, uint referralFeePPM) {
    var node = keccak256(TLD_NODE, label);
    var subnode = keccak256(node, keccak256(subdomain));

    if(ens.owner(subnode) != 0) {
      return ('', 0, 0, 0);
    }

    var data = domains[label];
    return (data.name, data.price, 0, data.referralFeePPM);
  }

  /**
   * @dev Registers a subdomain.
   * @param label The label hash of the domain to register a subdomain of.
   * @param subdomain The desired subdomain label.
   * @param subdomainOwner The account that should own the newly configured subdomain.
   * @param referrer The address of the account to receive the referral fee.
   */
  function register(bytes32 label, string subdomain, address subdomainOwner, address resolver, address referrer) public payable {
    var domainNode = keccak256(TLD_NODE, label);
    var subdomainLabel = keccak256(subdomain);

    // Subdomain must not be registered already.
    require(ens.owner(keccak256(domainNode, subdomainLabel)) == address(0));

    var domain = domains[label];

    // Domain must be available for registration
    require(keccak256(domain.name) == label);

    // User must have paid enough
    require(msg.value >= domain.price);

    // Send any extra back
    if(msg.value > domain.price) {
      msg.sender.transfer(msg.value - domain.price);
    }

    // Send any referral fee
    var total = domain.price;
    if(domain.referralFeePPM * domain.price > 0 && referrer != 0 && referrer != domain.owner) {
      var referralFee = (domain.price * domain.referralFeePPM) / 1000000;
      referrer.transfer(referralFee);
      total -= referralFee;
    }

    // Send the registration fee
    if(total > 0) {
      domain.owner.transfer(total);
    }

    // Register the domain
    if(subdomainOwner == 0) {
      subdomainOwner = msg.sender;
    }
    doRegistration(domainNode, subdomainLabel, subdomainOwner, Resolver(resolver));

    NewRegistration(label, subdomain, subdomainOwner, referrer, domain.price);
  }

  function doRegistration(bytes32 node, bytes32 label, address subdomainOwner, Resolver resolver) internal {
    // Get the subdomain so we can configure it
    ens.setSubnodeOwner(node, label, this);

    var subnode = keccak256(node, label);
    // Set the subdomain's resolver
    ens.setResolver(subnode, resolver);

    // Set the address record on the resolver
    resolver.setAddr(subnode, subdomainOwner);

    // Pass ownership of the new subdomain to the registrant
    ens.setOwner(subnode, subdomainOwner);
  }

  function supportsInterface(bytes4 interfaceID) constant returns (bool) {
    return (
         (interfaceID == 0x01ffc9a7) // supportsInterface(bytes4)
      || (interfaceID == 0xc1b15f5a) // RegistrarInterface
    );
  }

  function rentDue(bytes32 label, string subdomain) public view returns(uint timestamp) {
    return 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
  }

  function payRent(bytes32 label, string subdomain) public payable {
    revert();
  }
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"label","type":"bytes32"}],"name":"owner","outputs":[{"name":"ret","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"label","type":"bytes32"},{"name":"subdomain","type":"string"}],"name":"query","outputs":[{"name":"domain","type":"string"},{"name":"price","type":"uint256"},{"name":"rent","type":"uint256"},{"name":"referralFeePPM","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ens","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"label","type":"bytes32"},{"name":"subdomain","type":"string"},{"name":"subdomainOwner","type":"address"},{"name":"resolver","type":"address"},{"name":"referrer","type":"address"}],"name":"register","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"label","type":"bytes32"},{"name":"subdomain","type":"string"}],"name":"rentDue","outputs":[{"name":"timestamp","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"TLD_NODE","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"label","type":"bytes32"},{"name":"subdomain","type":"string"}],"name":"payRent","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"price","type":"uint256"},{"name":"referralFeePPM","type":"uint256"}],"name":"configureDomain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"}],"name":"unlistDomain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"newOwner","type":"address"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"label","type":"bytes32"},{"indexed":true,"name":"oldOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"label","type":"bytes32"}],"name":"DomainConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"label","type":"bytes32"}],"name":"DomainUnlisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"subdomain","type":"string"},{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"referrer","type":"address"},{"indexed":false,"name":"price","type":"uint256"}],"name":"NewRegistration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"label","type":"bytes32"},{"indexed":false,"name":"subdomain","type":"string"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"expirationDate","type":"uint256"}],"name":"RentPaid","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b604051602080611f8883398101604052808051906020019091905050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050611f0d8061007b6000396000f3006060604052600436106100ba576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ffc9a7146100bf57806302571be3146101195780632eef3d65146101805780633f15457f146102785780634254b155146102cd578063660b7ad514610389578063733ccaba1461040757806396df354014610483578063cb01a9bf146104b4578063da1fe7d514610513578063e34e788914610582578063fbf58b3e146105df575b600080fd5b34156100ca57600080fd5b6100ff60048080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909190505061065b565b604051808215151515815260200191505060405180910390f35b341561012457600080fd5b61013e6004808035600019169060200190919050506106f5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561018b57600080fd5b6101e860048080356000191690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061087f565b6040518080602001858152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b8381101561023a57808201518184015260208101905061021f565b50505050905090810190601f1680156102675780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b341561028357600080fd5b61028b610b5f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61038760048080356000191690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b84565b005b341561039457600080fd5b6103f160048080356000191690602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506110e8565b6040518082815260200191505060405180910390f35b341561041257600080fd5b610481600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611113565b005b341561048e57600080fd5b610496611359565b60405180826000191660001916815260200191505060405180910390f35b61051160048080356000191690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611380565b005b341561051e57600080fd5b610580600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091908035906020019091905050611385565b005b341561058d57600080fd5b6105dd600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061162d565b005b34156105ea57600080fd5b610659600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611816565b005b60006301ffc9a77c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806106ee575063c1b15f5a7c010000000000000000000000000000000000000000000000000000000002827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be37f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae6001028460405180836000191660001916815260200182600019166000191681526020019250505060405180910390206000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b15156107e757600080fd5b6102c65a03f115156107f857600080fd5b5050506040518051905090503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561087a5760016000836000191660001916815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b919050565b610887611e28565b6000806000806000807f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae600102896040518083600019166000191681526020018260001916600019168152602001925050506040518091039020925082886040518082805190602001908083835b60208310151561091a57805182526020820191506020810190506020830392506108f5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390206040518083600019166000191681526020018260001916600019168152602001925050506040518091039020915060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1515610a1757600080fd5b6102c65a03f11515610a2857600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16141515610a7e57600080600060206040519081016040528060008152509291908292508191508090509650965096509650610b53565b600160008a60001916600019168152602001908152602001600020905080600001816002015460008360030154838054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b405780601f10610b1557610100808354040283529160200191610b40565b820191906000526020600020905b815481529060010190602001808311610b2357829003601f168201915b5050505050935081915096509650965096505b50505092959194509250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060007f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae6001028a60405180836000191660001916815260200182600019166000191681526020019250505060405180910390209450886040518082805190602001908083835b602083101515610c155780518252602082019150602081019050602083039250610bf0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209350600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3878760405180836000191660001916815260200182600019166000191681526020019250505060405180910390206000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808260001916600019168152602001915050602060405180830381600087803b1515610d2957600080fd5b6102c65a03f11515610d3a57600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16141515610d6657600080fd5b600160008b6000191660001916815260200190815260200160002092508960001916836000016040518082805460018160011615610100020316600290048015610de75780601f10610dc5576101008083540402835291820191610de7565b820191906000526020600020905b815481529060010190602001808311610dd3575b5050915050604051809103902060001916141515610e0457600080fd5b82600201543410151515610e1757600080fd5b8260020154341115610e6a573373ffffffffffffffffffffffffffffffffffffffff166108fc846002015434039081150290604051600060405180830381858888f193505050501515610e6957600080fd5b5b8260020154915060008360020154846003015402118015610ea2575060008673ffffffffffffffffffffffffffffffffffffffff1614155b8015610efe57508260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614155b15610f6457620f42408360030154846002015402811515610f1b57fe5b0490508573ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515610f5e57600080fd5b80820391505b6000821115610fd2578260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501515610fd157600080fd5b5b60008873ffffffffffffffffffffffffffffffffffffffff161415610ff5573397505b61100185858a8a611a84565b8573ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168b600019167ffa38f9920801763ca6e4ee19135fb26a4fa11c0a34f7117455064991a1a3e6588c87600201546040518080602001838152602001828103825284818151815260200191508051906020019080838360005b838110156110a1578082015181840152602081019050611086565b50505050905090810190601f1680156110ce5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a450505050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905092915050565b600080836040518082805190602001908083835b60208310151561114c5780518252602082019150602081019050602083039250611127565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff16611199826106f5565b73ffffffffffffffffffffffffffffffffffffffff161415156111bb57600080fd5b846040518082805190602001908083835b6020831015156111f157805182526020820191506020810190506020830392506111cc565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902092507f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae60010283604051808360001916600019168152602001826000191660001916815260200192505050604051809103902091506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83866040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b151561133e57600080fd5b6102c65a03f1151561134f57600080fd5b5050505050505050565b7f93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae60010281565b600080fd5b600080846040518082805190602001908083835b6020831015156113be5780518252602082019150602081019050602083039250611399565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff1661140b826106f5565b73ffffffffffffffffffffffffffffffffffffffff1614151561142d57600080fd5b856040518082805190602001908083835b602083101515611463578051825260208201915060208101905060208303925061143e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209250600160008460001916600019168152602001908152602001600020915082600019168260000160405180828054600181600116156101000203166002900480156115135780601f106114f1576101008083540402835291820191611513565b820191906000526020600020905b8154815290600101906020018083116114ff575b50509150506040518091039020600019161415156115455785826000019080519060200190611543929190611e3c565b505b3373ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115e257338260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b84826002018190555083826003018190555082600019167f1427993bb6b6c16d8953c450c37078c8f41196e2e2db1619cda06620143e2d9160405160405180910390a2505050505050565b600080826040518082805190602001908083835b6020831015156116665780518252602082019150602081019050602083039250611641565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff166116b3826106f5565b73ffffffffffffffffffffffffffffffffffffffff161415156116d557600080fd5b836040518082805190602001908083835b60208310151561170b57805182526020820191506020810190506020830392506116e6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209250600160008460001916600019168152602001908152602001600020915082600019167f77f7b610de5055c8f704e6a3b12874468f5785f3a7d1007b67a8a4b4c7ed88fc60405160405180910390a260206040519081016040528060008152508260000190805190602001906117b0929190611e3c565b506117ba836106f5565b8260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600082600201819055506000826003018190555050505050565b6000826040518082805190602001908083835b60208310151561184e5780518252602082019150602081019050602083039250611829565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390203373ffffffffffffffffffffffffffffffffffffffff1661189b826106f5565b73ffffffffffffffffffffffffffffffffffffffff161415156118bd57600080fd5b836040518082805190602001908083835b6020831015156118f357805182526020820191506020810190506020830392506118ce565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091508273ffffffffffffffffffffffffffffffffffffffff1660016000846000191660001916815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16856040518082805190602001908083835b6020831015156119c4578051825260208201915060208101905060208303925061199f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020600019167f06e9c07310f63759634ddbb7257dbb19ca404f90bd6bdef1d3386fab033cebce60405160405180910390a48260016000846000191660001916815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59238686306040518463ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180846000191660001916815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050600060405180830381600087803b1515611b6157600080fd5b6102c65a03f11515611b7257600080fd5b5050508484604051808360001916600019168152602001826000191660001916815260200192505050604051809103902090506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a82846040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1515611c7057600080fd5b6102c65a03f11515611c8157600080fd5b5050508173ffffffffffffffffffffffffffffffffffffffff1663d5fa2b0082856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1515611d2e57600080fd5b6102c65a03f11515611d3f57600080fd5b5050506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1515611e0d57600080fd5b6102c65a03f11515611e1e57600080fd5b5050505050505050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611e7d57805160ff1916838001178555611eab565b82800160010185558215611eab579182015b82811115611eaa578251825591602001919060010190611e8f565b5b509050611eb89190611ebc565b5090565b611ede91905b80821115611eda576000816000905550600101611ec2565b5090565b905600a165627a7a7230582041a6435dd93573935c3578cc0f72e50c975bca17258053e2ace2e23c9954730d0029000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b


   Swarm Source:
bzzr://41a6435dd93573935c3578cc0f72e50c975bca17258053e2ace2e23c9954730d

 

View All
Block Age transaction Difficulty GasUsed 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.