Latest 2 txns

TxHash Age From To Value [TxFee]
0x030a4291124d14d47e03ac7a8368efd08fe492348e6ab4cc0a56556f46f3b46010 days 10 hrs ago0x292be23fd21492441567ee8bfc642ebb0b68c186  IN   0xbcc4dc8bf1cbefc0d478aa82a403801eb134c1e40 Ether0.00015014921
0xb824e96ada6487d209aa9906aad039fcd115dc914390f84a781029853960a6a010 days 10 hrs ago0x292be23fd21492441567ee8bfc642ebb0b68c186  IN    Contract Creation0 Ether0.000246735652


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

ParentTxHash Block Age From To Value
0x030a4291124d14d47e03ac7a8368efd08fe492348e6ab4cc0a56556f46f3b460385562910 days 10 hrs ago0xbcc4dc8bf1cbefc0d478aa82a403801eb134c1e40x98b6b9d3abb3b1bbf855193ee2968bdb4dce32960 Ether
[ Download CSV Export  ] 
Contract Name: TestRegistrar
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);
}


/**
 * A registrar that allocates subdomains to the first person to claim them, but
 * expires registrations a fixed period after they're initially claimed.
 */
contract TestRegistrar {
    uint constant registrationPeriod = 12 weeks;

    AbstractENS public ens;
    bytes32 public rootNode;
    mapping(bytes32=>uint) public expiryTimes;

    /**
     * Constructor.
     * @param ensAddr The address of the ENS registry.
     * @param node The node that this registrar administers.
     */
    function TestRegistrar(AbstractENS ensAddr, bytes32 node) {
        ens = ensAddr;
        rootNode = node;
    }

    /**
     * Register a name that's not currently registered
     * @param subnode The hash of the label to register.
     * @param owner The address of the new owner.
     */
    function register(bytes32 subnode, address owner) public {
        if(expiryTimes[subnode] >= now)
            revert();

        expiryTimes[subnode] = now + registrationPeriod;
        ens.setSubnodeOwner(rootNode, subnode, owner);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"ens","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"expiryTimes","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"subnode","type":"bytes32"},{"name":"owner","type":"address"}],"name":"register","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"rootNode","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"inputs":[{"name":"ensAddr","type":"address"},{"name":"node","type":"bytes32"}],"payable":false,"type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000c57fe5b6040516040806102848339810160405280516020909101515b60008054600160a060020a031916600160a060020a03841617905560018190555b50505b61022c806100586000396000f300606060405263ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633f15457f811461005b578063af9f26e414610094578063d22057a9146100b9578063faff50a8146100e7575bfe5b341561006357fe5b61006b610109565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b341561009c57fe5b6100a7600435610125565b60408051918252519081900360200190f35b34156100c157fe5b6100e560043573ffffffffffffffffffffffffffffffffffffffff60243516610137565b005b34156100ef57fe5b6100a76101fa565b60408051918252519081900360200190f35b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60026020526000908152604090205481565b6000828152600260205260409020544290106101535760006000fd5b60008281526002602052604080822042626ebe00019055815460015482517f06ab592300000000000000000000000000000000000000000000000000000000815260048101919091526024810186905273ffffffffffffffffffffffffffffffffffffffff8581166044830152925192909116926306ab59239260648084019382900301818387803b15156101e457fe5b6102c65a03f115156101f257fe5b5050505b5050565b600154815600a165627a7a7230582040a13426faa6b1cc165ded3235961b8fcf08fabc6a90a90d483e542a6869e403002900000000000000000000000098b6b9d3abb3b1bbf855193ee2968bdb4dce329604f740db81dc36c853ab4205bddd785f46e79ccedca351fc6dfcbd8cc9a33dd6

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

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000098b6b9d3abb3b1bbf855193ee2968bdb4dce3296
Arg [1] : 04f740db81dc36c853ab4205bddd785f46e79ccedca351fc6dfcbd8cc9a33dd6


   Swarm Source:
bzzr://40a13426faa6b1cc165ded3235961b8fcf08fabc6a90a90d483e542a6869e403

 

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