Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x3f669AeFF1607F8a0233CB2dE7508F5a9A114685
Balance 0 ETH
Nonce 1
Code Size 8213 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

8213 bytes
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638f32d59b1161010f578063c87b56dd116100a2578063e985e9c511610071578063e985e9c514610711578063f2fde38b1461073f578063f6a74ed714610765578063fca247ac1461078b576101f0565b8063c87b56dd146106a9578063d6e4fa86146106c6578063da8c229e146106e3578063ddf7fcb014610709576101f0565b8063a7fc7a07116100de578063a7fc7a0714610592578063b88d4fde146105b8578063c1a287e21461067e578063c475abff14610686576101f0565b80638f32d59b1461053757806395d89b411461053f57806396e494e814610547578063a22cb46514610564576101f0565b806342842e0e1161018757806370a082311161015657806370a082311461045b578063715018a6146104815780637ec4a659146104895780638da5cb5b1461052f576101f0565b806342842e0e146103da5780634e543b261461041057806362b99ad4146104365780636352211e1461043e576101f0565b80630e297b45116101c35780630e297b451461032c57806323b872dd1461037057806328ed4f6c146103a65780633f15457f146103d2576101f0565b806301ffc9a7146101f557806306fdde0314610248578063081812fc146102c5578063095ea7b3146102fe575b600080fd5b6102346004803603602081101561020b57600080fd5b50357fffffffff00000000000000000000000000000000000000000000000000000000166107bd565b604080519115158252519081900360200190f35b610250610a41565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028a578181015183820152602001610272565b50505050905090810190601f1680156102b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102e2600480360360208110156102db57600080fd5b5035610acf565b604080516001600160a01b039092168252519081900360200190f35b61032a6004803603604081101561031457600080fd5b506001600160a01b038135169060200135610aff565b005b61035e6004803603606081101561034257600080fd5b508035906001600160a01b036020820135169060400135610bc4565b60408051918252519081900360200190f35b61032a6004803603606081101561038657600080fd5b506001600160a01b03813581169160208101359091169060400135610bdb565b61032a600480360360408110156103bc57600080fd5b50803590602001356001600160a01b0316610bfe565b6102e2610d60565b61032a600480360360608110156103f057600080fd5b506001600160a01b03813581169160208101359091169060400135610d6f565b61032a6004803603602081101561042657600080fd5b50356001600160a01b0316610d8a565b610250610e27565b6102e26004803603602081101561045457600080fd5b5035610e82565b61035e6004803603602081101561047157600080fd5b50356001600160a01b0316610ea5565b61032a610ed6565b61032a6004803603602081101561049f57600080fd5b8101906020810181356401000000008111156104ba57600080fd5b8201836020820111156104cc57600080fd5b803590602001918460018302840111640100000000831117156104ee57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f49945050505050565b6102e2610f71565b610234610f81565b610250610f92565b6102346004803603602081101561055d57600080fd5b5035610fed565b61032a6004803603604081101561057a57600080fd5b506001600160a01b0381351690602001351515611008565b61032a600480360360208110156105a857600080fd5b50356001600160a01b03166110aa565b61032a600480360360808110156105ce57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561060957600080fd5b82018360208201111561061b57600080fd5b8035906020019184600183028401116401000000008311171561063d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611125945050505050565b61035e611145565b61035e6004803603604081101561069c57600080fd5b508035906020013561114c565b610250600480360360208110156106bf57600080fd5b50356112ba565b61035e600480360360208110156106dc57600080fd5b5035611405565b610234600480360360208110156106f957600080fd5b50356001600160a01b0316611417565b61035e61142c565b6102346004803603604081101561072757600080fd5b506001600160a01b0381358116916020013516611432565b61032a6004803603602081101561075557600080fd5b50356001600160a01b0316611460565b61032a6004803603602081101561077b57600080fd5b50356001600160a01b031661147d565b61035e600480360360608110156107a157600080fd5b508035906001600160a01b0360208201351690604001356114f5565b604080517f737570706f727473496e74657266616365286279746573342900000000000000815290519081900360190190206000907fffffffff00000000000000000000000000000000000000000000000000000000838116911614806109d95750604080517f746f6b656e5552492875696e7432353629000000000000000000000000000000815290519081900360110181209080602f611f91823960405190819003602f0181209150806029611f6882396040519081900360290181209150806025611f4382396040519081900360250181209150806021611fc08239604080519182900360210182207f736574417070726f76616c466f72416c6c28616464726573732c626f6f6c29008352815192839003601f0183207f676574417070726f7665642875696e7432353629000000000000000000000000845282519384900360140184207f617070726f766528616464726573732c75696e74323536290000000000000000855283519485900360180185207f6f776e65724f662875696e743235362900000000000000000000000000000000865284519586900360100186207f62616c616e63654f66286164647265737329000000000000000000000000000087529451958690036012019095207fffffffff000000000000000000000000000000000000000000000000000000008d81169190951890951818181893909318939093189390931893909318929092169190911490505b80610a395750604080517f7265636c61696d2875696e743235362c61646472657373290000000000000000815290519081900360180190207fffffffff000000000000000000000000000000000000000000000000000000008381169116145b90505b919050565b6005805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ac75780601f10610a9c57610100808354040283529160200191610ac7565b820191906000526020600020905b815481529060010190602001808311610aaa57829003601f168201915b505050505081565b6000610ada82611504565b610ae357600080fd5b506000908152600960205260409020546001600160a01b031690565b6000610b0a82610e82565b9050806001600160a01b0316836001600160a01b03161415610b2b57600080fd5b336001600160a01b0382161480610b475750610b478133611432565b610b5057600080fd5b60008281526009602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000610bd38484846000611521565b949350505050565b610be5338261173f565b610bee57600080fd5b610bf9838383611796565b505050565b600254600354604080517f02571be300000000000000000000000000000000000000000000000000000000815260048101929092525130926001600160a01b0316916302571be3916024808301926020929190829003018186803b158015610c6557600080fd5b505afa158015610c79573d6000803e3d6000fd5b505050506040513d6020811015610c8f57600080fd5b50516001600160a01b031614610ca457600080fd5b610cae338361173f565b610cb757600080fd5b600254600354604080517f06ab59230000000000000000000000000000000000000000000000000000000081526004810192909252602482018590526001600160a01b03848116604484015290519216916306ab5923916064808201926020929091908290030181600087803b158015610d3057600080fd5b505af1158015610d44573d6000803e3d6000fd5b505050506040513d6020811015610d5a57600080fd5b50505050565b6002546001600160a01b031681565b610bf983838360405180602001604052806000815250611125565b610d92610f81565b610d9b57600080fd5b600254600354604080517f1896f70a00000000000000000000000000000000000000000000000000000000815260048101929092526001600160a01b0384811660248401529051921691631896f70a9160448082019260009290919082900301818387803b158015610e0c57600080fd5b505af1158015610e20573d6000803e3d6000fd5b5050505050565b6007805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ac75780601f10610a9c57610100808354040283529160200191610ac7565b6000818152600c60205260408120544210610e9c57600080fd5b610a39826118bb565b60006001600160a01b038216610eba57600080fd5b506001600160a01b03166000908152600a602052604090205490565b610ede610f81565b610ee757600080fd5b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b610f51610f81565b610f5a57600080fd5b8051610f6d906007906020840190611eaa565b5050565b6001546001600160a01b03165b90565b6001546001600160a01b0316331490565b6006805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610ac75780601f10610a9c57610100808354040283529160200191610ac7565b6000908152600c6020526040902054426276a7009091011090565b6001600160a01b03821633141561101e57600080fd5b336000818152600b602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b6110b2610f81565b6110bb57600080fd5b6001600160a01b03811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055517f0a8bb31534c0ed46f380cb867bd5c803a189ced9a764e30b3a4991a9901d74749190a250565b611130848484610bdb565b61113c848484846118dd565b610d5a57600080fd5b6276a70081565b600254600354604080517f02571be300000000000000000000000000000000000000000000000000000000815260048101929092525160009230926001600160a01b03909116916302571be391602480820192602092909190829003018186803b1580156111b957600080fd5b505afa1580156111cd573d6000803e3d6000fd5b505050506040513d60208110156111e357600080fd5b50516001600160a01b0316146111f857600080fd5b3360009081526004602052604090205460ff1661121457600080fd5b6000838152600c6020526040902054426276a700909101101561123657600080fd5b6000838152600c60205260409020546276a700838101918401011161125a57600080fd5b6000838152600c602090815260409182902080548501908190558251908152915185927f9b87a00e30f1ac65d898f070f8a3488fe60517182d0a2098e1b4b93a54aa9bd692908290030190a250506000908152600c602052604090205490565b6000818152600860205260409020546060906001600160a01b03166112de57600080fd5b60606112e8611a5a565b9050600081511161130857604051806020016040528060008152506113fe565b8061131284611af0565b6040516020018083805190602001908083835b6020831061136257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611325565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106113c857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161138b565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040525b9392505050565b6000908152600c602052604090205490565b60046020526000908152604090205460ff1681565b60035481565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b611468610f81565b61147157600080fd5b61147a81611bef565b50565b611485610f81565b61148e57600080fd5b6001600160a01b03811660008181526004602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055517f33d83959be2573f5453b12eb9d43b3499bc57d96bd2f067ba44803c859e811139190a250565b6000610bd38484846001611521565b6000908152600860205260409020546001600160a01b0316151590565b600254600354604080517f02571be300000000000000000000000000000000000000000000000000000000815260048101929092525160009230926001600160a01b03909116916302571be391602480820192602092909190829003018186803b15801561158e57600080fd5b505afa1580156115a2573d6000803e3d6000fd5b505050506040513d60208110156115b857600080fd5b50516001600160a01b0316146115cd57600080fd5b3360009081526004602052604090205460ff166115e957600080fd5b6115f285610fed565b6115fb57600080fd5b6276a70042016276a700844201011161161357600080fd5b6000858152600c60205260409020428401905561162f85611504565b1561163d5761163d85611c76565b6116478486611c88565b81156116f357600254600354604080517f06ab59230000000000000000000000000000000000000000000000000000000081526004810192909252602482018890526001600160a01b03878116604484015290519216916306ab5923916064808201926020929091908290030181600087803b1580156116c657600080fd5b505af11580156116da573d6000803e3d6000fd5b505050506040513d60208110156116f057600080fd5b50505b60408051428501815290516001600160a01b0386169187917fb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d99181900360200190a35050420192915050565b60008061174b83610e82565b9050806001600160a01b0316846001600160a01b031614806117865750836001600160a01b031661177b84610acf565b6001600160a01b0316145b80610bd35750610bd38185611432565b826001600160a01b03166117a982610e82565b6001600160a01b0316146117bc57600080fd5b6001600160a01b0382166117cf57600080fd5b6117d881611d53565b6001600160a01b0383166000908152600a602052604090205461180290600163ffffffff611da616565b6001600160a01b038085166000908152600a6020526040808220939093559084168152205461183890600163ffffffff611dbb16565b6001600160a01b038084166000818152600a60209081526040808320959095558582526008905283812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016831790559251849391928716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000818152600860205260408120546001600160a01b031680610a3957600080fd5b60006118f1846001600160a01b0316611dcd565b6118fd57506001610bd3565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815233600482018181526001600160a01b03888116602485015260448401879052608060648501908152865160848601528651600095928a169463150b7a029490938c938b938b939260a4019060208501908083838e5b83811015611990578181015183820152602001611978565b50505050905090810190601f1680156119bd5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b1580156119df57600080fd5b505af11580156119f3573d6000803e3d6000fd5b505050506040513d6020811015611a0957600080fd5b50517fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014915050949350505050565b60078054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015611ae65780601f10611abb57610100808354040283529160200191611ae6565b820191906000526020600020905b815481529060010190602001808311611ac957829003601f168201915b5050505050905090565b606081611b31575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610a3c565b8160005b8115611b4957600101600a82049150611b35565b6060816040519080825280601f01601f191660200182016040528015611b76576020820181803883390190505b509050815b8515611be657600019016000600a8704600a028703603001905060008160f81b905080848481518110611baa57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a880497505050611b7b565b50949350505050565b6001600160a01b038116611c0257600080fd5b6001546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b61147a611c8282610e82565b82611dd3565b6001600160a01b038216611c9b57600080fd5b611ca481611504565b15611cae57600080fd5b600081815260086020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387169081179091558352600a909152902054611d08906001611dbb565b6001600160a01b0383166000818152600a60205260408082209390935591518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000818152600960205260409020546001600160a01b03161561147a57600090815260096020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b600082821115611db557600080fd5b50900390565b6000828201838110156113fe57600080fd5b3b151590565b816001600160a01b0316611de682610e82565b6001600160a01b031614611df957600080fd5b611e0281611d53565b6001600160a01b0382166000908152600a6020526040902054611e2c90600163ffffffff611da616565b6001600160a01b0383166000818152600a60209081526040808320949094558482526008905282812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559151839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611eeb57805160ff1916838001178555611f18565b82800160010185558215611f18579182015b82811115611f18578251825591602001919060010190611efd565b50611f24929150611f28565b5090565b610f7e91905b80821115611f245760008155600101611f2e56fe7472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e7432353629736166655472616e7366657246726f6d28616464726573732c616464726573732c75696e743235362c6279746573296973417070726f766564466f72416c6c28616464726573732c6164647265737329a265627a7a72315820a6fa09e4b6a197f845ac78fd058439b5982516fb99746210b626697597f685f064736f6c63430005100032

Verified Source Code Partial Match

Compiler: v0.5.16+commit.9c3226ce EVM: istanbul Optimization: Yes (10000 runs)
BaseRegistrarImplementation.sol 881 lines
// File: @ensdomains/ens/contracts/ENS.sol

pragma solidity >=0.4.24;

interface 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);

    // Logged when an operator is added or removed.
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    function setRecord(bytes32 node, address owner, address resolver, uint64 ttl) external;
    function setSubnodeRecord(bytes32 node, bytes32 label, address owner, address resolver, uint64 ttl) external;
    function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external returns(bytes32);
    function setResolver(bytes32 node, address resolver) external;
    function setOwner(bytes32 node, address owner) external;
    function setTTL(bytes32 node, uint64 ttl) external;
    function setApprovalForAll(address operator, bool approved) external;
    function owner(bytes32 node) external view returns (address);
    function resolver(bytes32 node) external view returns (address);
    function ttl(bytes32 node) external view returns (uint64);
    function recordExists(bytes32 node) external view returns (bool);
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

// File: openzeppelin-solidity/contracts/introspection/IERC165.sol

pragma solidity ^0.5.0;

/**
 * @title IERC165
 * @dev https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
 */
interface IERC165 {
    /**
     * @notice Query if a contract implements an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @dev Interface identification is specified in ERC-165. This function
     * uses less than 30,000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: openzeppelin-solidity/contracts/token/ERC721/IERC721.sol

pragma solidity ^0.5.0;


/**
 * @title ERC721 Non-Fungible Token Standard basic interface
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract IERC721 is IERC165 {
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    function balanceOf(address owner) public view returns (uint256 balance);
    function ownerOf(uint256 tokenId) public view returns (address owner);

    function approve(address to, uint256 tokenId) public;
    function getApproved(uint256 tokenId) public view returns (address operator);

    function setApprovalForAll(address operator, bool _approved) public;
    function isApprovedForAll(address owner, address operator) public view returns (bool);

    function transferFrom(address from, address to, uint256 tokenId) public;
    function safeTransferFrom(address from, address to, uint256 tokenId) public;

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
}

// File: openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol

pragma solidity ^0.5.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
contract IERC721Receiver {
    /**
     * @notice Handle the receipt of an NFT
     * @dev The ERC721 smart contract calls this function on the recipient
     * after a `safeTransfer`. This function MUST return the function selector,
     * otherwise the caller will revert the transaction. The selector to be
     * returned can be obtained as `this.onERC721Received.selector`. This
     * function MAY throw to revert and reject the transfer.
     * Note: the ERC721 contract address is always the message sender.
     * @param operator The address which called `safeTransferFrom` function
     * @param from The address which previously owned the token
     * @param tokenId The NFT identifier which is being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)
    public returns (bytes4);
}

// File: openzeppelin-solidity/contracts/math/SafeMath.sol

pragma solidity ^0.5.0;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {
    /**
    * @dev Multiplies two unsigned integers, reverts on overflow.
    */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
    * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
    */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
    * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
    */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
    * @dev Adds two unsigned integers, reverts on overflow.
    */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
    * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
    * reverts when dividing by zero.
    */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

// File: openzeppelin-solidity/contracts/utils/Address.sol

pragma solidity ^0.5.0;

/**
 * Utility library of inline functions on addresses
 */
library Address {
    /**
     * Returns whether the target address is a contract
     * @dev This function will return false if invoked during the constructor of a contract,
     * as the code is not actually created until after the constructor finishes.
     * @param account address of the account to check
     * @return whether the target address is a contract
     */
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        // XXX Currently there is no better way to check if there is a contract in an address
        // than to check the size of the code at that address.
        // See https://ethereum.stackexchange.com/a/14016/36603
        // for more details about how this works.
        // TODO Check this again before the Serenity release, because all addresses will be
        // contracts then.
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }
}

// File: openzeppelin-solidity/contracts/introspection/ERC165.sol

pragma solidity ^0.5.0;


/**
 * @title ERC165
 * @author Matt Condon (@shrugs)
 * @dev Implements ERC165 using a lookup table.
 */
contract ERC165 is IERC165 {
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
    /**
     * 0x01ffc9a7 ===
     *     bytes4(keccak256('supportsInterface(bytes4)'))
     */

    /**
     * @dev a mapping of interface id to whether or not it's supported
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    /**
     * @dev A contract implementing SupportsInterfaceWithLookup
     * implement ERC165 itself
     */
    constructor () internal {
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev implement supportsInterface(bytes4) using a lookup table
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev internal method for registering an interface
     */
    function _registerInterface(bytes4 interfaceId) internal {
        require(interfaceId != 0xffffffff);
        _supportedInterfaces[interfaceId] = true;
    }
}

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
contract IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// File: openzeppelin-solidity/contracts/token/ERC721/ERC721.sol

pragma solidity ^0.5.0;






/**
 * @title ERC721 Non-Fungible Token Standard basic implementation
 * @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
 */
contract ERC721 is ERC165, IERC721Metadata {
    using SafeMath for uint256;
    using Address for address;

    // Token name
    string public name;
    // Token symbol
    string public symbol;

    string public uriPrefix = "";
    // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
    bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;

    // Mapping from token ID to owner
    mapping (uint256 => address) private _tokenOwner;

    // Mapping from token ID to approved address
    mapping (uint256 => address) private _tokenApprovals;

    // Mapping from owner to number of owned token
    mapping (address => uint256) private _ownedTokensCount;

    // Mapping from owner to operator approvals
    mapping (address => mapping (address => bool)) private _operatorApprovals;

    bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
    /*
     * 0x80ac58cd ===
     *     bytes4(keccak256('balanceOf(address)')) ^
     *     bytes4(keccak256('ownerOf(uint256)')) ^
     *     bytes4(keccak256('approve(address,uint256)')) ^
     *     bytes4(keccak256('getApproved(uint256)')) ^
     *     bytes4(keccak256('setApprovalForAll(address,bool)')) ^
     *     bytes4(keccak256('isApprovedForAll(address,address)')) ^
     *     bytes4(keccak256('transferFrom(address,address,uint256)')) ^
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^
     *     bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)'))
     */

    constructor () public {
        // register the supported interfaces to conform to ERC721 via ERC165
        _registerInterface(_INTERFACE_ID_ERC721);
        name ="SEER: Web3 Identity";
        symbol ="SDID";
    }

    /**
     * @dev Gets the balance of the specified address
     * @param owner address to query the balance of
     * @return uint256 representing the amount owned by the passed address
     */
    function balanceOf(address owner) public view returns (uint256) {
        require(owner != address(0));
        return _ownedTokensCount[owner];
    }

    /**
     * @dev Gets the owner of the specified token ID
     * @param tokenId uint256 ID of the token to query the owner of
     * @return owner address currently marked as the owner of the given token ID
     */
    function ownerOf(uint256 tokenId) public view returns (address) {
        address owner = _tokenOwner[tokenId];
        require(owner != address(0));
        return owner;
    }

    function _baseURI() internal view returns (string memory) {
        return uriPrefix;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view  returns (string memory) {
        require(_tokenOwner[tokenId] != address(0));
        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, uint2str(tokenId))) : "";
    }

    function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len;
        while (_i != 0) {
            k = k-1;
            uint8 temp = (48 + uint8(_i - _i / 10 * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }

    /**
     * @dev Approves another address to transfer the given token ID
     * The zero address indicates there is no approved address.
     * There can only be one approved address per token at a given time.
     * Can only be called by the token owner or an approved operator.
     * @param to address to be approved for the given token ID
     * @param tokenId uint256 ID of the token to be approved
     */
    function approve(address to, uint256 tokenId) public {
        address owner = ownerOf(tokenId);
        require(to != owner);
        require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Gets the approved address for a token ID, or zero if no address set
     * Reverts if the token ID does not exist.
     * @param tokenId uint256 ID of the token to query the approval of
     * @return address currently approved for the given token ID
     */
    function getApproved(uint256 tokenId) public view returns (address) {
        require(_exists(tokenId));
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Sets or unsets the approval of a given operator
     * An operator is allowed to transfer all tokens of the sender on their behalf
     * @param to operator address to set the approval
     * @param approved representing the status of the approval to be set
     */
    function setApprovalForAll(address to, bool approved) public {
        require(to != msg.sender);
        _operatorApprovals[msg.sender][to] = approved;
        emit ApprovalForAll(msg.sender, to, approved);
    }

    /**
     * @dev Tells whether an operator is approved by a given owner
     * @param owner owner address which you want to query the approval of
     * @param operator operator address which you want to query the approval of
     * @return bool whether the given operator is approved by the given owner
     */
    function isApprovedForAll(address owner, address operator) public view returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev Transfers the ownership of a given token ID to another address
     * Usage of this method is discouraged, use `safeTransferFrom` whenever possible
     * Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
    */
    function transferFrom(address from, address to, uint256 tokenId) public {
        require(_isApprovedOrOwner(msg.sender, tokenId));

        _transferFrom(from, to, tokenId);
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     *
     * Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
    */
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev Safely transfers the ownership of a given token ID to another address
     * If the target address is a contract, it must implement `onERC721Received`,
     * which is called upon a safe transfer, and return the magic value
     * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
     * the transfer is reverted.
     * Requires the msg sender to be the owner, approved, or operator
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes data to send along with a safe transfer check
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {
        transferFrom(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data));
    }

    /**
     * @dev Returns whether the specified token exists
     * @param tokenId uint256 ID of the token to query the existence of
     * @return whether the token exists
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        address owner = _tokenOwner[tokenId];
        return owner != address(0);
    }

    /**
     * @dev Returns whether the given spender can transfer a given token ID
     * @param spender address of the spender to query
     * @param tokenId uint256 ID of the token to be transferred
     * @return bool whether the msg.sender is approved for the given token ID,
     *    is an operator of the owner, or is the owner of the token
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {
        address owner = ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Internal function to mint a new token
     * Reverts if the given token ID already exists
     * @param to The address that will own the minted token
     * @param tokenId uint256 ID of the token to be minted
     */
    function _mint(address to, uint256 tokenId) internal {
        require(to != address(0));
        require(!_exists(tokenId));

        _tokenOwner[tokenId] = to;
        _ownedTokensCount[to] = _ownedTokensCount[to].add(1);

        emit Transfer(address(0), to, tokenId);
    }

    /**
     * @dev Internal function to burn a specific token
     * Reverts if the token does not exist
     * Deprecated, use _burn(uint256) instead.
     * @param owner owner of the token to burn
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(address owner, uint256 tokenId) internal {
        require(ownerOf(tokenId) == owner);

        _clearApproval(tokenId);

        _ownedTokensCount[owner] = _ownedTokensCount[owner].sub(1);
        _tokenOwner[tokenId] = address(0);

        emit Transfer(owner, address(0), tokenId);
    }

    /**
     * @dev Internal function to burn a specific token
     * Reverts if the token does not exist
     * @param tokenId uint256 ID of the token being burned
     */
    function _burn(uint256 tokenId) internal {
        _burn(ownerOf(tokenId), tokenId);
    }

    /**
     * @dev Internal function to transfer ownership of a given token ID to another address.
     * As opposed to transferFrom, this imposes no restrictions on msg.sender.
     * @param from current owner of the token
     * @param to address to receive the ownership of the given token ID
     * @param tokenId uint256 ID of the token to be transferred
    */
    function _transferFrom(address from, address to, uint256 tokenId) internal {
        require(ownerOf(tokenId) == from);
        require(to != address(0));

        _clearApproval(tokenId);

        _ownedTokensCount[from] = _ownedTokensCount[from].sub(1);
        _ownedTokensCount[to] = _ownedTokensCount[to].add(1);

        _tokenOwner[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Internal function to invoke `onERC721Received` on a target address
     * The call is not executed if the target address is not a contract
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)
        internal returns (bool)
    {
        if (!to.isContract()) {
            return true;
        }

        bytes4 retval = IERC721Receiver(to).onERC721Received(msg.sender, from, tokenId, _data);
        return (retval == _ERC721_RECEIVED);
    }

    /**
     * @dev Private function to clear current approval of a given token ID
     * @param tokenId uint256 ID of the token to be transferred
     */
    function _clearApproval(uint256 tokenId) private {
        if (_tokenApprovals[tokenId] != address(0)) {
            _tokenApprovals[tokenId] = address(0);
        }
    }
}

// File: openzeppelin-solidity/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev The Ownable constructor sets the original `owner` of the contract to the sender
     * account.
     */
    constructor () internal {
        _owner = msg.sender;
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @return the address of the owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner());
        _;
    }

    /**
     * @return true if `msg.sender` is the owner of the contract.
     */
    function isOwner() public view returns (bool) {
        return msg.sender == _owner;
    }

    /**
     * @dev Allows the current owner to relinquish control of the contract.
     * @notice Renouncing to ownership will leave the contract without an owner.
     * It will not be possible to call the functions with the `onlyOwner`
     * modifier anymore.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Allows the current owner to transfer control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers control of the contract to a newOwner.
     * @param newOwner The address to transfer ownership to.
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0));
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @ensdomains/ethregistrar/contracts/BaseRegistrar.sol

pragma solidity >=0.4.24;




contract BaseRegistrar is IERC721, Ownable {
    uint constant public GRACE_PERIOD = 90 days;

    event ControllerAdded(address indexed controller);
    event ControllerRemoved(address indexed controller);
    event NameMigrated(uint256 indexed id, address indexed owner, uint expires);
    event NameRegistered(uint256 indexed id, address indexed owner, uint expires);
    event NameRenewed(uint256 indexed id, uint expires);

    // The ENS registry
    ENS public ens;

    // The namehash of the TLD this registrar owns (eg, .eth)
    bytes32 public baseNode;

    // A map of addresses that are authorised to register and renew names.
    mapping(address=>bool) public controllers;

    // Authorises a controller, who can register and renew domains.
    function addController(address controller) external;

    // Revoke controller permission for an address.
    function removeController(address controller) external;

    // Set the resolver for the TLD this registrar manages.
    function setResolver(address resolver) external;

    // Returns the expiration timestamp of the specified label hash.
    function nameExpires(uint256 id) external view returns(uint);

    // Returns true iff the specified name is available for registration.
    function available(uint256 id) public view returns(bool);

    /**
     * @dev Register a name.
     */
    function register(uint256 id, address owner, uint duration) external returns(uint);

    function renew(uint256 id, uint duration) external returns(uint);

    /**
     * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.
     */
    function reclaim(uint256 id, address owner) external;
}




// File: @ensdomains/ethregistrar/contracts/BaseRegistrarImplementation.sol

pragma solidity ^0.5.0;




contract BaseRegistrarImplementation is BaseRegistrar, ERC721 {
    // A map of expiry times
    mapping(uint256=>uint) expiries;

    bytes4 constant private INTERFACE_META_ID = bytes4(keccak256("supportsInterface(bytes4)"));
    bytes4 constant private ERC721_ID = bytes4(
        keccak256("balanceOf(address)") ^
        keccak256("ownerOf(uint256)") ^
        keccak256("approve(address,uint256)") ^
        keccak256("getApproved(uint256)") ^
        keccak256("setApprovalForAll(address,bool)") ^
        keccak256("isApprovedForAll(address,address)") ^
        keccak256("transferFrom(address,address,uint256)") ^
        keccak256("safeTransferFrom(address,address,uint256)") ^
        keccak256("safeTransferFrom(address,address,uint256,bytes)") ^
        keccak256("tokenURI(uint256)")
    );
    bytes4 constant private RECLAIM_ID = bytes4(keccak256("reclaim(uint256,address)"));

    constructor(ENS _ens, bytes32 _baseNode) public {
        ens = _ens;
        baseNode = _baseNode;
    }

    modifier live {
        require(ens.owner(baseNode) == address(this));
        _;
    }

    modifier onlyController {
        require(controllers[msg.sender]);
        _;
    }

    /**
     * @dev Gets the owner of the specified token ID. Names become unowned
     *      when their registration expires.
     * @param tokenId uint256 ID of the token to query the owner of
     * @return address currently marked as the owner of the given token ID
     */
    function ownerOf(uint256 tokenId) public view returns (address) {
        require(expiries[tokenId] > now);
        return super.ownerOf(tokenId);
    }

    // Authorises a controller, who can register and renew domains.
    function addController(address controller) external onlyOwner {
        controllers[controller] = true;
        emit ControllerAdded(controller);
    }

    // Revoke controller permission for an address.
    function removeController(address controller) external onlyOwner {
        controllers[controller] = false;
        emit ControllerRemoved(controller);
    }

    // Set the resolver for the TLD this registrar manages.
    function setResolver(address resolver) external onlyOwner {
        ens.setResolver(baseNode, resolver);
    }

    // Returns the expiration timestamp of the specified id.
    function nameExpires(uint256 id) external view returns(uint) {
        return expiries[id];
    }

    // Returns true iff the specified name is available for registration.
    function available(uint256 id) public view returns(bool) {
        // Not available if it's registered here or in its grace period.
        return expiries[id] + GRACE_PERIOD < now;
    }

    /**
     * @dev Register a name.
     * @param id The token ID (keccak256 of the label).
     * @param owner The address that should own the registration.
     * @param duration Duration in seconds for the registration.
     */
    function register(uint256 id, address owner, uint duration) external returns(uint) {
      return _register(id, owner, duration, true);
    }

    /**
     * @dev Register a name, without modifying the registry.
     * @param id The token ID (keccak256 of the label).
     * @param owner The address that should own the registration.
     * @param duration Duration in seconds for the registration.
     */
    function registerOnly(uint256 id, address owner, uint duration) external returns(uint) {
      return _register(id, owner, duration, false);
    }

    function _register(uint256 id, address owner, uint duration, bool updateRegistry) internal live onlyController returns(uint) {
        require(available(id));
        require(now + duration + GRACE_PERIOD > now + GRACE_PERIOD); // Prevent future overflow

        expiries[id] = now + duration;
        if(_exists(id)) {
            // Name was previously owned, and expired
            _burn(id);
        }
        _mint(owner, id);
        if(updateRegistry) {
            ens.setSubnodeOwner(baseNode, bytes32(id), owner);
        }

        emit NameRegistered(id, owner, now + duration);

        return now + duration;
    }

    function renew(uint256 id, uint duration) external live onlyController returns(uint) {
        require(expiries[id] + GRACE_PERIOD >= now); // Name must be registered here or in grace period
        require(expiries[id] + duration + GRACE_PERIOD > duration + GRACE_PERIOD); // Prevent future overflow

        expiries[id] += duration;
        emit NameRenewed(id, expiries[id]);
        return expiries[id];
    }

    /**
     * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.
     */
    function reclaim(uint256 id, address owner) external live {
        require(_isApprovedOrOwner(msg.sender, id));
        ens.setSubnodeOwner(baseNode, bytes32(id), owner);
    }

    function setUriPrefix(string memory _uriPrefix) public onlyOwner {
        uriPrefix = _uriPrefix;
    }

    function supportsInterface(bytes4 interfaceID) external view returns (bool) {
        return interfaceID == INTERFACE_META_ID ||
               interfaceID == ERC721_ID ||
               interfaceID == RECLAIM_ID;
    }
}

Read Contract

GRACE_PERIOD 0xc1a287e2 → uint256
available 0x96e494e8 → bool
balanceOf 0x70a08231 → uint256
baseNode 0xddf7fcb0 → bytes32
controllers 0xda8c229e → bool
ens 0x3f15457f → address
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isOwner 0x8f32d59b → bool
name 0x06fdde03 → string
nameExpires 0xd6e4fa86 → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
uriPrefix 0x62b99ad4 → string

Write Contract 15 functions

These functions modify contract state and require a wallet transaction to execute.

addController 0xa7fc7a07
address controller
approve 0x095ea7b3
address to
uint256 tokenId
reclaim 0x28ed4f6c
uint256 id
address owner
register 0xfca247ac
uint256 id
address owner
uint256 duration
returns: uint256
registerOnly 0x0e297b45
uint256 id
address owner
uint256 duration
returns: uint256
removeController 0xf6a74ed7
address controller
renew 0xc475abff
uint256 id
uint256 duration
returns: uint256
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address to
bool approved
setResolver 0x4e543b26
address resolver
setUriPrefix 0x7ec4a659
string _uriPrefix
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address