- We're indexing this chain right now. Some of the counts may be inaccurate.

Contract Address Details

0x4A4880CA51D9cD2F965CE2e6127F1e10eBbd3786

Contract Name
DomainWalletOracle
Creator
0xb8907c–4d2e8f at 0x98ec07–133d51
Balance
0 LIT
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
2793391
Contract name:
DomainWalletOracle




Optimization enabled
false
Compiler version
v0.8.17+commit.8df45f5f




Verified at
2023-07-13T19:59:54.501084Z

Constructor Arguments

000000000000000000000000ae1b317928e08318022391597caa4f3e1f678b2f

Arg [0] (address) : 0xae1b317928e08318022391597caa4f3e1f678b2f

              

contracts/domain-wallets/DomainWalletOracle.sol

//SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/AccessControl.sol";

struct DomainWallet {
    bytes user_id;
    uint64 id;
    uint256 pkpTokenId;
    bytes uri;
    uint ttl;
    bool isWallet;
    bool isRegistered;
    bytes cname;
}

contract DomainWalletOracle is AccessControl {
    // id to domain wallet instance
    mapping(uint64 => DomainWallet) domainWallets;
    // pkpTokenId to DomainWallet
    mapping(uint256 => DomainWallet) pkpOwners;
    // mapping of domain to tokenId for look ups
    mapping(bytes => uint256) ownerLookup;

    uint calcTime = 0;
    uint nonce = 0;
    address public registry;

    bytes32 public constant REGISTRY_ROLE = keccak256("ADMIN"); // 0xdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42

    event Registered(
        uint64 id,
        bytes indexed subDomain,
        uint indexed ttl,
        uint256 indexed tokenId
    );
    event Removed(uint256 indexed tokenId, bytes indexed subDomain);
    event Revoked(uint256 indexed tokenId, bytes indexed subDomain);
    event Expired(bytes indexed subDomain, uint256 tokenId, uint ttl);

    error NonRegistryCaller(address registryAddress, address account);
    error DomainAlreadyRegistered(bytes uri, uint256 pkpTokenId);

    constructor(address _registry) {
        registry = _registry;
        _grantRole(REGISTRY_ROLE, registry);
    }

    function isOwner(uint256 pkpTokenId) public view returns (bool) {
        return pkpOwners[pkpTokenId].isRegistered;
    }

    function isRouted(uint256 pkpTokenId) public view returns (bool) {
        return pkpOwners[pkpTokenId].isRegistered;
    }

    function hasOwner(uint256 pkpTokenId) public view returns (bool) {
        return pkpOwners[pkpTokenId].isRegistered;
    }

    function hasExpired(uint256 pkpTokenId) public returns (bool) {
        uint ttl = pkpOwners[pkpTokenId].ttl;
        bytes memory uri = pkpOwners[pkpTokenId].uri;
        bool isExpired = ttl > block.timestamp;

        if (isExpired) {
            emit Expired(uri, pkpTokenId, ttl);
            return true;
        }

        return false;
    }

    function getDomainById(
        uint256 pkpTokenId
    ) public view returns (bytes memory) {
        return pkpOwners[pkpTokenId].uri;
    }

    function getDomainUri(
        uint256 pkpTokenId
    ) public view returns (bytes memory) {
        return pkpOwners[pkpTokenId].uri;
    }

    function getExpirery(uint256 pkpTokenId) public view returns (uint) {
        return pkpOwners[pkpTokenId].ttl;
    }

    function getPkpTokenId(uint256 pkpTokenId) public view returns (uint256) {
        return pkpOwners[pkpTokenId].pkpTokenId;
    }

    function getRecord(
        uint256 pkpTokenId
    ) public view returns (bytes memory) {
        return pkpOwners[pkpTokenId].cname;
    }

    function checkRegistration(bytes memory userId) public view {
        if (ownerLookup[userId] != 0) {
            revert DomainAlreadyRegistered(userId, ownerLookup[userId]);
        }
    }

    function registerDomain(
        uint64 id,
        bytes memory userId,
        bytes memory uri,
        uint256 pkpTokenId,
        uint ttl
    ) public {
        if (!hasRole(REGISTRY_ROLE, msg.sender)) {
            revert NonRegistryCaller(registry, msg.sender);
        }

        if (ownerLookup[uri] != 0) {
            revert DomainAlreadyRegistered(uri, ownerLookup[uri]);
        }

        domainWallets[id].user_id = userId;
        domainWallets[id].pkpTokenId = pkpTokenId;
        domainWallets[id].uri = uri;
        domainWallets[id].ttl = ttl;
        domainWallets[id].isRegistered = true;
        domainWallets[id].isWallet = true;

        // Set the value in the pkpOwners map from the domainWallets map to avoid memory storage.
        pkpOwners[pkpTokenId] = domainWallets[id];
        // Set the domain as a lookup to the pkp
        ownerLookup[uri] = pkpTokenId;

        emit Registered(id, userId, ttl, pkpTokenId);
    }

    function registerPKP(uint64 id, uint256 pkpTokenId) public returns (bool) {
        if (!hasRole(REGISTRY_ROLE, msg.sender)) {
            revert NonRegistryCaller(registry, msg.sender);
        }

        if (domainWallets[id].isWallet == false) {
            return false;
        }

        domainWallets[id].pkpTokenId = pkpTokenId;

        return true;
    }

    function removeDomain(uint256 pkpTokenId) public returns (bool) {
        if (!hasRole(REGISTRY_ROLE, msg.sender)) {
            revert NonRegistryCaller(registry, msg.sender);
        }

        if (pkpOwners[pkpTokenId].isWallet == false) {
            return false;
        }

        uint64 id = pkpOwners[pkpTokenId].id;
        delete pkpOwners[pkpTokenId]; // delete the pkp ownership relationship

        domainWallets[id].isRegistered = false;
        domainWallets[id].isWallet = false;
        domainWallets[id].pkpTokenId = 0; // null the tokenId since the owner is no longer this pkp
        domainWallets[id].user_id = hex"00"; // 0 out the bytes for the user id

        emit Removed(id, domainWallets[id].user_id);

        return true;
    }

    function updateDomainRecord(
        uint256 pkpTokenId,
        bytes memory record
    ) public returns (bool) {
        if (!hasRole(REGISTRY_ROLE, msg.sender)) {
            revert NonRegistryCaller(registry, msg.sender);
        }

        if (pkpOwners[pkpTokenId].isWallet == false) {
            return false;
        }
        pkpOwners[pkpTokenId].cname = record;
        domainWallets[pkpOwners[pkpTokenId].id].cname = pkpOwners[pkpTokenId]
            .cname;
        return true;
    }

    function revokeDomain(uint256 pkpTokenId) public returns (bool) {
        if (!hasRole(REGISTRY_ROLE, msg.sender)) {
            revert NonRegistryCaller(registry, msg.sender);
        }

        if (pkpOwners[pkpTokenId].isRegistered == false) {
            return false;
        }

        pkpOwners[pkpTokenId].isRegistered = false;
        pkpOwners[pkpTokenId].pkpTokenId = 0; // null the tokenId since the owner is no longer this pkp;
        pkpOwners[pkpTokenId].user_id = hex"00"; // 0 out the bytes for the user id
        pkpOwners[pkpTokenId].cname = hex"00"; // 0 out the bytes for the record

        domainWallets[pkpOwners[pkpTokenId].id] = pkpOwners[pkpTokenId];

        emit Revoked(pkpTokenId, pkpOwners[pkpTokenId].uri);

        return true;
    }
}
        

@openzeppelin/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}
          

@openzeppelin/contracts/access/IAccessControl.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}
          

@openzeppelin/contracts/utils/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;
    }
}
          

@openzeppelin/contracts/utils/Strings.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}
          

@openzeppelin/contracts/utils/introspection/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;
    }
}
          

@openzeppelin/contracts/utils/introspection/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);
}
          

@openzeppelin/contracts/utils/math/Math.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_registry","internalType":"address"}]},{"type":"error","name":"DomainAlreadyRegistered","inputs":[{"type":"bytes","name":"uri","internalType":"bytes"},{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"error","name":"NonRegistryCaller","inputs":[{"type":"address","name":"registryAddress","internalType":"address"},{"type":"address","name":"account","internalType":"address"}]},{"type":"event","name":"Expired","inputs":[{"type":"bytes","name":"subDomain","internalType":"bytes","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false},{"type":"uint256","name":"ttl","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Registered","inputs":[{"type":"uint64","name":"id","internalType":"uint64","indexed":false},{"type":"bytes","name":"subDomain","internalType":"bytes","indexed":true},{"type":"uint256","name":"ttl","internalType":"uint256","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"Removed","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"bytes","name":"subDomain","internalType":"bytes","indexed":true}],"anonymous":false},{"type":"event","name":"Revoked","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true},{"type":"bytes","name":"subDomain","internalType":"bytes","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"REGISTRY_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[],"name":"checkRegistration","inputs":[{"type":"bytes","name":"userId","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"getDomainById","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"getDomainUri","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getExpirery","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPkpTokenId","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"getRecord","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasExpired","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasOwner","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOwner","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isRouted","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"registerDomain","inputs":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"bytes","name":"userId","internalType":"bytes"},{"type":"bytes","name":"uri","internalType":"bytes"},{"type":"uint256","name":"pkpTokenId","internalType":"uint256"},{"type":"uint256","name":"ttl","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"registerPKP","inputs":[{"type":"uint64","name":"id","internalType":"uint64"},{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"registry","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"removeDomain","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"revokeDomain","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"updateDomainRecord","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"},{"type":"bytes","name":"record","internalType":"bytes"}]}]
            

Contract Creation Code

0x6080604052600060045560006005553480156200001b57600080fd5b50604051620032ba380380620032ba8339818101604052810190620000419190620002aa565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000d67fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16620000dd60201b60201c565b50620002dc565b620000ef8282620001ce60201b60201c565b620001ca57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200016f6200023860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002728262000245565b9050919050565b620002848162000265565b81146200029057600080fd5b50565b600081519050620002a48162000279565b92915050565b600060208284031215620002c357620002c262000240565b5b6000620002d38482850162000293565b91505092915050565b612fce80620002ec6000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806349fcbc54116100c3578063abcd62a01161007c578063abcd62a014610437578063c9b2874914610467578063d547741f14610497578063d964a375146104b3578063e7094380146104e3578063f48d60ca1461051357610158565b806349fcbc541461033b5780635100240f1461036b5780636a3000c41461039b5780637b103999146103cb57806391d14854146103e9578063a217fddf1461041957610158565b8063248a9ca311610115578063248a9ca31461026957806327bd069e146102995780632f2ff15d146102b557806336568abe146102d157806339c7639c146102ed57806342f1e8791461031d57610158565b806301c6d0351461015d57806301ffc9a71461018d57806303e9e609146101bd57806306985fb1146101ed5780630c91d3421461021d57806315d4647414610239575b600080fd5b61017760048036038101906101729190611e98565b610543565b6040516101849190611ee0565b60405180910390f35b6101a760048036038101906101a29190611f53565b610570565b6040516101b49190611ee0565b60405180910390f35b6101d760048036038101906101d29190611e98565b6105ea565b6040516101e49190612010565b60405180910390f35b61020760048036038101906102029190612167565b610692565b6040516102149190611ee0565b60405180910390f35b61023760048036038101906102329190612203565b610801565b005b610253600480360381019061024e9190611e98565b610c0b565b6040516102609190611ee0565b60405180910390f35b610283600480360381019061027e91906122ec565b610f21565b6040516102909190612328565b60405180910390f35b6102b360048036038101906102ae9190612343565b610f40565b005b6102cf60048036038101906102ca91906123ea565b610fc6565b005b6102eb60048036038101906102e691906123ea565b610fe7565b005b61030760048036038101906103029190611e98565b61106a565b6040516103149190611ee0565b60405180910390f35b610325611097565b6040516103329190612328565b60405180910390f35b61035560048036038101906103509190611e98565b6110bb565b6040516103629190611ee0565b60405180910390f35b61038560048036038101906103809190611e98565b6111ef565b6040516103929190612010565b60405180910390f35b6103b560048036038101906103b09190611e98565b611297565b6040516103c29190612010565b60405180910390f35b6103d361133f565b6040516103e09190612439565b60405180910390f35b61040360048036038101906103fe91906123ea565b611365565b6040516104109190611ee0565b60405180910390f35b6104216113cf565b60405161042e9190612328565b60405180910390f35b610451600480360381019061044c9190611e98565b6113d6565b60405161045e9190612463565b60405180910390f35b610481600480360381019061047c919061247e565b6113f6565b60405161048e9190611ee0565b60405180910390f35b6104b160048036038101906104ac91906123ea565b61150d565b005b6104cd60048036038101906104c89190611e98565b61152e565b6040516104da9190611ee0565b60405180910390f35b6104fd60048036038101906104f89190611e98565b61186f565b60405161050a9190612463565b60405180910390f35b61052d60048036038101906105289190611e98565b61188f565b60405161053a9190611ee0565b60405180910390f35b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105e357506105e2826118bc565b5b9050919050565b606060026000838152602001908152602001600020600601805461060d906124ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610639906124ed565b80156106865780601f1061065b57610100808354040283529160200191610686565b820191906000526020600020905b81548152906001019060200180831161066957829003601f168201915b50505050509050919050565b60006106be7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61072357600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161071a92919061251e565b60405180910390fd5b600015156002600085815260200190815260200160002060050160009054906101000a900460ff1615150361075b57600090506107fb565b8160026000858152602001908152602001600020600601908161077e91906126f3565b5060026000848152602001908152602001600020600601600160006002600087815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060060190816107f591906127f0565b50600190505b92915050565b61082b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61089057600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161088792919061251e565b60405180910390fd5b60006003846040516108a29190612914565b9081526020016040518091039020541461091357826003846040516108c79190612914565b9081526020016040518091039020546040517f3bcbf6c400000000000000000000000000000000000000000000000000000000815260040161090a92919061292b565b60405180910390fd5b83600160008767ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001908161094a91906126f3565b5081600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018190555082600160008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060030190816109b191906126f3565b5080600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206004018190555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff021916908315150217905550600160008667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002600084815260200190815260200160002060008201816000019081610ab39190612971565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506002820154816002015560038201816003019081610b159190612971565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff02191690831515021790555060068201816006019081610b8e9190612971565b5090505081600384604051610ba39190612914565b908152602001604051809103902081905550818185604051610bc59190612914565b60405180910390207fc276b207558b882d6e0e49fc3e221e9fd140cced79dd16fae88e0de97f4a2f0d88604051610bfc9190612a68565b60405180910390a45050505050565b6000610c377fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b610c9c57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610c9392919061251e565b60405180910390fd5b600015156002600084815260200190815260200160002060050160009054906101000a900460ff16151503610cd45760009050610f1c565b60006002600084815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1690506002600084815260200190815260200160002060008082016000610d279190611df1565b6001820160006101000a81549067ffffffffffffffff02191690556002820160009055600382016000610d5a9190611df1565b60048201600090556005820160006101000a81549060ff02191690556005820160016101000a81549060ff0219169055600682016000610d9a9190611df1565b50506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055506040518060400160405280600181526020016000815250600160008367ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000019081610e9f9190612a8e565b50600160008267ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001604051610ed79190612be3565b60405180910390208167ffffffffffffffff167fd4a95e28367a3ce6694042b01d34e7ba0198bcdaca1ffb38eaec9898c748b0ad60405160405180910390a360019150505b919050565b6000806000838152602001908152602001600020600101549050919050565b6000600382604051610f529190612914565b90815260200160405180910390205414610fc35780600382604051610f779190612914565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610fba92919061292b565b60405180910390fd5b50565b610fcf82610f21565b610fd881611926565b610fe2838361193a565b505050565b610fef611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461105c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105390612c7d565b60405180910390fd5b6110668282611a22565b5050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b6000806002600084815260200190815260200160002060040154905060006002600085815260200190815260200160002060030180546110fa906124ed565b80601f0160208091040260200160405190810160405280929190818152602001828054611126906124ed565b80156111735780601f1061114857610100808354040283529160200191611173565b820191906000526020600020905b81548152906001019060200180831161115657829003601f168201915b505050505090506000428311905080156111e257816040516111959190612914565b60405180910390207fb2363f688f7b32557c64bff90081959f0bb6c24f09ca465424c5afc5854dc58d86856040516111ce929190612c9d565b60405180910390a2600193505050506111ea565b600093505050505b919050565b6060600260008381526020019081526020016000206003018054611212906124ed565b80601f016020809104026020016040519081016040528092919081815260200182805461123e906124ed565b801561128b5780601f106112605761010080835404028352916020019161128b565b820191906000526020600020905b81548152906001019060200180831161126e57829003601f168201915b50505050509050919050565b60606002600083815260200190815260200160002060030180546112ba906124ed565b80601f01602080910402602001604051908101604052809291908181526020018280546112e6906124ed565b80156113335780601f1061130857610100808354040283529160200191611333565b820191906000526020600020905b81548152906001019060200180831161131657829003601f168201915b50505050509050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b600060026000838152602001908152602001600020600201549050919050565b60006114227fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61148757600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161147e92919061251e565b60405180910390fd5b60001515600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160009054906101000a900460ff161515036114d35760009050611507565b81600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060020181905550600190505b92915050565b61151682610f21565b61151f81611926565b6115298383611a22565b505050565b600061155a7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b6115bf57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016115b692919061251e565b60405180910390fd5b600015156002600084815260200190815260200160002060050160019054906101000a900460ff161515036115f7576000905061186a565b60006002600084815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060006002600084815260200190815260200160002060020181905550604051806040016040528060018152602001600081525060026000848152602001908152602001600020600001908161167b9190612a8e565b5060405180604001604052806001815260200160008152506002600084815260200190815260200160002060060190816116b59190612a8e565b5060026000838152602001908152602001600020600160006002600086815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000820181600001908161172e9190612971565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060028201548160020155600382018160030190816117909190612971565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff021916908315150217905550600682018160060190816118099190612971565b50905050600260008381526020019081526020016000206003016040516118309190612be3565b6040518091039020827fae179513beb9b19a22a2c82f794dfd4d379cbbd2e7e95c744a1ea89ad20032f760405160405180910390a3600190505b919050565b600060026000838152602001908152602001600020600401549050919050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61193781611932611a1a565b611b03565b50565b6119448282611365565b611a1657600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506119bb611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611a2c8282611365565b15611aff57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611aa4611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b611b0d8282611365565b611b8457611b1a81611b88565b611b288360001c6020611bb5565b604051602001611b39929190612d9a565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7b9190612e0d565b60405180910390fd5b5050565b6060611bae8273ffffffffffffffffffffffffffffffffffffffff16601460ff16611bb5565b9050919050565b606060006002836002611bc89190612e5e565b611bd29190612ea0565b67ffffffffffffffff811115611beb57611bea61203c565b5b6040519080825280601f01601f191660200182016040528015611c1d5781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c5557611c54612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611cb957611cb8612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611cf99190612e5e565b611d039190612ea0565b90505b6001811115611da3577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611d4557611d44612ed4565b5b1a60f81b828281518110611d5c57611d5b612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611d9c90612f03565b9050611d06565b5060008414611de7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dde90612f78565b60405180910390fd5b8091505092915050565b508054611dfd906124ed565b6000825580601f10611e0f5750611e2e565b601f016020900490600052602060002090810190611e2d9190611e31565b5b50565b5b80821115611e4a576000816000905550600101611e32565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b611e7581611e62565b8114611e8057600080fd5b50565b600081359050611e9281611e6c565b92915050565b600060208284031215611eae57611ead611e58565b5b6000611ebc84828501611e83565b91505092915050565b60008115159050919050565b611eda81611ec5565b82525050565b6000602082019050611ef56000830184611ed1565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611f3081611efb565b8114611f3b57600080fd5b50565b600081359050611f4d81611f27565b92915050565b600060208284031215611f6957611f68611e58565b5b6000611f7784828501611f3e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611fba578082015181840152602081019050611f9f565b60008484015250505050565b6000601f19601f8301169050919050565b6000611fe282611f80565b611fec8185611f8b565b9350611ffc818560208601611f9c565b61200581611fc6565b840191505092915050565b6000602082019050818103600083015261202a8184611fd7565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61207482611fc6565b810181811067ffffffffffffffff821117156120935761209261203c565b5b80604052505050565b60006120a6611e4e565b90506120b2828261206b565b919050565b600067ffffffffffffffff8211156120d2576120d161203c565b5b6120db82611fc6565b9050602081019050919050565b82818337600083830152505050565b600061210a612105846120b7565b61209c565b90508281526020810184848401111561212657612125612037565b5b6121318482856120e8565b509392505050565b600082601f83011261214e5761214d612032565b5b813561215e8482602086016120f7565b91505092915050565b6000806040838503121561217e5761217d611e58565b5b600061218c85828601611e83565b925050602083013567ffffffffffffffff8111156121ad576121ac611e5d565b5b6121b985828601612139565b9150509250929050565b600067ffffffffffffffff82169050919050565b6121e0816121c3565b81146121eb57600080fd5b50565b6000813590506121fd816121d7565b92915050565b600080600080600060a0868803121561221f5761221e611e58565b5b600061222d888289016121ee565b955050602086013567ffffffffffffffff81111561224e5761224d611e5d565b5b61225a88828901612139565b945050604086013567ffffffffffffffff81111561227b5761227a611e5d565b5b61228788828901612139565b935050606061229888828901611e83565b92505060806122a988828901611e83565b9150509295509295909350565b6000819050919050565b6122c9816122b6565b81146122d457600080fd5b50565b6000813590506122e6816122c0565b92915050565b60006020828403121561230257612301611e58565b5b6000612310848285016122d7565b91505092915050565b612322816122b6565b82525050565b600060208201905061233d6000830184612319565b92915050565b60006020828403121561235957612358611e58565b5b600082013567ffffffffffffffff81111561237757612376611e5d565b5b61238384828501612139565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123b78261238c565b9050919050565b6123c7816123ac565b81146123d257600080fd5b50565b6000813590506123e4816123be565b92915050565b6000806040838503121561240157612400611e58565b5b600061240f858286016122d7565b9250506020612420858286016123d5565b9150509250929050565b612433816123ac565b82525050565b600060208201905061244e600083018461242a565b92915050565b61245d81611e62565b82525050565b60006020820190506124786000830184612454565b92915050565b6000806040838503121561249557612494611e58565b5b60006124a3858286016121ee565b92505060206124b485828601611e83565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061250557607f821691505b602082108103612518576125176124be565b5b50919050565b6000604082019050612533600083018561242a565b612540602083018461242a565b9392505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026125a97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261256c565b6125b3868361256c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006125f06125eb6125e684611e62565b6125cb565b611e62565b9050919050565b6000819050919050565b61260a836125d5565b61261e612616826125f7565b848454612579565b825550505050565b600090565b612633612626565b61263e818484612601565b505050565b5b818110156126625761265760008261262b565b600181019050612644565b5050565b601f8211156126a75761267881612547565b6126818461255c565b81016020851015612690578190505b6126a461269c8561255c565b830182612643565b50505b505050565b600082821c905092915050565b60006126ca600019846008026126ac565b1980831691505092915050565b60006126e383836126b9565b9150826002028217905092915050565b6126fc82611f80565b67ffffffffffffffff8111156127155761271461203c565b5b61271f82546124ed565b61272a828285612666565b600060209050601f83116001811461275d576000841561274b578287015190505b61275585826126d7565b8655506127bd565b601f19841661276b86612547565b60005b828110156127935784890151825560018201915060208501945060208101905061276e565b868310156127b057848901516127ac601f8916826126b9565b8355505b6001600288020188555050505b505050505050565b6000815490506127d4816124ed565b9050919050565b60008190508160005260206000209050919050565b8181036127fe5750506128d6565b612807826127c5565b67ffffffffffffffff8111156128205761281f61203c565b5b61282a82546124ed565b612835828285612666565b6000601f8311600181146128645760008415612852578287015490505b61285c85826126d7565b8655506128cf565b601f198416612872876127db565b965061287d86612547565b60005b828110156128a557848901548255600182019150600185019450602081019050612880565b868310156128c257848901546128be601f8916826126b9565b8355505b6001600288020188555050505b5050505050505b565b600081905092915050565b60006128ee82611f80565b6128f881856128d8565b9350612908818560208601611f9c565b80840191505092915050565b600061292082846128e3565b915081905092915050565b600060408201905081810360008301526129458185611fd7565b90506129546020830184612454565b9392505050565b60008154905061296a816124ed565b9050919050565b81810361297f575050612a57565b6129888261295b565b67ffffffffffffffff8111156129a1576129a061203c565b5b6129ab82546124ed565b6129b6828285612666565b6000601f8311600181146129e557600084156129d3578287015490505b6129dd85826126d7565b865550612a50565b601f1984166129f387612547565b96506129fe86612547565b60005b82811015612a2657848901548255600182019150600185019450602081019050612a01565b86831015612a435784890154612a3f601f8916826126b9565b8355505b6001600288020188555050505b5050505050505b565b612a62816121c3565b82525050565b6000602082019050612a7d6000830184612a59565b92915050565b600081519050919050565b612a9782612a83565b67ffffffffffffffff811115612ab057612aaf61203c565b5b612aba82546124ed565b612ac5828285612666565b600060209050601f831160018114612af85760008415612ae6578287015190505b612af085826126d7565b865550612b58565b601f198416612b0686612547565b60005b82811015612b2e57848901518255600182019150602085019450602081019050612b09565b86831015612b4b5784890151612b47601f8916826126b9565b8355505b6001600288020188555050505b505050505050565b60008154612b6d816124ed565b612b7781866128d8565b94506001821660008114612b925760018114612ba757612bda565b60ff1983168652811515820286019350612bda565b612bb085612547565b60005b83811015612bd257815481890152600182019150602081019050612bb3565b838801955050505b50505092915050565b6000612bef8284612b60565b915081905092915050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612c67602f83612bfa565b9150612c7282612c0b565b604082019050919050565b60006020820190508181036000830152612c9681612c5a565b9050919050565b6000604082019050612cb26000830185612454565b612cbf6020830184612454565b9392505050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612d07601783612cc6565b9150612d1282612cd1565b601782019050919050565b6000612d2882612a83565b612d328185612cc6565b9350612d42818560208601611f9c565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612d84601183612cc6565b9150612d8f82612d4e565b601182019050919050565b6000612da582612cfa565b9150612db18285612d1d565b9150612dbc82612d77565b9150612dc88284612d1d565b91508190509392505050565b6000612ddf82612a83565b612de98185612bfa565b9350612df9818560208601611f9c565b612e0281611fc6565b840191505092915050565b60006020820190508181036000830152612e278184612dd4565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e6982611e62565b9150612e7483611e62565b9250828202612e8281611e62565b91508282048414831517612e9957612e98612e2f565b5b5092915050565b6000612eab82611e62565b9150612eb683611e62565b9250828201905080821115612ece57612ecd612e2f565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612f0e82611e62565b915060008203612f2157612f20612e2f565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612f62602083612bfa565b9150612f6d82612f2c565b602082019050919050565b60006020820190508181036000830152612f9181612f55565b905091905056fea264697066735822122071da3764852fc77fa18f3e79494b69ca0d46c7dda5cff9db561a090581a405fa64736f6c63430008110033000000000000000000000000ae1b317928e08318022391597caa4f3e1f678b2f

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c806349fcbc54116100c3578063abcd62a01161007c578063abcd62a014610437578063c9b2874914610467578063d547741f14610497578063d964a375146104b3578063e7094380146104e3578063f48d60ca1461051357610158565b806349fcbc541461033b5780635100240f1461036b5780636a3000c41461039b5780637b103999146103cb57806391d14854146103e9578063a217fddf1461041957610158565b8063248a9ca311610115578063248a9ca31461026957806327bd069e146102995780632f2ff15d146102b557806336568abe146102d157806339c7639c146102ed57806342f1e8791461031d57610158565b806301c6d0351461015d57806301ffc9a71461018d57806303e9e609146101bd57806306985fb1146101ed5780630c91d3421461021d57806315d4647414610239575b600080fd5b61017760048036038101906101729190611e98565b610543565b6040516101849190611ee0565b60405180910390f35b6101a760048036038101906101a29190611f53565b610570565b6040516101b49190611ee0565b60405180910390f35b6101d760048036038101906101d29190611e98565b6105ea565b6040516101e49190612010565b60405180910390f35b61020760048036038101906102029190612167565b610692565b6040516102149190611ee0565b60405180910390f35b61023760048036038101906102329190612203565b610801565b005b610253600480360381019061024e9190611e98565b610c0b565b6040516102609190611ee0565b60405180910390f35b610283600480360381019061027e91906122ec565b610f21565b6040516102909190612328565b60405180910390f35b6102b360048036038101906102ae9190612343565b610f40565b005b6102cf60048036038101906102ca91906123ea565b610fc6565b005b6102eb60048036038101906102e691906123ea565b610fe7565b005b61030760048036038101906103029190611e98565b61106a565b6040516103149190611ee0565b60405180910390f35b610325611097565b6040516103329190612328565b60405180910390f35b61035560048036038101906103509190611e98565b6110bb565b6040516103629190611ee0565b60405180910390f35b61038560048036038101906103809190611e98565b6111ef565b6040516103929190612010565b60405180910390f35b6103b560048036038101906103b09190611e98565b611297565b6040516103c29190612010565b60405180910390f35b6103d361133f565b6040516103e09190612439565b60405180910390f35b61040360048036038101906103fe91906123ea565b611365565b6040516104109190611ee0565b60405180910390f35b6104216113cf565b60405161042e9190612328565b60405180910390f35b610451600480360381019061044c9190611e98565b6113d6565b60405161045e9190612463565b60405180910390f35b610481600480360381019061047c919061247e565b6113f6565b60405161048e9190611ee0565b60405180910390f35b6104b160048036038101906104ac91906123ea565b61150d565b005b6104cd60048036038101906104c89190611e98565b61152e565b6040516104da9190611ee0565b60405180910390f35b6104fd60048036038101906104f89190611e98565b61186f565b60405161050a9190612463565b60405180910390f35b61052d60048036038101906105289190611e98565b61188f565b60405161053a9190611ee0565b60405180910390f35b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105e357506105e2826118bc565b5b9050919050565b606060026000838152602001908152602001600020600601805461060d906124ed565b80601f0160208091040260200160405190810160405280929190818152602001828054610639906124ed565b80156106865780601f1061065b57610100808354040283529160200191610686565b820191906000526020600020905b81548152906001019060200180831161066957829003601f168201915b50505050509050919050565b60006106be7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61072357600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161071a92919061251e565b60405180910390fd5b600015156002600085815260200190815260200160002060050160009054906101000a900460ff1615150361075b57600090506107fb565b8160026000858152602001908152602001600020600601908161077e91906126f3565b5060026000848152602001908152602001600020600601600160006002600087815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060060190816107f591906127f0565b50600190505b92915050565b61082b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61089057600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161088792919061251e565b60405180910390fd5b60006003846040516108a29190612914565b9081526020016040518091039020541461091357826003846040516108c79190612914565b9081526020016040518091039020546040517f3bcbf6c400000000000000000000000000000000000000000000000000000000815260040161090a92919061292b565b60405180910390fd5b83600160008767ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001908161094a91906126f3565b5081600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018190555082600160008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060030190816109b191906126f3565b5080600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206004018190555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff021916908315150217905550600160008667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002600084815260200190815260200160002060008201816000019081610ab39190612971565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506002820154816002015560038201816003019081610b159190612971565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff02191690831515021790555060068201816006019081610b8e9190612971565b5090505081600384604051610ba39190612914565b908152602001604051809103902081905550818185604051610bc59190612914565b60405180910390207fc276b207558b882d6e0e49fc3e221e9fd140cced79dd16fae88e0de97f4a2f0d88604051610bfc9190612a68565b60405180910390a45050505050565b6000610c377fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b610c9c57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610c9392919061251e565b60405180910390fd5b600015156002600084815260200190815260200160002060050160009054906101000a900460ff16151503610cd45760009050610f1c565b60006002600084815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1690506002600084815260200190815260200160002060008082016000610d279190611df1565b6001820160006101000a81549067ffffffffffffffff02191690556002820160009055600382016000610d5a9190611df1565b60048201600090556005820160006101000a81549060ff02191690556005820160016101000a81549060ff0219169055600682016000610d9a9190611df1565b50506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055506040518060400160405280600181526020016000815250600160008367ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000019081610e9f9190612a8e565b50600160008267ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001604051610ed79190612be3565b60405180910390208167ffffffffffffffff167fd4a95e28367a3ce6694042b01d34e7ba0198bcdaca1ffb38eaec9898c748b0ad60405160405180910390a360019150505b919050565b6000806000838152602001908152602001600020600101549050919050565b6000600382604051610f529190612914565b90815260200160405180910390205414610fc35780600382604051610f779190612914565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610fba92919061292b565b60405180910390fd5b50565b610fcf82610f21565b610fd881611926565b610fe2838361193a565b505050565b610fef611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461105c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105390612c7d565b60405180910390fd5b6110668282611a22565b5050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b6000806002600084815260200190815260200160002060040154905060006002600085815260200190815260200160002060030180546110fa906124ed565b80601f0160208091040260200160405190810160405280929190818152602001828054611126906124ed565b80156111735780601f1061114857610100808354040283529160200191611173565b820191906000526020600020905b81548152906001019060200180831161115657829003601f168201915b505050505090506000428311905080156111e257816040516111959190612914565b60405180910390207fb2363f688f7b32557c64bff90081959f0bb6c24f09ca465424c5afc5854dc58d86856040516111ce929190612c9d565b60405180910390a2600193505050506111ea565b600093505050505b919050565b6060600260008381526020019081526020016000206003018054611212906124ed565b80601f016020809104026020016040519081016040528092919081815260200182805461123e906124ed565b801561128b5780601f106112605761010080835404028352916020019161128b565b820191906000526020600020905b81548152906001019060200180831161126e57829003601f168201915b50505050509050919050565b60606002600083815260200190815260200160002060030180546112ba906124ed565b80601f01602080910402602001604051908101604052809291908181526020018280546112e6906124ed565b80156113335780601f1061130857610100808354040283529160200191611333565b820191906000526020600020905b81548152906001019060200180831161131657829003601f168201915b50505050509050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000801b81565b600060026000838152602001908152602001600020600201549050919050565b60006114227fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b61148757600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c00000000000000000000000000000000000000000000000000000000815260040161147e92919061251e565b60405180910390fd5b60001515600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160009054906101000a900460ff161515036114d35760009050611507565b81600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060020181905550600190505b92915050565b61151682610f21565b61151f81611926565b6115298383611a22565b505050565b600061155a7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4233611365565b6115bf57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016115b692919061251e565b60405180910390fd5b600015156002600084815260200190815260200160002060050160019054906101000a900460ff161515036115f7576000905061186a565b60006002600084815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060006002600084815260200190815260200160002060020181905550604051806040016040528060018152602001600081525060026000848152602001908152602001600020600001908161167b9190612a8e565b5060405180604001604052806001815260200160008152506002600084815260200190815260200160002060060190816116b59190612a8e565b5060026000838152602001908152602001600020600160006002600086815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000820181600001908161172e9190612971565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555060028201548160020155600382018160030190816117909190612971565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff021916908315150217905550600682018160060190816118099190612971565b50905050600260008381526020019081526020016000206003016040516118309190612be3565b6040518091039020827fae179513beb9b19a22a2c82f794dfd4d379cbbd2e7e95c744a1ea89ad20032f760405160405180910390a3600190505b919050565b600060026000838152602001908152602001600020600401549050919050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61193781611932611a1a565b611b03565b50565b6119448282611365565b611a1657600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506119bb611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b611a2c8282611365565b15611aff57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611aa4611a1a565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b611b0d8282611365565b611b8457611b1a81611b88565b611b288360001c6020611bb5565b604051602001611b39929190612d9a565b6040516020818303038152906040526040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7b9190612e0d565b60405180910390fd5b5050565b6060611bae8273ffffffffffffffffffffffffffffffffffffffff16601460ff16611bb5565b9050919050565b606060006002836002611bc89190612e5e565b611bd29190612ea0565b67ffffffffffffffff811115611beb57611bea61203c565b5b6040519080825280601f01601f191660200182016040528015611c1d5781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611c5557611c54612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611cb957611cb8612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611cf99190612e5e565b611d039190612ea0565b90505b6001811115611da3577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611d4557611d44612ed4565b5b1a60f81b828281518110611d5c57611d5b612ed4565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611d9c90612f03565b9050611d06565b5060008414611de7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dde90612f78565b60405180910390fd5b8091505092915050565b508054611dfd906124ed565b6000825580601f10611e0f5750611e2e565b601f016020900490600052602060002090810190611e2d9190611e31565b5b50565b5b80821115611e4a576000816000905550600101611e32565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b611e7581611e62565b8114611e8057600080fd5b50565b600081359050611e9281611e6c565b92915050565b600060208284031215611eae57611ead611e58565b5b6000611ebc84828501611e83565b91505092915050565b60008115159050919050565b611eda81611ec5565b82525050565b6000602082019050611ef56000830184611ed1565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611f3081611efb565b8114611f3b57600080fd5b50565b600081359050611f4d81611f27565b92915050565b600060208284031215611f6957611f68611e58565b5b6000611f7784828501611f3e565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611fba578082015181840152602081019050611f9f565b60008484015250505050565b6000601f19601f8301169050919050565b6000611fe282611f80565b611fec8185611f8b565b9350611ffc818560208601611f9c565b61200581611fc6565b840191505092915050565b6000602082019050818103600083015261202a8184611fd7565b905092915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61207482611fc6565b810181811067ffffffffffffffff821117156120935761209261203c565b5b80604052505050565b60006120a6611e4e565b90506120b2828261206b565b919050565b600067ffffffffffffffff8211156120d2576120d161203c565b5b6120db82611fc6565b9050602081019050919050565b82818337600083830152505050565b600061210a612105846120b7565b61209c565b90508281526020810184848401111561212657612125612037565b5b6121318482856120e8565b509392505050565b600082601f83011261214e5761214d612032565b5b813561215e8482602086016120f7565b91505092915050565b6000806040838503121561217e5761217d611e58565b5b600061218c85828601611e83565b925050602083013567ffffffffffffffff8111156121ad576121ac611e5d565b5b6121b985828601612139565b9150509250929050565b600067ffffffffffffffff82169050919050565b6121e0816121c3565b81146121eb57600080fd5b50565b6000813590506121fd816121d7565b92915050565b600080600080600060a0868803121561221f5761221e611e58565b5b600061222d888289016121ee565b955050602086013567ffffffffffffffff81111561224e5761224d611e5d565b5b61225a88828901612139565b945050604086013567ffffffffffffffff81111561227b5761227a611e5d565b5b61228788828901612139565b935050606061229888828901611e83565b92505060806122a988828901611e83565b9150509295509295909350565b6000819050919050565b6122c9816122b6565b81146122d457600080fd5b50565b6000813590506122e6816122c0565b92915050565b60006020828403121561230257612301611e58565b5b6000612310848285016122d7565b91505092915050565b612322816122b6565b82525050565b600060208201905061233d6000830184612319565b92915050565b60006020828403121561235957612358611e58565b5b600082013567ffffffffffffffff81111561237757612376611e5d565b5b61238384828501612139565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006123b78261238c565b9050919050565b6123c7816123ac565b81146123d257600080fd5b50565b6000813590506123e4816123be565b92915050565b6000806040838503121561240157612400611e58565b5b600061240f858286016122d7565b9250506020612420858286016123d5565b9150509250929050565b612433816123ac565b82525050565b600060208201905061244e600083018461242a565b92915050565b61245d81611e62565b82525050565b60006020820190506124786000830184612454565b92915050565b6000806040838503121561249557612494611e58565b5b60006124a3858286016121ee565b92505060206124b485828601611e83565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061250557607f821691505b602082108103612518576125176124be565b5b50919050565b6000604082019050612533600083018561242a565b612540602083018461242a565b9392505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026125a97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261256c565b6125b3868361256c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006125f06125eb6125e684611e62565b6125cb565b611e62565b9050919050565b6000819050919050565b61260a836125d5565b61261e612616826125f7565b848454612579565b825550505050565b600090565b612633612626565b61263e818484612601565b505050565b5b818110156126625761265760008261262b565b600181019050612644565b5050565b601f8211156126a75761267881612547565b6126818461255c565b81016020851015612690578190505b6126a461269c8561255c565b830182612643565b50505b505050565b600082821c905092915050565b60006126ca600019846008026126ac565b1980831691505092915050565b60006126e383836126b9565b9150826002028217905092915050565b6126fc82611f80565b67ffffffffffffffff8111156127155761271461203c565b5b61271f82546124ed565b61272a828285612666565b600060209050601f83116001811461275d576000841561274b578287015190505b61275585826126d7565b8655506127bd565b601f19841661276b86612547565b60005b828110156127935784890151825560018201915060208501945060208101905061276e565b868310156127b057848901516127ac601f8916826126b9565b8355505b6001600288020188555050505b505050505050565b6000815490506127d4816124ed565b9050919050565b60008190508160005260206000209050919050565b8181036127fe5750506128d6565b612807826127c5565b67ffffffffffffffff8111156128205761281f61203c565b5b61282a82546124ed565b612835828285612666565b6000601f8311600181146128645760008415612852578287015490505b61285c85826126d7565b8655506128cf565b601f198416612872876127db565b965061287d86612547565b60005b828110156128a557848901548255600182019150600185019450602081019050612880565b868310156128c257848901546128be601f8916826126b9565b8355505b6001600288020188555050505b5050505050505b565b600081905092915050565b60006128ee82611f80565b6128f881856128d8565b9350612908818560208601611f9c565b80840191505092915050565b600061292082846128e3565b915081905092915050565b600060408201905081810360008301526129458185611fd7565b90506129546020830184612454565b9392505050565b60008154905061296a816124ed565b9050919050565b81810361297f575050612a57565b6129888261295b565b67ffffffffffffffff8111156129a1576129a061203c565b5b6129ab82546124ed565b6129b6828285612666565b6000601f8311600181146129e557600084156129d3578287015490505b6129dd85826126d7565b865550612a50565b601f1984166129f387612547565b96506129fe86612547565b60005b82811015612a2657848901548255600182019150600185019450602081019050612a01565b86831015612a435784890154612a3f601f8916826126b9565b8355505b6001600288020188555050505b5050505050505b565b612a62816121c3565b82525050565b6000602082019050612a7d6000830184612a59565b92915050565b600081519050919050565b612a9782612a83565b67ffffffffffffffff811115612ab057612aaf61203c565b5b612aba82546124ed565b612ac5828285612666565b600060209050601f831160018114612af85760008415612ae6578287015190505b612af085826126d7565b865550612b58565b601f198416612b0686612547565b60005b82811015612b2e57848901518255600182019150602085019450602081019050612b09565b86831015612b4b5784890151612b47601f8916826126b9565b8355505b6001600288020188555050505b505050505050565b60008154612b6d816124ed565b612b7781866128d8565b94506001821660008114612b925760018114612ba757612bda565b60ff1983168652811515820286019350612bda565b612bb085612547565b60005b83811015612bd257815481890152600182019150602081019050612bb3565b838801955050505b50505092915050565b6000612bef8284612b60565b915081905092915050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612c67602f83612bfa565b9150612c7282612c0b565b604082019050919050565b60006020820190508181036000830152612c9681612c5a565b9050919050565b6000604082019050612cb26000830185612454565b612cbf6020830184612454565b9392505050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612d07601783612cc6565b9150612d1282612cd1565b601782019050919050565b6000612d2882612a83565b612d328185612cc6565b9350612d42818560208601611f9c565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612d84601183612cc6565b9150612d8f82612d4e565b601182019050919050565b6000612da582612cfa565b9150612db18285612d1d565b9150612dbc82612d77565b9150612dc88284612d1d565b91508190509392505050565b6000612ddf82612a83565b612de98185612bfa565b9350612df9818560208601611f9c565b612e0281611fc6565b840191505092915050565b60006020820190508181036000830152612e278184612dd4565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612e6982611e62565b9150612e7483611e62565b9250828202612e8281611e62565b91508282048414831517612e9957612e98612e2f565b5b5092915050565b6000612eab82611e62565b9150612eb683611e62565b9250828201905080821115612ece57612ecd612e2f565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612f0e82611e62565b915060008203612f2157612f20612e2f565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612f62602083612bfa565b9150612f6d82612f2c565b602082019050919050565b60006020820190508181036000830152612f9181612f55565b905091905056fea264697066735822122071da3764852fc77fa18f3e79494b69ca0d46c7dda5cff9db561a090581a405fa64736f6c63430008110033