ETH Price: $3,759.82 (-2.68%)
Gas: 13 Gwei

Contract

0x04ebA57401184A97C919b0B6b4e8dDE263BCb920
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Transfer Origin ...197494632024-04-27 21:51:2332 days ago1714254683IN
0x04ebA574...263BCb920
0 ETH0.000165174.22841391
Register183829932023-10-19 7:48:11223 days ago1697701691IN
0x04ebA574...263BCb920
0 ETH0.001439646.241685
Register183828642023-10-19 7:21:47223 days ago1697700107IN
0x04ebA574...263BCb920
0 ETH0.001626167.08638436
Register183800552023-10-18 21:55:11224 days ago1697666111IN
0x04ebA574...263BCb920
0 ETH0.00183577.85235127
Register183788702023-10-18 17:57:47224 days ago1697651867IN
0x04ebA574...263BCb920
0 ETH0.0026945313.97176128
Register183292132023-10-11 19:15:35231 days ago1697051735IN
0x04ebA574...263BCb920
0 ETH0.001730999.01154772
Set Base URI182809392023-10-05 1:09:59238 days ago1696468199IN
0x04ebA574...263BCb920
0 ETH0.000219276.28558348
Set Base URI182809302023-10-05 1:08:11238 days ago1696468091IN
0x04ebA574...263BCb920
0 ETH0.000217276.22610316
Sync182805312023-10-04 23:47:35238 days ago1696463255IN
0x04ebA574...263BCb920
0 ETH0.000878936.34414189
Sync182329642023-09-28 8:11:59244 days ago1695888719IN
0x04ebA574...263BCb920
0 ETH0.001137857.93801307
Sync182311852023-09-28 2:11:11245 days ago1695867071IN
0x04ebA574...263BCb920
0 ETH0.000831446.84756499
Sync182311432023-09-28 2:02:47245 days ago1695866567IN
0x04ebA574...263BCb920
0 ETH0.001094167.63326486
Register181761182023-09-20 9:10:23252 days ago1695201023IN
0x04ebA574...263BCb920
0 ETH0.001874828.15608582
Sync181759312023-09-20 8:32:47252 days ago1695198767IN
0x04ebA574...263BCb920
0 ETH0.00099058.15752401
Sync181672062023-09-19 3:12:59254 days ago1695093179IN
0x04ebA574...263BCb920
0 ETH0.001209938.44207762
Register179384642023-08-18 1:40:11286 days ago1692322811IN
0x04ebA574...263BCb920
0 ETH0.0058272925.22189316
Sync179327382023-08-17 6:25:59287 days ago1692253559IN
0x04ebA574...263BCb920
0 ETH0.002295116.56612757
Set Operator179261982023-08-16 8:28:11287 days ago1692174491IN
0x04ebA574...263BCb920
0 ETH0.0008221716.41631314
Set Approval For...179261902023-08-16 8:26:35287 days ago1692174395IN
0x04ebA574...263BCb920
0 ETH0.0007904817.04993745
0x60806040178820612023-08-10 4:18:59294 days ago1691641139IN
 Create: HipHopZone
0 ETH0.0751290820

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HipHopZone

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 30 : HipHop.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "../ICANN.sol";

contract HipHopZone is ICANNZone {
  constructor()
    ICANNZone(
      ENS(0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e),
      PublicResolver(0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41),
      0x2e4d0b92c040073a779a941f10fd3884f10b8995870e4059fa548aa532b4ff3e,
      ".hiphop",
      "HIPHOP",
      "ipfs://"
    )
  {}
}

File 3 of 30 : ICANN.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./Standard.sol";
import "./../external/ENS.sol";
import "./../external/PublicResolver.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

contract ICANNZone is StandardZone {
  using ECDSA for bytes32;
  using Strings for uint256;

  event SetOperator(
    address indexed owner,
    bytes32 indexed namehash,
    address indexed operator,
    bool approved
  );

  event Assigned(bytes32 indexed namehash, address indexed owner);

  event Synced(bytes32 indexed namehash, address indexed owner);

  event ChildLockSet(bytes32 indexed namehash, bool locked);

  event LockSet(bytes32 indexed namehash, bool locked);

  ENS public ens;
  PublicResolver public resolver;

  mapping(address => mapping(bytes32 => mapping(address => bool)))
    private operators;

  struct Domain {
    bytes32 parent;
    bytes32 label;
    uint256 nonce;
    bool locked;
    bool childlock;
  }

  mapping(bytes32 => Domain) public domains;

  constructor(
    ENS _registry,
    PublicResolver _resolver,
    bytes32 _origin,
    string memory _name,
    string memory _symbol,
    string memory _baseURI
  ) StandardZone(msg.sender, _origin, _name, _symbol, _baseURI) {
    ens = _registry;
    resolver = _resolver;
  }

  modifier onlyOperator(bytes32 namehash) {
    require(isOperator(namehash, _msgSender()), "unauthorized");
    _;
  }

  modifier onlyParentOperator(bytes32 namehash) {
    if (namehash == getOrigin()) {
      require(isOperator(namehash, _msgSender()), "unauthorized");
    } else {
      bytes32 parent = domains[namehash].parent;
      require(isOperator(parent, _msgSender()), "unauthorized");
    }
    _;
  }

  modifier onlyZoneAdmin() {
    require(
      _isApprovedOrOwner(_msgSender(), uint256(getOrigin())),
      "must own zone"
    );
    _;
  }

  // register a new domain
  function register(
    address to,
    bytes32 parent,
    string memory label
  ) public virtual override returns (bytes32 namehash) {
    require(
      _isApprovedOrOwner(_msgSender(), uint256(parent)),
      "must own parent"
    );
    require(_isValidLabel(bytes(label)), "invalid label");

    bytes32 _label = keccak256(bytes(label));
    namehash = _register(to, parent, _label);

    domains[namehash].parent = parent;

    emit ResourceRegistered(parent, label);
  }

  function _register(
    address to,
    bytes32 parent,
    bytes32 label
  ) internal virtual returns (bytes32 namehash) {
    namehash = keccak256(abi.encodePacked(parent, label));

    domains[namehash] = Domain({
      parent: parent,
      label: label,
      nonce: 0,
      locked: false,
      childlock: false
    });

    _safeMint(to, uint256(namehash));
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual override {
    bytes32 namehash = bytes32(tokenId);
    require(
      from == address(0x0) || !isLocked(namehash),
      "transfer not allowed"
    );

    if (namehash != getOrigin()) {
      _bridge(to, namehash);
    }
  }

  function _bridge(address to, bytes32 namehash) internal virtual {
    bytes32 parent = domains[namehash].parent;
    bytes32 label = domains[namehash].label;
    require(parent != 0x0 && label != 0x0, "invalid namehash");

    _takeOwnership(parent);

    bytes32 subnode = ens.setSubnodeOwner(parent, label, address(this));

    resolver.setAddr(subnode, to);
    ens.setResolver(subnode, address(resolver));
    ens.setSubnodeOwner(parent, label, to);

    _resetOwnership(parent);
  }

  function _takeOwnership(bytes32 namehash) internal {
    if (namehash != getOrigin() && ens.owner(namehash) != address(this)) {
      _takeOwnership(domains[namehash].parent);
      ens.setSubnodeOwner(
        domains[namehash].parent,
        domains[namehash].label,
        address(this)
      );
    }
  }

  function _resetOwnership(bytes32 namehash) internal {
    if (namehash != getOrigin() && ens.owner(namehash) == address(this)) {
      ens.setOwner(namehash, ownerOf(uint256(namehash)));
      _resetOwnership(domains[namehash].parent);
    }
  }

  function assign(address[] memory to, bytes32[] memory namehashes)
    public
    onlyZoneAdmin
  {
    require(to.length == namehashes.length, "Mismatched arrays");
    for (uint256 i = 0; i < namehashes.length; i++) {
      _assign(to[i], namehashes[i]);
    }
  }

  function assignTo(address to, bytes32[] memory namehashes)
    public
    onlyZoneAdmin
  {
    for (uint256 i = 0; i < namehashes.length; i++) {
      _assign(to, namehashes[i]);
    }
  }

  function _assign(address to, bytes32 namehash) internal {
    if (_exists(uint256(namehash))) {
      address currentOwner = ownerOf(uint256(namehash));
      _transfer(currentOwner, to, uint256(namehash));
      emit Assigned(namehash, to);
    }
  }

  function sync(
    address to,
    bytes32 parent,
    string memory label,
    bytes memory signature,
    uint256 nonce
  ) public virtual {
    bytes32 _label = keccak256(bytes(label));
    bytes32 namehash = keccak256(abi.encodePacked(parent, _label));

    require(nonce > domains[namehash].nonce, "invalid nonce");

    bytes32 message = keccak256(abi.encodePacked(nonce, to, namehash));
    address operator = message.toEthSignedMessageHash().recover(signature);

    require(isOperator(parent, operator), "unauthorized");

    domains[namehash].nonce = nonce;
    _assign(to, namehash);

    emit Synced(namehash, to);
  }

  // zone settings
  function setOperator(
    bytes32 namehash,
    address operator,
    bool approved
  ) public virtual {
    require(
      _isApprovedOrOwner(_msgSender(), uint256(namehash)),
      "unauthorized"
    );
    address owner = ownerOf(uint256(namehash));
    operators[owner][namehash][operator] = approved;
    emit SetOperator(owner, namehash, operator, approved);
  }

  function isOperator(bytes32 namehash, address operator)
    public
    view
    returns (bool)
  {
    address owner = ownerOf(uint256(namehash));
    return owner == operator || operators[owner][namehash][operator];
  }

  function lock(bytes32 namehash, bool _lock)
    public
    onlyParentOperator(namehash)
  {
    domains[namehash].locked = _lock;
    emit LockSet(namehash, _lock);
  }

  function childlock(bytes32 namehash, bool _lock)
    public
    onlyParentOperator(namehash)
  {
    domains[namehash].childlock = _lock;
    emit ChildLockSet(namehash, _lock);
  }

  // Updated function to check if a domain is locked using recursion
  function isLocked(bytes32 namehash) public view returns (bool) {
    return domains[namehash].locked || isChildLocked(namehash);
  }

  function isChildLocked(bytes32 namehash) public view returns (bool) {
    if (namehash == getOrigin()) {
      return domains[namehash].childlock;
    } else {
      return
        domains[namehash].childlock || isChildLocked(domains[namehash].parent);
    }
  }

  // Add a function to read the parent of a domain
  function parentOf(bytes32 namehash) public view returns (bytes32) {
    return domains[namehash].parent;
  }

  // Add a function to read the label of a domain
  function labelOf(bytes32 namehash) public view returns (bytes32) {
    return domains[namehash].label;
  }

  // Add a function to read the nonce of a domain
  function nonceOf(bytes32 namehash) public view returns (uint256) {
    return domains[namehash].nonce;
  }

  function setTokenURI(uint256 tokenId, string memory _tokenURI)
    public
    onlyZoneAdmin
  {
    _setTokenURI(tokenId, _tokenURI);
  }

  function transferOriginTo(address to) public onlyZoneAdmin {
    ens.setOwner(getOrigin(), to);
  }
}

File 4 of 30 : Standard.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./Base.sol";

contract StandardZone is BaseZone {
  string public baseURI;

  constructor(
    address admin,
    bytes32 origin,
    string memory name,
    string memory symbol,
    string memory baseTokenURI
  ) BaseZone(admin, origin, name, symbol) {
    _setBaseURI(baseTokenURI);
  }

  function setBaseURI(string memory base) public {
    require(
      _isApprovedOrOwner(_msgSender(), uint256(getOrigin())),
      "must own zone"
    );
    _setBaseURI(base);
  }

  // function contractURI() public view returns (string memory) {
  //   return tokenURI(uint256(getOrigin()));
  // }

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

  function _setBaseURI(string memory base) internal virtual {
    baseURI = base;
  }
}

File 5 of 30 : ENS.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

interface ENS {

    // Logged when the owner of a node assigns a new owner to a subnode.
    event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

    // Logged when the owner of a node transfers ownership to a new account.
    event Transfer(bytes32 indexed node, address owner);

    // Logged when the resolver for a node changes.
    event NewResolver(bytes32 indexed node, address resolver);

    // Logged when the TTL of a node changes
    event NewTTL(bytes32 indexed node, uint64 ttl);

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

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

File 6 of 30 : PublicResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./ENS.sol";
import "./profiles/AddrResolver.sol";
import "./profiles/TextResolver.sol";

/**
 * A simple resolver anyone can use; only allows the owner of a node to set its
 * address.
 */
contract PublicResolver is AddrResolver, TextResolver {
  ENS ens;

  /**
    * A mapping of operators. An address that is authorised for an address
    * may make any changes to the name that the owner could, but may not update
    * the set of authorisations.
    * (owner, operator) => approved
    */
  mapping(address => mapping(address => bool)) private _operatorApprovals;

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

  constructor(ENS _ens){
    ens = _ens;
  }

  /**
    * @dev See {IERC1155-setApprovalForAll}.
    */
  function setApprovalForAll(address operator, bool approved) external{
    require(
      msg.sender != operator,
      "ERC1155: setting approval status for self"
    );

    _operatorApprovals[msg.sender][operator] = approved;
    emit ApprovalForAll(msg.sender, operator, approved);
  }

  function isAuthorised(bytes32 node) internal override view returns(bool) {
    address owner = ens.owner(node);
    return owner == msg.sender || isApprovedForAll(owner, msg.sender);
  }

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

File 7 of 30 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 8 of 30 : Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./Interface.sol";
import "../common/StandardNFT.sol";

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract BaseZone is ZoneInterface, StandardNFT {
  using SafeMath for uint256;

  bytes32 private _origin;

  constructor(
    address admin,
    bytes32 origin,
    string memory name,
    string memory symbol
  ) ERC721(name, symbol) EIP712MetaTransaction(name) {
    _origin = origin;
    _safeMint(admin, uint256(origin));
    emit ZoneCreated(origin, name, symbol);
  }

  function getOrigin() public view override returns (bytes32) {
    return _origin;
  }

  function owner() public view virtual override returns (address) {
    return ownerOf(uint256(_origin));
  }

  modifier onlyOwner() {
    require(owner() == _msgSender(), "Ownable: caller is not the owner");
    _;
  }

  function exists(bytes32 namehash)
    external
    view
    virtual
    override
    returns (bool)
  {
    return _exists(uint256(namehash));
  }

  function register(
    address to,
    bytes32 parent,
    string memory label
  ) public virtual override returns (bytes32 namehash) {
    require(
      _isApprovedOrOwner(_msgSender(), uint256(parent)),
      "must own parent"
    );
    require(_isValidLabel(bytes(label)), "invalid label");

    namehash = keccak256(abi.encodePacked(parent, keccak256(bytes(label))));
    _safeMint(to, uint256(namehash));

    emit ResourceRegistered(parent, label);
  }

  function _isValidLabel(bytes memory label)
    internal
    view
    virtual
    returns (bool valid)
  {
    require(label.length > 0, "must include a label");

    valid = true;

    for (uint256 i = 0; i < label.length; i++) {
      uint8 char = uint8(label[i]);
      valid =
        valid &&
        (char == 45 ||
          (char >= 48 && char <= 57) ||
          (char >= 97 && char <= 122));
    }
  }

  function _msgSender()
    internal
    view
    virtual
    override
    returns (address sender)
  {
    return EIP712MetaTransaction.msgSender();
  }
}

File 9 of 30 : Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

interface ZoneInterface {
  event ZoneCreated(bytes32 indexed origin, string name, string symbol);
  event ResourceRegistered(bytes32 indexed parent, string label);

  function getOrigin() external view returns (bytes32);

  function owner() external view returns (address);

  function exists(bytes32 namehash) external view returns (bool);

  function register(
    address to,
    bytes32 parent,
    string memory label
  ) external returns (bytes32 namehash);
}

File 10 of 30 : StandardNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./ERC721HexURI.sol";
import "./EIP712MetaTransaction.sol";

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";

abstract contract StandardNFT is
  ERC721HexURI,
  ERC721Burnable,
  ERC721Enumerable,
  ERC721URIStorage,
  EIP712MetaTransaction
{
  using Strings for uint256;
  using SafeMath for uint256;

  // Context Overrides
  function _msgSender() internal view virtual override returns (address sender) {
    return EIP712MetaTransaction.msgSender();
  }

  // ERC721URIStorage Overrides
  function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
    super._burn(tokenId);
  }

  // ERC721Enumerable Overrides
  function supportsInterface(
    bytes4 interfaceId
  ) public view virtual override(ERC721, ERC721Enumerable) returns (bool) {
    return super.supportsInterface(interfaceId);
  }

  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual override(ERC721, ERC721Enumerable) {
    super._beforeTokenTransfer(from, to, tokenId);
  }

  function tokenURI(uint256 tokenId)
    public view virtual override(ERC721, ERC721HexURI, ERC721URIStorage)
    returns (string memory)
  {
    return super.tokenURI(tokenId);
  }
}

File 11 of 30 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 12 of 30 : ERC721HexURI.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";

abstract contract ERC721HexURI is ERC721 {
  using Strings for uint256;

  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    string memory base = _baseURI();
    return bytes(base).length > 0 ? string(abi.encodePacked(base, tokenId.toHexString(32))) : "";
  }
}

File 13 of 30 : EIP712MetaTransaction.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./EIP712Base.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract EIP712MetaTransaction is EIP712Base {
  using SafeMath for uint256;

  event MetaTransactionExecuted(address userAddress, address payable relayerAddress, bytes functionSignature);

  struct MetaTransaction {
    uint256 nonce;
    address from;
    bytes functionSignature;
  }

  bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(bytes("MetaTransaction(uint256 nonce,address from,bytes functionSignature)"));
  mapping(address => uint256) private nonces;

  constructor(string memory name) EIP712Base(name) {}

  function convertBytesToBytes4(
    bytes memory inBytes
  ) internal pure returns (bytes4 outBytes4) {
    if (inBytes.length == 0) {
      return 0x0;
    }

    assembly {
      outBytes4 := mload(add(inBytes, 32))
    }
  }

  function executeMetaTransaction(
    address userAddress,
    bytes memory functionSignature,
    bytes32 sigR,
    bytes32 sigS,
    uint8 sigV
  ) public payable returns(bytes memory) {
    bytes4 destinationFunctionSig = convertBytesToBytes4(functionSignature);
    require(destinationFunctionSig != msg.sig, "functionSignature can not be of executeMetaTransaction method");
    MetaTransaction memory metaTx = MetaTransaction({
      nonce: nonces[userAddress],
      from: userAddress,
      functionSignature: functionSignature
    });
    require(verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match");
    nonces[userAddress] = nonces[userAddress].add(1);
    // Append userAddress at the end to extract it from calling context
    (bool success, bytes memory returnData) = address(this).call(abi.encodePacked(functionSignature, userAddress));

    require(success, "Function call not successful");
    emit MetaTransactionExecuted(userAddress, payable(msg.sender), functionSignature);
    return returnData;
  }

  function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) {
    return keccak256(abi.encode(
      META_TRANSACTION_TYPEHASH,
      metaTx.nonce,
      metaTx.from,
      keccak256(metaTx.functionSignature)
    ));
  }

  function getNonce(address user) external view returns(uint256 nonce) {
    nonce = nonces[user];
  }

  function verify(address user, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV) internal view returns (bool) {
    address signer = ecrecover(toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS);
    require(signer != address(0), "Invalid signature");
    return signer == user;
  }

  function msgSender() internal view returns(address sender) {
    if(msg.sender == address(this)) {
      bytes memory array = msg.data;
      uint256 index = msg.data.length;
      assembly {
        // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
        sender := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)
      }
    } else {
      sender = msg.sender;
    }
    return sender;
  }
}

File 14 of 30 : 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 15 of 30 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

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

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 17 of 30 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 18 of 30 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

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

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @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 override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

File 19 of 30 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 overriden 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 || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

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

    /**
     * @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 of token that is not own");
        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);
    }

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

File 20 of 30 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, 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;
}

File 21 of 30 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 22 of 30 : 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 23 of 30 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        (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 24 of 30 : 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 25 of 30 : 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 26 of 30 : 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 27 of 30 : EIP712Base.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

contract EIP712Base {
  struct EIP712Domain {
    string name;
    string version;
    address verifyingContract;
    bytes32 salt;
  }

  bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(bytes("EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"));

  bytes32 internal domainSeparator;

  constructor(string memory name) {
    domainSeparator = keccak256(abi.encode(
      EIP712_DOMAIN_TYPEHASH,
      keccak256(bytes(name)),
      keccak256(bytes("1")),
      address(this),
      bytes32(getChainID())
    ));
  }

  function getChainID() internal view returns (uint256 id) {
    assembly {
      id := chainid()
    }
  }

  function getDomainSeparator() private view returns(bytes32) {
    return domainSeparator;
  }

  /**
  * Accept message hash and returns hash message in EIP712 compatible form
  * So that it can be used to recover signer from signature signed using EIP712 formatted data
  * https://eips.ethereum.org/EIPS/eip-712
  * "\\x19" makes the encoding deterministic
  * "\\x01" is the version byte to make it compatible to EIP-191
  */
  function toTypedMessageHash(bytes32 messageHash) internal view returns(bytes32) {
    return keccak256(abi.encodePacked("\x19\x01", getDomainSeparator(), messageHash));
  }
}

File 28 of 30 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @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 29 of 30 : AddrResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.4;

import "../ResolverBase.sol";

interface IAddrResolver {
  event AddrChanged(bytes32 indexed node, address a);
  function addr(bytes32 node) external view returns (address payable);
}

interface IAddressResolver {
  event AddressChanged(bytes32 indexed node, uint coinType, bytes newAddress);
  function addr(bytes32 node, uint coinType) external view returns(bytes memory);
}

abstract contract AddrResolver is IAddrResolver, IAddressResolver, ResolverBase {
  uint constant private COIN_TYPE_ETH = 60;

  mapping(bytes32=>mapping(uint=>bytes)) _addresses;

  /**
    * Sets the address associated with an ENS node.
    * May only be called by the owner of that node in the ENS registry.
    * @param node The node to update.
    * @param a The address to set.
    */
  function setAddr(bytes32 node, address a) virtual external authorised(node) {
    setAddr(node, COIN_TYPE_ETH, addressToBytes(a));
  }

  /**
    * Returns the address associated with an ENS node.
    * @param node The ENS node to query.
    * @return The associated address.
    */
  function addr(bytes32 node) virtual override public view returns (address payable) {
    bytes memory a = addr(node, COIN_TYPE_ETH);
    if(a.length == 0) {
      return payable(0);
    }
    return bytesToAddress(a);
  }

  function setAddr(bytes32 node, uint coinType, bytes memory a) virtual public authorised(node) {
    emit AddressChanged(node, coinType, a);
    if(coinType == COIN_TYPE_ETH) {
      emit AddrChanged(node, bytesToAddress(a));
    }
    _addresses[node][coinType] = a;
  }

  function addr(bytes32 node, uint coinType) virtual override public view returns(bytes memory) {
    return _addresses[node][coinType];
  }

  function bytesToAddress(bytes memory b) internal pure returns(address payable a) {
    require(b.length == 20);
    assembly {
      a := div(mload(add(b, 32)), exp(256, 12))
    }
  }

  function addressToBytes(address a) internal pure returns(bytes memory b) {
    b = new bytes(20);
    assembly {
      mstore(add(b, 32), mul(a, exp(256, 12)))
    }
  }
}

File 30 of 30 : TextResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "../ResolverBase.sol";

interface ITextResolver {
  event TextChanged(bytes32 indexed node, string indexed indexedKey, string key);
  function text(bytes32 node, string calldata key) external view returns (string memory);
}

abstract contract TextResolver is ITextResolver, ResolverBase {
  mapping(bytes32=>mapping(string=>string)) texts;

  /**
    * Sets the text data associated with an ENS node and key.
    * May only be called by the owner of that node in the ENS registry.
    * @param node The node to update.
    * @param key The key to set.
    * @param value The text data value to set.
    */
  function setText(bytes32 node, string calldata key, string calldata value) virtual external authorised(node) {
    texts[node][key] = value;
    emit TextChanged(node, key, key);
  }

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"namehash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Assigned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"namehash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"locked","type":"bool"}],"name":"ChildLockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"namehash","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"locked","type":"bool"}],"name":"LockSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"parent","type":"bytes32"},{"indexed":false,"internalType":"string","name":"label","type":"string"}],"name":"ResourceRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"namehash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"SetOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"namehash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"Synced","type":"event"},{"anonymous":false,"inputs":[{"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":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"origin","type":"bytes32"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"ZoneCreated","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"bytes32[]","name":"namehashes","type":"bytes32[]"}],"name":"assign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32[]","name":"namehashes","type":"bytes32[]"}],"name":"assignTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"},{"internalType":"bool","name":"_lock","type":"bool"}],"name":"childlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"domains","outputs":[{"internalType":"bytes32","name":"parent","type":"bytes32"},{"internalType":"bytes32","name":"label","type":"bytes32"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"bool","name":"childlock","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ens","outputs":[{"internalType":"contract ENS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOrigin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"isChildLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"},{"internalType":"address","name":"operator","type":"address"}],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"labelOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"},{"internalType":"bool","name":"_lock","type":"bool"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"nonceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"name":"parentOf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"parent","type":"bytes32"},{"internalType":"string","name":"label","type":"string"}],"name":"register","outputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resolver","outputs":[{"internalType":"contract PublicResolver","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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"base","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"namehash","type":"bytes32"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes32","name":"parent","type":"bytes32"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"sync","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferOriginTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506e0c2e074ec69a0dfb2997ba6c7d2e1e734976fb03c32e5b8cfe2b6ccb31c09ba78ebaba417f2e4d0b92c040073a779a941f10fd3884f10b8995870e4059fa548aa532b4ff3e60001b6040518060400160405280600781526020016602e686970686f760cc1b815250604051806040016040528060068152602001650484950484f560d41b81525060405180604001604052806007815260200166697066733a2f2f60c81b815250338484848484848484818083838160009080519060200190620000df92919062000cec565b508051620000f590600190602084019062000cec565b5050506040518060800160405280604f815260200162004d74604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600b5550600d839055620001aa84846200023b565b827facb8b567519ff790dedfe39925dc221bf74564c192ac5ba2bae09518596911198383604051620001de92919062000e92565b60405180910390a250505050620001fb816200026160201b60201c565b5050600f80546001600160a01b039a8b166001600160a01b0319918216179091556010805499909a169816979097179097555062000f2695505050505050565b6200025d8282604051806020016040528060008152506200027660201b60201c565b5050565b80516200025d90600e90602084019062000cec565b620002828383620002f2565b62000291600084848462000448565b620002ed5760405162461bcd60e51b8152602060048201526032602482015260008051602062004d5483398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b0382166200034a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401620002e4565b6000818152600260205260409020546001600160a01b031615620003b15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401620002e4565b620003bf60008383620005ba565b6001600160a01b0382166000908152600360205260408120805460019290620003ea90849062000ec4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600062000469846001600160a01b03166200064460201b620019451760201c565b15620005ae576001600160a01b03841663150b7a02620004886200064a565b8786866040518563ffffffff1660e01b8152600401620004ac949392919062000e53565b602060405180830381600087803b158015620004c757600080fd5b505af1925050508015620004fa575060408051601f3d908101601f19168201909252620004f79181019062000ddb565b60015b62000593573d8080156200052b576040519150601f19603f3d011682016040523d82523d6000602084013e62000530565b606091505b5080516200058b5760405162461bcd60e51b8152602060048201526032602482015260008051602062004d5483398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401620002e4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620005b2565b5060015b949350505050565b806001600160a01b0384161580620005da5750620005d88162000666565b155b620006285760405162461bcd60e51b815260206004820152601460248201527f7472616e73666572206e6f7420616c6c6f7765640000000000000000000000006044820152606401620002e4565b600d5481146200063e576200063e838262000693565b50505050565b3b151590565b6000620006616200090b60201b6200194b1760201c565b905090565b60008181526012602052604081206003015460ff16806200068d57506200068d826200096a565b92915050565b600081815260126020526040902080546001909101548115801590620006b857508015155b620006f95760405162461bcd60e51b815260206004820152601060248201526f0d2dcecc2d8d2c840dcc2dacad0c2e6d60831b6044820152606401620002e4565b6200070482620009d7565b600f546040516306ab592360e01b815260048101849052602481018390523060448201526000916001600160a01b0316906306ab592390606401602060405180830381600087803b1580156200075957600080fd5b505af11580156200076e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000794919062000dc2565b60105460405162d5fa2b60e81b8152600481018390526001600160a01b03888116602483015292935091169063d5fa2b0090604401600060405180830381600087803b158015620007e457600080fd5b505af1158015620007f9573d6000803e3d6000fd5b5050600f54601054604051630c4b7b8560e11b8152600481018690526001600160a01b03918216602482015291169250631896f70a9150604401600060405180830381600087803b1580156200084e57600080fd5b505af115801562000863573d6000803e3d6000fd5b5050600f546040516306ab592360e01b815260048101879052602481018690526001600160a01b03898116604483015290911692506306ab59239150606401602060405180830381600087803b158015620008bd57600080fd5b505af1158015620008d2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008f8919062000dc2565b50620009048362000b3c565b5050505050565b6000333014156200096457600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620009679050565b50335b90565b600062000976600d5490565b8214156200099c5750600090815260126020526040902060030154610100900460ff1690565b600082815260126020526040902060030154610100900460ff16806200068d57506000828152601260205260409020546200068d906200096a565b600d54811415801562000a715750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b15801562000a2a57600080fd5b505afa15801562000a3f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a65919062000d92565b6001600160a01b031614155b1562000b395760008181526012602052604090205462000a9190620009d7565b600f5460008281526012602052604090819020805460019091015491516306ab592360e01b8152600481019190915260248101919091523060448201526001600160a01b03909116906306ab592390606401602060405180830381600087803b15801562000afe57600080fd5b505af115801562000b13573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200025d919062000dc2565b50565b600d54811415801562000bd55750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b15801562000b8f57600080fd5b505afa15801562000ba4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000bca919062000d92565b6001600160a01b0316145b1562000b3957600f546001600160a01b0316635b0fc9c38262000bf88162000c73565b6040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801562000c4057600080fd5b505af115801562000c55573d6000803e3d6000fd5b50505060008281526012602052604090205462000b39915062000b3c565b6000818152600260205260408120546001600160a01b0316806200068d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401620002e4565b82805462000cfa9062000ee9565b90600052602060002090601f01602090048101928262000d1e576000855562000d69565b82601f1062000d3957805160ff191683800117855562000d69565b8280016001018555821562000d69579182015b8281111562000d6957825182559160200191906001019062000d4c565b5062000d7792915062000d7b565b5090565b5b8082111562000d77576000815560010162000d7c565b60006020828403121562000da4578081fd5b81516001600160a01b038116811462000dbb578182fd5b9392505050565b60006020828403121562000dd4578081fd5b5051919050565b60006020828403121562000ded578081fd5b81516001600160e01b03198116811462000dbb578182fd5b60008151808452815b8181101562000e2c5760208185018101518683018201520162000e0e565b8181111562000e3e5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009062000e889083018462000e05565b9695505050505050565b60408152600062000ea7604083018562000e05565b828103602084015262000ebb818562000e05565b95945050505050565b6000821982111562000ee457634e487b7160e01b81526011600452602481fd5b500190565b600181811c9082168062000efe57607f821691505b6020821081141562000f2057634e487b7160e01b600052602260045260246000fd5b50919050565b613e1e8062000f366000396000f3fe6080604052600436106102515760003560e01c806355f804b31161013957806395d89b41116100b6578063b88d4fde1161007a578063b88d4fde1461070e578063c722f1771461072e578063c87b56dd146107a8578063ddeda132146107c8578063df1f29ee146107f5578063e985e9c51461080a57600080fd5b806395d89b411461066957806397ddf5aa1461067e578063a22cb4651461069e578063a5c122fe146106be578063ad41e973146106ee57600080fd5b80636c0360eb116100fd5780636c0360eb146105df57806370a08231146105f45780637af704bf146106145780638a8d9e7c146106345780638da5cb5b1461065457600080fd5b806355f804b31461052f57806359f3ec161461054f5780636352211e1461057f57806364422b861461059f5780636a9831d7146105bf57600080fd5b806318904988116101d257806332a16f4e1161019657806332a16f4e1461046f57806338a699a41461048f5780633f15457f146104af57806342842e0e146104cf57806342966c68146104ef5780634f6ccce71461050f57600080fd5b806318904988146103b957806323b872dd146103d95780632d0335ab146103f95780632f745c591461042f578063328fd6981461044f57600080fd5b80630c53c51c116102195780630c53c51c1461032757806310f8dd701461033a57806314fd37941461035a578063162094c41461037a57806318160ddd1461039a57600080fd5b806301ffc9a71461025657806304f3bcec1461028b57806306fdde03146102c3578063081812fc146102e5578063095ea7b314610305575b600080fd5b34801561026257600080fd5b5061027661027136600461394f565b610853565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506010546102ab906001600160a01b031681565b6040516001600160a01b039091168152602001610282565b3480156102cf57600080fd5b506102d8610864565b6040516102829190613b15565b3480156102f157600080fd5b506102ab61030036600461389c565b6108f6565b34801561031157600080fd5b506103256103203660046137b8565b610983565b005b6102d861033536600461373d565b610aab565b34801561034657600080fd5b5061032561035536600461392d565b610d22565b34801561036657600080fd5b506103256103753660046137e3565b610e00565b34801561038657600080fd5b506103256103953660046139ba565b610eea565b3480156103a657600080fd5b506008545b604051908152602001610282565b3480156103c557600080fd5b506103256103d43660046138f0565b610f1f565b3480156103e557600080fd5b506103256103f4366004613535565b610fd4565b34801561040557600080fd5b506103ab6104143660046134c5565b6001600160a01b03166000908152600c602052604090205490565b34801561043b57600080fd5b506103ab61044a3660046137b8565b61100c565b34801561045b57600080fd5b5061032561046a3660046135df565b6110a2565b34801561047b57600080fd5b5061027661048a36600461389c565b61110b565b34801561049b57600080fd5b506102766104aa36600461389c565b61112f565b3480156104bb57600080fd5b50600f546102ab906001600160a01b031681565b3480156104db57600080fd5b506103256104ea366004613535565b61113a565b3480156104fb57600080fd5b5061032561050a36600461389c565b611155565b34801561051b57600080fd5b506103ab61052a36600461389c565b6111d1565b34801561053b57600080fd5b5061032561054a366004613987565b611272565b34801561055b57600080fd5b506103ab61056a36600461389c565b60009081526012602052604090206002015490565b34801561058b57600080fd5b506102ab61059a36600461389c565b6112a2565b3480156105ab57600080fd5b506103ab6105ba366004613661565b611319565b3480156105cb57600080fd5b506102766105da36600461389c565b611411565b3480156105eb57600080fd5b506102d861147e565b34801561060057600080fd5b506103ab61060f3660046134c5565b61150c565b34801561062057600080fd5b5061032561062f3660046136b8565b611593565b34801561064057600080fd5b5061027661064f3660046138cc565b6116f4565b34801561066057600080fd5b506102ab611757565b34801561067557600080fd5b506102d861176c565b34801561068a57600080fd5b506103256106993660046134c5565b61177b565b3480156106aa57600080fd5b506103256106b936600461362d565b61181f565b3480156106ca57600080fd5b506103ab6106d936600461389c565b60009081526012602052604090206001015490565b3480156106fa57600080fd5b5061032561070936600461392d565b611831565b34801561071a57600080fd5b50610325610729366004613575565b6118fb565b34801561073a57600080fd5b5061077c61074936600461389c565b60126020526000908152604090208054600182015460028301546003909301549192909160ff8082169161010090041685565b60408051958652602086019490945292840191909152151560608301521515608082015260a001610282565b3480156107b457600080fd5b506102d86107c336600461389c565b61193a565b3480156107d457600080fd5b506103ab6107e336600461389c565b60009081526012602052604090205490565b34801561080157600080fd5b50600d546103ab565b34801561081657600080fd5b506102766108253660046134fd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600061085e826119a8565b92915050565b60606000805461087390613cfe565b80601f016020809104026020016040519081016040528092919081815260200182805461089f90613cfe565b80156108ec5780601f106108c1576101008083540402835291602001916108ec565b820191906000526020600020905b8154815290600101906020018083116108cf57829003601f168201915b5050505050905090565b6000610901826119cd565b6109675760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061098e826112a2565b9050806001600160a01b0316836001600160a01b031614156109fc5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161095e565b806001600160a01b0316610a0e6119ea565b6001600160a01b03161480610a2a5750610a2a816108256119ea565b610a9c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161095e565b610aa683836119f4565b505050565b60606000610ab886611a62565b90506000356001600160e01b03199081169082161415610b405760405162461bcd60e51b815260206004820152603d60248201527f66756e6374696f6e5369676e61747572652063616e206e6f74206265206f662060448201527f657865637574654d6574615472616e73616374696f6e206d6574686f64000000606482015260840161095e565b604080516060810182526001600160a01b0389166000818152600c602090815290849020548352820152908101879052610b7d8882888888611a7e565b610bd35760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b606482015260840161095e565b6001600160a01b0388166000908152600c6020526040902054610bf7906001611b5a565b6001600160a01b0389166000908152600c60209081526040808320939093559151909182913091610c2c918c918e9101613a3d565b60408051601f1981840301815290829052610c4691613a21565b6000604051808303816000865af19150503d8060008114610c83576040519150601f19603f3d011682016040523d82523d6000602084013e610c88565b606091505b509150915081610cda5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015260640161095e565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b8a338b604051610d0d93929190613aa3565b60405180910390a19998505050505050505050565b81610d2c600d5490565b811415610d6057610d3f8161064f6119ea565b610d5b5760405162461bcd60e51b815260040161095e90613b7a565b610d99565b600081815260126020526040902054610d7b8161064f6119ea565b610d975760405162461bcd60e51b815260040161095e90613b7a565b505b6000838152601260205260409081902060030180548415156101000261ff00199091161790555183907f877ec3da51a74d79d301fdcb61d51573d9098a613a23525ae4cc65696aa13f8b90610df390851515815260200190565b60405180910390a2505050565b610e13610e0b6119ea565b600d54611b6d565b610e2f5760405162461bcd60e51b815260040161095e90613ba0565b8051825114610e745760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b604482015260640161095e565b60005b8151811015610aa657610ed8838281518110610ea357634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110610ecb57634e487b7160e01b600052603260045260246000fd5b6020026020010151611c53565b80610ee281613d33565b915050610e77565b610ef5610e0b6119ea565b610f115760405162461bcd60e51b815260040161095e90613ba0565b610f1b8282611cb4565b5050565b610f30610f2a6119ea565b84611b6d565b610f4c5760405162461bcd60e51b815260040161095e90613b7a565b6000610f57846112a2565b6001600160a01b0381811660008181526011602090815260408083208a8452825280832094891680845294825291829020805460ff19168815159081179091559151918252939450919287927fe15accea57e78a1edb7e7a1dcb530ebae80dd826f0643a629f3c29bf88a06056910160405180910390a450505050565b610fe5610fdf6119ea565b82611b6d565b6110015760405162461bcd60e51b815260040161095e90613bc7565b610aa6838383611d3f565b60006110178361150c565b82106110795760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161095e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6110ad610e0b6119ea565b6110c95760405162461bcd60e51b815260040161095e90613ba0565b60005b8151811015610aa6576110f983838381518110610ecb57634e487b7160e01b600052603260045260246000fd5b8061110381613d33565b9150506110cc565b60008181526012602052604081206003015460ff168061085e575061085e82611411565b600061085e826119cd565b610aa6838383604051806020016040528060008152506118fb565b611160610fdf6119ea565b6111c55760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b606482015260840161095e565b6111ce81611eea565b50565b60006111dc60085490565b821061123f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161095e565b6008828154811061126057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b61127d610e0b6119ea565b6112995760405162461bcd60e51b815260040161095e90613ba0565b6111ce81611ef3565b6000818152600260205260408120546001600160a01b03168061085e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161095e565b6000611326610f2a6119ea565b6113645760405162461bcd60e51b815260206004820152600f60248201526e1b5d5cdd081bdddb881c185c995b9d608a1b604482015260640161095e565b61136d82611f06565b6113a95760405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a59081b1858995b609a1b604482015260640161095e565b815160208301206113bb858583611ff1565b600081815260126020526040908190208690555190925084907ffa0de44d6b928def17acff11cc1684fd8bcdfc30b81206468debd6fd42e5cd9f90611401908690613b15565b60405180910390a2509392505050565b600061141c600d5490565b8214156114415750600090815260126020526040902060030154610100900460ff1690565b600082815260126020526040902060030154610100900460ff168061085e575060008281526012602052604090205461085e90611411565b919050565b600e805461148b90613cfe565b80601f01602080910402602001604051908101604052809291908181526020018280546114b790613cfe565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505081565b60006001600160a01b0382166115775760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161095e565b506001600160a01b031660009081526003602052604090205490565b825160208085019190912060408051808401889052808201839052815180820383018152606090910182528051908401206000818152601290945292206002015490919083116116155760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b604482015260640161095e565b60408051602080820186905260608a901b6bffffffffffffffffffffffff19168284015260548083018590528351808403909101815260749092019092528051910120600061166d866116678461209a565b906120ee565b905061167988826116f4565b6116955760405162461bcd60e51b815260040161095e90613b7a565b60008381526012602052604090206002018590556116b38984611c53565b6040516001600160a01b038a169084907f0a4fcfb4f260b16059293bd039089e5a2d07d52794055541c87ea36bbef5b91790600090a3505050505050505050565b600080611700846112a2565b9050826001600160a01b0316816001600160a01b0316148061174f57506001600160a01b03808216600090815260116020908152604080832088845282528083209387168352929052205460ff165b949350505050565b6000611767600d5460001c6112a2565b905090565b60606001805461087390613cfe565b611786610e0b6119ea565b6117a25760405162461bcd60e51b815260040161095e90613ba0565b600f546001600160a01b0316635b0fc9c36117bc600d5490565b6040516001600160e01b031960e084901b16815260048101919091526001600160a01b0384166024820152604401600060405180830381600087803b15801561180457600080fd5b505af1158015611818573d6000803e3d6000fd5b5050505050565b610f1b61182a6119ea565b8383612112565b8161183b600d5490565b81141561186f5761184e8161064f6119ea565b61186a5760405162461bcd60e51b815260040161095e90613b7a565b6118a8565b60008181526012602052604090205461188a8161064f6119ea565b6118a65760405162461bcd60e51b815260040161095e90613b7a565b505b600083815260126020908152604091829020600301805460ff1916851515908117909155915191825284917fc640891d750a341f85306f484a775fc6f0bde8103365957803463d6724aff9529101610df3565b61190c6119066119ea565b83611b6d565b6119285760405162461bcd60e51b815260040161095e90613bc7565b611934848484846121e1565b50505050565b606061085e82612214565b3b151590565b6000333014156119a257600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506119a59050565b50335b90565b60006001600160e01b0319821663780e9d6360e01b148061085e575061085e82612376565b6000908152600260205260409020546001600160a01b0316151590565b600061176761194b565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a29826112a2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000815160001415611a7657506000919050565b506020015190565b6000806001611a94611a8f886123c6565b612426565b6040805160008152602081018083529290925260ff861690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015611ae2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b395760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161095e565b866001600160a01b0316816001600160a01b03161491505095945050505050565b6000611b668284613c6d565b9392505050565b6000611b78826119cd565b611bd95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161095e565b6000611be4836112a2565b9050806001600160a01b0316846001600160a01b03161480611c1f5750836001600160a01b0316611c14846108f6565b6001600160a01b0316145b8061174f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff1661174f565b611c5c816119cd565b15610f1b576000611c6c826112a2565b9050611c79818484611d3f565b6040516001600160a01b0384169083907ff731247417820d44ac85e102738c4a832dd1a7ef577a560dd40e33d76ff2fbac90600090a3505050565b611cbd826119cd565b611d205760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b606482015260840161095e565b6000828152600a602090815260409091208251610aa69284019061330c565b826001600160a01b0316611d52826112a2565b6001600160a01b031614611dba5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161095e565b6001600160a01b038216611e1c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161095e565b611e27838383612456565b611e326000826119f4565b6001600160a01b0383166000908152600360205260408120805460019290611e5b908490613ca4565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e89908490613c6d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6111ce816124c9565b8051610f1b90600e90602084019061330c565b600080825111611f4f5760405162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a5b98db1d59194818481b1858995b60621b604482015260640161095e565b50600160005b8251811015611feb576000838281518110611f8057634e487b7160e01b600052603260045260246000fd5b016020015160f81c9050828015611fd557508060ff16602d1480611fb7575060308160ff1610158015611fb7575060398160ff1611155b80611fd5575060618160ff1610158015611fd55750607a8160ff1611155b9250508080611fe390613d33565b915050611f55565b50919050565b604080516020810184905290810182905260009060600160408051808303601f19018152828252805160209182012060a084018352868452818401868152600085850181815260608701828152608088018381528584526012909652959091209551865590516001860155516002850155915160039093018054915161ffff1990921693151561ff0019169390931761010091151591909102179091559050611b668482612509565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c015b604051602081830303815290604052805190602001209050919050565b60008060006120fd8585612523565b9150915061210a81612593565b509392505050565b816001600160a01b0316836001600160a01b031614156121745760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161095e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6121ec848484611d3f565b6121f884848484612794565b6119345760405162461bcd60e51b815260040161095e90613b28565b606061221f826119cd565b6122855760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b606482015260840161095e565b6000828152600a60205260408120805461229e90613cfe565b80601f01602080910402602001604051908101604052809291908181526020018280546122ca90613cfe565b80156123175780601f106122ec57610100808354040283529160200191612317565b820191906000526020600020905b8154815290600101906020018083116122fa57829003601f168201915b5050505050905060006123286128a8565b905080516000141561233b575092915050565b81511561236d578082604051602001612355929190613a74565b60405160208183030381529060405292505050919050565b61174f846128b7565b60006001600160e01b031982166380ac58cd60e01b14806123a757506001600160e01b03198216635b5e139f60e01b145b8061085e57506301ffc9a760e01b6001600160e01b031983161461085e565b6000604051806080016040528060438152602001613da660439139805160209182012083518483015160408087015180519086012090516120d1950193845260208401929092526001600160a01b03166040830152606082015260800190565b6000612431600b5490565b60405161190160f01b60208201526022810191909152604281018390526062016120d1565b806001600160a01b038416158061247357506124718161110b565b155b6124b65760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c881b9bdd08185b1b1bddd95960621b604482015260640161095e565b600d548114611934576119348382612916565b6124d281612b74565b6000818152600a6020526040902080546124eb90613cfe565b1590506111ce576000818152600a602052604081206111ce91613390565b610f1b828260405180602001604052806000815250612c1b565b60008082516041141561255a5760208301516040840151606085015160001a61254e87828585612c4e565b9450945050505061258c565b8251604014156125845760208301516040840151612579868383612d3b565b93509350505061258c565b506000905060025b9250929050565b60008160048111156125b557634e487b7160e01b600052602160045260246000fd5b14156125be5750565b60018160048111156125e057634e487b7160e01b600052602160045260246000fd5b141561262e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161095e565b600281600481111561265057634e487b7160e01b600052602160045260246000fd5b141561269e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161095e565b60038160048111156126c057634e487b7160e01b600052602160045260246000fd5b14156127195760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161095e565b600481600481111561273b57634e487b7160e01b600052602160045260246000fd5b14156111ce5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161095e565b60006001600160a01b0384163b1561289d57836001600160a01b031663150b7a026127bd6119ea565b8786866040518563ffffffff1660e01b81526004016127df9493929190613ad8565b602060405180830381600087803b1580156127f957600080fd5b505af1925050508015612829575060408051601f3d908101601f191682019092526128269181019061396b565b60015b612883573d808015612857576040519150601f19603f3d011682016040523d82523d6000602084013e61285c565b606091505b50805161287b5760405162461bcd60e51b815260040161095e90613b28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061174f565b506001949350505050565b6060600e805461087390613cfe565b606060006128c36128a8565b905060008151116128e35760405180602001604052806000815250611b66565b806128ef846020612d6a565b604051602001612900929190613a74565b6040516020818303038152906040529392505050565b60008181526012602052604090208054600190910154811580159061293a57508015155b6129795760405162461bcd60e51b815260206004820152601060248201526f0d2dcecc2d8d2c840dcc2dacad0c2e6d60831b604482015260640161095e565b61298282612f4c565b600f546040516306ab592360e01b815260048101849052602481018390523060448201526000916001600160a01b0316906306ab592390606401602060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a0e91906138b4565b60105460405162d5fa2b60e81b8152600481018390526001600160a01b03888116602483015292935091169063d5fa2b0090604401600060405180830381600087803b158015612a5d57600080fd5b505af1158015612a71573d6000803e3d6000fd5b5050600f54601054604051630c4b7b8560e11b8152600481018690526001600160a01b03918216602482015291169250631896f70a9150604401600060405180830381600087803b158015612ac557600080fd5b505af1158015612ad9573d6000803e3d6000fd5b5050600f546040516306ab592360e01b815260048101879052602481018690526001600160a01b03898116604483015290911692506306ab59239150606401602060405180830381600087803b158015612b3257600080fd5b505af1158015612b46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b6a91906138b4565b50611818836130a2565b6000612b7f826112a2565b9050612b8d81600084612456565b612b986000836119f4565b6001600160a01b0381166000908152600360205260408120805460019290612bc1908490613ca4565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612c2583836131cd565b612c326000848484612794565b610aa65760405162461bcd60e51b815260040161095e90613b28565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c855750600090506003612d32565b8460ff16601b14158015612c9d57508460ff16601c14155b15612cae5750600090506004612d32565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612d02573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d2b57600060019250925050612d32565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612d5c87828885612c4e565b935093505050935093915050565b60606000612d79836002613c85565b612d84906002613c6d565b67ffffffffffffffff811115612daa57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612dd4576020820181803683370190505b509050600360fc1b81600081518110612dfd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612e3a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612e5e846002613c85565b612e69906001613c6d565b90505b6001811115612efd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612eab57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612ecf57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612ef681613ce7565b9050612e6c565b508315611b665760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161095e565b600d548114158015612fe15750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b158015612f9d57600080fd5b505afa158015612fb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd591906134e1565b6001600160a01b031614155b156111ce57600081815260126020526040902054612ffe90612f4c565b600f5460008281526012602052604090819020805460019091015491516306ab592360e01b8152600481019190915260248101919091523060448201526001600160a01b03909116906306ab592390606401602060405180830381600087803b15801561306a57600080fd5b505af115801561307e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906138b4565b600d5481141580156131365750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b1580156130f357600080fd5b505afa158015613107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061312b91906134e1565b6001600160a01b0316145b156111ce57600f546001600160a01b0316635b0fc9c382613156816112a2565b6040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561319d57600080fd5b505af11580156131b1573d6000803e3d6000fd5b5050506000828152601260205260409020546111ce91506130a2565b6001600160a01b0382166132235760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161095e565b61322c816119cd565b156132795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161095e565b61328560008383612456565b6001600160a01b03821660009081526003602052604081208054600192906132ae908490613c6d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461331890613cfe565b90600052602060002090601f01602090048101928261333a5760008555613380565b82601f1061335357805160ff1916838001178555613380565b82800160010185558215613380579182015b82811115613380578251825591602001919060010190613365565b5061338c9291506133c6565b5090565b50805461339c90613cfe565b6000825580601f106133ac575050565b601f0160209004906000526020600020908101906111ce91905b5b8082111561338c57600081556001016133c7565b600082601f8301126133eb578081fd5b813560206134006133fb83613c49565b613c18565b80838252828201915082860187848660051b890101111561341f578586fd5b855b8581101561343d57813584529284019290840190600101613421565b5090979650505050505050565b8035801515811461147957600080fd5b600082601f83011261346a578081fd5b813567ffffffffffffffff81111561348457613484613d64565b613497601f8201601f1916602001613c18565b8181528460208386010111156134ab578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156134d6578081fd5b8135611b6681613d7a565b6000602082840312156134f2578081fd5b8151611b6681613d7a565b6000806040838503121561350f578081fd5b823561351a81613d7a565b9150602083013561352a81613d7a565b809150509250929050565b600080600060608486031215613549578081fd5b833561355481613d7a565b9250602084013561356481613d7a565b929592945050506040919091013590565b6000806000806080858703121561358a578081fd5b843561359581613d7a565b935060208501356135a581613d7a565b925060408501359150606085013567ffffffffffffffff8111156135c7578182fd5b6135d38782880161345a565b91505092959194509250565b600080604083850312156135f1578182fd5b82356135fc81613d7a565b9150602083013567ffffffffffffffff811115613617578182fd5b613623858286016133db565b9150509250929050565b6000806040838503121561363f578182fd5b823561364a81613d7a565b91506136586020840161344a565b90509250929050565b600080600060608486031215613675578081fd5b833561368081613d7a565b925060208401359150604084013567ffffffffffffffff8111156136a2578182fd5b6136ae8682870161345a565b9150509250925092565b600080600080600060a086880312156136cf578283fd5b85356136da81613d7a565b945060208601359350604086013567ffffffffffffffff808211156136fd578485fd5b61370989838a0161345a565b9450606088013591508082111561371e578283fd5b5061372b8882890161345a565b95989497509295608001359392505050565b600080600080600060a08688031215613754578283fd5b853561375f81613d7a565b9450602086013567ffffffffffffffff81111561377a578384fd5b6137868882890161345a565b9450506040860135925060608601359150608086013560ff811681146137aa578182fd5b809150509295509295909350565b600080604083850312156137ca578182fd5b82356137d581613d7a565b946020939093013593505050565b600080604083850312156137f5578182fd5b823567ffffffffffffffff8082111561380c578384fd5b818501915085601f83011261381f578384fd5b8135602061382f6133fb83613c49565b8083825282820191508286018a848660051b890101111561384e578889fd5b8896505b8487101561387957803561386581613d7a565b835260019690960195918301918301613852565b509650508601359250508082111561388f578283fd5b50613623858286016133db565b6000602082840312156138ad578081fd5b5035919050565b6000602082840312156138c5578081fd5b5051919050565b600080604083850312156138de578182fd5b82359150602083013561352a81613d7a565b600080600060608486031215613904578081fd5b83359250602084013561391681613d7a565b91506139246040850161344a565b90509250925092565b6000806040838503121561393f578182fd5b823591506136586020840161344a565b600060208284031215613960578081fd5b8135611b6681613d8f565b60006020828403121561397c578081fd5b8151611b6681613d8f565b600060208284031215613998578081fd5b813567ffffffffffffffff8111156139ae578182fd5b61174f8482850161345a565b600080604083850312156139cc578182fd5b82359150602083013567ffffffffffffffff8111156139e9578182fd5b6136238582860161345a565b60008151808452613a0d816020860160208601613cbb565b601f01601f19169290920160200192915050565b60008251613a33818460208701613cbb565b9190910192915050565b60008351613a4f818460208801613cbb565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351613a86818460208801613cbb565b835190830190613a9a818360208801613cbb565b01949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090613acf908301846139f5565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b0b908301846139f5565b9695505050505050565b602081526000611b6660208301846139f5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b6020808252600d908201526c6d757374206f776e207a6f6e6560981b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613c4157613c41613d64565b604052919050565b600067ffffffffffffffff821115613c6357613c63613d64565b5060051b60200190565b60008219821115613c8057613c80613d4e565b500190565b6000816000190483118215151615613c9f57613c9f613d4e565b500290565b600082821015613cb657613cb6613d4e565b500390565b60005b83811015613cd6578181015183820152602001613cbe565b838111156119345750506000910152565b600081613cf657613cf6613d4e565b506000190190565b600181811c90821680613d1257607f821691505b60208210811415611feb57634e487b7160e01b600052602260045260246000fd5b6000600019821415613d4757613d47613d4e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111ce57600080fd5b6001600160e01b0319811681146111ce57600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a264697066735822122077d7b7ae3dd08bce3bdd07db1dd2c5d8930d071bf0b6313c7c383024c6761ba964736f6c634300080400334552433732313a207472616e7366657220746f206e6f6e204552433732315265454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429

Deployed Bytecode

0x6080604052600436106102515760003560e01c806355f804b31161013957806395d89b41116100b6578063b88d4fde1161007a578063b88d4fde1461070e578063c722f1771461072e578063c87b56dd146107a8578063ddeda132146107c8578063df1f29ee146107f5578063e985e9c51461080a57600080fd5b806395d89b411461066957806397ddf5aa1461067e578063a22cb4651461069e578063a5c122fe146106be578063ad41e973146106ee57600080fd5b80636c0360eb116100fd5780636c0360eb146105df57806370a08231146105f45780637af704bf146106145780638a8d9e7c146106345780638da5cb5b1461065457600080fd5b806355f804b31461052f57806359f3ec161461054f5780636352211e1461057f57806364422b861461059f5780636a9831d7146105bf57600080fd5b806318904988116101d257806332a16f4e1161019657806332a16f4e1461046f57806338a699a41461048f5780633f15457f146104af57806342842e0e146104cf57806342966c68146104ef5780634f6ccce71461050f57600080fd5b806318904988146103b957806323b872dd146103d95780632d0335ab146103f95780632f745c591461042f578063328fd6981461044f57600080fd5b80630c53c51c116102195780630c53c51c1461032757806310f8dd701461033a57806314fd37941461035a578063162094c41461037a57806318160ddd1461039a57600080fd5b806301ffc9a71461025657806304f3bcec1461028b57806306fdde03146102c3578063081812fc146102e5578063095ea7b314610305575b600080fd5b34801561026257600080fd5b5061027661027136600461394f565b610853565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506010546102ab906001600160a01b031681565b6040516001600160a01b039091168152602001610282565b3480156102cf57600080fd5b506102d8610864565b6040516102829190613b15565b3480156102f157600080fd5b506102ab61030036600461389c565b6108f6565b34801561031157600080fd5b506103256103203660046137b8565b610983565b005b6102d861033536600461373d565b610aab565b34801561034657600080fd5b5061032561035536600461392d565b610d22565b34801561036657600080fd5b506103256103753660046137e3565b610e00565b34801561038657600080fd5b506103256103953660046139ba565b610eea565b3480156103a657600080fd5b506008545b604051908152602001610282565b3480156103c557600080fd5b506103256103d43660046138f0565b610f1f565b3480156103e557600080fd5b506103256103f4366004613535565b610fd4565b34801561040557600080fd5b506103ab6104143660046134c5565b6001600160a01b03166000908152600c602052604090205490565b34801561043b57600080fd5b506103ab61044a3660046137b8565b61100c565b34801561045b57600080fd5b5061032561046a3660046135df565b6110a2565b34801561047b57600080fd5b5061027661048a36600461389c565b61110b565b34801561049b57600080fd5b506102766104aa36600461389c565b61112f565b3480156104bb57600080fd5b50600f546102ab906001600160a01b031681565b3480156104db57600080fd5b506103256104ea366004613535565b61113a565b3480156104fb57600080fd5b5061032561050a36600461389c565b611155565b34801561051b57600080fd5b506103ab61052a36600461389c565b6111d1565b34801561053b57600080fd5b5061032561054a366004613987565b611272565b34801561055b57600080fd5b506103ab61056a36600461389c565b60009081526012602052604090206002015490565b34801561058b57600080fd5b506102ab61059a36600461389c565b6112a2565b3480156105ab57600080fd5b506103ab6105ba366004613661565b611319565b3480156105cb57600080fd5b506102766105da36600461389c565b611411565b3480156105eb57600080fd5b506102d861147e565b34801561060057600080fd5b506103ab61060f3660046134c5565b61150c565b34801561062057600080fd5b5061032561062f3660046136b8565b611593565b34801561064057600080fd5b5061027661064f3660046138cc565b6116f4565b34801561066057600080fd5b506102ab611757565b34801561067557600080fd5b506102d861176c565b34801561068a57600080fd5b506103256106993660046134c5565b61177b565b3480156106aa57600080fd5b506103256106b936600461362d565b61181f565b3480156106ca57600080fd5b506103ab6106d936600461389c565b60009081526012602052604090206001015490565b3480156106fa57600080fd5b5061032561070936600461392d565b611831565b34801561071a57600080fd5b50610325610729366004613575565b6118fb565b34801561073a57600080fd5b5061077c61074936600461389c565b60126020526000908152604090208054600182015460028301546003909301549192909160ff8082169161010090041685565b60408051958652602086019490945292840191909152151560608301521515608082015260a001610282565b3480156107b457600080fd5b506102d86107c336600461389c565b61193a565b3480156107d457600080fd5b506103ab6107e336600461389c565b60009081526012602052604090205490565b34801561080157600080fd5b50600d546103ab565b34801561081657600080fd5b506102766108253660046134fd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600061085e826119a8565b92915050565b60606000805461087390613cfe565b80601f016020809104026020016040519081016040528092919081815260200182805461089f90613cfe565b80156108ec5780601f106108c1576101008083540402835291602001916108ec565b820191906000526020600020905b8154815290600101906020018083116108cf57829003601f168201915b5050505050905090565b6000610901826119cd565b6109675760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061098e826112a2565b9050806001600160a01b0316836001600160a01b031614156109fc5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161095e565b806001600160a01b0316610a0e6119ea565b6001600160a01b03161480610a2a5750610a2a816108256119ea565b610a9c5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161095e565b610aa683836119f4565b505050565b60606000610ab886611a62565b90506000356001600160e01b03199081169082161415610b405760405162461bcd60e51b815260206004820152603d60248201527f66756e6374696f6e5369676e61747572652063616e206e6f74206265206f662060448201527f657865637574654d6574615472616e73616374696f6e206d6574686f64000000606482015260840161095e565b604080516060810182526001600160a01b0389166000818152600c602090815290849020548352820152908101879052610b7d8882888888611a7e565b610bd35760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b606482015260840161095e565b6001600160a01b0388166000908152600c6020526040902054610bf7906001611b5a565b6001600160a01b0389166000908152600c60209081526040808320939093559151909182913091610c2c918c918e9101613a3d565b60408051601f1981840301815290829052610c4691613a21565b6000604051808303816000865af19150503d8060008114610c83576040519150601f19603f3d011682016040523d82523d6000602084013e610c88565b606091505b509150915081610cda5760405162461bcd60e51b815260206004820152601c60248201527f46756e6374696f6e2063616c6c206e6f74207375636365737366756c00000000604482015260640161095e565b7f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b8a338b604051610d0d93929190613aa3565b60405180910390a19998505050505050505050565b81610d2c600d5490565b811415610d6057610d3f8161064f6119ea565b610d5b5760405162461bcd60e51b815260040161095e90613b7a565b610d99565b600081815260126020526040902054610d7b8161064f6119ea565b610d975760405162461bcd60e51b815260040161095e90613b7a565b505b6000838152601260205260409081902060030180548415156101000261ff00199091161790555183907f877ec3da51a74d79d301fdcb61d51573d9098a613a23525ae4cc65696aa13f8b90610df390851515815260200190565b60405180910390a2505050565b610e13610e0b6119ea565b600d54611b6d565b610e2f5760405162461bcd60e51b815260040161095e90613ba0565b8051825114610e745760405162461bcd60e51b81526020600482015260116024820152704d69736d6174636865642061727261797360781b604482015260640161095e565b60005b8151811015610aa657610ed8838281518110610ea357634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110610ecb57634e487b7160e01b600052603260045260246000fd5b6020026020010151611c53565b80610ee281613d33565b915050610e77565b610ef5610e0b6119ea565b610f115760405162461bcd60e51b815260040161095e90613ba0565b610f1b8282611cb4565b5050565b610f30610f2a6119ea565b84611b6d565b610f4c5760405162461bcd60e51b815260040161095e90613b7a565b6000610f57846112a2565b6001600160a01b0381811660008181526011602090815260408083208a8452825280832094891680845294825291829020805460ff19168815159081179091559151918252939450919287927fe15accea57e78a1edb7e7a1dcb530ebae80dd826f0643a629f3c29bf88a06056910160405180910390a450505050565b610fe5610fdf6119ea565b82611b6d565b6110015760405162461bcd60e51b815260040161095e90613bc7565b610aa6838383611d3f565b60006110178361150c565b82106110795760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161095e565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6110ad610e0b6119ea565b6110c95760405162461bcd60e51b815260040161095e90613ba0565b60005b8151811015610aa6576110f983838381518110610ecb57634e487b7160e01b600052603260045260246000fd5b8061110381613d33565b9150506110cc565b60008181526012602052604081206003015460ff168061085e575061085e82611411565b600061085e826119cd565b610aa6838383604051806020016040528060008152506118fb565b611160610fdf6119ea565b6111c55760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b606482015260840161095e565b6111ce81611eea565b50565b60006111dc60085490565b821061123f5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161095e565b6008828154811061126057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b61127d610e0b6119ea565b6112995760405162461bcd60e51b815260040161095e90613ba0565b6111ce81611ef3565b6000818152600260205260408120546001600160a01b03168061085e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161095e565b6000611326610f2a6119ea565b6113645760405162461bcd60e51b815260206004820152600f60248201526e1b5d5cdd081bdddb881c185c995b9d608a1b604482015260640161095e565b61136d82611f06565b6113a95760405162461bcd60e51b815260206004820152600d60248201526c1a5b9d985b1a59081b1858995b609a1b604482015260640161095e565b815160208301206113bb858583611ff1565b600081815260126020526040908190208690555190925084907ffa0de44d6b928def17acff11cc1684fd8bcdfc30b81206468debd6fd42e5cd9f90611401908690613b15565b60405180910390a2509392505050565b600061141c600d5490565b8214156114415750600090815260126020526040902060030154610100900460ff1690565b600082815260126020526040902060030154610100900460ff168061085e575060008281526012602052604090205461085e90611411565b919050565b600e805461148b90613cfe565b80601f01602080910402602001604051908101604052809291908181526020018280546114b790613cfe565b80156115045780601f106114d957610100808354040283529160200191611504565b820191906000526020600020905b8154815290600101906020018083116114e757829003601f168201915b505050505081565b60006001600160a01b0382166115775760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161095e565b506001600160a01b031660009081526003602052604090205490565b825160208085019190912060408051808401889052808201839052815180820383018152606090910182528051908401206000818152601290945292206002015490919083116116155760405162461bcd60e51b815260206004820152600d60248201526c696e76616c6964206e6f6e636560981b604482015260640161095e565b60408051602080820186905260608a901b6bffffffffffffffffffffffff19168284015260548083018590528351808403909101815260749092019092528051910120600061166d866116678461209a565b906120ee565b905061167988826116f4565b6116955760405162461bcd60e51b815260040161095e90613b7a565b60008381526012602052604090206002018590556116b38984611c53565b6040516001600160a01b038a169084907f0a4fcfb4f260b16059293bd039089e5a2d07d52794055541c87ea36bbef5b91790600090a3505050505050505050565b600080611700846112a2565b9050826001600160a01b0316816001600160a01b0316148061174f57506001600160a01b03808216600090815260116020908152604080832088845282528083209387168352929052205460ff165b949350505050565b6000611767600d5460001c6112a2565b905090565b60606001805461087390613cfe565b611786610e0b6119ea565b6117a25760405162461bcd60e51b815260040161095e90613ba0565b600f546001600160a01b0316635b0fc9c36117bc600d5490565b6040516001600160e01b031960e084901b16815260048101919091526001600160a01b0384166024820152604401600060405180830381600087803b15801561180457600080fd5b505af1158015611818573d6000803e3d6000fd5b5050505050565b610f1b61182a6119ea565b8383612112565b8161183b600d5490565b81141561186f5761184e8161064f6119ea565b61186a5760405162461bcd60e51b815260040161095e90613b7a565b6118a8565b60008181526012602052604090205461188a8161064f6119ea565b6118a65760405162461bcd60e51b815260040161095e90613b7a565b505b600083815260126020908152604091829020600301805460ff1916851515908117909155915191825284917fc640891d750a341f85306f484a775fc6f0bde8103365957803463d6724aff9529101610df3565b61190c6119066119ea565b83611b6d565b6119285760405162461bcd60e51b815260040161095e90613bc7565b611934848484846121e1565b50505050565b606061085e82612214565b3b151590565b6000333014156119a257600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506119a59050565b50335b90565b60006001600160e01b0319821663780e9d6360e01b148061085e575061085e82612376565b6000908152600260205260409020546001600160a01b0316151590565b600061176761194b565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a29826112a2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000815160001415611a7657506000919050565b506020015190565b6000806001611a94611a8f886123c6565b612426565b6040805160008152602081018083529290925260ff861690820152606081018790526080810186905260a0016020604051602081039080840390855afa158015611ae2573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611b395760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b604482015260640161095e565b866001600160a01b0316816001600160a01b03161491505095945050505050565b6000611b668284613c6d565b9392505050565b6000611b78826119cd565b611bd95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161095e565b6000611be4836112a2565b9050806001600160a01b0316846001600160a01b03161480611c1f5750836001600160a01b0316611c14846108f6565b6001600160a01b0316145b8061174f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff1661174f565b611c5c816119cd565b15610f1b576000611c6c826112a2565b9050611c79818484611d3f565b6040516001600160a01b0384169083907ff731247417820d44ac85e102738c4a832dd1a7ef577a560dd40e33d76ff2fbac90600090a3505050565b611cbd826119cd565b611d205760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b606482015260840161095e565b6000828152600a602090815260409091208251610aa69284019061330c565b826001600160a01b0316611d52826112a2565b6001600160a01b031614611dba5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161095e565b6001600160a01b038216611e1c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161095e565b611e27838383612456565b611e326000826119f4565b6001600160a01b0383166000908152600360205260408120805460019290611e5b908490613ca4565b90915550506001600160a01b0382166000908152600360205260408120805460019290611e89908490613c6d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6111ce816124c9565b8051610f1b90600e90602084019061330c565b600080825111611f4f5760405162461bcd60e51b81526020600482015260146024820152731b5d5cdd081a5b98db1d59194818481b1858995b60621b604482015260640161095e565b50600160005b8251811015611feb576000838281518110611f8057634e487b7160e01b600052603260045260246000fd5b016020015160f81c9050828015611fd557508060ff16602d1480611fb7575060308160ff1610158015611fb7575060398160ff1611155b80611fd5575060618160ff1610158015611fd55750607a8160ff1611155b9250508080611fe390613d33565b915050611f55565b50919050565b604080516020810184905290810182905260009060600160408051808303601f19018152828252805160209182012060a084018352868452818401868152600085850181815260608701828152608088018381528584526012909652959091209551865590516001860155516002850155915160039093018054915161ffff1990921693151561ff0019169390931761010091151591909102179091559050611b668482612509565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c015b604051602081830303815290604052805190602001209050919050565b60008060006120fd8585612523565b9150915061210a81612593565b509392505050565b816001600160a01b0316836001600160a01b031614156121745760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161095e565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6121ec848484611d3f565b6121f884848484612794565b6119345760405162461bcd60e51b815260040161095e90613b28565b606061221f826119cd565b6122855760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b606482015260840161095e565b6000828152600a60205260408120805461229e90613cfe565b80601f01602080910402602001604051908101604052809291908181526020018280546122ca90613cfe565b80156123175780601f106122ec57610100808354040283529160200191612317565b820191906000526020600020905b8154815290600101906020018083116122fa57829003601f168201915b5050505050905060006123286128a8565b905080516000141561233b575092915050565b81511561236d578082604051602001612355929190613a74565b60405160208183030381529060405292505050919050565b61174f846128b7565b60006001600160e01b031982166380ac58cd60e01b14806123a757506001600160e01b03198216635b5e139f60e01b145b8061085e57506301ffc9a760e01b6001600160e01b031983161461085e565b6000604051806080016040528060438152602001613da660439139805160209182012083518483015160408087015180519086012090516120d1950193845260208401929092526001600160a01b03166040830152606082015260800190565b6000612431600b5490565b60405161190160f01b60208201526022810191909152604281018390526062016120d1565b806001600160a01b038416158061247357506124718161110b565b155b6124b65760405162461bcd60e51b81526020600482015260146024820152731d1c985b9cd9995c881b9bdd08185b1b1bddd95960621b604482015260640161095e565b600d548114611934576119348382612916565b6124d281612b74565b6000818152600a6020526040902080546124eb90613cfe565b1590506111ce576000818152600a602052604081206111ce91613390565b610f1b828260405180602001604052806000815250612c1b565b60008082516041141561255a5760208301516040840151606085015160001a61254e87828585612c4e565b9450945050505061258c565b8251604014156125845760208301516040840151612579868383612d3b565b93509350505061258c565b506000905060025b9250929050565b60008160048111156125b557634e487b7160e01b600052602160045260246000fd5b14156125be5750565b60018160048111156125e057634e487b7160e01b600052602160045260246000fd5b141561262e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161095e565b600281600481111561265057634e487b7160e01b600052602160045260246000fd5b141561269e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161095e565b60038160048111156126c057634e487b7160e01b600052602160045260246000fd5b14156127195760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161095e565b600481600481111561273b57634e487b7160e01b600052602160045260246000fd5b14156111ce5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161095e565b60006001600160a01b0384163b1561289d57836001600160a01b031663150b7a026127bd6119ea565b8786866040518563ffffffff1660e01b81526004016127df9493929190613ad8565b602060405180830381600087803b1580156127f957600080fd5b505af1925050508015612829575060408051601f3d908101601f191682019092526128269181019061396b565b60015b612883573d808015612857576040519150601f19603f3d011682016040523d82523d6000602084013e61285c565b606091505b50805161287b5760405162461bcd60e51b815260040161095e90613b28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061174f565b506001949350505050565b6060600e805461087390613cfe565b606060006128c36128a8565b905060008151116128e35760405180602001604052806000815250611b66565b806128ef846020612d6a565b604051602001612900929190613a74565b6040516020818303038152906040529392505050565b60008181526012602052604090208054600190910154811580159061293a57508015155b6129795760405162461bcd60e51b815260206004820152601060248201526f0d2dcecc2d8d2c840dcc2dacad0c2e6d60831b604482015260640161095e565b61298282612f4c565b600f546040516306ab592360e01b815260048101849052602481018390523060448201526000916001600160a01b0316906306ab592390606401602060405180830381600087803b1580156129d657600080fd5b505af11580156129ea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a0e91906138b4565b60105460405162d5fa2b60e81b8152600481018390526001600160a01b03888116602483015292935091169063d5fa2b0090604401600060405180830381600087803b158015612a5d57600080fd5b505af1158015612a71573d6000803e3d6000fd5b5050600f54601054604051630c4b7b8560e11b8152600481018690526001600160a01b03918216602482015291169250631896f70a9150604401600060405180830381600087803b158015612ac557600080fd5b505af1158015612ad9573d6000803e3d6000fd5b5050600f546040516306ab592360e01b815260048101879052602481018690526001600160a01b03898116604483015290911692506306ab59239150606401602060405180830381600087803b158015612b3257600080fd5b505af1158015612b46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b6a91906138b4565b50611818836130a2565b6000612b7f826112a2565b9050612b8d81600084612456565b612b986000836119f4565b6001600160a01b0381166000908152600360205260408120805460019290612bc1908490613ca4565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b612c2583836131cd565b612c326000848484612794565b610aa65760405162461bcd60e51b815260040161095e90613b28565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612c855750600090506003612d32565b8460ff16601b14158015612c9d57508460ff16601c14155b15612cae5750600090506004612d32565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612d02573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d2b57600060019250925050612d32565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01612d5c87828885612c4e565b935093505050935093915050565b60606000612d79836002613c85565b612d84906002613c6d565b67ffffffffffffffff811115612daa57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612dd4576020820181803683370190505b509050600360fc1b81600081518110612dfd57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612e3a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612e5e846002613c85565b612e69906001613c6d565b90505b6001811115612efd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612eab57634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110612ecf57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93612ef681613ce7565b9050612e6c565b508315611b665760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161095e565b600d548114158015612fe15750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b158015612f9d57600080fd5b505afa158015612fb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd591906134e1565b6001600160a01b031614155b156111ce57600081815260126020526040902054612ffe90612f4c565b600f5460008281526012602052604090819020805460019091015491516306ab592360e01b8152600481019190915260248101919091523060448201526001600160a01b03909116906306ab592390606401602060405180830381600087803b15801561306a57600080fd5b505af115801561307e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1b91906138b4565b600d5481141580156131365750600f546040516302571be360e01b81526004810183905230916001600160a01b0316906302571be39060240160206040518083038186803b1580156130f357600080fd5b505afa158015613107573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061312b91906134e1565b6001600160a01b0316145b156111ce57600f546001600160a01b0316635b0fc9c382613156816112a2565b6040516001600160e01b031960e085901b16815260048101929092526001600160a01b03166024820152604401600060405180830381600087803b15801561319d57600080fd5b505af11580156131b1573d6000803e3d6000fd5b5050506000828152601260205260409020546111ce91506130a2565b6001600160a01b0382166132235760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161095e565b61322c816119cd565b156132795760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161095e565b61328560008383612456565b6001600160a01b03821660009081526003602052604081208054600192906132ae908490613c6d565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461331890613cfe565b90600052602060002090601f01602090048101928261333a5760008555613380565b82601f1061335357805160ff1916838001178555613380565b82800160010185558215613380579182015b82811115613380578251825591602001919060010190613365565b5061338c9291506133c6565b5090565b50805461339c90613cfe565b6000825580601f106133ac575050565b601f0160209004906000526020600020908101906111ce91905b5b8082111561338c57600081556001016133c7565b600082601f8301126133eb578081fd5b813560206134006133fb83613c49565b613c18565b80838252828201915082860187848660051b890101111561341f578586fd5b855b8581101561343d57813584529284019290840190600101613421565b5090979650505050505050565b8035801515811461147957600080fd5b600082601f83011261346a578081fd5b813567ffffffffffffffff81111561348457613484613d64565b613497601f8201601f1916602001613c18565b8181528460208386010111156134ab578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156134d6578081fd5b8135611b6681613d7a565b6000602082840312156134f2578081fd5b8151611b6681613d7a565b6000806040838503121561350f578081fd5b823561351a81613d7a565b9150602083013561352a81613d7a565b809150509250929050565b600080600060608486031215613549578081fd5b833561355481613d7a565b9250602084013561356481613d7a565b929592945050506040919091013590565b6000806000806080858703121561358a578081fd5b843561359581613d7a565b935060208501356135a581613d7a565b925060408501359150606085013567ffffffffffffffff8111156135c7578182fd5b6135d38782880161345a565b91505092959194509250565b600080604083850312156135f1578182fd5b82356135fc81613d7a565b9150602083013567ffffffffffffffff811115613617578182fd5b613623858286016133db565b9150509250929050565b6000806040838503121561363f578182fd5b823561364a81613d7a565b91506136586020840161344a565b90509250929050565b600080600060608486031215613675578081fd5b833561368081613d7a565b925060208401359150604084013567ffffffffffffffff8111156136a2578182fd5b6136ae8682870161345a565b9150509250925092565b600080600080600060a086880312156136cf578283fd5b85356136da81613d7a565b945060208601359350604086013567ffffffffffffffff808211156136fd578485fd5b61370989838a0161345a565b9450606088013591508082111561371e578283fd5b5061372b8882890161345a565b95989497509295608001359392505050565b600080600080600060a08688031215613754578283fd5b853561375f81613d7a565b9450602086013567ffffffffffffffff81111561377a578384fd5b6137868882890161345a565b9450506040860135925060608601359150608086013560ff811681146137aa578182fd5b809150509295509295909350565b600080604083850312156137ca578182fd5b82356137d581613d7a565b946020939093013593505050565b600080604083850312156137f5578182fd5b823567ffffffffffffffff8082111561380c578384fd5b818501915085601f83011261381f578384fd5b8135602061382f6133fb83613c49565b8083825282820191508286018a848660051b890101111561384e578889fd5b8896505b8487101561387957803561386581613d7a565b835260019690960195918301918301613852565b509650508601359250508082111561388f578283fd5b50613623858286016133db565b6000602082840312156138ad578081fd5b5035919050565b6000602082840312156138c5578081fd5b5051919050565b600080604083850312156138de578182fd5b82359150602083013561352a81613d7a565b600080600060608486031215613904578081fd5b83359250602084013561391681613d7a565b91506139246040850161344a565b90509250925092565b6000806040838503121561393f578182fd5b823591506136586020840161344a565b600060208284031215613960578081fd5b8135611b6681613d8f565b60006020828403121561397c578081fd5b8151611b6681613d8f565b600060208284031215613998578081fd5b813567ffffffffffffffff8111156139ae578182fd5b61174f8482850161345a565b600080604083850312156139cc578182fd5b82359150602083013567ffffffffffffffff8111156139e9578182fd5b6136238582860161345a565b60008151808452613a0d816020860160208601613cbb565b601f01601f19169290920160200192915050565b60008251613a33818460208701613cbb565b9190910192915050565b60008351613a4f818460208801613cbb565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b60008351613a86818460208801613cbb565b835190830190613a9a818360208801613cbb565b01949350505050565b6001600160a01b03848116825283166020820152606060408201819052600090613acf908301846139f5565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613b0b908301846139f5565b9695505050505050565b602081526000611b6660208301846139f5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252600c908201526b1d5b985d5d1a1bdc9a5e995960a21b604082015260600190565b6020808252600d908201526c6d757374206f776e207a6f6e6560981b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613c4157613c41613d64565b604052919050565b600067ffffffffffffffff821115613c6357613c63613d64565b5060051b60200190565b60008219821115613c8057613c80613d4e565b500190565b6000816000190483118215151615613c9f57613c9f613d4e565b500290565b600082821015613cb657613cb6613d4e565b500390565b60005b83811015613cd6578181015183820152602001613cbe565b838111156119345750506000910152565b600081613cf657613cf6613d4e565b506000190190565b600181811c90821680613d1257607f821691505b60208210811415611feb57634e487b7160e01b600052602260045260246000fd5b6000600019821415613d4757613d47613d4e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146111ce57600080fd5b6001600160e01b0319811681146111ce57600080fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e617475726529a264697066735822122077d7b7ae3dd08bce3bdd07db1dd2c5d8930d071bf0b6313c7c383024c6761ba964736f6c63430008040033

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

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.