Contract Overview | ENS-Registrar.eth
Balance: 0 Ether
Transactions: 15574 txns
 Latest 25 transactions from a total of 15574 transactions

TxHash Age From To Value [TxFee]
0x5daeb4c5f5c3639f9372e8f58df0d773dd47d258afbe96b78b9965265a6cf98e69 days 12 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000316475
0x175c51b7a4cdcd7f8e0edde5883508a09086ca2f7f45da1d09722e5eb866522569 days 13 hrs ago0xecb39cd457ec3bda88b0edf57bd642a6742ea3a3  IN   ENS-Registrar.eth0 Ether0.000067355
0x9f406f7dd6e279e197862cb4581c649b9b2d73fc5390e08083daaca50c6275f969 days 13 hrs ago0xecb39cd457ec3bda88b0edf57bd642a6742ea3a3  IN   ENS-Registrar.eth0 Ether0.000067355
0xe35589597eda5171a77a220cd9a14a89472521f81912483c67be0a972655ec1569 days 13 hrs ago0xecb39cd457ec3bda88b0edf57bd642a6742ea3a3  IN   ENS-Registrar.eth0 Ether0.000067355
0x9391cd1c318f7fa2e3a975de113fb60a0c20cfa50f6c64d31dd75d7a1778a3da69 days 14 hrs ago0xecb39cd457ec3bda88b0edf57bd642a6742ea3a3  IN   ENS-Registrar.eth0 Ether0.000067355
0x5974830207190e9d4ceab52e90a17cb31f4b7cdf98edf625401eee5075294f3a69 days 16 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000316475
0xba4dd33a0ceefb4bc36ae669c09a33594e2095d8e397f3bdab632186e645bbcb69 days 16 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000067355
0xfbf34ca8e2f4e445174851e193828e5cdfafad1741ba3571829c1c71c9978e2969 days 16 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000316475
0x0c295a34834340f5151f77e58d4b43edb03a395e99aad165aae7cc29af30ae2f69 days 16 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.0002
0x3dd7a56dbd0fba6b1626294bb07a5aecbeccfe015f926a2ed06cdd019389910a69 days 16 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000067355
0x03d4efe84ff8d734722fa6defd2f5a930e44bd65a138ecfd51a15e96a6db49fa69 days 17 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000067291
0x20140850f200c44fe90f5160880a8fae850ed9cbe47b551c56dd011d60f624b869 days 17 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000067355
0x3e59e6095a7c342dab1af78d9d65ddb5333097d9a574094b33532c184c160cbf88 days 17 hrs ago0x3c482e5e634319928959ab54fb4fdb9cc59e2745  IN   ENS-Registrar.eth0 Ether0.000067355
0x41d5501028178d0f8a9e5e0ac28a52aa888152b77cabe3b50e9713d345dda63a88 days 17 hrs ago0x44d0b1bf2a3809c5ebb288f6babf46c76953d0e5  IN   ENS-Registrar.eth0 Ether0.000067355
0x75a6f752acf1733f352d55026e14ba7a9e9003650522aacdbe47d8bdaa9d88a388 days 18 hrs ago0x44d0b1bf2a3809c5ebb288f6babf46c76953d0e5  IN   ENS-Registrar.eth0 Ether0.000202065
0xa36856cc9439b3ca1bc82e406f4a87443d2cce4003451097a0682c673960f7d888 days 19 hrs ago0xfc414becae6d7501d8d21080000b7f0c6ddc0319  IN   ENS-Registrar.eth0.00000002 Ether0.003
0x5ba204b06c16b19430e0fc6705a1c2e587e4833a9f958c30066743aee5889f4488 days 19 hrs ago0xfc414becae6d7501d8d21080000b7f0c6ddc0319  IN   ENS-Registrar.eth20 wei0.003
0xdca60b0f72689e4baf28e15c81603d9d839c82d9a16c15cbb95cb5949609f6ac89 days 15 hrs ago0xfc414becae6d7501d8d21080000b7f0c6ddc0319  IN   ENS-Registrar.eth0.00000005 Ether0.003
0x2ed458c8186dadec25b02a094efdb84a7b4e75489da5e26783a0f93d1f21100b619 days 12 hrs ago0xb5400f2b6d9916956dc6a25b43572737e911925f  IN   ENS-Registrar.eth0 Ether0.01381356
0xc687de4e7525157c0a0396c3668fbbef120191481dcb11fcaf67384becf93e30623 days 2 hrs ago0x9750590477e6c0b0dc6e52de0f9728984ce8777f  IN   ENS-Registrar.eth0 Ether0.095690225082
0xade90ff00228ee8f15318813dff7de5fe2e09f96e57dde7f51b9a4e1ebfe776b623 days 2 hrs ago0x72866e0fb4a66bc5e15e15e763b447b77ac30d59  IN   ENS-Registrar.eth0.01 Ether0.064635
0xd29af221b250f9375cc52bd06d219190ddf134152af12b497ac94dbf21b8b00e623 days 2 hrs ago0x72866e0fb4a66bc5e15e15e763b447b77ac30d59  IN   ENS-Registrar.eth0 Ether0.1151002
0xad121c795d02cecf0d12524756dc6e7467339e02ab4294bdb8bb889c4b884553623 days 2 hrs ago0x72866e0fb4a66bc5e15e15e763b447b77ac30d59  IN   ENS-Registrar.eth0.01 Ether0.064635
0x1989edc1d9c38e30b6205d786b111cff45bf3bc5f47b86611ab3162e9bf58f9f623 days 2 hrs ago0x72866e0fb4a66bc5e15e15e763b447b77ac30d59  IN   ENS-Registrar.eth0 Ether0.1151386
0xc3475552ecc4cb767e2422f3ca2cb62c863855640e92ca9af2a8dfe68c148481623 days 2 hrs ago0xa8faf982180b4a3015b8b6a440d2b261c0d0ec3c  IN   ENS-Registrar.eth0.735467683327504 Ether0.064635
[ 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
0x5daeb4c5f5c3639f9372e8f58df0d773dd47d258afbe96b78b9965265a6cf98e459027369 days 12 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40xfbc9c5024ccc73d00ee7588d91d949a223d0ea750 Ether
0x5daeb4c5f5c3639f9372e8f58df0d773dd47d258afbe96b78b9965265a6cf98e459027369 days 12 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0x5974830207190e9d4ceab52e90a17cb31f4b7cdf98edf625401eee5075294f3a458906969 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x34add0b5d7aa04fe1cd7cf6e3306350d7a0a13a80 Ether
0x5974830207190e9d4ceab52e90a17cb31f4b7cdf98edf625401eee5075294f3a458906969 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0xfbf34ca8e2f4e445174851e193828e5cdfafad1741ba3571829c1c71c9978e29458902569 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x43c0bf822518e2535d351f3e124ee1658e5711c90 Ether
0xfbf34ca8e2f4e445174851e193828e5cdfafad1741ba3571829c1c71c9978e29458902569 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0xade90ff00228ee8f15318813dff7de5fe2e09f96e57dde7f51b9a4e1ebfe776b1049069623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40xfdd5dd5af14abf80071114083f82cf231e92d76b0.01 Ether
0xade90ff00228ee8f15318813dff7de5fe2e09f96e57dde7f51b9a4e1ebfe776b1049069623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0xad121c795d02cecf0d12524756dc6e7467339e02ab4294bdb8bb889c4b8845531049065623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x0d88a6a695f9bf85c0759c78fb06023329cf15cc0.01 Ether
0xad121c795d02cecf0d12524756dc6e7467339e02ab4294bdb8bb889c4b8845531049065623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0xc3475552ecc4cb767e2422f3ca2cb62c863855640e92ca9af2a8dfe68c1484811049062623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x1eaf8e08e05f7498f90cdfebfe2c68f5eea7b3d90.735467683327504 Ether
0xc3475552ecc4cb767e2422f3ca2cb62c863855640e92ca9af2a8dfe68c1484811049062623 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0x511fa7ebf4bdcae7d874261b9aa2467a7d2f32e020dbf6fae62515c63486c234792122665 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x7ddbb4c6fa0b5aef8903c078e13afdf820943aa70 Ether
0x511fa7ebf4bdcae7d874261b9aa2467a7d2f32e020dbf6fae62515c63486c234792122665 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x7ddbb4c6fa0b5aef8903c078e13afdf820943aa70 Ether
0x511fa7ebf4bdcae7d874261b9aa2467a7d2f32e020dbf6fae62515c63486c234792122665 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x7ddbb4c6fa0b5aef8903c078e13afdf820943aa70 Ether
0xc35137909a83297caa408eae397b8a0d419d6c0dbf97f40c7783208eef2947ac792122665 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x7ddbb4c6fa0b5aef8903c078e13afdf820943aa71.2441698734697082 Ether
0xc35137909a83297caa408eae397b8a0d419d6c0dbf97f40c7783208eef2947ac792122665 days 16 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b4  Contract Creation0 Ether
0xe2b78e2027883b0d74601bb3381267c00cf7ab99efcdf05c80620f68d45cce29765356670 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xe2b78e2027883b0d74601bb3381267c00cf7ab99efcdf05c80620f68d45cce29765356670 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xe2b78e2027883b0d74601bb3381267c00cf7ab99efcdf05c80620f68d45cce29765356670 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x112234455c3a32fd11230c42e7bccd4a84e020100 Ether
0xe2b78e2027883b0d74601bb3381267c00cf7ab99efcdf05c80620f68d45cce29765356670 days 2 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xcb6c0f2ed31e9b8f373fa8ab79d0878aef665db8a8b0e4f0cd7a49b549be1b47764682670 days 4 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xcb6c0f2ed31e9b8f373fa8ab79d0878aef665db8a8b0e4f0cd7a49b549be1b47764682670 days 4 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xcb6c0f2ed31e9b8f373fa8ab79d0878aef665db8a8b0e4f0cd7a49b549be1b47764682670 days 4 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40x19d34ad828d37959c7adfc13b4bb92402c24a9590 Ether
0xeb8372fb41e9b3f6fe9af0f059ba37f4d6614a5929c5890f9c470863efbb0b6d757026671 days 9 hrs ago0xc68de5b43c3d980b0c110a77a5f78d3c4c4d63b40xd3aaec011e693729251541d1d628cfda3b21f3ec0 Ether
[ Download CSV Export  ] 
Contract Name: Registrar
Compiler Version: v0.4.4+commit.4633f3de
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.0;


/*

Temporary Hash Registrar 
========================

This is a simplified version of a hash registrar. It is purporsefully limited:
names cannot be six letters or shorter, new auctions will stop after 4 years
and all ether still locked after 8 years will become unreachable.

The plan is to test the basic features and then move to a new contract in at most
2 years, when some sort of renewal mechanism will be enabled.
*/

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

    event Transfer(bytes32 indexed node, address owner);
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
    event NewResolver(bytes32 indexed node, address resolver);
    event NewTTL(bytes32 indexed node, uint64 ttl);
}

/**
 * @title Deed to hold ether in exchange for ownership of a node
 * @dev The deed can be controlled only by the registrar and can only send ether back to the owner.
 */
contract Deed {
    address public registrar;
    address constant burn = 0xdead;
    uint public creationDate;
    address public owner;
    event OwnerChanged(address newOwner);
    event DeedClosed();
    bool active;


    modifier onlyRegistrar {
        if (msg.sender != registrar) throw;
        _;
    }

    modifier onlyActive {
        if (!active) throw;
        _;
    }

    function Deed() {
        registrar = msg.sender;
        creationDate = now;
        active = true;
    }
        
    function setOwner(address newOwner) onlyRegistrar {
        owner = newOwner;
        OwnerChanged(newOwner);
    }

    function setRegistrar(address newRegistrar) onlyRegistrar {
        registrar = newRegistrar;
    }
    
    function setBalance(uint newValue) onlyRegistrar onlyActive payable {
        // Check if it has enough balance to set the value
        if (this.balance < newValue) throw;
        // Send the difference to the owner
        if (!owner.send(this.balance - newValue)) throw;
    }

    /**
     * @dev Close a deed and refund a specified fraction of the bid value
     * @param refundRatio The amount*1/1000 to refund
     */
    function closeDeed(uint refundRatio) onlyRegistrar onlyActive {
        active = false;            
        if (! burn.send(((1000 - refundRatio) * this.balance)/1000)) throw;
        DeedClosed();
        destroyDeed();
    }    

    /**
     * @dev Close a deed and refund a specified fraction of the bid value
     */
    function destroyDeed() {
        if (active) throw;
        if(owner.send(this.balance)) 
            selfdestruct(burn);
        else throw;
    }

    // The default function just receives an amount
    function () payable {}
}

/**
 * @title Registrar
 * @dev The registrar handles the auction process for each subnode of the node it owns.
 */
contract Registrar {
    AbstractENS public ens;
    bytes32 public rootNode;

    mapping (bytes32 => entry) public entries;
    mapping (bytes32 => Deed) public sealedBids;
    
    enum Mode { Open, Auction, Owned, Forbidden }
    uint32 constant auctionLength = 7 days;
    uint32 constant revealPeriod = 24 hours;
    uint32 constant initialAuctionPeriod = 2 weeks;
    uint constant minPrice = 0.01 ether;
    uint public registryCreated;

    event AuctionStarted(bytes32 indexed hash, uint auctionExpiryDate);
    event NewBid(bytes32 indexed hash, uint deposit);
    event BidRevealed(bytes32 indexed hash, address indexed owner, uint value, uint8 status);
    event HashRegistered(bytes32 indexed hash, address indexed owner, uint value, uint now);
    event HashReleased(bytes32 indexed hash, uint value);
    event HashInvalidated(bytes32 indexed hash, string indexed name, uint value, uint now);

    struct entry {
        Mode status;
        Deed deed;
        uint registrationDate;
        uint value;
        uint highestBid;
    }

    modifier onlyOwner(bytes32 _hash) {
        entry h = entries[_hash];
        if (msg.sender != h.deed.owner() || h.status != Mode.Owned) throw;
        _;
    }
    
    /**
     * @dev Constructs a new Registrar, with the provided address as the owner of the root node.
     * @param _ens The address of the ENS
     * @param _rootNode The hash of the rootnode.
     */
    function Registrar(address _ens, bytes32 _rootNode) {
        ens = AbstractENS(_ens);
        rootNode = _rootNode;
        registryCreated = now;
    }

    /**
     * @dev Returns the maximum of two unsigned integers
     * @param a A number to compare
     * @param b A number to compare
     * @return The maximum of two unsigned integers
     */
    function max(uint a, uint b) internal constant returns (uint max) {
        if (a > b)
            return a;
        else
            return b;
    }

    /**
     * @dev Returns the minimum of two unsigned integers
     * @param a A number to compare
     * @param b A number to compare
     * @return The minimum of two unsigned integers
     */
    function  min(uint a, uint b) internal constant returns (uint min) {
        if (a < b)
            return a;
        else
            return b;
    }

    /**
     * @dev Returns the length of a given string
     * @param s The string to measure the length of
     * @return The length of the input string
     */
    function strlen(string s) internal constant returns (uint) {
        // Starting here means the LSB will be the byte we care about
        uint ptr;
        uint end;
        assembly {
            ptr := add(s, 1)
            end := add(mload(s), ptr)
        }
        for (uint len = 0; ptr < end; len++) {
            uint8 b;
            assembly { b := and(mload(ptr), 0xFF) }
            if (b < 0x80) {
                ptr += 1;
            } else if(b < 0xE0) {
                ptr += 2;
            } else if(b < 0xF0) {
                ptr += 3;
            } else if(b < 0xF8) {
                ptr += 4;
            } else if(b < 0xFC) {
                ptr += 5;
            } else {
                ptr += 6;
            }
        }
        return len;
    }

    /**
     * @dev Start an auction for an available hash
     * 
     * Anyone can start an auction by sending an array of hashes that they want to bid for. 
     * Arrays are sent so that someone can open up an auction for X dummy hashes when they 
     * are only really interested in bidding for one. This will increase the cost for an 
     * attacker to simply bid blindly on all new auctions. Dummy auctions that are 
     * open but not bid on are closed after a week. 
     *
     * @param _hash The hash to start an auction on
     */    
    function startAuction(bytes32 _hash) {
        entry newAuction = entries[_hash];
        // Ensure the hash is available, and no auction is currently underway
        if ((newAuction.status == Mode.Auction && now < newAuction.registrationDate)
            || newAuction.status == Mode.Owned 
            || newAuction.status == Mode.Forbidden
            || now > registryCreated + 4 years)
            throw;
        
        // for the first month of the registry, make longer auctions
        newAuction.registrationDate = max(now + auctionLength, registryCreated + initialAuctionPeriod);
        newAuction.status = Mode.Auction;  
        newAuction.value = 0;
        newAuction.highestBid = 0;
        AuctionStarted(_hash, newAuction.registrationDate);      
    }

    /**
     * @dev Start multiple auctions for better anonymity
     * @param _hashes An array of hashes, at least one of which you presumably want to bid on
     */
    function startAuctions(bytes32[] _hashes)  {
        for (uint i = 0; i < _hashes.length; i ++ ) {
            startAuction(_hashes[i]);
        }
    }
    
    /**
     * @dev Hash the values required for a secret bid
     * @param hash The node corresponding to the desired namehash
     * @param owner The address which will own the 
     * @param value The bid amount
     * @param salt A random value to ensure secrecy of the bid
     * @return The hash of the bid values
     */
    function shaBid(bytes32 hash, address owner, uint value, bytes32 salt) constant returns (bytes32 sealedBid) {
        return sha3(hash, owner, value, salt);
    }
    
    /**
     * @dev Submit a new sealed bid on a desired hash in a blind auction
     * 
     * Bids are sent by sending a message to the main contract with a hash and an amount. The hash 
     * contains information about the bid, including the bidded hash, the bid amount, and a random 
     * salt. Bids are not tied to any one auction until they are revealed. The value of the bid 
     * itself can be masqueraded by sending more than the value of your actual bid. This is 
     * followed by a 24h reveal period. Bids revealed after this period will be burned and the ether unrecoverable. 
     * Since this is an auction, it is expected that most public hashes, like known domains and common dictionary 
     * words, will have multiple bidders pushing the price up. 
     *
     * @param sealedBid A sealedBid, created by the shaBid function
     */
    function newBid(bytes32 sealedBid) payable {
        if (address(sealedBids[sealedBid]) > 0 ) throw;
        // creates a new hash contract with the owner
        Deed newBid = new Deed();
        sealedBids[sealedBid] = newBid;
        NewBid(sealedBid, msg.value);
        if (!newBid.send(msg.value)) throw;
    } 

    /**
     * @dev Submit the properties of a bid to reveal them
     * @param _hash The node in the sealedBid
     * @param _owner The address in the sealedBid
     * @param _value The bid amount in the sealedBid
     * @param _salt The sale in the sealedBid
     */ 
    function unsealBid(bytes32 _hash, address _owner, uint _value, bytes32 _salt) {
        bytes32 seal = shaBid(_hash, _owner, _value, _salt);
        Deed bid = sealedBids[seal];
        if (address(bid) == 0 ) throw;
        sealedBids[seal] = Deed(0);
        bid.setOwner(_owner);
        entry h = entries[_hash];

        /* 
        A penalty is applied for submitting unrevealed bids, which could otherwise
        be used as a threat of revealing a bid higher than the second-highest 
        bid, to extort the winner into paying them.
        */
        if (bid.creationDate() > h.registrationDate - revealPeriod
            || now > h.registrationDate 
            || _value < minPrice) {
            // bid is invalid, burn 99%
            bid.closeDeed(10);
            BidRevealed(_hash, _owner, _value, 0);
            
        } else if (_value > h.highestBid) {
            // new winner
            // cancel the other bid, refund 99.9%
            if(address(h.deed) != 0) {
                Deed previousWinner = h.deed;
                previousWinner.closeDeed(999);
            }
            
            // set new winner
            // per the rules of a vickery auction, the value becomes the previous highestBid
            h.value = h.highestBid;
            h.highestBid = _value;
            h.deed = bid;
            bid.setBalance(_value);
            BidRevealed(_hash, _owner, _value, 2);
        
        } else if (_value > h.value) {
            // not winner, but affects second place
            h.value = _value;
            bid.closeDeed(999);
            BidRevealed(_hash, _owner, _value, 3);
            
        } else {
            // bid doesn't affect auction
            bid.closeDeed(999);
            BidRevealed(_hash, _owner, _value, 4);
        }
    }
    
    /**
     * @dev Cancel a bid
     * @param seal The value returned by the shaBid function
     */ 
    function cancelBid(bytes32 seal) {
        Deed bid = sealedBids[seal];
        // If the bid hasn't been revealed long after any possible auction date, then close it
        if (address(bid) == 0 
            || now < bid.creationDate() + auctionLength * 12 
            || bid.owner() > 0) throw; 

        // There is a fee for cancelling an old bid, but it's smaller than revealing it
        bid.setOwner(msg.sender);
        bid.closeDeed(5);
        sealedBids[seal] = Deed(0);
        BidRevealed(seal, 0, 0, 5);
    }

    /**
     * @dev Finalize an auction after the registration date has passed
     * @param _hash The hash of the name the auction is for
     */ 
    function finalizeAuction(bytes32 _hash) {
        entry h = entries[_hash];
        if (now < h.registrationDate 
            || h.highestBid == 0
            || h.status != Mode.Auction) throw;
        
        // set the hash
        h.status = Mode.Owned;
        h.value =  max(h.value, minPrice);

        // Assign the owner in ENS
        ens.setSubnodeOwner(rootNode, _hash, h.deed.owner());

        Deed deedContract = h.deed;
        deedContract.setBalance(h.value);
        HashRegistered(_hash, deedContract.owner(), h.value, now);
    }

    /**
     * @dev The owner of a domain may transfer it to someone else at any time.
     * @param _hash The node to transfer
     * @param newOwner The address to transfer ownership to
     */
    function transfer(bytes32 _hash, address newOwner) onlyOwner(_hash) {
        entry h = entries[_hash];
        h.deed.setOwner(newOwner);
        ens.setSubnodeOwner(rootNode, _hash, newOwner);
    }


    /**
     * @dev After some time, the owner can release the property and get their ether back
     * @param _hash The node to release
     */
    function releaseDeed(bytes32 _hash) onlyOwner(_hash) {
        entry h = entries[_hash];
        Deed deedContract = h.deed;
        if (now < h.registrationDate + 1 years 
            || now > registryCreated + 8 years) throw;
        
        h.status = Mode.Open;
        ens.setSubnodeOwner(rootNode, _hash, 0);
        deedContract.closeDeed(1000);
        HashReleased(_hash, h.value);
    }  

    /**
     * @dev Submit a name 6 characters long or less. If it has been registered, 
     * the submitter will earn 10% of the deed value. We are purposefully
     * handicapping the simplified registrar as a way to force it into being restructured
     * in a few years.
     * @param unhashedName An invalid name to search for in the registry.
     * 
     */
    function invalidateName(string unhashedName) {
        if (strlen(unhashedName) > 6 ) throw;
        bytes32 hash = sha3(unhashedName);
        
        entry h = entries[hash];
        h.status = Mode.Forbidden;
        ens.setSubnodeOwner(rootNode, hash, 0);
        if(address(h.deed) != 0) {
            // Reward the discoverer with 10% of the deed
            // The previous owner gets nothing
            h.deed.setOwner(msg.sender);
            h.deed.closeDeed(100);
        }
        HashInvalidated(hash, unhashedName, h.value, now);
    }

    /**
     * @dev Transfers the deed to the current registrar, if different from this one.
     * Used during the upgrade process to a permanent registrar.
     * @param _hash The name hash to transfer.
     */
    function transferRegistrars(bytes32 _hash) onlyOwner(_hash) {
        var registrar = ens.owner(rootNode);
        if(registrar == address(this))
            throw;

        entry h = entries[_hash];
        h.deed.setRegistrar(registrar);
        h.status = Mode.Forbidden;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"}],"name":"releaseDeed","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"unhashedName","type":"string"}],"name":"invalidateName","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"hash","type":"bytes32"},{"name":"owner","type":"address"},{"name":"value","type":"uint256"},{"name":"salt","type":"bytes32"}],"name":"shaBid","outputs":[{"name":"sealedBid","type":"bytes32"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"entries","outputs":[{"name":"status","type":"uint8"},{"name":"deed","type":"address"},{"name":"registrationDate","type":"uint256"},{"name":"value","type":"uint256"},{"name":"highestBid","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ens","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"}],"name":"transferRegistrars","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"sealedBids","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"},{"name":"newOwner","type":"address"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"}],"name":"finalizeAuction","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"},{"name":"_owner","type":"address"},{"name":"_value","type":"uint256"},{"name":"_salt","type":"bytes32"}],"name":"unsealBid","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"registryCreated","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"sealedBid","type":"bytes32"}],"name":"newBid","outputs":[],"payable":true,"type":"function"},{"constant":false,"inputs":[{"name":"seal","type":"bytes32"}],"name":"cancelBid","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hashes","type":"bytes32[]"}],"name":"startAuctions","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_hash","type":"bytes32"}],"name":"startAuction","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"rootNode","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"inputs":[{"name":"_ens","type":"address"},{"name":"_rootNode","type":"bytes32"}],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":false,"name":"auctionExpiryDate","type":"uint256"}],"name":"AuctionStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":false,"name":"deposit","type":"uint256"}],"name":"NewBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"status","type":"uint8"}],"name":"BidRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":true,"name":"owner","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"now","type":"uint256"}],"name":"HashRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":false,"name":"value","type":"uint256"}],"name":"HashReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"hash","type":"bytes32"},{"indexed":true,"name":"name","type":"string"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"now","type":"uint256"}],"name":"HashInvalidated","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604081815280611996833960a0905251608051600080546c0100000000000000000000000080850204600160a060020a03199091161790556001819055426004555050611944806100526000396000f3606060405236156100c45760e060020a60003504630230a07c81146100c957806315f733311461016b57806322ec1244146101f8578063267b6922146102115780633f15457f146102585780635ddae2831461026f578063615849361461031157806379ce9fac14610337578063983b94fb146103dc578063aefc8c7214610426578063b88eef5314610485578063ce92dced14610493578063df7cec28146104be578063e27fe50f146105bb578063ede8acdb14610629578063faff50a814610694575b610002565b3461000257600480356000818152600260209081526040808320805482518401859052825160e060020a638da5cb5b02815292516106a29786958895610100909404600160a060020a031693638da5cb5b9381840193909182900301818987803b156100025760325a03f1156100025750506040515133600160a060020a03908116911614159050806101615750805460ff16600214155b1561070557610002565b34610002576106a26004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284375094965050505050505060006000600661084784805160009060018381019184010182805b828410156114ca5750825160ff1660808110156114d3576001939093019261153b565b34610002576106a460043560243560443560643561044a565b34610002576002602081905260043560009081526040902080546001820154928201546003909201546106b69360ff831693610100909304600160a060020a031692909185565b34610002576106e9600054600160a060020a031681565b3461000257600480356000818152600260209081526040808320805482518401859052825160e060020a638da5cb5b02815292516106a29786958895610100909404600160a060020a031693638da5cb5b9381840193909182900301818987803b156100025760325a03f1156100025750506040515133600160a060020a03908116911614159050806103075750805460ff16600214155b15610aa157610002565b34610002576106e9600435600360205260009081526040902054600160a060020a031681565b3461000257600480356000818152600260209081526040808320805482518401859052825160e060020a638da5cb5b02815292516106a29760243596958895610100909404600160a060020a031693638da5cb5b9381840193909182900301818987803b156100025760325a03f1156100025750506040515133600160a060020a03908116911614159050806103d25750805460ff16600214155b15610bc957610002565b34610002576106a26004356000818152600260205260408120600181015490919042108061040c57506003820154155b8061041c5750815460ff16600114155b15610c9c57610002565b34610002576106a26004356024356044356064356000600060006000610e8d888888885b60408051948552600160a060020a0393909316606060020a026020850152603484019190915260548301525160749181900391909101902090565b34610002576106a460045481565b6106a2600435600081815260036020526040812054600160a060020a0316819011156112b757610002565b34610002576106a2600435600081815260036020526040902054600160a060020a031680158061054c575062093a80600c0263ffffffff1681600160a060020a03166305b344106000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100025760325a03f1156100025750506040515191909101421090505b806105b15750600081600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100025760325a03f11561000257505060405151600160a060020a03169190911190505b1561136a57610002565b3461000257604080516020600480358082013583810280860185019096528085526106a295929460249490939285019282918501908490808284375094965050505050505060005b815181101561136657611452828281518110156100025790602001906020020151610635565b34610002576106a26004355b6000818152600260205260409020805460ff16600114801561065a5750600181015442105b806106695750805460ff166002145b806106785750805460ff166003145b8061068a5750600454630784ce000142115b1561145a57610002565b34610002576106a460015481565b005b60408051918252519081900360200190f35b60408051958652600160a060020a0390941660208601528484019290925260608401526080830152519081900360a00190f35b60408051600160a060020a039092168252519081900360200190f35b6000858152600260205260409020805460018201549195506101009004600160a060020a031693506301e13380014210806107475750600454630f099c000142115b1561075157610002565b835460ff19168455600080546001546040805160e060020a6306ab59230281526004810192909252602482018990526044820184905251600160a060020a03909216926306ab59239260648084019382900301818387803b156100025760325a03f1156100025750505082600160a060020a031663bbe427716103e86040518260e060020a02815260040180828152602001915050600060405180830381600087803b156100025760325a03f115610002575050506002840154604080519182525186917f292b79b9246fa2c8e77d3fe195b251f9cb839d7d038e667c069ee7708c631e16919081900360200190a25050505050565b111561085257610002565b82604051808280519060200190808383829060006004602084601f0104600302600f01f150905001915050604051809103902091506002600050600083600019168152602001908152602001600020600050905060038160000160006101000a81548160ff021916908360f860020a908102040217905550600060009054906101000a9004600160a060020a0316600160a060020a03166306ab59236001600050548460006040518460e060020a0281526004018084600019168152602001836000191681526020018281526020019350505050600060405180830381600087803b156100025760325a03f11561000257505081546101009004600160a060020a0316159050610a1e578060000160019054906101000a9004600160a060020a0316600160a060020a03166313af4035336040518260e060020a0281526004018082600160a060020a03168152602001915050600060405180830381600087803b156100025760325a03f11561000257505081546040805160e060020a63bbe42771028152606460048201529051610100909204600160a060020a0316925063bbe4277191602480830192600092919082900301818387803b156100025760325a03f115610002575050505b82604051808280519060200190808383829060006004602084601f0104600302600f01f150905001915050604051809103902082600019167f1f9c649fe47e58bb60f4e52f0d90e4c47a526c9f90c5113df842c025970b66ad836002016000505442604051808381526020018281526020019250505060405180910390a3505050565b6000805460015460408051602090810185905281517f02571be300000000000000000000000000000000000000000000000000000000815260048101939093529051600160a060020a03909316936302571be3936024808501949192918390030190829087803b156100025760325a03f1156100025750506040515194505030600160a060020a039081169085161415610b3a57610002565b600085815260026020526040808220805482517ffaab9d39000000000000000000000000000000000000000000000000000000008152600160a060020a03898116600483015293519297506101009091049092169263faab9d39926024808201939182900301818387803b156100025760325a03f115610002575050835460ff19166003178455505050505050565b6000858152600260205260408082208054825160e060020a6313af4035028152600160a060020a0389811660048301529351929750610100909104909216926313af4035926024808201939182900301818387803b156100025760325a03f115610002575050600080546001546040805160e060020a6306ab59230281526004810192909252602482018a9052600160a060020a0389811660448401529051921693506306ab592392606480830193919282900301818387803b156100025760325a03f115610002575050505050505050565b815460ff191660029081178355820154610cca90662386f26fc100005b600081831115611546575081611549565b6002830155600080546001548454604080516020908101869052815160e060020a638da5cb5b0281529151600160a060020a03958616966306ab5923968b9561010090041693638da5cb5b93600480830194919391928390030190829087803b156100025760325a03f11561000257505060408051805160e060020a8702825260048201959095526024810193909352600160a060020a039093166044830152509051606480830192600092919082900301818387803b156100025760325a03f115610002575050825460028401546040805160e160020a637d8b34e5028152600481019290925251610100909204600160a060020a0316935083925063fb1669ca91602480830192600092919082900301818387803b156100025760325a03f1156100025750505080600160a060020a0316638da5cb5b6000604051602001526040518160e060020a028152600401809050602060405180830381600087803b156100025760325a03f115610002575050604080518051600286015482524260208301528251600160a060020a03909116935086927f0f0c27adfd84b60b6f456b0e87cdccb1e5fb9603991588d87fa99f5b6b61e670928290030190a3505050565b600081815260036020526040902054909450600160a060020a03169250821515610eb657610002565b6000848152600360205260408082208054600160a060020a0319169055805160e060020a6313af4035028152600160a060020a038a811660048301529151918616926313af40359260248084019382900301818387803b156100025760325a03f11561000257505050600088815260026020908152604080832060018101548251840185905282517f05b3441000000000000000000000000000000000000000000000000000000000815292519196506201517f190193600160a060020a038816936305b34410936004808201949293918390030190829087803b156100025760325a03f1156100025750506040515191909111905080610fba5750600182015442115b80610fcb5750662386f26fc1000086105b156110525782600160a060020a031663bbe42771600a6040518260e060020a02815260040180828152602001915050600060405180830381600087803b156100025760325a03f11561000257505060408051888152600060208201528151600160a060020a038b1693508b92600080516020611924833981519152928290030190a36112ad565b60038201548611156111915781546101009004600160a060020a0316156110d0575080546040805160e060020a63bbe427710281526103e760048201529051610100909204600160a060020a031691829163bbe4277191602480830192600092919082900301818387803b156100025760325a03f115610002575050505b6003820180546002840155869055815474ffffffffffffffffffffffffffffffffffffffff001916610100606060020a85810204021782556040805160e160020a637d8b34e5028152600481018890529051600160a060020a0385169163fb1669ca91602480830192600092919082900301818387803b156100025760325a03f11561000257505060408051888152600260208201528151600160a060020a038b1693508b92600080516020611924833981519152928290030190a36112ad565b600282015486111561122e57600282018690556040805160e060020a63bbe427710281526103e760048201529051600160a060020a0385169163bbe4277191602480830192600092919082900301818387803b156100025760325a03f11561000257505060408051888152600360208201528151600160a060020a038b1693508b92600080516020611924833981519152928290030190a36112ad565b82600160a060020a031663bbe427716103e76040518260e060020a02815260040180828152602001915050600060405180830381600087803b156100025760325a03f11561000257505060408051888152600460208201528151600160a060020a038b1693508b92600080516020611924833981519152928290030190a35b5050505050505050565b6040516103d480611550833901809050604051809103906000f08015610002576000838152600360209081526040918290208054600160a060020a031916606060020a858102041790558151348152915192935084927fdb578ec7204282ed3ffcec84ef9d2ca9adda7fb0c0b707010bad5cce9f18f41f9281900390910190a2604051600160a060020a038216903480156108fc02916000818181858888f19350505050151561136657610002565b5050565b80600160a060020a03166313af4035336040518260e060020a0281526004018082600160a060020a03168152602001915050600060405180830381600087803b156100025760325a03f1156100025750505080600160a060020a031663bbe4277160056040518260e060020a02815260040180828152602001915050600060405180830381600087803b156100025760325a03f1156100025750505060008281526003602090815260408083208054600160a060020a031916905580518381526005928101929092528051859260008051602061192483398151915292908290030190a35050565b600101610603565b600454611472904262093a8001906212750001610cb9565b6001808301829055825460ff19161782556000600283018190556003830155604080519182525183917f87e97e825a1d1fa0c54e1d36c7506c1dea8b1efd451fe68b000cf96f7cf40003919081900360200190a25050565b50949350505050565b60e08160ff1610156114eb576002939093019261153b565b60f08160ff161015611503576003939093019261153b565b60f88160ff16101561151b576004939093019261153b565b60fc8160ff161015611533576005939093019261153b565b600693909301925b6001909101906101d5565b50805b9291505056006060604052600080546c0100000000000000000000000033810204600160a060020a0319909116179055426001556002805460a060020a60ff02191674010000000000000000000000000000000000000000179055610372806100626000396000f36060604052361561006c5760e060020a600035046305b34410811461006e5780630b5ab3d51461007c57806313af4035146100895780632b20e397146100af5780638da5cb5b146100c6578063bbe42771146100dd578063faab9d3914610103578063fb1669ca14610129575b005b346100025761014a60015481565b346100025761006c610189565b346100025761006c60043560005433600160a060020a039081169116146101f557610002565b34610002576101a0600054600160a060020a031681565b34610002576101a0600254600160a060020a031681565b346100025761006c60043560005433600160a060020a0390811691161461026657610002565b346100025761006c60043560005433600160a060020a039081169116146102d657610002565b61006c60043560005433600160a060020a0390811691161461030b57610002565b60408051918252519081900360200190f35b6040517fbb2ce2f51803bba16bc85282b47deeea9a5c6223eabea1077be696b3f265cf1390600090a16102635b60025460a060020a900460ff16156101bc57610002565b60408051600160a060020a039092168252519081900360200190f35b600254604051600160a060020a039182169130163180156108fc02916000818181858888f19350505050156101f05761deadff5b610002565b6002805473ffffffffffffffffffffffffffffffffffffffff19166c010000000000000000000000008381020417905560408051600160a060020a038316815290517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf36916020908290030190a15b50565b60025460a060020a900460ff16151561027e57610002565b6002805474ff00000000000000000000000000000000000000001916905560405161dead906103e8600160a060020a03301631848203020480156108fc02916000818181858888f19350505050151561015c57610002565b600080546c010000000000000000000000008084020473ffffffffffffffffffffffffffffffffffffffff1990911617905550565b60025460a060020a900460ff16151561032357610002565b8030600160a060020a031631101561033a57610002565b600254604051600160a060020a039182169130163183900380156108fc02916000818181858888f19350505050151561026357610002567b6c4b278d165a6b33958f8ea5dfb00c8c9d4d0acf1985bef5d10786898bc3e7

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

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000112234455c3a32fd11230c42e7bccd4a84e02010
Arg [1] : 93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae


 

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