Goerli Testnet

Contract

0xD870715d5231e7b264951988c867d723e539CDc2
Source Code

Overview

ETH Balance

0 ETH

Multi Chain

Multichain Addresses

N/A
Transaction Hash
Method
Block
From
To
Value
0x6080604077464912022-10-10 18:27:12426 days 19 hrs ago1665426432IN
 Create: ZNSHub
0 ETH0.002340431.71258838

Latest 25 internal transactions (View All)

Advanced mode:
Parent Txn Hash Block From To Value
94078262023-07-25 21:20:12138 days 16 hrs ago1690320012
0xD87071...e539CDc2
0 ETH
94077842023-07-25 21:11:00138 days 16 hrs ago1690319460
0xD87071...e539CDc2
0 ETH
94077402023-07-25 20:59:24138 days 16 hrs ago1690318764
0xD87071...e539CDc2
0 ETH
93710502023-07-19 12:17:48145 days 1 hr ago1689769068
0xD87071...e539CDc2
0 ETH
93710232023-07-19 12:12:00145 days 1 hr ago1689768720
0xD87071...e539CDc2
0 ETH
93710182023-07-19 12:10:36145 days 1 hr ago1689768636
0xD87071...e539CDc2
0 ETH
93666722023-07-18 17:19:24145 days 20 hrs ago1689700764
0xD87071...e539CDc2
0 ETH
93666152023-07-18 17:04:24145 days 20 hrs ago1689699864
0xD87071...e539CDc2
0 ETH
93666062023-07-18 17:02:00145 days 20 hrs ago1689699720
0xD87071...e539CDc2
0 ETH
92282522023-06-23 18:32:36170 days 18 hrs ago1687545156
0xD87071...e539CDc2
0 ETH
92282162023-06-23 18:24:00170 days 19 hrs ago1687544640
0xD87071...e539CDc2
0 ETH
92281922023-06-23 18:18:00170 days 19 hrs ago1687544280
0xD87071...e539CDc2
0 ETH
92267322023-06-23 12:04:24171 days 1 hr ago1687521864
0xD87071...e539CDc2
0 ETH
92267312023-06-23 12:04:12171 days 1 hr ago1687521852
0xD87071...e539CDc2
0 ETH
92267302023-06-23 12:04:00171 days 1 hr ago1687521840
0xD87071...e539CDc2
0 ETH
92267292023-06-23 12:03:48171 days 1 hr ago1687521828
0xD87071...e539CDc2
0 ETH
92267292023-06-23 12:03:48171 days 1 hr ago1687521828
0xD87071...e539CDc2
0 ETH
92267282023-06-23 12:03:24171 days 1 hr ago1687521804
0xD87071...e539CDc2
0 ETH
92267272023-06-23 12:03:12171 days 1 hr ago1687521792
0xD87071...e539CDc2
0 ETH
92267262023-06-23 12:03:00171 days 1 hr ago1687521780
0xD87071...e539CDc2
0 ETH
92267252023-06-23 12:02:48171 days 1 hr ago1687521768
0xD87071...e539CDc2
0 ETH
92267242023-06-23 12:02:24171 days 1 hr ago1687521744
0xD87071...e539CDc2
0 ETH
92260012023-06-23 9:05:00171 days 4 hrs ago1687511100
0xD87071...e539CDc2
0 ETH
92260002023-06-23 9:04:36171 days 4 hrs ago1687511076
0xD87071...e539CDc2
0 ETH
92259992023-06-23 9:04:24171 days 4 hrs ago1687511064
0xD87071...e539CDc2
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ZNSHub

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : ZNSHub.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {ContextUpgradeable} from "../oz/utils/ContextUpgradeable.sol";
import {ERC165Upgradeable} from "../oz/introspection/ERC165Upgradeable.sol";
import {OwnableUpgradeable} from "../oz/access/OwnableUpgradeable.sol";
import {IZNSHub} from "../interfaces/IZNSHub.sol";
import {IRegistrar} from "../interfaces/IRegistrar.sol";

contract ZNSHub is
  ContextUpgradeable,
  ERC165Upgradeable,
  IZNSHub,
  OwnableUpgradeable
{
  event EETransferV1(
    address registrar,
    address indexed from,
    address indexed to,
    uint256 indexed tokenId
  );

  event EEDomainCreatedV2(
    address registrar,
    uint256 indexed id,
    string label,
    uint256 indexed labelHash,
    uint256 indexed parent,
    address minter,
    address controller,
    string metadataUri,
    uint256 royaltyAmount
  );

  event EEDomainCreatedV3(
    address registrar,
    uint256 indexed id,
    string label,
    uint256 indexed labelHash,
    uint256 indexed parent,
    address minter,
    address controller,
    string metadataUri,
    uint256 royaltyAmount,
    uint256 groupId,
    uint256 groupFileIndex
  );

  event EEMetadataLockChanged(
    address registrar,
    uint256 indexed id,
    address locker,
    bool isLocked
  );

  event EEMetadataChanged(address registrar, uint256 indexed id, string uri);

  event EERoyaltiesAmountChanged(
    address registrar,
    uint256 indexed id,
    uint256 amount
  );

  event EENewSubdomainRegistrar(
    address parentRegistrar,
    uint256 rootId,
    address childRegistrar
  );

  event EEDomainGroupUpdatedV1(
    address parentRegistrar,
    uint256 folderGroupId,
    string baseMetadataUri
  );

  // Contains all zNS Registrars that are authentic
  mapping(address => bool) public authorizedRegistrars;

  // Contains all authorized global zNS controllers
  mapping(address => bool) public controllers;

  // The original default registrar
  address public defaultRegistrar;

  // Contains mapping of domain id to contract
  mapping(uint256 => address) public domainToContract;

  // Contains mapping of root domain id => subdomain registrar
  mapping(uint256 => address) public subdomainRegistrars;

  // Beacon Proxy used by zNS Registrars
  address public beacon;

  uint8 private test;

  modifier onlyRegistrar() {
    require(authorizedRegistrars[msg.sender], "REE: Not authorized registrar");
    _;
  }

  function initialize(address defaultRegistrar_, address registrarBeacon_)
    public
    initializer
  {
    __ERC165_init();
    __Context_init();
    __Ownable_init();
    defaultRegistrar = defaultRegistrar_;
    beacon = registrarBeacon_;
  }

  function setDefaultRegistrar(address defaultRegistrar_) public onlyOwner {
    defaultRegistrar = defaultRegistrar_;
  }

  function registrarBeacon() external view returns (address) {
    return beacon;
  }

  /**
   Adds a new registrar to the set of authorized registrars.
   Only the contract owner or an already registered registrar may
   add new registrars.
   */
  function addRegistrar(uint256 rootDomainId, address registrar) external {
    require(
      _msgSender() == owner() || authorizedRegistrars[_msgSender()],
      "REE: Not Authorized"
    );

    require(!authorizedRegistrars[registrar], "ZH: Already Registered");

    authorizedRegistrars[registrar] = true;
    subdomainRegistrars[rootDomainId] = registrar;

    emit EENewSubdomainRegistrar(_msgSender(), rootDomainId, registrar);
  }

  function isController(address controller) external view returns (bool) {
    return controllers[controller];
  }

  function addController(address controller) external onlyOwner {
    require(!controllers[controller], "ZH: Already controller");
    controllers[controller] = true;
  }

  function removeController(address controller) external onlyOwner {
    require(controllers[controller], "ZH: Not a controller");
    controllers[controller] = false;
  }

  function getRegistrarForDomain(uint256 domainId)
    public
    view
    returns (IRegistrar)
  {
    address registrar = domainToContract[domainId];
    if (registrar == address(0)) {
      registrar = defaultRegistrar;
    }
    return IRegistrar(registrar);
  }

  function ownerOf(uint256 domainId) public view returns (address) {
    IRegistrar reg = getRegistrarForDomain(domainId);
    require(reg.domainExists(domainId), "ZH: Domain doesn't exist");
    return reg.ownerOf(domainId);
  }

  function domainExists(uint256 domainId) public view returns (bool) {
    IRegistrar reg = getRegistrarForDomain(domainId);
    return reg.domainExists(domainId);
  }

  // Used by registrars to emit transfer events so that we can pick it
  // up on subgraph
  function domainTransferred(
    address from,
    address to,
    uint256 tokenId
  ) external onlyRegistrar {
    emit EETransferV1(_msgSender(), from, to, tokenId);
  }

  function domainCreated(
    uint256 id,
    string calldata label,
    uint256 labelHash,
    uint256 parent,
    address minter,
    address controller,
    string calldata metadataUri,
    uint256 royaltyAmount,
    uint256 groupId,
    uint256 groupFileIndex
  ) external onlyRegistrar {
    emit EEDomainCreatedV3(
      _msgSender(),
      id,
      label,
      labelHash,
      parent,
      minter,
      controller,
      metadataUri,
      royaltyAmount,
      groupId,
      groupFileIndex
    );
    domainToContract[id] = _msgSender();
  }

  function metadataLockChanged(
    uint256 id,
    address locker,
    bool isLocked
  ) external onlyRegistrar {
    emit EEMetadataLockChanged(_msgSender(), id, locker, isLocked);
  }

  function metadataChanged(uint256 id, string calldata uri)
    external
    onlyRegistrar
  {
    emit EEMetadataChanged(_msgSender(), id, uri);
  }

  function royaltiesAmountChanged(uint256 id, uint256 amount)
    external
    onlyRegistrar
  {
    emit EERoyaltiesAmountChanged(_msgSender(), id, amount);
  }

  function domainGroupUpdated(
    uint256 folderGroupId,
    string calldata baseMetadataUri
  ) external onlyRegistrar {
    emit EEDomainGroupUpdatedV1(_msgSender(), folderGroupId, baseMetadataUri);
  }

  function owner()
    public
    view
    override(OwnableUpgradeable, IZNSHub)
    returns (address)
  {
    return super.owner();
  }

  function parentOf(uint256 domainId) external view returns (uint256) {
    IRegistrar registrar = getRegistrarForDomain(domainId);
    return registrar.parentOf(domainId);
  }
}

File 2 of 12 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;
import "../proxy/Initializable.sol";

/*
 * @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 GSN 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 ContextUpgradeable is Initializable {
  function __Context_init() internal initializer {
    __Context_init_unchained();
  }

  function __Context_init_unchained() internal initializer {}

  function _msgSender() internal view virtual returns (address) {
    return msg.sender;
  }

  function _msgData() internal view virtual returns (bytes memory) {
    this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    return msg.data;
  }

  uint256[50] private __gap;
}

File 3 of 12 : ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "./IERC165Upgradeable.sol";
import "../proxy/Initializable.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
  /*
   * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
   */
  bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

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

  function __ERC165_init() internal initializer {
    __ERC165_init_unchained();
  }

  function __ERC165_init_unchained() internal initializer {
    // Derived contracts need only register support for their own interfaces,
    // we register support for ERC165 itself here
    _registerInterface(_INTERFACE_ID_ERC165);
  }

  /**
   * @dev See {IERC165-supportsInterface}.
   *
   * Time complexity O(1), guaranteed to always use less than 30 000 gas.
   */
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override
    returns (bool)
  {
    return _supportedInterfaces[interfaceId];
  }

  /**
   * @dev Registers the contract as an implementer of the interface defined by
   * `interfaceId`. Support of the actual ERC165 interface is automatic and
   * registering its interface id is not required.
   *
   * See {IERC165-supportsInterface}.
   *
   * Requirements:
   *
   * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
   */
  function _registerInterface(bytes4 interfaceId) internal virtual {
    require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
    _supportedInterfaces[interfaceId] = true;
  }

  uint256[49] private __gap;
}

File 4 of 12 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "../utils/ContextUpgradeable.sol";
import "../proxy/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
  address private _owner;

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

  /**
   * @dev Initializes the contract setting the deployer as the initial owner.
   */
  function __Ownable_init() internal initializer {
    __Context_init_unchained();
    __Ownable_init_unchained();
  }

  function __Ownable_init_unchained() internal initializer {
    address msgSender = _msgSender();
    _owner = msgSender;
    emit OwnershipTransferred(address(0), 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 {
    emit OwnershipTransferred(_owner, address(0));
    _owner = 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");
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }

  uint256[49] private __gap;
}

File 5 of 12 : IZNSHub.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import {IRegistrar} from "./IRegistrar.sol";

interface IZNSHub {
  function addRegistrar(uint256 rootDomainId, address registrar) external;

  function isController(address controller) external returns (bool);

  function getRegistrarForDomain(uint256 domainId)
    external
    view
    returns (IRegistrar);

  function ownerOf(uint256 domainId) external view returns (address);

  function domainExists(uint256 domainId) external view returns (bool);

  function owner() external view returns (address);

  function registrarBeacon() external view returns (address);

  function domainTransferred(
    address from,
    address to,
    uint256 tokenId
  ) external;

  function domainCreated(
    uint256 id,
    string calldata name,
    uint256 nameHash,
    uint256 parent,
    address minter,
    address controller,
    string calldata metadataUri,
    uint256 royaltyAmount,
    uint256 groupId,
    uint256 groupFileIndex
  ) external;

  function metadataLockChanged(
    uint256 id,
    address locker,
    bool isLocked
  ) external;

  function metadataChanged(uint256 id, string calldata uri) external;

  function royaltiesAmountChanged(uint256 id, uint256 amount) external;

  // Returns the parent domain of a child domain
  function parentOf(uint256 id) external view returns (uint256);

  function domainGroupUpdated(uint256 folderGroupId, string calldata baseUri)
    external;

  function subdomainRegistrars(uint256 id) external view returns (address);
}

File 6 of 12 : IRegistrar.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "../oz/token/ERC721/IERC721EnumerableUpgradeable.sol";
import "../oz/token/ERC721/IERC721MetadataUpgradeable.sol";

interface IRegistrar is
  IERC721MetadataUpgradeable,
  IERC721EnumerableUpgradeable
{
  // Emitted when a controller is removed
  event ControllerAdded(address indexed controller);

  // Emitted whenever a controller is removed
  event ControllerRemoved(address indexed controller);

  // Emitted whenever a new domain is created
  event DomainCreated(
    uint256 indexed id,
    string label,
    uint256 indexed labelHash,
    uint256 indexed parent,
    address minter,
    address controller,
    string metadataUri,
    uint256 royaltyAmount
  );

  // Emitted whenever the metadata of a domain is locked
  event MetadataLockChanged(uint256 indexed id, address locker, bool isLocked);

  // Emitted whenever the metadata of a domain is changed
  event MetadataChanged(uint256 indexed id, string uri);

  // Emitted whenever the royalty amount is changed
  event RoyaltiesAmountChanged(uint256 indexed id, uint256 amount);

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

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

  // Registers a new sub domain
  function registerDomain(
    uint256 parentId,
    string memory label,
    address minter,
    string memory metadataUri,
    uint256 royaltyAmount,
    bool locked
  ) external returns (uint256);

  function registerDomainAndSend(
    uint256 parentId,
    string memory label,
    address minter,
    string memory metadataUri,
    uint256 royaltyAmount,
    bool locked,
    address sendToUser
  ) external returns (uint256);

  function registerSubdomainContract(
    uint256 parentId,
    string memory label,
    address minter,
    string memory metadataUri,
    uint256 royaltyAmount,
    bool locked,
    address sendToUser
  ) external returns (uint256);

  function registerDomainInGroupBulk(
    uint256 parentId,
    uint256 groupId,
    uint256 namingOffset,
    uint256 startingIndex,
    uint256 endingIndex,
    address minter,
    uint256 royaltyAmount,
    address sendTo
  ) external;

  // Set a domains metadata uri and lock that domain from being modified
  function setAndLockDomainMetadata(uint256 id, string memory uri) external;

  // Lock a domain's metadata so that it cannot be changed
  function lockDomainMetadata(uint256 id, bool toLock) external;

  // Update a domain's metadata uri
  function setDomainMetadataUri(uint256 id, string memory uri) external;

  // Sets the asked royalty amount on a domain (amount is a percentage with 5 decimal places)
  function setDomainRoyaltyAmount(uint256 id, uint256 amount) external;

  // Returns whether an address is a controller
  function isController(address account) external view returns (bool);

  // Checks whether or not a domain exists
  function domainExists(uint256 id) external view returns (bool);

  // Returns the original minter of a domain
  function minterOf(uint256 id) external view returns (address);

  // Checks if a domains metadata is locked
  function isDomainMetadataLocked(uint256 id) external view returns (bool);

  // Returns the address which locked the domain metadata
  function domainMetadataLockedBy(uint256 id) external view returns (address);

  // Gets the controller that registered a domain
  function domainController(uint256 id) external view returns (address);

  // Gets a domains current royalty amount
  function domainRoyaltyAmount(uint256 id) external view returns (uint256);

  // Returns the parent domain of a child domain
  function parentOf(uint256 id) external view returns (uint256);

  function createDomainGroup(string memory baseMetadataUri)
    external
    returns (uint256);

  function updateDomainGroup(uint256 id, string memory baseMetadataUri)
    external;

  function numDomainGroups() external view returns (uint256);
}

File 7 of 12 : Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity ^0.8.9;

import "../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {
  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private _initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private _initializing;

  /**
   * @dev Modifier to protect an initializer function from being invoked twice.
   */
  modifier initializer() {
    require(
      _initializing || _isConstructor() || !_initialized,
      "Initializable: contract is already initialized"
    );

    bool isTopLevelCall = !_initializing;
    if (isTopLevelCall) {
      _initializing = true;
      _initialized = true;
    }

    _;

    if (isTopLevelCall) {
      _initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function _isConstructor() private view returns (bool) {
    return !AddressUpgradeable.isContract(address(this));
  }
}

File 8 of 12 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
  /**
   * @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
   * ====
   */
  function isContract(address account) internal view returns (bool) {
    // This method relies on extcodesize, which returns 0 for contracts in
    // construction, since the code is only stored at the end of the
    // constructor execution.

    uint256 size;
    // solhint-disable-next-line no-inline-assembly
    assembly {
      size := extcodesize(account)
    }
    return size > 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");

    // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
    (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");

    // solhint-disable-next-line avoid-low-level-calls
    (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");

    // solhint-disable-next-line avoid-low-level-calls
    (bool success, bytes memory returndata) = target.staticcall(data);
    return _verifyCallResult(success, returndata, errorMessage);
  }

  function _verifyCallResult(
    bool success,
    bytes memory returndata,
    string memory errorMessage
  ) private 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

        // solhint-disable-next-line no-inline-assembly
        assembly {
          let returndata_size := mload(returndata)
          revert(add(32, returndata), returndata_size)
        }
      } else {
        revert(errorMessage);
      }
    }
  }
}

File 9 of 12 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

/**
 * @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 IERC165Upgradeable {
  /**
   * @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 10 of 12 : IERC721EnumerableUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;
import "./IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721EnumerableUpgradeable is IERC721Upgradeable {
  /**
   * @dev Returns the total amount of tokens stored by the contract.
   */
  function totalSupply() external view returns (uint256);

  /**
   * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
   * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
   */
  function tokenOfOwnerByIndex(address owner, uint256 index)
    external
    view
    returns (uint256 tokenId);

  /**
   * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
   * Use along with {totalSupply} to enumerate all tokens.
   */
  function tokenByIndex(uint256 index) external view returns (uint256);
}

File 11 of 12 : IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;
import "./IERC721Upgradeable.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
  /**
   * @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 12 of 12 : IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;
import "../../introspection/IERC165Upgradeable.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
  /**
   * @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`, 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 Returns the account approved for `tokenId` token.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   */
  function getApproved(uint256 tokenId)
    external
    view
    returns (address operator);

  /**
   * @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 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);

  /**
   * @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;
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"label","type":"string"},{"indexed":true,"internalType":"uint256","name":"labelHash","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"parent","type":"uint256"},{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"string","name":"metadataUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"name":"EEDomainCreatedV2","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"label","type":"string"},{"indexed":true,"internalType":"uint256","name":"labelHash","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"parent","type":"uint256"},{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"address","name":"controller","type":"address"},{"indexed":false,"internalType":"string","name":"metadataUri","type":"string"},{"indexed":false,"internalType":"uint256","name":"royaltyAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"groupId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"groupFileIndex","type":"uint256"}],"name":"EEDomainCreatedV3","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"parentRegistrar","type":"address"},{"indexed":false,"internalType":"uint256","name":"folderGroupId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseMetadataUri","type":"string"}],"name":"EEDomainGroupUpdatedV1","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"EEMetadataChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"locker","type":"address"},{"indexed":false,"internalType":"bool","name":"isLocked","type":"bool"}],"name":"EEMetadataLockChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"parentRegistrar","type":"address"},{"indexed":false,"internalType":"uint256","name":"rootId","type":"uint256"},{"indexed":false,"internalType":"address","name":"childRegistrar","type":"address"}],"name":"EENewSubdomainRegistrar","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EERoyaltiesAmountChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"registrar","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"EETransferV1","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"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rootDomainId","type":"uint256"},{"internalType":"address","name":"registrar","type":"address"}],"name":"addRegistrar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorizedRegistrars","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beacon","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRegistrar","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"uint256","name":"labelHash","type":"uint256"},{"internalType":"uint256","name":"parent","type":"uint256"},{"internalType":"address","name":"minter","type":"address"},{"internalType":"address","name":"controller","type":"address"},{"internalType":"string","name":"metadataUri","type":"string"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"},{"internalType":"uint256","name":"groupId","type":"uint256"},{"internalType":"uint256","name":"groupFileIndex","type":"uint256"}],"name":"domainCreated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"domainId","type":"uint256"}],"name":"domainExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"folderGroupId","type":"uint256"},{"internalType":"string","name":"baseMetadataUri","type":"string"}],"name":"domainGroupUpdated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"domainToContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"domainTransferred","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"domainId","type":"uint256"}],"name":"getRegistrarForDomain","outputs":[{"internalType":"contract IRegistrar","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"defaultRegistrar_","type":"address"},{"internalType":"address","name":"registrarBeacon_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"isController","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"metadataChanged","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"locker","type":"address"},{"internalType":"bool","name":"isLocked","type":"bool"}],"name":"metadataLockChanged","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"domainId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"domainId","type":"uint256"}],"name":"parentOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registrarBeacon","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"royaltiesAmountChanged","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"defaultRegistrar_","type":"address"}],"name":"setDefaultRegistrar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"subdomainRegistrars","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506117c3806100206000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063a6f87ee3116100f9578063da8c229e11610097578063e1cc849011610071578063e1cc849014610409578063e43ad7d51461041a578063f2fde38b1461042d578063f6a74ed71461044057600080fd5b8063da8c229e146103c0578063df10cd0e146103e3578063e0b50dec146103f657600080fd5b8063b16eab65116100d3578063b16eab651461034d578063b429afeb14610360578063b8351c5c1461038c578063cfa3c1321461039f57600080fd5b8063a6f87ee3146102ee578063a7fc7a0714610317578063a9c6b3fa1461032a57600080fd5b806359659e9011610166578063715018a611610140578063715018a6146102b85780638da5cb5b146102c05780638de2dec9146102c85780638e831d9e146102db57600080fd5b806359659e901461027f5780636304aecb146102925780636352211e146102a557600080fd5b806301ffc9a7146101ae578063173b61a8146101f0578063393e836e146102055780633f7baeb914610218578063485cc9551461022b5780634b6160eb1461023e575b600080fd5b6101db6101bc366004611288565b6001600160e01b03191660009081526033602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6102036101fe3660046112fb565b610453565b005b61020361021336600461136c565b6104cc565b6102036102263660046113ad565b610558565b6102036102393660046113dd565b6106c9565b61026761024c36600461140b565b609a602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b609c54610267906001600160a01b031681565b6102676102a036600461140b565b610789565b6102676102b336600461140b565b6107ba565b6102036108ee565b610267610967565b6101db6102d636600461140b565b610980565b6102036102e9366004611424565b6109f8565b6102676102fc36600461140b565b609b602052600090815260409020546001600160a01b031681565b6102036103253660046114f9565b610a9f565b6101db6103383660046114f9565b60976020526000908152604090205460ff1681565b609954610267906001600160a01b031681565b6101db61036e3660046114f9565b6001600160a01b031660009081526098602052604090205460ff1690565b61020361039a3660046114f9565b610b54565b6103b26103ad36600461140b565b610ba5565b6040519081526020016101e7565b6101db6103ce3660046114f9565b60986020526000908152604090205460ff1681565b6102036103f1366004611516565b610c1d565b6102036104043660046112fb565b610c8a565b609c546001600160a01b0316610267565b610203610428366004611546565b610cfb565b61020361043b3660046114f9565b610d75565b61020361044e3660046114f9565b610e65565b3360009081526097602052604090205460ff1661048b5760405162461bcd60e51b815260040161048290611588565b60405180910390fd5b827f46b5f635ea2563da8822268d8558a1690da5088a058682a2507e6c39fd1a36403384846040516104bf939291906115e8565b60405180910390a2505050565b3360009081526097602052604090205460ff166104fb5760405162461bcd60e51b815260040161048290611588565b80826001600160a01b0316846001600160a01b03167f104ce6adace18a8921a4a90cde8b3f21b4958ccf5835b5085ad6026e80dd9bcd6105383390565b6040516001600160a01b03909116815260200160405180910390a4505050565b610560610967565b6001600160a01b0316336001600160a01b0316148061058e57503360009081526097602052604090205460ff165b6105d05760405162461bcd60e51b81526020600482015260136024820152721491514e88139bdd08105d5d1a1bdc9a5e9959606a1b6044820152606401610482565b6001600160a01b03811660009081526097602052604090205460ff16156106325760405162461bcd60e51b815260206004820152601660248201527516920e88105b1c9958591e48149959da5cdd195c995960521b6044820152606401610482565b6001600160a01b0381166000818152609760209081526040808320805460ff19166001179055858352609b909152902080546001600160a01b03191690911790557fff2d4441c70a09ed806c7c3992c2740b9560ff95e3876fe66a3395dbef18505861069b3390565b604080516001600160a01b039283168152602081018690529184169082015260600160405180910390a15050565b600054610100900460ff16806106de5750303b155b806106ec575060005460ff16155b6107085760405162461bcd60e51b815260040161048290611616565b600054610100900460ff1615801561072a576000805461ffff19166101011790555b610732610f14565b61073a610f92565b610742610ffb565b609980546001600160a01b038086166001600160a01b031992831617909255609c8054928516929091169190911790558015610784576000805461ff00191690555b505050565b6000818152609a60205260408120546001600160a01b0316806107b457506099546001600160a01b03165b92915050565b6000806107c683610789565b604051638de2dec960e01b8152600481018590529091506001600160a01b03821690638de2dec990602401602060405180830381865afa15801561080e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108329190611664565b61087e5760405162461bcd60e51b815260206004820152601860248201527f5a483a20446f6d61696e20646f65736e277420657869737400000000000000006044820152606401610482565b6040516331a9108f60e11b8152600481018490526001600160a01b03821690636352211e90602401602060405180830381865afa1580156108c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611681565b9392505050565b336108f7610967565b6001600160a01b03161461091d5760405162461bcd60e51b81526004016104829061169e565b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b600061097b6065546001600160a01b031690565b905090565b60008061098c83610789565b604051638de2dec960e01b8152600481018590529091506001600160a01b03821690638de2dec990602401602060405180830381865afa1580156109d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611664565b3360009081526097602052604090205460ff16610a275760405162461bcd60e51b815260040161048290611588565b87898d7f822332526c9d813f6561b5321967c517cace954a3769be46b2aa60c95c0db1ca338f8f8d8d8d8d8d8d8d604051610a6b9a999897969594939291906116d3565b60405180910390a450505060009889525050609a6020525050604090942080546001600160a01b0319163317905550505050565b33610aa8610967565b6001600160a01b031614610ace5760405162461bcd60e51b81526004016104829061169e565b6001600160a01b03811660009081526098602052604090205460ff1615610b305760405162461bcd60e51b81526020600482015260166024820152752d241d1020b63932b0b23c9031b7b73a3937b63632b960511b6044820152606401610482565b6001600160a01b03166000908152609860205260409020805460ff19166001179055565b33610b5d610967565b6001600160a01b031614610b835760405162461bcd60e51b81526004016104829061169e565b609980546001600160a01b0319166001600160a01b0392909216919091179055565b600080610bb183610789565b6040516367d1e09960e11b8152600481018590529091506001600160a01b0382169063cfa3c13290602401602060405180830381865afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611742565b3360009081526097602052604090205460ff16610c4c5760405162461bcd60e51b815260040161048290611588565b6040805133815260208101839052815184927f3c5f30a4d469e90e44e1c01f47c6be345fb987fdca8403a73416e02d40403fbc928290030190a25050565b3360009081526097602052604090205460ff16610cb95760405162461bcd60e51b815260040161048290611588565b7ff689f087f6173613915cadbcf1cf66648d93097fb15863f04033a9ee4b72cb4b33848484604051610cee949392919061175b565b60405180910390a1505050565b3360009081526097602052604090205460ff16610d2a5760405162461bcd60e51b815260040161048290611588565b827f7688b26a49451438d86586ed3dff712630a5804aa78a2079b39fa0c45f8413bb33604080516001600160a01b0392831681529186166020830152841515908201526060016104bf565b33610d7e610967565b6001600160a01b031614610da45760405162461bcd60e51b81526004016104829061169e565b6001600160a01b038116610e095760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610482565b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b33610e6e610967565b6001600160a01b031614610e945760405162461bcd60e51b81526004016104829061169e565b6001600160a01b03811660009081526098602052604090205460ff16610ef35760405162461bcd60e51b81526020600482015260146024820152732d241d102737ba10309031b7b73a3937b63632b960611b6044820152606401610482565b6001600160a01b03166000908152609860205260409020805460ff19169055565b600054610100900460ff1680610f295750303b155b80610f37575060005460ff16155b610f535760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610f75576000805461ffff19166101011790555b610f7d61106c565b8015610f8f576000805461ff00191690555b50565b600054610100900460ff1680610fa75750303b155b80610fb5575060005460ff16155b610fd15760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610ff3576000805461ffff19166101011790555b610f7d6110dd565b600054610100900460ff16806110105750303b155b8061101e575060005460ff16155b61103a5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff1615801561105c576000805461ffff19166101011790555b6110646110dd565b610f7d611151565b600054610100900460ff16806110815750303b155b8061108f575060005460ff16155b6110ab5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff161580156110cd576000805461ffff19166101011790555b610f7d6301ffc9a760e01b611209565b600054610100900460ff16806110f25750303b155b80611100575060005460ff16155b61111c5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610f7d576000805461ffff19166101011790558015610f8f576000805461ff001916905550565b600054610100900460ff16806111665750303b155b80611174575060005460ff16155b6111905760405162461bcd60e51b815260040161048290611616565b600054610100900460ff161580156111b2576000805461ffff19166101011790555b606580546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610f8f576000805461ff001916905550565b6001600160e01b031980821614156112635760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610482565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b60006020828403121561129a57600080fd5b81356001600160e01b0319811681146108e757600080fd5b60008083601f8401126112c457600080fd5b50813567ffffffffffffffff8111156112dc57600080fd5b6020830191508360208285010111156112f457600080fd5b9250929050565b60008060006040848603121561131057600080fd5b83359250602084013567ffffffffffffffff81111561132e57600080fd5b61133a868287016112b2565b9497909650939450505050565b6001600160a01b0381168114610f8f57600080fd5b803561136781611347565b919050565b60008060006060848603121561138157600080fd5b833561138c81611347565b9250602084013561139c81611347565b929592945050506040919091013590565b600080604083850312156113c057600080fd5b8235915060208301356113d281611347565b809150509250929050565b600080604083850312156113f057600080fd5b82356113fb81611347565b915060208301356113d281611347565b60006020828403121561141d57600080fd5b5035919050565b6000806000806000806000806000806000806101408d8f03121561144757600080fd5b8c359b5067ffffffffffffffff60208e0135111561146457600080fd5b6114748e60208f01358f016112b2565b909b50995060408d0135985060608d0135975061149360808e0161135c565b96506114a160a08e0161135c565b955067ffffffffffffffff60c08e013511156114bc57600080fd5b6114cc8e60c08f01358f016112b2565b9c9f9b9e50999c989b979a9699959895979660e08701359661010081013596506101200135945092505050565b60006020828403121561150b57600080fd5b81356108e781611347565b6000806040838503121561152957600080fd5b50508035926020909101359150565b8015158114610f8f57600080fd5b60008060006060848603121561155b57600080fd5b83359250602084013561156d81611347565b9150604084013561157d81611538565b809150509250925092565b6020808252601d908201527f5245453a204e6f7420617574686f72697a656420726567697374726172000000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038416815260406020820181905260009061160d90830184866115bf565b95945050505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561167657600080fd5b81516108e781611538565b60006020828403121561169357600080fd5b81516108e781611347565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b038b81168252610100602083018190526000916116fa8483018d8f6115bf565b8b82166040860152908a1660608501528381036080850152905061171f81888a6115bf565b60a0840196909652505060c081019290925260e090910152979650505050505050565b60006020828403121561175457600080fd5b5051919050565b60018060a01b03851681528360208201526060604082015260006117836060830184866115bf565b969550505050505056fea26469706673582212208c5c4e304010fd5854a5f34af1fc7106151b50c263d0a963d10837a7e07b754264736f6c634300080b0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063a6f87ee3116100f9578063da8c229e11610097578063e1cc849011610071578063e1cc849014610409578063e43ad7d51461041a578063f2fde38b1461042d578063f6a74ed71461044057600080fd5b8063da8c229e146103c0578063df10cd0e146103e3578063e0b50dec146103f657600080fd5b8063b16eab65116100d3578063b16eab651461034d578063b429afeb14610360578063b8351c5c1461038c578063cfa3c1321461039f57600080fd5b8063a6f87ee3146102ee578063a7fc7a0714610317578063a9c6b3fa1461032a57600080fd5b806359659e9011610166578063715018a611610140578063715018a6146102b85780638da5cb5b146102c05780638de2dec9146102c85780638e831d9e146102db57600080fd5b806359659e901461027f5780636304aecb146102925780636352211e146102a557600080fd5b806301ffc9a7146101ae578063173b61a8146101f0578063393e836e146102055780633f7baeb914610218578063485cc9551461022b5780634b6160eb1461023e575b600080fd5b6101db6101bc366004611288565b6001600160e01b03191660009081526033602052604090205460ff1690565b60405190151581526020015b60405180910390f35b6102036101fe3660046112fb565b610453565b005b61020361021336600461136c565b6104cc565b6102036102263660046113ad565b610558565b6102036102393660046113dd565b6106c9565b61026761024c36600461140b565b609a602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e7565b609c54610267906001600160a01b031681565b6102676102a036600461140b565b610789565b6102676102b336600461140b565b6107ba565b6102036108ee565b610267610967565b6101db6102d636600461140b565b610980565b6102036102e9366004611424565b6109f8565b6102676102fc36600461140b565b609b602052600090815260409020546001600160a01b031681565b6102036103253660046114f9565b610a9f565b6101db6103383660046114f9565b60976020526000908152604090205460ff1681565b609954610267906001600160a01b031681565b6101db61036e3660046114f9565b6001600160a01b031660009081526098602052604090205460ff1690565b61020361039a3660046114f9565b610b54565b6103b26103ad36600461140b565b610ba5565b6040519081526020016101e7565b6101db6103ce3660046114f9565b60986020526000908152604090205460ff1681565b6102036103f1366004611516565b610c1d565b6102036104043660046112fb565b610c8a565b609c546001600160a01b0316610267565b610203610428366004611546565b610cfb565b61020361043b3660046114f9565b610d75565b61020361044e3660046114f9565b610e65565b3360009081526097602052604090205460ff1661048b5760405162461bcd60e51b815260040161048290611588565b60405180910390fd5b827f46b5f635ea2563da8822268d8558a1690da5088a058682a2507e6c39fd1a36403384846040516104bf939291906115e8565b60405180910390a2505050565b3360009081526097602052604090205460ff166104fb5760405162461bcd60e51b815260040161048290611588565b80826001600160a01b0316846001600160a01b03167f104ce6adace18a8921a4a90cde8b3f21b4958ccf5835b5085ad6026e80dd9bcd6105383390565b6040516001600160a01b03909116815260200160405180910390a4505050565b610560610967565b6001600160a01b0316336001600160a01b0316148061058e57503360009081526097602052604090205460ff165b6105d05760405162461bcd60e51b81526020600482015260136024820152721491514e88139bdd08105d5d1a1bdc9a5e9959606a1b6044820152606401610482565b6001600160a01b03811660009081526097602052604090205460ff16156106325760405162461bcd60e51b815260206004820152601660248201527516920e88105b1c9958591e48149959da5cdd195c995960521b6044820152606401610482565b6001600160a01b0381166000818152609760209081526040808320805460ff19166001179055858352609b909152902080546001600160a01b03191690911790557fff2d4441c70a09ed806c7c3992c2740b9560ff95e3876fe66a3395dbef18505861069b3390565b604080516001600160a01b039283168152602081018690529184169082015260600160405180910390a15050565b600054610100900460ff16806106de5750303b155b806106ec575060005460ff16155b6107085760405162461bcd60e51b815260040161048290611616565b600054610100900460ff1615801561072a576000805461ffff19166101011790555b610732610f14565b61073a610f92565b610742610ffb565b609980546001600160a01b038086166001600160a01b031992831617909255609c8054928516929091169190911790558015610784576000805461ff00191690555b505050565b6000818152609a60205260408120546001600160a01b0316806107b457506099546001600160a01b03165b92915050565b6000806107c683610789565b604051638de2dec960e01b8152600481018590529091506001600160a01b03821690638de2dec990602401602060405180830381865afa15801561080e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108329190611664565b61087e5760405162461bcd60e51b815260206004820152601860248201527f5a483a20446f6d61696e20646f65736e277420657869737400000000000000006044820152606401610482565b6040516331a9108f60e11b8152600481018490526001600160a01b03821690636352211e90602401602060405180830381865afa1580156108c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611681565b9392505050565b336108f7610967565b6001600160a01b03161461091d5760405162461bcd60e51b81526004016104829061169e565b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b600061097b6065546001600160a01b031690565b905090565b60008061098c83610789565b604051638de2dec960e01b8152600481018590529091506001600160a01b03821690638de2dec990602401602060405180830381865afa1580156109d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611664565b3360009081526097602052604090205460ff16610a275760405162461bcd60e51b815260040161048290611588565b87898d7f822332526c9d813f6561b5321967c517cace954a3769be46b2aa60c95c0db1ca338f8f8d8d8d8d8d8d8d604051610a6b9a999897969594939291906116d3565b60405180910390a450505060009889525050609a6020525050604090942080546001600160a01b0319163317905550505050565b33610aa8610967565b6001600160a01b031614610ace5760405162461bcd60e51b81526004016104829061169e565b6001600160a01b03811660009081526098602052604090205460ff1615610b305760405162461bcd60e51b81526020600482015260166024820152752d241d1020b63932b0b23c9031b7b73a3937b63632b960511b6044820152606401610482565b6001600160a01b03166000908152609860205260409020805460ff19166001179055565b33610b5d610967565b6001600160a01b031614610b835760405162461bcd60e51b81526004016104829061169e565b609980546001600160a01b0319166001600160a01b0392909216919091179055565b600080610bb183610789565b6040516367d1e09960e11b8152600481018590529091506001600160a01b0382169063cfa3c13290602401602060405180830381865afa158015610bf9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e79190611742565b3360009081526097602052604090205460ff16610c4c5760405162461bcd60e51b815260040161048290611588565b6040805133815260208101839052815184927f3c5f30a4d469e90e44e1c01f47c6be345fb987fdca8403a73416e02d40403fbc928290030190a25050565b3360009081526097602052604090205460ff16610cb95760405162461bcd60e51b815260040161048290611588565b7ff689f087f6173613915cadbcf1cf66648d93097fb15863f04033a9ee4b72cb4b33848484604051610cee949392919061175b565b60405180910390a1505050565b3360009081526097602052604090205460ff16610d2a5760405162461bcd60e51b815260040161048290611588565b827f7688b26a49451438d86586ed3dff712630a5804aa78a2079b39fa0c45f8413bb33604080516001600160a01b0392831681529186166020830152841515908201526060016104bf565b33610d7e610967565b6001600160a01b031614610da45760405162461bcd60e51b81526004016104829061169e565b6001600160a01b038116610e095760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610482565b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b33610e6e610967565b6001600160a01b031614610e945760405162461bcd60e51b81526004016104829061169e565b6001600160a01b03811660009081526098602052604090205460ff16610ef35760405162461bcd60e51b81526020600482015260146024820152732d241d102737ba10309031b7b73a3937b63632b960611b6044820152606401610482565b6001600160a01b03166000908152609860205260409020805460ff19169055565b600054610100900460ff1680610f295750303b155b80610f37575060005460ff16155b610f535760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610f75576000805461ffff19166101011790555b610f7d61106c565b8015610f8f576000805461ff00191690555b50565b600054610100900460ff1680610fa75750303b155b80610fb5575060005460ff16155b610fd15760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610ff3576000805461ffff19166101011790555b610f7d6110dd565b600054610100900460ff16806110105750303b155b8061101e575060005460ff16155b61103a5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff1615801561105c576000805461ffff19166101011790555b6110646110dd565b610f7d611151565b600054610100900460ff16806110815750303b155b8061108f575060005460ff16155b6110ab5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff161580156110cd576000805461ffff19166101011790555b610f7d6301ffc9a760e01b611209565b600054610100900460ff16806110f25750303b155b80611100575060005460ff16155b61111c5760405162461bcd60e51b815260040161048290611616565b600054610100900460ff16158015610f7d576000805461ffff19166101011790558015610f8f576000805461ff001916905550565b600054610100900460ff16806111665750303b155b80611174575060005460ff16155b6111905760405162461bcd60e51b815260040161048290611616565b600054610100900460ff161580156111b2576000805461ffff19166101011790555b606580546001600160a01b0319163390811790915560405181906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610f8f576000805461ff001916905550565b6001600160e01b031980821614156112635760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e74657266616365206964000000006044820152606401610482565b6001600160e01b0319166000908152603360205260409020805460ff19166001179055565b60006020828403121561129a57600080fd5b81356001600160e01b0319811681146108e757600080fd5b60008083601f8401126112c457600080fd5b50813567ffffffffffffffff8111156112dc57600080fd5b6020830191508360208285010111156112f457600080fd5b9250929050565b60008060006040848603121561131057600080fd5b83359250602084013567ffffffffffffffff81111561132e57600080fd5b61133a868287016112b2565b9497909650939450505050565b6001600160a01b0381168114610f8f57600080fd5b803561136781611347565b919050565b60008060006060848603121561138157600080fd5b833561138c81611347565b9250602084013561139c81611347565b929592945050506040919091013590565b600080604083850312156113c057600080fd5b8235915060208301356113d281611347565b809150509250929050565b600080604083850312156113f057600080fd5b82356113fb81611347565b915060208301356113d281611347565b60006020828403121561141d57600080fd5b5035919050565b6000806000806000806000806000806000806101408d8f03121561144757600080fd5b8c359b5067ffffffffffffffff60208e0135111561146457600080fd5b6114748e60208f01358f016112b2565b909b50995060408d0135985060608d0135975061149360808e0161135c565b96506114a160a08e0161135c565b955067ffffffffffffffff60c08e013511156114bc57600080fd5b6114cc8e60c08f01358f016112b2565b9c9f9b9e50999c989b979a9699959895979660e08701359661010081013596506101200135945092505050565b60006020828403121561150b57600080fd5b81356108e781611347565b6000806040838503121561152957600080fd5b50508035926020909101359150565b8015158114610f8f57600080fd5b60008060006060848603121561155b57600080fd5b83359250602084013561156d81611347565b9150604084013561157d81611538565b809150509250925092565b6020808252601d908201527f5245453a204e6f7420617574686f72697a656420726567697374726172000000604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038416815260406020820181905260009061160d90830184866115bf565b95945050505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60006020828403121561167657600080fd5b81516108e781611538565b60006020828403121561169357600080fd5b81516108e781611347565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b038b81168252610100602083018190526000916116fa8483018d8f6115bf565b8b82166040860152908a1660608501528381036080850152905061171f81888a6115bf565b60a0840196909652505060c081019290925260e090910152979650505050505050565b60006020828403121561175457600080fd5b5051919050565b60018060a01b03851681528360208201526060604082015260006117836060830184866115bf565b969550505050505056fea26469706673582212208c5c4e304010fd5854a5f34af1fc7106151b50c263d0a963d10837a7e07b754264736f6c634300080b0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ 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.