ETH Price: $3,585.44 (+0.08%)
Gas: 25 Gwei

Contract

0x7d311cCb3b4F5006A1215418BfC45961fC5609e4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x0bf4e3c495435984a78e6e0767ab919e1e6e50d268889ea6be5787d37fe1454bRegister With Co...(pending)2024-03-24 1:49:154 days ago1711244955IN
0x7d311cCb...1fC5609e4
0 ETH(Pending)(Pending)
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969712024-03-23 11:22:234 days ago1711192943IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
Renew194969662024-03-23 11:21:234 days ago1711192883IN
0x7d311cCb...1fC5609e4
0 ETH0.0016615620
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
RegistrarController

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
File 1 of 33 : RegistrarController.sol
pragma solidity >=0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

import "./NameState.sol";
import "./StringUtils.sol";
import "./PriceOracle.sol";
import "./INameValidator.sol";
import "./BaseRegistrarImplementation.sol";
import "../resolvers/Resolver.sol";

/**
 * @dev A registrar controller for registering and renewing names at fixed cost.
 */
contract RegistrarController is Ownable {
    using StringUtils for *;

    uint256 public constant MIN_REGISTRATION_DURATION = 365 days;

    bytes4 private constant INTERFACE_META_ID =
        bytes4(keccak256("supportsInterface(bytes4)"));
    bytes4 private constant COMMITMENT_CONTROLLER_ID =
        bytes4(
            keccak256("rentPrice(string,uint256)") ^
                keccak256("available(string)") ^
                keccak256("makeCommitment(string,address,bytes32)") ^
                keccak256("commit(bytes32)") ^
                keccak256("register(string,address,uint256,bytes32)") ^
                keccak256("renew(string,uint256)")
        );

    bytes4 private constant COMMITMENT_WITH_CONFIG_CONTROLLER_ID =
        bytes4(
            keccak256(
                "registerWithConfig(string,address,uint256,bytes32,address,address)"
            ) ^
                keccak256(
                    "makeCommitmentWithConfig(string,address,bytes32,address,address)"
                ) ^
                keccak256(
                    "registerWithWhitelist(string,address,uint256,bytes32,address,address,bytes32[])"
                )
        );

    BaseRegistrarImplementation base;
    PriceOracle prices;
    INameValidator nameValidator;
    uint256 public minCommitmentAge;
    uint256 public maxCommitmentAge;

    bool public isNameValidation;
    bool public isPublicMint;
    bool public isMintStarted;
    bool public isWhitelistOn;
    mapping(uint256 => bool) public isReserve;
    mapping(uint256 => bool) public isWhitelist;
    bytes32 public root;

    mapping(bytes32 => uint256) public commitments;

    event NameRegistered(
        string name,
        bytes32 indexed label,
        address indexed owner,
        uint256 tokenId,
        uint256 createdAt,
        uint256 cost,
        uint256 expires
    );
    event NameRenewed(
        string name,
        bytes32 indexed label,
        uint256 cost,
        uint256 expires
    );
    event NewPriceOracle(address indexed oracle);
    event NewNameValidator(address indexed validator);

    event ModifyMerkleRoot(bytes32 newRoot);
    event IsPublicMint(bool enableOrNot);
    event IsNameValidation(bool enableOrNot);
    event IsWhitelistOn(bool enableOrNot);
    event IsMintStarted(bool enableOrNot);
    event ReservationName(string name, bool enableOrNot);
    event WhitelistName(string name, bool enableOrNot);

    constructor(
        BaseRegistrarImplementation _base,
        PriceOracle _prices,
        INameValidator _nameValidator,
        uint256 _minCommitmentAge,
        uint256 _maxCommitmentAge
    ) public {
        require(_maxCommitmentAge > _minCommitmentAge);

        base = _base;
        prices = _prices;
        nameValidator = _nameValidator;
        minCommitmentAge = _minCommitmentAge;
        maxCommitmentAge = _maxCommitmentAge;

        isNameValidation = true;
        isPublicMint = false;
        isMintStarted = false;
        isWhitelistOn = true;
    }

    function nameState(string memory name)
        external
        view
        returns (NameState.State state)
    {
        if (!valid(name)) return NameState.State.INVALID_NAME;
        uint256 labelhash = uint256(keccak256(bytes(name)));
        if (!base.available(labelhash))
            return NameState.State.NOT_AVAILABLE_NAME;
        if (isWhitelistOn && isWhitelist[labelhash])
            return NameState.State.WHITELIST_NAME;
        if (isReserve[labelhash]) return NameState.State.RESERVATION_NAME;
        if (!isPublicMint && name.strlen() <= 3)
            return NameState.State.NOT_AVAILABLE_NAME;

        return NameState.State.AVAILABLE_NAME;
    }

    function rentPrice(string memory name, uint256 duration)
        public
        view
        returns (uint256)
    {
        bytes32 hash = keccak256(bytes(name));
        return prices.price(name, base.nameExpires(uint256(hash)), duration);
    }

    function valid(string memory name) public view returns (bool) {
        if (isNameValidation) {
            return nameValidator.valid(name);
        } else {
            return name.strlen() >= 1;
        }
    }

    function available(string memory name) public view returns (bool) {
        bytes32 label = keccak256(bytes(name));
        return valid(name) && base.available(uint256(label));
    }

    function makeCommitment(
        string memory name,
        address owner,
        bytes32 secret
    ) public pure returns (bytes32) {
        return
            makeCommitmentWithConfig(
                name,
                owner,
                secret,
                address(0),
                address(0)
            );
    }

    function makeCommitmentWithConfig(
        string memory name,
        address owner,
        bytes32 secret,
        address resolver,
        address addr
    ) public pure returns (bytes32) {
        bytes32 label = keccak256(bytes(name));
        if (resolver == address(0) && addr == address(0)) {
            return keccak256(abi.encodePacked(label, owner, secret));
        }
        require(resolver != address(0));
        return
            keccak256(abi.encodePacked(label, owner, resolver, addr, secret));
    }

    function commit(bytes32 commitment) public {
        require(commitments[commitment] + maxCommitmentAge < block.timestamp);
        commitments[commitment] = block.timestamp;
    }

    function registerWithWhitelist(
        string memory name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        address addr,
        bytes32[] calldata proof
    ) external payable {
        bytes32 node = keccak256(abi.encodePacked(msg.sender, name));
        require(MerkleProof.verify(proof, root, node), "merkle");
        _registerWithConfig(name, owner, duration, secret, resolver, addr);
    }

    function registerWithAdmin(
        string memory name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        address addr
    ) external onlyOwner {
        _registerWithConfig(name, owner, duration, secret, resolver, addr);
    }

    function register(
        string calldata name,
        address owner,
        uint256 duration,
        bytes32 secret
    ) external payable {
        require(isMintStarted, "not start");
        if (name.strlen() <= 3) {
            require(isPublicMint, "public");
        }
        uint256 labelhash = uint256(keccak256(bytes(name)));
        if (isWhitelistOn) {
            require(!isWhitelist[labelhash], "whitelist");
        }
        require(!isReserve[labelhash], "reserve");
        _registerWithConfig(
            name,
            owner,
            duration,
            secret,
            address(0),
            address(0)
        );
    }

    function registerWithConfig(
        string memory name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        address addr
    ) public payable {
        require(isMintStarted, "not start");
        if (name.strlen() <= 3) {
            require(isPublicMint, "public");
        }
        uint256 labelhash = uint256(keccak256(bytes(name)));
        if (isWhitelistOn) {
            require(!isWhitelist[labelhash], "whitelist");
        }
        require(!isReserve[labelhash], "reserve");
        _registerWithConfig(name, owner, duration, secret, resolver, addr);
    }

    function _registerWithConfig(
        string memory name,
        address owner,
        uint256 duration,
        bytes32 secret,
        address resolver,
        address addr
    ) internal {
        bytes32 commitment = makeCommitmentWithConfig(
            name,
            owner,
            secret,
            resolver,
            addr
        );
        uint256 cost = _consumeCommitment(name, duration, commitment);

        bytes32 label = keccak256(bytes(name));
        uint256 tokenId = uint256(label);

        uint256 expires;
        if (resolver != address(0)) {
            // Set this contract as the (temporary) owner, giving it
            // permission to set up the resolver.
            expires = base.register(tokenId, address(this), duration);

            // The nodehash of this label
            bytes32 nodehash = keccak256(
                abi.encodePacked(base.baseNode(), label)
            );

            // Set the resolver
            base.bns().setResolver(nodehash, resolver);

            // Configure the resolver
            if (addr != address(0)) {
                Resolver(resolver).setAddr(nodehash, addr);
            }

            // Now transfer full ownership to the expeceted owner
            base.reclaim(tokenId, owner);
            base.transferFrom(address(this), owner, tokenId);
        } else {
            require(addr == address(0));
            expires = base.register(tokenId, owner, duration);
        }

        emit NameRegistered(
            name,
            label,
            owner,
            tokenId,
            block.timestamp,
            cost,
            expires
        );

        // Refund any extra payment
        if (msg.value > cost) {
            payable(msg.sender).transfer(msg.value - cost);
        }
    }

    function renew(string calldata name, uint256 duration) external payable {
        uint256 cost = rentPrice(name, duration);
        require(msg.value >= cost);
        require(duration == MIN_REGISTRATION_DURATION);

        bytes32 label = keccak256(bytes(name));
        uint256 expires = base.renew(uint256(label), duration);

        if (msg.value > cost) {
            payable(msg.sender).transfer(msg.value - cost);
        }

        emit NameRenewed(name, label, cost, expires);
    }

    function setPriceOracle(PriceOracle _prices) public onlyOwner {
        prices = _prices;
        emit NewPriceOracle(address(prices));
    }

    function setCommitmentAges(
        uint256 _minCommitmentAge,
        uint256 _maxCommitmentAge
    ) public onlyOwner {
        minCommitmentAge = _minCommitmentAge;
        maxCommitmentAge = _maxCommitmentAge;
    }

    function setMerkleRoot(bytes32 _root) public onlyOwner {
        root = _root;
        emit ModifyMerkleRoot(_root);
    }

    function setIsPublicMintOpen(bool enableOrNot) public onlyOwner {
        isPublicMint = enableOrNot;
        emit IsPublicMint(isWhitelistOn);
    }

    function setNameValidation(bool enableOrNot) public onlyOwner {
        isNameValidation = enableOrNot;
        emit IsNameValidation(isWhitelistOn);
    }

    function setIsWhitelistOn(bool enableOrNot) public onlyOwner {
        isWhitelistOn = enableOrNot;
        emit IsWhitelistOn(isWhitelistOn);
    }

    function setIsMintStarted(bool enableOrNot) public onlyOwner {
        isMintStarted = enableOrNot;
        emit IsMintStarted(isMintStarted);
    }

    function changeNameValidation(INameValidator _validator)
        external
        onlyOwner
    {
        nameValidator = _validator;
        emit NewNameValidator(address(nameValidator));
    }

    function setReservationNames(
        string[] calldata names,
        bool[] calldata enableOrNots
    ) public onlyOwner {
        require(names.length == enableOrNots.length, "length");
        for (uint256 idx = 0; idx < names.length; idx++) {
            isReserve[uint256(keccak256(bytes(names[idx])))] = enableOrNots[
                idx
            ];
            emit ReservationName(names[idx], enableOrNots[idx]);
        }
    }

    function setWhitelistNames(
        string[] calldata names,
        bool[] calldata enableOrNots
    ) public onlyOwner {
        require(names.length == enableOrNots.length, "length");
        for (uint256 idx = 0; idx < names.length; idx++) {
            isWhitelist[uint256(keccak256(bytes(names[idx])))] = enableOrNots[
                idx
            ];
            emit WhitelistName(names[idx], enableOrNots[idx]);
        }
    }

    function withdraw() public onlyOwner {
        payable(msg.sender).transfer(address(this).balance);
    }

    function supportsInterface(bytes4 interfaceID)
        external
        pure
        returns (bool)
    {
        return
            interfaceID == INTERFACE_META_ID ||
            interfaceID == COMMITMENT_CONTROLLER_ID ||
            interfaceID == COMMITMENT_WITH_CONFIG_CONTROLLER_ID;
    }

    function _consumeCommitment(
        string memory name,
        uint256 duration,
        bytes32 commitment
    ) internal returns (uint256) {
        // Require a valid commitment
        require(commitments[commitment] + minCommitmentAge <= block.timestamp);

        // If the commitment is too old, or the name is registered, stop
        require(commitments[commitment] + maxCommitmentAge > block.timestamp);
        require(available(name));

        delete (commitments[commitment]);

        uint256 cost = rentPrice(name, duration);
        require(duration == MIN_REGISTRATION_DURATION);
        require(msg.value >= cost);

        return cost;
    }
}

File 2 of 33 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 33 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 4 of 33 : NameState.sol
pragma solidity >=0.8.4;

library NameState {
    enum State {
        UNKNOWN,
        INVALID_NAME,
        WHITELIST_NAME,
        RESERVATION_NAME,
        NOT_AVAILABLE_NAME,
        AVAILABLE_NAME
    }
}

File 5 of 33 : StringUtils.sol
pragma solidity >=0.8.4;

library StringUtils {
    /**
     * @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 memory s) internal pure returns (uint256) {
        uint256 len;
        uint256 i = 0;
        uint256 bytelength = bytes(s).length;
        for (len = 0; i < bytelength; len++) {
            bytes1 b = bytes(s)[i];
            if (b < 0x80) {
                i += 1;
            } else if (b < 0xE0) {
                i += 2;
            } else if (b < 0xF0) {
                i += 3;
            } else if (b < 0xF8) {
                i += 4;
            } else if (b < 0xFC) {
                i += 5;
            } else {
                i += 6;
            }
        }
        return len;
    }
}

File 6 of 33 : PriceOracle.sol
pragma solidity >=0.8.4;

interface PriceOracle {
    /**
     * @dev Returns the price to register or renew a name.
     * @param name The name being registered or renewed.
     * @param expires When the name presently expires (0 if this is a new registration).
     * @param duration How long the name is being registered or extended for, in seconds.
     * @return The price of this renewal or registration, in wei.
     */
    function price(
        string calldata name,
        uint256 expires,
        uint256 duration
    ) external view returns (uint256);
}

File 7 of 33 : INameValidator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface INameValidator {
    function valid(string calldata name) external view returns (bool);
}

File 8 of 33 : BaseRegistrarImplementation.sol
pragma solidity >=0.8.4;

import "../registry/BNS.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

import "./BaseRegistrar.sol";

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

    // baseURI
    string public baseTokenURI;

    bytes4 private constant INTERFACE_META_ID =
        bytes4(keccak256("supportsInterface(bytes4)"));
    bytes4 private constant 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 private constant RECLAIM_ID =
        bytes4(keccak256("reclaim(uint256,address)"));

    /**
     * v2.1.3 version of _isApprovedOrOwner which calls ownerOf(tokenId) and takes grace period into consideration instead of ERC721.ownerOf(tokenId);
     * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.1.3/contracts/token/ERC721/ERC721.sol#L187
     * @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
        override
        returns (bool)
    {
        address owner = ownerOf(tokenId);
        return (spender == owner ||
            getApproved(tokenId) == spender ||
            isApprovedForAll(owner, spender));
    }

    constructor(BNS _bns, bytes32 _baseNode) ERC721("", "") {
        bns = _bns;
        baseNode = _baseNode;
        baseTokenURI = "";
    }

    modifier live() {
        require(bns.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 expiries.
     * @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
        override(IERC721, ERC721)
        returns (address)
    {
        require(expiries[tokenId] > block.timestamp);
        return super.ownerOf(tokenId);
    }

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

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

    // setBaseURI
    function setBaseTokenURI(string memory _baseTokenURI) external onlyOwner {
        baseTokenURI = _baseTokenURI;
    }

    function _baseURI()
        internal
        view
        virtual
        override(ERC721)
        returns (string memory)
    {
        return baseTokenURI;
    }

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

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

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

    /**
     * @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,
        uint256 duration
    ) external override returns (uint256) {
        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,
        uint256 duration
    ) external returns (uint256) {
        return _register(id, owner, duration, false);
    }

    function _register(
        uint256 id,
        address owner,
        uint256 duration,
        bool updateRegistry
    ) internal live onlyController returns (uint256) {
        require(available(id));
        expiries[id] = block.timestamp + duration;
        if (_exists(id)) {
            // Name was previously owned, and expired
            _burn(id);
        }
        _mint(owner, id);
        if (updateRegistry) {
            bns.setSubnodeOwner(baseNode, bytes32(id), owner);
        }

        emit NameRegistered(id, owner, block.timestamp + duration);

        return block.timestamp + duration;
    }

    function renew(uint256 id, uint256 duration)
        external
        override
        live
        onlyController
        returns (uint256)
    {
        require(expiries[id] < block.timestamp + RENEW_PERIOD, "renew period");

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

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

    function supportsInterface(bytes4 interfaceID)
        public
        view
        override(ERC721, IERC165)
        returns (bool)
    {
        return
            interfaceID == INTERFACE_META_ID ||
            interfaceID == ERC721_ID ||
            interfaceID == RECLAIM_ID ||
            super.supportsInterface(interfaceID);
    }
}

File 9 of 33 : Resolver.sol
//SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./profiles/IABIResolver.sol";
import "./profiles/IAddressResolver.sol";
import "./profiles/IAddrResolver.sol";
import "./profiles/IContentHashResolver.sol";
import "./profiles/IDNSRecordResolver.sol";
import "./profiles/IDNSZoneResolver.sol";
import "./profiles/IInterfaceResolver.sol";
import "./profiles/INameResolver.sol";
import "./profiles/IPubkeyResolver.sol";
import "./profiles/ITextResolver.sol";
import "./ISupportsInterface.sol";

/**
 * A generic resolver interface which includes all the functions including the ones deprecated
 */
interface Resolver is
    ISupportsInterface,
    IABIResolver,
    IAddressResolver,
    IAddrResolver,
    IContentHashResolver,
    IDNSRecordResolver,
    IDNSZoneResolver,
    IInterfaceResolver,
    INameResolver,
    IPubkeyResolver,
    ITextResolver
{
    /* Deprecated events */
    event ContentChanged(bytes32 indexed node, bytes32 hash);

    function setABI(
        bytes32 node,
        uint256 contentType,
        bytes calldata data
    ) external;

    function setAddr(bytes32 node, address addr) external;

    function setAddr(
        bytes32 node,
        uint256 coinType,
        bytes calldata a
    ) external;

    function setContenthash(bytes32 node, bytes calldata hash) external;

    function setDnsrr(bytes32 node, bytes calldata data) external;

    function setName(bytes32 node, string calldata _name) external;

    function setPubkey(
        bytes32 node,
        bytes32 x,
        bytes32 y
    ) external;

    function setText(
        bytes32 node,
        string calldata key,
        string calldata value
    ) external;

    function setInterface(
        bytes32 node,
        bytes4 interfaceID,
        address implementer
    ) external;

    function multicall(bytes[] calldata data)
        external
        returns (bytes[] memory results);

    /* Deprecated functions */
    function content(bytes32 node) external view returns (bytes32);

    function multihash(bytes32 node) external view returns (bytes memory);

    function setContent(bytes32 node, bytes32 hash) external;

    function setMultihash(bytes32 node, bytes calldata hash) external;
}

File 10 of 33 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 33 : BNS.sol
pragma solidity >=0.8.4;

interface BNS {
    // 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 virtual;

    function setSubnodeRecord(
        bytes32 node,
        bytes32 label,
        address owner,
        address resolver,
        uint64 ttl
    ) external virtual;

    function setSubnodeOwner(
        bytes32 node,
        bytes32 label,
        address owner
    ) external virtual returns (bytes32);

    function setResolver(bytes32 node, address resolver) external virtual;

    function setOwner(bytes32 node, address owner) external virtual;

    function setTTL(bytes32 node, uint64 ttl) external virtual;

    function setApprovalForAll(address operator, bool approved)
        external
        virtual;

    function owner(bytes32 node) external view virtual returns (address);

    function resolver(bytes32 node) external view virtual returns (address);

    function ttl(bytes32 node) external view virtual returns (uint64);

    function recordExists(bytes32 node) external view virtual returns (bool);

    function isApprovedForAll(address owner, address operator)
        external
        view
        virtual
        returns (bool);
}

File 12 of 33 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

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

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-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 bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 13 of 33 : BaseRegistrar.sol
pragma solidity ^0.8.4;

import "../registry/BNS.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract BaseRegistrar is Ownable, IERC721 {
    uint256 public constant GRACE_PERIOD = 0; // no protection period
    uint256 public constant RENEW_PERIOD = 180 days;

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

    // The BNS registry
    BNS public bns;

    // 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 virtual;

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

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

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

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

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

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

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

File 14 of 33 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 15 of 33 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 33 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface 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 17 of 33 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 18 of 33 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 19 of 33 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 20 of 33 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 21 of 33 : IABIResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./IABIResolver.sol";
import "../ResolverBase.sol";

interface IABIResolver {
    event ABIChanged(bytes32 indexed node, uint256 indexed contentType);

    /**
     * Returns the ABI associated with an BNS node.
     * Defined in EIP205.
     * @param node The BNS node to query
     * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.
     * @return contentType The content type of the return value
     * @return data The ABI data
     */
    function ABI(bytes32 node, uint256 contentTypes)
        external
        view
        returns (uint256, bytes memory);
}

File 22 of 33 : IAddressResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/**
 * Interface for the new (multicoin) addr function.
 */
interface IAddressResolver {
    event AddressChanged(
        bytes32 indexed node,
        uint256 coinType,
        bytes newAddress
    );

    function addr(bytes32 node, uint256 coinType)
        external
        view
        returns (bytes memory);
}

File 23 of 33 : IAddrResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

/**
 * Interface for the legacy (ETH-only) addr function.
 */
interface IAddrResolver {
    event AddrChanged(bytes32 indexed node, address a);

    /**
     * Returns the address associated with an BNS node.
     * @param node The BNS node to query.
     * @return The associated address.
     */
    function addr(bytes32 node) external view returns (address payable);
}

File 24 of 33 : IContentHashResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IContentHashResolver {
    event ContenthashChanged(bytes32 indexed node, bytes hash);

    /**
     * Returns the contenthash associated with an BNS node.
     * @param node The BNS node to query.
     * @return The associated contenthash.
     */
    function contenthash(bytes32 node) external view returns (bytes memory);
}

File 25 of 33 : IDNSRecordResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IDNSRecordResolver {
    // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.
    event DNSRecordChanged(
        bytes32 indexed node,
        bytes name,
        uint16 resource,
        bytes record
    );
    // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.
    event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);
    // DNSZoneCleared is emitted whenever a given node's zone information is cleared.
    event DNSZoneCleared(bytes32 indexed node);

    /**
     * Obtain a DNS record.
     * @param node the namehash of the node for which to fetch the record
     * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record
     * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types
     * @return the DNS record in wire format if present, otherwise empty
     */
    function dnsRecord(
        bytes32 node,
        bytes32 name,
        uint16 resource
    ) external view returns (bytes memory);
}

File 26 of 33 : IDNSZoneResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IDNSZoneResolver {
    // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.
    event DNSZonehashChanged(
        bytes32 indexed node,
        bytes lastzonehash,
        bytes zonehash
    );

    /**
     * zonehash obtains the hash for the zone.
     * @param node The BNS node to query.
     * @return The associated contenthash.
     */
    function zonehash(bytes32 node) external view returns (bytes memory);
}

File 27 of 33 : IInterfaceResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IInterfaceResolver {
    event InterfaceChanged(
        bytes32 indexed node,
        bytes4 indexed interfaceID,
        address implementer
    );

    /**
     * Returns the address of a contract that implements the specified interface for this name.
     * If an implementer has not been set for this interfaceID and name, the resolver will query
     * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that
     * contract implements EIP165 and returns `true` for the specified interfaceID, its address
     * will be returned.
     * @param node The BNS node to query.
     * @param interfaceID The EIP 165 interface ID to check for.
     * @return The address that implements this interface, or 0 if the interface is unsupported.
     */
    function interfaceImplementer(bytes32 node, bytes4 interfaceID)
        external
        view
        returns (address);
}

File 28 of 33 : INameResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface INameResolver {
    event NameChanged(bytes32 indexed node, string name);

    /**
     * Returns the name associated with an BNS node, for reverse records.
     * Defined in EIP181.
     * @param node The BNS node to query.
     * @return The associated name.
     */
    function name(bytes32 node) external view returns (string memory);
}

File 29 of 33 : IPubkeyResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface IPubkeyResolver {
    event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);

    /**
     * Returns the SECP256k1 public key associated with an BNS node.
     * Defined in EIP 619.
     * @param node The BNS node to query
     * @return x The X coordinate of the curve point for the public key.
     * @return y The Y coordinate of the curve point for the public key.
     */
    function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);
}

File 30 of 33 : ITextResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

interface ITextResolver {
    event TextChanged(
        bytes32 indexed node,
        string indexed indexedKey,
        string key
    );

    /**
     * Returns the text data associated with an BNS node and key.
     * @param node The BNS node to query.
     * @param key The text data key to query.
     * @return The associated text data.
     */
    function text(bytes32 node, string calldata key)
        external
        view
        returns (string memory);
}

File 31 of 33 : ISupportsInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ISupportsInterface {
    function supportsInterface(bytes4 interfaceID) external pure returns (bool);
}

File 32 of 33 : ResolverBase.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "./SupportsInterface.sol";

abstract contract ResolverBase is SupportsInterface {
    function isAuthorised(bytes32 node) internal view virtual returns (bool);

    modifier authorised(bytes32 node) {
        require(isAuthorised(node));
        _;
    }
}

File 33 of 33 : SupportsInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./ISupportsInterface.sol";

abstract contract SupportsInterface is ISupportsInterface {
    function supportsInterface(bytes4 interfaceID)
        public
        pure
        virtual
        override
        returns (bool)
    {
        return interfaceID == type(ISupportsInterface).interfaceId;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 500
  },
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract BaseRegistrarImplementation","name":"_base","type":"address"},{"internalType":"contract PriceOracle","name":"_prices","type":"address"},{"internalType":"contract INameValidator","name":"_nameValidator","type":"address"},{"internalType":"uint256","name":"_minCommitmentAge","type":"uint256"},{"internalType":"uint256","name":"_maxCommitmentAge","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"IsMintStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"IsNameValidation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"IsPublicMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"IsWhitelistOn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"ModifyMerkleRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"createdAt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":true,"internalType":"bytes32","name":"label","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"cost","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expires","type":"uint256"}],"name":"NameRenewed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"validator","type":"address"}],"name":"NewNameValidator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oracle","type":"address"}],"name":"NewPriceOracle","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"ReservationName","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"WhitelistName","type":"event"},{"inputs":[],"name":"MIN_REGISTRATION_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract INameValidator","name":"_validator","type":"address"}],"name":"changeNameValidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"commitment","type":"bytes32"}],"name":"commit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"commitments","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isNameValidation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isReserve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistOn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"secret","type":"bytes32"}],"name":"makeCommitment","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"addr","type":"address"}],"name":"makeCommitmentWithConfig","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"maxCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minCommitmentAge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"nameState","outputs":[{"internalType":"enum NameState.State","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"}],"name":"register","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"addr","type":"address"}],"name":"registerWithAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"addr","type":"address"}],"name":"registerWithConfig","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"duration","type":"uint256"},{"internalType":"bytes32","name":"secret","type":"bytes32"},{"internalType":"address","name":"resolver","type":"address"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"registerWithWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"renew","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"rentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minCommitmentAge","type":"uint256"},{"internalType":"uint256","name":"_maxCommitmentAge","type":"uint256"}],"name":"setCommitmentAges","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"setIsMintStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"setIsPublicMintOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"setIsWhitelistOn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enableOrNot","type":"bool"}],"name":"setNameValidation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract PriceOracle","name":"_prices","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"names","type":"string[]"},{"internalType":"bool[]","name":"enableOrNots","type":"bool[]"}],"name":"setReservationNames","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"names","type":"string[]"},{"internalType":"bool[]","name":"enableOrNots","type":"bool[]"}],"name":"setWhitelistNames","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"valid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002cbd38038062002cbd8339810160408190526200003491620000fc565b6200003f33620000ac565b8181116200004c57600080fd5b600180546001600160a01b03199081166001600160a01b0397881617909155600280548216958716959095179094556003805490941692909416919091179091556004556005556006805463ffffffff1916630100000117905562000179565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600060a0868803121562000114578081fd5b8551620001218162000160565b6020870151909550620001348162000160565b6040870151909450620001478162000160565b6060870151608090970151959894975095949392505050565b6001600160a01b03811681146200017657600080fd5b50565b612b3480620001896000396000f3fe6080604052600436106102255760003560e01c8063839df94511610123578063aeb8ce9b116100ab578063ebf0c7171161006f578063ebf0c71714610652578063f14fcbc814610668578063f2fde38b14610688578063f49826be146106a8578063f7a16963146106c857600080fd5b8063aeb8ce9b146105ac578063af33f722146105cc578063ce1e09c0146105fc578063e4469dee14610612578063e89b1f4e1461063257600080fd5b80638c1661c9116100f25780638c1661c91461051b5780638d839ffe1461053b5780638da5cb5b146105515780639791c09714610579578063acf1a8411461059957600080fd5b8063839df945146104a357806383e7f6ff146104d057806385f6d155146104f05780638a95b09f1461050357600080fd5b806348ade7f2116101b1578063716f10bf11610175578063716f10bf1461040f578063734e1bf014610430578063783ddbb3146104505780637cb64759146104635780637e3244791461048357600080fd5b806348ade7f21461036d5780634e6bf7091461038d57806352a7d9a6146103ad578063530e784f146103da578063715018a6146103fa57600080fd5b80632d26a002116101f85780632d26a002146102d15780633057931f146102eb57806332ae2b651461030a5780633ccfd60b1461032a5780633d86c52f1461033f57600080fd5b806301ffc9a71461022a578063107b95be1461025f5780631869e7d4146102815780631c8891dc146102a1575b600080fd5b34801561023657600080fd5b5061024a6102453660046124d8565b6106db565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b5061027f61027a366004612407565b61072c565b005b34801561028d57600080fd5b5060065461024a9062010000900460ff1681565b3480156102ad57600080fd5b5061024a6102bc3660046124a8565b60076020526000908152604090205460ff1681565b3480156102dd57600080fd5b5060065461024a9060ff1681565b3480156102f757600080fd5b5060065461024a90610100900460ff1681565b34801561031657600080fd5b5061027f610325366004612470565b610915565b34801561033657600080fd5b5061027f6109b7565b34801561034b57600080fd5b5061035f61035a366004612656565b610a2e565b604051908152602001610256565b34801561037957600080fd5b5061027f610388366004612407565b610b26565b34801561039957600080fd5b5061027f6103a8366004612470565b610d03565b3480156103b957600080fd5b506103cd6103c83660046125cb565b610da0565b6040516102569190612915565b3480156103e657600080fd5b5061027f6103f53660046123eb565b610ed4565b34801561040657600080fd5b5061027f610f66565b34801561041b57600080fd5b5060065461024a906301000000900460ff1681565b34801561043c57600080fd5b5061027f61044b366004612470565b610fba565b61027f61045e36600461275c565b611050565b34801561046f57600080fd5b5061027f61047e3660046124a8565b61110c565b34801561048f57600080fd5b5061027f61049e366004612857565b611189565b3480156104af57600080fd5b5061035f6104be3660046124a8565b600a6020526000908152604090205481565b3480156104dc57600080fd5b5061035f6104eb366004612814565b6111dc565b61027f6104fe36600461251c565b6112e9565b34801561050f57600080fd5b5061035f6301e1338081565b34801561052757600080fd5b5061027f6105363660046126d5565b6114c3565b34801561054757600080fd5b5061035f60045481565b34801561055d57600080fd5b506000546040516001600160a01b039091168152602001610256565b34801561058557600080fd5b5061024a6105943660046125cb565b611519565b61027f6105a7366004612581565b6115ba565b3480156105b857600080fd5b5061024a6105c73660046125cb565b611747565b3480156105d857600080fd5b5061024a6105e73660046124a8565b60086020526000908152604090205460ff1681565b34801561060857600080fd5b5061035f60055481565b34801561061e57600080fd5b5061027f61062d366004612470565b6117e4565b34801561063e57600080fd5b5061027f61064d3660046123eb565b61187f565b34801561065e57600080fd5b5061035f60095481565b34801561067457600080fd5b5061027f6106833660046124a8565b611911565b34801561069457600080fd5b5061027f6106a33660046123eb565b61194b565b3480156106b457600080fd5b5061035f6106c33660046125fe565b611a01565b61027f6106d63660046126d5565b611a11565b60006001600160e01b031982166301ffc9a760e01b148061070b57506001600160e01b0319821662c7d60360e11b145b8061072657506001600160e01b0319821663b21a77ff60e01b145b92915050565b6000546001600160a01b031633146107795760405162461bcd60e51b81526020600482018190526024820152600080516020612b0883398151915260448201526064015b60405180910390fd5b8281146107b15760405162461bcd60e51b81526020600482015260066024820152650d8cadccee8d60d31b6044820152606401610770565b60005b8381101561090e578282828181106107dc57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107f19190612470565b6008600087878581811061081557634e487b7160e01b600052603260045260246000fd5b905060200281019061082791906129f9565b604051610835929190612905565b60408051918290039091208252602082019290925201600020805460ff19169115159190911790557f3ef2f74b9d48f6af7f01d23a16c4de04bc537ebe3a17ab5422d7cdb5f218e39685858381811061089e57634e487b7160e01b600052603260045260246000fd5b90506020028101906108b091906129f9565b8585858181106108d057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108e59190612470565b6040516108f49392919061293d565b60405180910390a18061090681612a9d565b9150506107b4565b5050505050565b6000546001600160a01b0316331461095d5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527f1d45ef0e253d06bd345f4a11bb4d59e58346e4425c7f4287bbd16014ce71cb28906020015b60405180910390a150565b6000546001600160a01b031633146109ff5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b60405133904780156108fc02916000818181858888f19350505050158015610a2b573d6000803e3d6000fd5b50565b845160208601206000906001600160a01b038416158015610a5657506001600160a01b038316155b15610aa95760408051602081018390526bffffffffffffffffffffffff19606089901b16918101919091526054810186905260740160405160208183030381529060405280519060200120915050610b1d565b6001600160a01b038416610abc57600080fd5b60408051602081018390526bffffffffffffffffffffffff19606089811b82169383019390935286831b811660548301529185901b9091166068820152607c8101869052609c01604051602081830303815290604052805190602001209150505b95945050505050565b6000546001600160a01b03163314610b6e5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b828114610ba65760405162461bcd60e51b81526020600482015260066024820152650d8cadccee8d60d31b6044820152606401610770565b60005b8381101561090e57828282818110610bd157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610be69190612470565b60076000878785818110610c0a57634e487b7160e01b600052603260045260246000fd5b9050602002810190610c1c91906129f9565b604051610c2a929190612905565b60408051918290039091208252602082019290925201600020805460ff19169115159190911790557f30c6b1107d87b27bceab87ee1aeaf94c7d2ad1de673b07c2938a7bce1bf2cfdc858583818110610c9357634e487b7160e01b600052603260045260246000fd5b9050602002810190610ca591906129f9565b858585818110610cc557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610cda9190612470565b604051610ce99392919061293d565b60405180910390a180610cfb81612a9d565b915050610ba9565b6000546001600160a01b03163314610d4b5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805463ff000000191663010000008315158102919091179182905560405160ff9190920416151581527fb054127b49d65012542c041e1af2d00a87696ac19b53e627d52fd126e9c8ea66906020016109ac565b6000610dab82611519565b610db757506001919050565b815160208301206001546040516312dc929d60e31b8152600481018390526001600160a01b03909116906396e494e89060240160206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3a919061248c565b610e475750600492915050565b6006546301000000900460ff168015610e6e575060008181526008602052604090205460ff165b15610e7c5750600292915050565b60008181526007602052604090205460ff1615610e9c5750600392915050565b600654610100900460ff16158015610ebd57506003610eba84611b69565b11155b15610ecb5750600492915050565b50600592915050565b6000546001600160a01b03163314610f1c5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600280546001600160a01b0319166001600160a01b0383169081179091556040517ff261845a790fe29bbd6631e2ca4a5bdc83e6eed7c3271d9590d97287e00e912390600090a250565b6000546001600160a01b03163314610fae5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b610fb86000611c7a565b565b6000546001600160a01b031633146110025760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805482151560ff199091161790819055604051630100000090910460ff16151581527f0b03d19043a965e4296cff4518b7dc6de46b528979113799a31c86c454757dec906020016109ac565b600033896040516020016110659291906128cd565b6040516020818303038152906040528051906020012090506110be838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506009549150849050611cca565b6110f35760405162461bcd60e51b81526020600482015260066024820152656d65726b6c6560d01b6044820152606401610770565b611101898989898989611ce0565b505050505050505050565b6000546001600160a01b031633146111545760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b60098190556040518181527f44a666fbdcadd9f9b00de4a1a1c92304bd363c650f84a735053073aade50a00a906020016109ac565b6000546001600160a01b031633146111d15760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600491909155600555565b81516020830120600254600154604051636b727d4360e11b815260048101849052600093926001600160a01b03908116926350e9a7159288929091169063d6e4fa869060240160206040518083038186803b15801561123a57600080fd5b505afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127291906124c0565b866040518463ffffffff1660e01b81526004016112919392919061299d565b60206040518083038186803b1580156112a957600080fd5b505afa1580156112bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e191906124c0565b949350505050565b60065462010000900460ff1661132d5760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b6044820152606401610770565b600361136e86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b6992505050565b116113b357600654610100900460ff166113b35760405162461bcd60e51b81526020600482015260066024820152657075626c696360d01b6044820152606401610770565b600085856040516113c5929190612905565b6040519081900390206006549091506301000000900460ff161561142e5760008181526008602052604090205460ff161561142e5760405162461bcd60e51b81526020600482015260096024820152681dda1a5d195b1a5cdd60ba1b6044820152606401610770565b60008181526007602052604090205460ff16156114775760405162461bcd60e51b81526020600482015260076024820152667265736572766560c81b6044820152606401610770565b6114bb86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525089935088925087915080611ce0565b505050505050565b6000546001600160a01b0316331461150b5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6114bb868686868686611ce0565b60065460009060ff16156115a757600354604051639791c09760e01b81526001600160a01b0390911690639791c0979061155790859060040161298a565b60206040518083038186803b15801561156f57600080fd5b505afa158015611583573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610726919061248c565b60016115b283611b69565b101592915050565b60006115fd84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508692506111dc915050565b90508034101561160c57600080fd5b6301e13380821461161c57600080fd5b6000848460405161162e929190612905565b60405190819003812060015463c475abff60e01b835260048301829052602483018690529092506000916001600160a01b039091169063c475abff90604401602060405180830381600087803b15801561168757600080fd5b505af115801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf91906124c0565b90508234111561170157336108fc6116d78534612a56565b6040518115909202916000818181858888f193505050501580156116ff573d6000803e3d6000fd5b505b817f3da24c024582931cfaf8267d8ed24d13a82a8068d5bd337d30ec45cea4e506ae878786856040516117379493929190612963565b60405180910390a2505050505050565b8051602082012060009061175a83611519565b80156117dd57506001546040516312dc929d60e31b8152600481018390526001600160a01b03909116906396e494e89060240160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117dd919061248c565b9392505050565b6000546001600160a01b0316331461182c5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600680548215156101000261ff00199091161790819055604051630100000090910460ff16151581527f345bf287378de0beffa48b8f7fe45f5ae5b10a426a35814f2547daa338c0a5e0906020016109ac565b6000546001600160a01b031633146118c75760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fb7966c0bfd1b71bb7f3d7d9aa80cd2e45eaf883e439567987aa6f99ff455641990600090a250565b6005546000828152600a6020526040902054429161192e91612a3e565b1061193857600080fd5b6000908152600a60205260409020429055565b6000546001600160a01b031633146119935760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6001600160a01b0381166119f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610770565b610a2b81611c7a565b60006112e1848484600080610a2e565b60065462010000900460ff16611a555760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b6044820152606401610770565b6003611a6087611b69565b11611aa557600654610100900460ff16611aa55760405162461bcd60e51b81526020600482015260066024820152657075626c696360d01b6044820152606401610770565b855160208701206006546301000000900460ff1615611b095760008181526008602052604090205460ff1615611b095760405162461bcd60e51b81526020600482015260096024820152681dda1a5d195b1a5cdd60ba1b6044820152606401610770565b60008181526007602052604090205460ff1615611b525760405162461bcd60e51b81526020600482015260076024820152667265736572766560c81b6044820152606401610770565b611b60878787878787611ce0565b50505050505050565b8051600090819081905b80821015611c71576000858381518110611b9d57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160ff1b811015611bcc57611bc5600184612a3e565b9250611c5e565b600760fd1b6001600160f81b031982161015611bed57611bc5600284612a3e565b600f60fc1b6001600160f81b031982161015611c0e57611bc5600384612a3e565b601f60fb1b6001600160f81b031982161015611c2f57611bc5600484612a3e565b603f60fa1b6001600160f81b031982161015611c5057611bc5600584612a3e565b611c5b600684612a3e565b92505b5082611c6981612a9d565b935050611b73565b50909392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082611cd785846121ba565b14949350505050565b6000611cef8787868686610a2e565b90506000611cfe88878461223c565b885160208a01209091508060006001600160a01b0387161561207f57600154604051633f2891eb60e21b815260048101849052306024820152604481018b90526001600160a01b039091169063fca247ac90606401602060405180830381600087803b158015611d6d57600080fd5b505af1158015611d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da591906124c0565b90506000600160009054906101000a90046001600160a01b03166001600160a01b031663ddf7fcb06040518163ffffffff1660e01b815260040160206040518083038186803b158015611df757600080fd5b505afa158015611e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2f91906124c0565b604080516020810192909252810185905260600160408051601f198184030181528282528051602091820120600154631867e2f560e01b855292519094506001600160a01b0390921692631867e2f59260048083019392829003018186803b158015611e9a57600080fd5b505afa158015611eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed29190612500565b604051630c4b7b8560e11b8152600481018390526001600160a01b038a811660248301529190911690631896f70a90604401600060405180830381600087803b158015611f1e57600080fd5b505af1158015611f32573d6000803e3d6000fd5b505050506001600160a01b03871615611fa75760405162d5fa2b60e81b8152600481018290526001600160a01b03888116602483015289169063d5fa2b0090604401600060405180830381600087803b158015611f8e57600080fd5b505af1158015611fa2573d6000803e3d6000fd5b505050505b600154604051630a3b53db60e21b8152600481018590526001600160a01b038d81166024830152909116906328ed4f6c90604401600060405180830381600087803b158015611ff557600080fd5b505af1158015612009573d6000803e3d6000fd5b50506001546040516323b872dd60e01b81523060048201526001600160a01b038f811660248301526044820188905290911692506323b872dd9150606401600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b5050505050612123565b6001600160a01b0386161561209357600080fd5b600154604051633f2891eb60e21b8152600481018490526001600160a01b038c81166024830152604482018c90529091169063fca247ac90606401602060405180830381600087803b1580156120e857600080fd5b505af11580156120fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212091906124c0565b90505b896001600160a01b0316837f3f20a2f68d2f1fc31915768c6a23ee9a37aea4bc54fd9698fd61546843bb22598d854289876040516121659594939291906129c2565b60405180910390a3833411156121ad57336108fc6121838634612a56565b6040518115909202916000818181858888f193505050501580156121ab573d6000803e3d6000fd5b505b5050505050505050505050565b600081815b84518110156122345760008582815181106121ea57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122105760008381526020829052604090209250612221565b600081815260208490526040902092505b508061222c81612a9d565b9150506121bf565b509392505050565b6004546000828152600a60205260408120549091429161225c9190612a3e565b111561226757600080fd5b6005546000838152600a6020526040902054429161228491612a3e565b1161228e57600080fd5b61229784611747565b6122a057600080fd5b6000828152600a602052604081208190556122bb85856111dc565b90506301e1338084146122cd57600080fd5b803410156112e157600080fd5b60008083601f8401126122eb578081fd5b50813567ffffffffffffffff811115612302578182fd5b6020830191508360208260051b850101111561231d57600080fd5b9250929050565b60008083601f840112612335578182fd5b50813567ffffffffffffffff81111561234c578182fd5b60208301915083602082850101111561231d57600080fd5b600082601f830112612374578081fd5b813567ffffffffffffffff8082111561238f5761238f612ace565b604051601f8301601f19908116603f011681019082821181831017156123b7576123b7612ace565b816040528381528660208588010111156123cf578485fd5b8360208701602083013792830160200193909352509392505050565b6000602082840312156123fc578081fd5b81356117dd81612ae4565b6000806000806040858703121561241c578283fd5b843567ffffffffffffffff80821115612433578485fd5b61243f888389016122da565b90965094506020870135915080821115612457578384fd5b50612464878288016122da565b95989497509550505050565b600060208284031215612481578081fd5b81356117dd81612af9565b60006020828403121561249d578081fd5b81516117dd81612af9565b6000602082840312156124b9578081fd5b5035919050565b6000602082840312156124d1578081fd5b5051919050565b6000602082840312156124e9578081fd5b81356001600160e01b0319811681146117dd578182fd5b600060208284031215612511578081fd5b81516117dd81612ae4565b600080600080600060808688031215612533578081fd5b853567ffffffffffffffff811115612549578182fd5b61255588828901612324565b909650945050602086013561256981612ae4565b94979396509394604081013594506060013592915050565b600080600060408486031215612595578081fd5b833567ffffffffffffffff8111156125ab578182fd5b6125b786828701612324565b909790965060209590950135949350505050565b6000602082840312156125dc578081fd5b813567ffffffffffffffff8111156125f2578182fd5b6112e184828501612364565b600080600060608486031215612612578081fd5b833567ffffffffffffffff811115612628578182fd5b61263486828701612364565b935050602084013561264581612ae4565b929592945050506040919091013590565b600080600080600060a0868803121561266d578283fd5b853567ffffffffffffffff811115612683578384fd5b61268f88828901612364565b95505060208601356126a081612ae4565b93506040860135925060608601356126b781612ae4565b915060808601356126c781612ae4565b809150509295509295909350565b60008060008060008060c087890312156126ed578384fd5b863567ffffffffffffffff811115612703578485fd5b61270f89828a01612364565b965050602087013561272081612ae4565b94506040870135935060608701359250608087013561273e81612ae4565b915060a087013561274e81612ae4565b809150509295509295509295565b60008060008060008060008060e0898b031215612777578586fd5b883567ffffffffffffffff8082111561278e578788fd5b61279a8c838d01612364565b995060208b013591506127ac82612ae4565b90975060408a0135965060608a0135955060808a0135906127cc82612ae4565b90945060a08a0135906127de82612ae4565b90935060c08a013590808211156127f3578384fd5b506128008b828c016122da565b999c989b5096995094979396929594505050565b60008060408385031215612826578182fd5b823567ffffffffffffffff81111561283c578283fd5b61284885828601612364565b95602094909401359450505050565b60008060408385031215612869578182fd5b50508035926020909101359150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526128b9816020860160208601612a6d565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff198360601b168152600082516128f7816014850160208701612a6d565b919091016014019392505050565b8183823760009101908152919050565b602081016006831061293757634e487b7160e01b600052602160045260246000fd5b91905290565b604081526000612951604083018587612878565b90508215156020830152949350505050565b606081526000612977606083018688612878565b6020830194909452506040015292915050565b6020815260006117dd60208301846128a1565b6060815260006129b060608301866128a1565b60208301949094525060400152919050565b60a0815260006129d560a08301886128a1565b90508560208301528460408301528360608301528260808301529695505050505050565b6000808335601e19843603018112612a0f578283fd5b83018035915067ffffffffffffffff821115612a29578283fd5b60200191503681900382131561231d57600080fd5b60008219821115612a5157612a51612ab8565b500190565b600082821015612a6857612a68612ab8565b500390565b60005b83811015612a88578181015183820152602001612a70565b83811115612a97576000848401525b50505050565b6000600019821415612ab157612ab1612ab8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a2b57600080fd5b8015158114610a2b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000804000a000000000000000000000000457efd33def0bff2dfe33089d385898d919d3a1000000000000000000000000005b4b9873c64acd24adf4c67aa5775c7c5e569250000000000000000000000001656d34c117490079c534bc17f0a61e805648983000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000093a80

Deployed Bytecode

0x6080604052600436106102255760003560e01c8063839df94511610123578063aeb8ce9b116100ab578063ebf0c7171161006f578063ebf0c71714610652578063f14fcbc814610668578063f2fde38b14610688578063f49826be146106a8578063f7a16963146106c857600080fd5b8063aeb8ce9b146105ac578063af33f722146105cc578063ce1e09c0146105fc578063e4469dee14610612578063e89b1f4e1461063257600080fd5b80638c1661c9116100f25780638c1661c91461051b5780638d839ffe1461053b5780638da5cb5b146105515780639791c09714610579578063acf1a8411461059957600080fd5b8063839df945146104a357806383e7f6ff146104d057806385f6d155146104f05780638a95b09f1461050357600080fd5b806348ade7f2116101b1578063716f10bf11610175578063716f10bf1461040f578063734e1bf014610430578063783ddbb3146104505780637cb64759146104635780637e3244791461048357600080fd5b806348ade7f21461036d5780634e6bf7091461038d57806352a7d9a6146103ad578063530e784f146103da578063715018a6146103fa57600080fd5b80632d26a002116101f85780632d26a002146102d15780633057931f146102eb57806332ae2b651461030a5780633ccfd60b1461032a5780633d86c52f1461033f57600080fd5b806301ffc9a71461022a578063107b95be1461025f5780631869e7d4146102815780631c8891dc146102a1575b600080fd5b34801561023657600080fd5b5061024a6102453660046124d8565b6106db565b60405190151581526020015b60405180910390f35b34801561026b57600080fd5b5061027f61027a366004612407565b61072c565b005b34801561028d57600080fd5b5060065461024a9062010000900460ff1681565b3480156102ad57600080fd5b5061024a6102bc3660046124a8565b60076020526000908152604090205460ff1681565b3480156102dd57600080fd5b5060065461024a9060ff1681565b3480156102f757600080fd5b5060065461024a90610100900460ff1681565b34801561031657600080fd5b5061027f610325366004612470565b610915565b34801561033657600080fd5b5061027f6109b7565b34801561034b57600080fd5b5061035f61035a366004612656565b610a2e565b604051908152602001610256565b34801561037957600080fd5b5061027f610388366004612407565b610b26565b34801561039957600080fd5b5061027f6103a8366004612470565b610d03565b3480156103b957600080fd5b506103cd6103c83660046125cb565b610da0565b6040516102569190612915565b3480156103e657600080fd5b5061027f6103f53660046123eb565b610ed4565b34801561040657600080fd5b5061027f610f66565b34801561041b57600080fd5b5060065461024a906301000000900460ff1681565b34801561043c57600080fd5b5061027f61044b366004612470565b610fba565b61027f61045e36600461275c565b611050565b34801561046f57600080fd5b5061027f61047e3660046124a8565b61110c565b34801561048f57600080fd5b5061027f61049e366004612857565b611189565b3480156104af57600080fd5b5061035f6104be3660046124a8565b600a6020526000908152604090205481565b3480156104dc57600080fd5b5061035f6104eb366004612814565b6111dc565b61027f6104fe36600461251c565b6112e9565b34801561050f57600080fd5b5061035f6301e1338081565b34801561052757600080fd5b5061027f6105363660046126d5565b6114c3565b34801561054757600080fd5b5061035f60045481565b34801561055d57600080fd5b506000546040516001600160a01b039091168152602001610256565b34801561058557600080fd5b5061024a6105943660046125cb565b611519565b61027f6105a7366004612581565b6115ba565b3480156105b857600080fd5b5061024a6105c73660046125cb565b611747565b3480156105d857600080fd5b5061024a6105e73660046124a8565b60086020526000908152604090205460ff1681565b34801561060857600080fd5b5061035f60055481565b34801561061e57600080fd5b5061027f61062d366004612470565b6117e4565b34801561063e57600080fd5b5061027f61064d3660046123eb565b61187f565b34801561065e57600080fd5b5061035f60095481565b34801561067457600080fd5b5061027f6106833660046124a8565b611911565b34801561069457600080fd5b5061027f6106a33660046123eb565b61194b565b3480156106b457600080fd5b5061035f6106c33660046125fe565b611a01565b61027f6106d63660046126d5565b611a11565b60006001600160e01b031982166301ffc9a760e01b148061070b57506001600160e01b0319821662c7d60360e11b145b8061072657506001600160e01b0319821663b21a77ff60e01b145b92915050565b6000546001600160a01b031633146107795760405162461bcd60e51b81526020600482018190526024820152600080516020612b0883398151915260448201526064015b60405180910390fd5b8281146107b15760405162461bcd60e51b81526020600482015260066024820152650d8cadccee8d60d31b6044820152606401610770565b60005b8381101561090e578282828181106107dc57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906107f19190612470565b6008600087878581811061081557634e487b7160e01b600052603260045260246000fd5b905060200281019061082791906129f9565b604051610835929190612905565b60408051918290039091208252602082019290925201600020805460ff19169115159190911790557f3ef2f74b9d48f6af7f01d23a16c4de04bc537ebe3a17ab5422d7cdb5f218e39685858381811061089e57634e487b7160e01b600052603260045260246000fd5b90506020028101906108b091906129f9565b8585858181106108d057634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108e59190612470565b6040516108f49392919061293d565b60405180910390a18061090681612a9d565b9150506107b4565b5050505050565b6000546001600160a01b0316331461095d5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527f1d45ef0e253d06bd345f4a11bb4d59e58346e4425c7f4287bbd16014ce71cb28906020015b60405180910390a150565b6000546001600160a01b031633146109ff5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b60405133904780156108fc02916000818181858888f19350505050158015610a2b573d6000803e3d6000fd5b50565b845160208601206000906001600160a01b038416158015610a5657506001600160a01b038316155b15610aa95760408051602081018390526bffffffffffffffffffffffff19606089901b16918101919091526054810186905260740160405160208183030381529060405280519060200120915050610b1d565b6001600160a01b038416610abc57600080fd5b60408051602081018390526bffffffffffffffffffffffff19606089811b82169383019390935286831b811660548301529185901b9091166068820152607c8101869052609c01604051602081830303815290604052805190602001209150505b95945050505050565b6000546001600160a01b03163314610b6e5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b828114610ba65760405162461bcd60e51b81526020600482015260066024820152650d8cadccee8d60d31b6044820152606401610770565b60005b8381101561090e57828282818110610bd157634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610be69190612470565b60076000878785818110610c0a57634e487b7160e01b600052603260045260246000fd5b9050602002810190610c1c91906129f9565b604051610c2a929190612905565b60408051918290039091208252602082019290925201600020805460ff19169115159190911790557f30c6b1107d87b27bceab87ee1aeaf94c7d2ad1de673b07c2938a7bce1bf2cfdc858583818110610c9357634e487b7160e01b600052603260045260246000fd5b9050602002810190610ca591906129f9565b858585818110610cc557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610cda9190612470565b604051610ce99392919061293d565b60405180910390a180610cfb81612a9d565b915050610ba9565b6000546001600160a01b03163314610d4b5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805463ff000000191663010000008315158102919091179182905560405160ff9190920416151581527fb054127b49d65012542c041e1af2d00a87696ac19b53e627d52fd126e9c8ea66906020016109ac565b6000610dab82611519565b610db757506001919050565b815160208301206001546040516312dc929d60e31b8152600481018390526001600160a01b03909116906396e494e89060240160206040518083038186803b158015610e0257600080fd5b505afa158015610e16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e3a919061248c565b610e475750600492915050565b6006546301000000900460ff168015610e6e575060008181526008602052604090205460ff165b15610e7c5750600292915050565b60008181526007602052604090205460ff1615610e9c5750600392915050565b600654610100900460ff16158015610ebd57506003610eba84611b69565b11155b15610ecb5750600492915050565b50600592915050565b6000546001600160a01b03163314610f1c5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600280546001600160a01b0319166001600160a01b0383169081179091556040517ff261845a790fe29bbd6631e2ca4a5bdc83e6eed7c3271d9590d97287e00e912390600090a250565b6000546001600160a01b03163314610fae5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b610fb86000611c7a565b565b6000546001600160a01b031633146110025760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6006805482151560ff199091161790819055604051630100000090910460ff16151581527f0b03d19043a965e4296cff4518b7dc6de46b528979113799a31c86c454757dec906020016109ac565b600033896040516020016110659291906128cd565b6040516020818303038152906040528051906020012090506110be838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506009549150849050611cca565b6110f35760405162461bcd60e51b81526020600482015260066024820152656d65726b6c6560d01b6044820152606401610770565b611101898989898989611ce0565b505050505050505050565b6000546001600160a01b031633146111545760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b60098190556040518181527f44a666fbdcadd9f9b00de4a1a1c92304bd363c650f84a735053073aade50a00a906020016109ac565b6000546001600160a01b031633146111d15760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600491909155600555565b81516020830120600254600154604051636b727d4360e11b815260048101849052600093926001600160a01b03908116926350e9a7159288929091169063d6e4fa869060240160206040518083038186803b15801561123a57600080fd5b505afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061127291906124c0565b866040518463ffffffff1660e01b81526004016112919392919061299d565b60206040518083038186803b1580156112a957600080fd5b505afa1580156112bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e191906124c0565b949350505050565b60065462010000900460ff1661132d5760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b6044820152606401610770565b600361136e86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b6992505050565b116113b357600654610100900460ff166113b35760405162461bcd60e51b81526020600482015260066024820152657075626c696360d01b6044820152606401610770565b600085856040516113c5929190612905565b6040519081900390206006549091506301000000900460ff161561142e5760008181526008602052604090205460ff161561142e5760405162461bcd60e51b81526020600482015260096024820152681dda1a5d195b1a5cdd60ba1b6044820152606401610770565b60008181526007602052604090205460ff16156114775760405162461bcd60e51b81526020600482015260076024820152667265736572766560c81b6044820152606401610770565b6114bb86868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525089935088925087915080611ce0565b505050505050565b6000546001600160a01b0316331461150b5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6114bb868686868686611ce0565b60065460009060ff16156115a757600354604051639791c09760e01b81526001600160a01b0390911690639791c0979061155790859060040161298a565b60206040518083038186803b15801561156f57600080fd5b505afa158015611583573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610726919061248c565b60016115b283611b69565b101592915050565b60006115fd84848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508692506111dc915050565b90508034101561160c57600080fd5b6301e13380821461161c57600080fd5b6000848460405161162e929190612905565b60405190819003812060015463c475abff60e01b835260048301829052602483018690529092506000916001600160a01b039091169063c475abff90604401602060405180830381600087803b15801561168757600080fd5b505af115801561169b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bf91906124c0565b90508234111561170157336108fc6116d78534612a56565b6040518115909202916000818181858888f193505050501580156116ff573d6000803e3d6000fd5b505b817f3da24c024582931cfaf8267d8ed24d13a82a8068d5bd337d30ec45cea4e506ae878786856040516117379493929190612963565b60405180910390a2505050505050565b8051602082012060009061175a83611519565b80156117dd57506001546040516312dc929d60e31b8152600481018390526001600160a01b03909116906396e494e89060240160206040518083038186803b1580156117a557600080fd5b505afa1580156117b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117dd919061248c565b9392505050565b6000546001600160a01b0316331461182c5760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600680548215156101000261ff00199091161790819055604051630100000090910460ff16151581527f345bf287378de0beffa48b8f7fe45f5ae5b10a426a35814f2547daa338c0a5e0906020016109ac565b6000546001600160a01b031633146118c75760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b600380546001600160a01b0319166001600160a01b0383169081179091556040517fb7966c0bfd1b71bb7f3d7d9aa80cd2e45eaf883e439567987aa6f99ff455641990600090a250565b6005546000828152600a6020526040902054429161192e91612a3e565b1061193857600080fd5b6000908152600a60205260409020429055565b6000546001600160a01b031633146119935760405162461bcd60e51b81526020600482018190526024820152600080516020612b088339815191526044820152606401610770565b6001600160a01b0381166119f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610770565b610a2b81611c7a565b60006112e1848484600080610a2e565b60065462010000900460ff16611a555760405162461bcd60e51b81526020600482015260096024820152681b9bdd081cdd185c9d60ba1b6044820152606401610770565b6003611a6087611b69565b11611aa557600654610100900460ff16611aa55760405162461bcd60e51b81526020600482015260066024820152657075626c696360d01b6044820152606401610770565b855160208701206006546301000000900460ff1615611b095760008181526008602052604090205460ff1615611b095760405162461bcd60e51b81526020600482015260096024820152681dda1a5d195b1a5cdd60ba1b6044820152606401610770565b60008181526007602052604090205460ff1615611b525760405162461bcd60e51b81526020600482015260076024820152667265736572766560c81b6044820152606401610770565b611b60878787878787611ce0565b50505050505050565b8051600090819081905b80821015611c71576000858381518110611b9d57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319169050600160ff1b811015611bcc57611bc5600184612a3e565b9250611c5e565b600760fd1b6001600160f81b031982161015611bed57611bc5600284612a3e565b600f60fc1b6001600160f81b031982161015611c0e57611bc5600384612a3e565b601f60fb1b6001600160f81b031982161015611c2f57611bc5600484612a3e565b603f60fa1b6001600160f81b031982161015611c5057611bc5600584612a3e565b611c5b600684612a3e565b92505b5082611c6981612a9d565b935050611b73565b50909392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082611cd785846121ba565b14949350505050565b6000611cef8787868686610a2e565b90506000611cfe88878461223c565b885160208a01209091508060006001600160a01b0387161561207f57600154604051633f2891eb60e21b815260048101849052306024820152604481018b90526001600160a01b039091169063fca247ac90606401602060405180830381600087803b158015611d6d57600080fd5b505af1158015611d81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da591906124c0565b90506000600160009054906101000a90046001600160a01b03166001600160a01b031663ddf7fcb06040518163ffffffff1660e01b815260040160206040518083038186803b158015611df757600080fd5b505afa158015611e0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2f91906124c0565b604080516020810192909252810185905260600160408051601f198184030181528282528051602091820120600154631867e2f560e01b855292519094506001600160a01b0390921692631867e2f59260048083019392829003018186803b158015611e9a57600080fd5b505afa158015611eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ed29190612500565b604051630c4b7b8560e11b8152600481018390526001600160a01b038a811660248301529190911690631896f70a90604401600060405180830381600087803b158015611f1e57600080fd5b505af1158015611f32573d6000803e3d6000fd5b505050506001600160a01b03871615611fa75760405162d5fa2b60e81b8152600481018290526001600160a01b03888116602483015289169063d5fa2b0090604401600060405180830381600087803b158015611f8e57600080fd5b505af1158015611fa2573d6000803e3d6000fd5b505050505b600154604051630a3b53db60e21b8152600481018590526001600160a01b038d81166024830152909116906328ed4f6c90604401600060405180830381600087803b158015611ff557600080fd5b505af1158015612009573d6000803e3d6000fd5b50506001546040516323b872dd60e01b81523060048201526001600160a01b038f811660248301526044820188905290911692506323b872dd9150606401600060405180830381600087803b15801561206157600080fd5b505af1158015612075573d6000803e3d6000fd5b5050505050612123565b6001600160a01b0386161561209357600080fd5b600154604051633f2891eb60e21b8152600481018490526001600160a01b038c81166024830152604482018c90529091169063fca247ac90606401602060405180830381600087803b1580156120e857600080fd5b505af11580156120fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061212091906124c0565b90505b896001600160a01b0316837f3f20a2f68d2f1fc31915768c6a23ee9a37aea4bc54fd9698fd61546843bb22598d854289876040516121659594939291906129c2565b60405180910390a3833411156121ad57336108fc6121838634612a56565b6040518115909202916000818181858888f193505050501580156121ab573d6000803e3d6000fd5b505b5050505050505050505050565b600081815b84518110156122345760008582815181106121ea57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116122105760008381526020829052604090209250612221565b600081815260208490526040902092505b508061222c81612a9d565b9150506121bf565b509392505050565b6004546000828152600a60205260408120549091429161225c9190612a3e565b111561226757600080fd5b6005546000838152600a6020526040902054429161228491612a3e565b1161228e57600080fd5b61229784611747565b6122a057600080fd5b6000828152600a602052604081208190556122bb85856111dc565b90506301e1338084146122cd57600080fd5b803410156112e157600080fd5b60008083601f8401126122eb578081fd5b50813567ffffffffffffffff811115612302578182fd5b6020830191508360208260051b850101111561231d57600080fd5b9250929050565b60008083601f840112612335578182fd5b50813567ffffffffffffffff81111561234c578182fd5b60208301915083602082850101111561231d57600080fd5b600082601f830112612374578081fd5b813567ffffffffffffffff8082111561238f5761238f612ace565b604051601f8301601f19908116603f011681019082821181831017156123b7576123b7612ace565b816040528381528660208588010111156123cf578485fd5b8360208701602083013792830160200193909352509392505050565b6000602082840312156123fc578081fd5b81356117dd81612ae4565b6000806000806040858703121561241c578283fd5b843567ffffffffffffffff80821115612433578485fd5b61243f888389016122da565b90965094506020870135915080821115612457578384fd5b50612464878288016122da565b95989497509550505050565b600060208284031215612481578081fd5b81356117dd81612af9565b60006020828403121561249d578081fd5b81516117dd81612af9565b6000602082840312156124b9578081fd5b5035919050565b6000602082840312156124d1578081fd5b5051919050565b6000602082840312156124e9578081fd5b81356001600160e01b0319811681146117dd578182fd5b600060208284031215612511578081fd5b81516117dd81612ae4565b600080600080600060808688031215612533578081fd5b853567ffffffffffffffff811115612549578182fd5b61255588828901612324565b909650945050602086013561256981612ae4565b94979396509394604081013594506060013592915050565b600080600060408486031215612595578081fd5b833567ffffffffffffffff8111156125ab578182fd5b6125b786828701612324565b909790965060209590950135949350505050565b6000602082840312156125dc578081fd5b813567ffffffffffffffff8111156125f2578182fd5b6112e184828501612364565b600080600060608486031215612612578081fd5b833567ffffffffffffffff811115612628578182fd5b61263486828701612364565b935050602084013561264581612ae4565b929592945050506040919091013590565b600080600080600060a0868803121561266d578283fd5b853567ffffffffffffffff811115612683578384fd5b61268f88828901612364565b95505060208601356126a081612ae4565b93506040860135925060608601356126b781612ae4565b915060808601356126c781612ae4565b809150509295509295909350565b60008060008060008060c087890312156126ed578384fd5b863567ffffffffffffffff811115612703578485fd5b61270f89828a01612364565b965050602087013561272081612ae4565b94506040870135935060608701359250608087013561273e81612ae4565b915060a087013561274e81612ae4565b809150509295509295509295565b60008060008060008060008060e0898b031215612777578586fd5b883567ffffffffffffffff8082111561278e578788fd5b61279a8c838d01612364565b995060208b013591506127ac82612ae4565b90975060408a0135965060608a0135955060808a0135906127cc82612ae4565b90945060a08a0135906127de82612ae4565b90935060c08a013590808211156127f3578384fd5b506128008b828c016122da565b999c989b5096995094979396929594505050565b60008060408385031215612826578182fd5b823567ffffffffffffffff81111561283c578283fd5b61284885828601612364565b95602094909401359450505050565b60008060408385031215612869578182fd5b50508035926020909101359150565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600081518084526128b9816020860160208601612a6d565b601f01601f19169290920160200192915050565b6bffffffffffffffffffffffff198360601b168152600082516128f7816014850160208701612a6d565b919091016014019392505050565b8183823760009101908152919050565b602081016006831061293757634e487b7160e01b600052602160045260246000fd5b91905290565b604081526000612951604083018587612878565b90508215156020830152949350505050565b606081526000612977606083018688612878565b6020830194909452506040015292915050565b6020815260006117dd60208301846128a1565b6060815260006129b060608301866128a1565b60208301949094525060400152919050565b60a0815260006129d560a08301886128a1565b90508560208301528460408301528360608301528260808301529695505050505050565b6000808335601e19843603018112612a0f578283fd5b83018035915067ffffffffffffffff821115612a29578283fd5b60200191503681900382131561231d57600080fd5b60008219821115612a5157612a51612ab8565b500190565b600082821015612a6857612a68612ab8565b500390565b60005b83811015612a88578181015183820152602001612a70565b83811115612a97576000848401525b50505050565b6000600019821415612ab157612ab1612ab8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610a2b57600080fd5b8015158114610a2b57600080fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a164736f6c6343000804000a

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

000000000000000000000000457efd33def0bff2dfe33089d385898d919d3a1000000000000000000000000005b4b9873c64acd24adf4c67aa5775c7c5e569250000000000000000000000001656d34c117490079c534bc17f0a61e805648983000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000093a80

-----Decoded View---------------
Arg [0] : _base (address): 0x457eFd33Def0bFF2dfe33089D385898D919d3a10
Arg [1] : _prices (address): 0x05b4b9873c64aCD24ADf4C67AA5775C7c5E56925
Arg [2] : _nameValidator (address): 0x1656d34C117490079c534bc17f0a61e805648983
Arg [3] : _minCommitmentAge (uint256): 60
Arg [4] : _maxCommitmentAge (uint256): 604800

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000457efd33def0bff2dfe33089d385898d919d3a10
Arg [1] : 00000000000000000000000005b4b9873c64acd24adf4c67aa5775c7c5e56925
Arg [2] : 0000000000000000000000001656d34c117490079c534bc17f0a61e805648983
Arg [3] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [4] : 0000000000000000000000000000000000000000000000000000000000093a80


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.