- Contract name:
- DomainWalletOracle
- Optimization enabled
- false
- Compiler version
- v0.8.17+commit.8df45f5f
- Verified at
- 2023-07-13T02:05:36.172505Z
Constructor Arguments
000000000000000000000000c7f8095dd2564af9bb3c5f759ecc660ad1fef5c3
Arg [0] (address) : 0xc7f8095dd2564af9bb3c5f759ecc660ad1fef5c3
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 userId, uint ttl, uint256 tokenId); event Removed(uint64 id, bytes userId); event Revoked(uint64 id, uint256 pkptokenId); event Expired(uint64 id, 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; uint64 id = pkpOwners[pkpTokenId].id; bool isExpired = ttl > block.timestamp; if (isExpired) { emit Expired(id, 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 getCnameRecord(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 emit Removed(id, domainWallets[id].user_id); domainWallets[id].user_id = hex"00"; // 0 out the bytes for the 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(uint64 id) public returns (bool) { if (!hasRole(REGISTRY_ROLE, msg.sender)) { revert NonRegistryCaller(registry, msg.sender); } if (domainWallets[id].isRegistered == false) { return false; } domainWallets[id].isRegistered = 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 Revoked(id, domainWallets[id].pkpTokenId); 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":"uint64","name":"id","internalType":"uint64","indexed":false},{"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":"userId","internalType":"bytes","indexed":false},{"type":"uint256","name":"ttl","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Removed","inputs":[{"type":"uint64","name":"id","internalType":"uint64","indexed":false},{"type":"bytes","name":"userId","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"Revoked","inputs":[{"type":"uint64","name":"id","internalType":"uint64","indexed":false},{"type":"uint256","name":"pkptokenId","internalType":"uint256","indexed":false}],"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":"getCnameRecord","inputs":[{"type":"uint256","name":"pkpTokenId","internalType":"uint256"}]},{"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":"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":"uint64","name":"id","internalType":"uint64"}]},{"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
0x6080604052600060045560006005553480156200001b57600080fd5b5060405162003185380380620031858339818101604052810190620000419190620002aa565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000d67fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16620000dd60201b60201c565b50620002dc565b620000ef8282620001ce60201b60201c565b620001ca57600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200016f6200023860201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002728262000245565b9050919050565b620002848162000265565b81146200029057600080fd5b50565b600081519050620002a48162000279565b92915050565b600060208284031215620002c357620002c262000240565b5b6000620002d38482850162000293565b91505092915050565b612e9980620002ec6000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80635100240f116100c3578063a217fddf1161007c578063a217fddf14610449578063abcd62a014610467578063c9b2874914610497578063d547741f146104c7578063e7094380146104e3578063f48d60ca1461051357610158565b80635100240f1461033b5780636a3000c41461036b5780636c6f02a51461039b5780637b103999146103cb57806391d14854146103e9578063980064611461041957610158565b806327bd069e1161011557806327bd069e146102695780632f2ff15d1461028557806336568abe146102a157806339c7639c146102bd57806342f1e879146102ed57806349fcbc541461030b57610158565b806301c6d0351461015d57806301ffc9a71461018d57806306985fb1146101bd5780630c91d342146101ed57806315d4647414610209578063248a9ca314610239575b600080fd5b61017760048036038101906101729190611cb4565b610543565b6040516101849190611cfc565b60405180910390f35b6101a760048036038101906101a29190611d6f565b610570565b6040516101b49190611cfc565b60405180910390f35b6101d760048036038101906101d29190611ee2565b6105ea565b6040516101e49190611cfc565b60405180910390f35b61020760048036038101906102029190611f7e565b610759565b005b610223600480360381019061021e9190611cb4565b610b51565b6040516102309190611cfc565b60405180910390f35b610253600480360381019061024e9190612067565b610e53565b60405161026091906120a3565b60405180910390f35b610283600480360381019061027e91906120be565b610e72565b005b61029f600480360381019061029a9190612165565b610ef8565b005b6102bb60048036038101906102b69190612165565b610f19565b005b6102d760048036038101906102d29190611cb4565b610f9c565b6040516102e49190611cfc565b60405180910390f35b6102f5610fc9565b60405161030291906120a3565b60405180910390f35b61032560048036038101906103209190611cb4565b610fed565b6040516103329190611cfc565b60405180910390f35b61035560048036038101906103509190611cb4565b611099565b6040516103629190612224565b60405180910390f35b61038560048036038101906103809190611cb4565b611141565b6040516103929190612224565b60405180910390f35b6103b560048036038101906103b09190611cb4565b6111e9565b6040516103c29190612224565b60405180910390f35b6103d3611291565b6040516103e09190612255565b60405180910390f35b61040360048036038101906103fe9190612165565b6112b7565b6040516104109190611cfc565b60405180910390f35b610433600480360381019061042e9190612270565b611321565b6040516104409190611cfc565b60405180910390f35b61045161152c565b60405161045e91906120a3565b60405180910390f35b610481600480360381019061047c9190611cb4565b611533565b60405161048e91906122ac565b60405180910390f35b6104b160048036038101906104ac91906122c7565b611553565b6040516104be9190611cfc565b60405180910390f35b6104e160048036038101906104dc9190612165565b61166a565b005b6104fd60048036038101906104f89190611cb4565b61168b565b60405161050a91906122ac565b60405180910390f35b61052d60048036038101906105289190611cb4565b6116ab565b60405161053a9190611cfc565b60405180910390f35b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105e357506105e2826116d8565b5b9050919050565b60006106167fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b61067b57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610672929190612307565b60405180910390fd5b600015156002600085815260200190815260200160002060050160009054906101000a900460ff161515036106b35760009050610753565b816002600085815260200190815260200160002060060190816106d6919061253c565b5060026000848152602001908152602001600020600601600160006002600087815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600601908161074d9190612639565b50600190505b92915050565b6107837fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6107e857600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016107df929190612307565b60405180910390fd5b60006003846040516107fa919061275d565b9081526020016040518091039020541461086b578260038460405161081f919061275d565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610862929190612774565b60405180910390fd5b83600160008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000190816108a2919061253c565b5081600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018190555082600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003019081610909919061253c565b5080600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206004018190555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff021916908315150217905550600160008667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002600084815260200190815260200160002060008201816000019081610a0b91906127ba565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506002820154816002015560038201816003019081610a6d91906127ba565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff02191690831515021790555060068201816006019081610ae691906127ba565b5090505081600384604051610afb919061275d565b9081526020016040518091039020819055507fc276b207558b882d6e0e49fc3e221e9fd140cced79dd16fae88e0de97f4a2f0d85858385604051610b4294939291906128b1565b60405180910390a15050505050565b6000610b7d7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b610be257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610bd9929190612307565b60405180910390fd5b600015156002600084815260200190815260200160002060050160009054906101000a900460ff16151503610c1a5760009050610e4e565b60006002600084815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1690506002600084815260200190815260200160002060008082016000610c6d9190611c0d565b6001820160006101000a81549067ffffffffffffffff02191690556002820160009055600382016000610ca09190611c0d565b60048201600090556005820160006101000a81549060ff02191690556005820160016101000a81549060ff0219169055600682016000610ce09190611c0d565b50506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055507fe6c7218fcae4ed4870b84ce0215faaeda5c8ea428f00b5f039cd1edb815bd28681600160008467ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001604051610df2929190612981565b60405180910390a16040518060400160405280600181526020016000815250600160008367ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000019081610e4791906129bc565b5060019150505b919050565b6000806000838152602001908152602001600020600101549050919050565b6000600382604051610e84919061275d565b90815260200160405180910390205414610ef55780600382604051610ea9919061275d565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610eec929190612774565b60405180910390fd5b50565b610f0182610e53565b610f0a81611742565b610f148383611756565b505050565b610f21611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8590612b11565b60405180910390fd5b610f98828261183e565b5050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b6000806002600084815260200190815260200160002060040154905060006002600085815260200190815260200160002060010160009054906101000a900467ffffffffffffffff16905060004283119050801561108c577f32199dcc0060c4db7165056978b8be48adaf24c6886946cc17aa1953e4c4bef482868560405161107893929190612b31565b60405180910390a160019350505050611094565b600093505050505b919050565b60606002600083815260200190815260200160002060030180546110bc9061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546110e89061235f565b80156111355780601f1061110a57610100808354040283529160200191611135565b820191906000526020600020905b81548152906001019060200180831161111857829003601f168201915b50505050509050919050565b60606002600083815260200190815260200160002060030180546111649061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546111909061235f565b80156111dd5780601f106111b2576101008083540402835291602001916111dd565b820191906000526020600020905b8154815290600101906020018083116111c057829003601f168201915b50505050509050919050565b606060026000838152602001908152602001600020600601805461120c9061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546112389061235f565b80156112855780601f1061125a57610100808354040283529160200191611285565b820191906000526020600020905b81548152906001019060200180831161126857829003601f168201915b50505050509050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061134d7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6113b257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016113a9929190612307565b60405180910390fd5b60001515600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160019054906101000a900460ff161515036113fe5760009050611527565b6000600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008467ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055506040518060400160405280600181526020016000815250600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000190816114be91906129bc565b507fecd217e09f488cce368823cf22a1f3877c30635645f181319c79ce88292845fb82600160008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002015460405161151a929190612b68565b60405180910390a1600190505b919050565b6000801b81565b600060026000838152602001908152602001600020600201549050919050565b600061157f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6115e457600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016115db929190612307565b60405180910390fd5b60001515600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160009054906101000a900460ff161515036116305760009050611664565b81600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060020181905550600190505b92915050565b61167382610e53565b61167c81611742565b611686838361183e565b505050565b600060026000838152602001908152602001600020600401549050919050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6117538161174e611836565b61191f565b50565b61176082826112b7565b61183257600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506117d7611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b61184882826112b7565b1561191b57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506118c0611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61192982826112b7565b6119a057611936816119a4565b6119448360001c60206119d1565b604051602001611955929190612c65565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119979190612cd8565b60405180910390fd5b5050565b60606119ca8273ffffffffffffffffffffffffffffffffffffffff16601460ff166119d1565b9050919050565b6060600060028360026119e49190612d29565b6119ee9190612d6b565b67ffffffffffffffff811115611a0757611a06611db7565b5b6040519080825280601f01601f191660200182016040528015611a395781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a7157611a70612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ad557611ad4612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b159190612d29565b611b1f9190612d6b565b90505b6001811115611bbf577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611b6157611b60612d9f565b5b1a60f81b828281518110611b7857611b77612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611bb890612dce565b9050611b22565b5060008414611c03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bfa90612e43565b60405180910390fd5b8091505092915050565b508054611c199061235f565b6000825580601f10611c2b5750611c4a565b601f016020900490600052602060002090810190611c499190611c4d565b5b50565b5b80821115611c66576000816000905550600101611c4e565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b611c9181611c7e565b8114611c9c57600080fd5b50565b600081359050611cae81611c88565b92915050565b600060208284031215611cca57611cc9611c74565b5b6000611cd884828501611c9f565b91505092915050565b60008115159050919050565b611cf681611ce1565b82525050565b6000602082019050611d116000830184611ced565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d4c81611d17565b8114611d5757600080fd5b50565b600081359050611d6981611d43565b92915050565b600060208284031215611d8557611d84611c74565b5b6000611d9384828501611d5a565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611def82611da6565b810181811067ffffffffffffffff82111715611e0e57611e0d611db7565b5b80604052505050565b6000611e21611c6a565b9050611e2d8282611de6565b919050565b600067ffffffffffffffff821115611e4d57611e4c611db7565b5b611e5682611da6565b9050602081019050919050565b82818337600083830152505050565b6000611e85611e8084611e32565b611e17565b905082815260208101848484011115611ea157611ea0611da1565b5b611eac848285611e63565b509392505050565b600082601f830112611ec957611ec8611d9c565b5b8135611ed9848260208601611e72565b91505092915050565b60008060408385031215611ef957611ef8611c74565b5b6000611f0785828601611c9f565b925050602083013567ffffffffffffffff811115611f2857611f27611c79565b5b611f3485828601611eb4565b9150509250929050565b600067ffffffffffffffff82169050919050565b611f5b81611f3e565b8114611f6657600080fd5b50565b600081359050611f7881611f52565b92915050565b600080600080600060a08688031215611f9a57611f99611c74565b5b6000611fa888828901611f69565b955050602086013567ffffffffffffffff811115611fc957611fc8611c79565b5b611fd588828901611eb4565b945050604086013567ffffffffffffffff811115611ff657611ff5611c79565b5b61200288828901611eb4565b935050606061201388828901611c9f565b925050608061202488828901611c9f565b9150509295509295909350565b6000819050919050565b61204481612031565b811461204f57600080fd5b50565b6000813590506120618161203b565b92915050565b60006020828403121561207d5761207c611c74565b5b600061208b84828501612052565b91505092915050565b61209d81612031565b82525050565b60006020820190506120b86000830184612094565b92915050565b6000602082840312156120d4576120d3611c74565b5b600082013567ffffffffffffffff8111156120f2576120f1611c79565b5b6120fe84828501611eb4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061213282612107565b9050919050565b61214281612127565b811461214d57600080fd5b50565b60008135905061215f81612139565b92915050565b6000806040838503121561217c5761217b611c74565b5b600061218a85828601612052565b925050602061219b85828601612150565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156121df5780820151818401526020810190506121c4565b60008484015250505050565b60006121f6826121a5565b61220081856121b0565b93506122108185602086016121c1565b61221981611da6565b840191505092915050565b6000602082019050818103600083015261223e81846121eb565b905092915050565b61224f81612127565b82525050565b600060208201905061226a6000830184612246565b92915050565b60006020828403121561228657612285611c74565b5b600061229484828501611f69565b91505092915050565b6122a681611c7e565b82525050565b60006020820190506122c1600083018461229d565b92915050565b600080604083850312156122de576122dd611c74565b5b60006122ec85828601611f69565b92505060206122fd85828601611c9f565b9150509250929050565b600060408201905061231c6000830185612246565b6123296020830184612246565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061237757607f821691505b60208210810361238a57612389612330565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026123f27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826123b5565b6123fc86836123b5565b95508019841693508086168417925050509392505050565b6000819050919050565b600061243961243461242f84611c7e565b612414565b611c7e565b9050919050565b6000819050919050565b6124538361241e565b61246761245f82612440565b8484546123c2565b825550505050565b600090565b61247c61246f565b61248781848461244a565b505050565b5b818110156124ab576124a0600082612474565b60018101905061248d565b5050565b601f8211156124f0576124c181612390565b6124ca846123a5565b810160208510156124d9578190505b6124ed6124e5856123a5565b83018261248c565b50505b505050565b600082821c905092915050565b6000612513600019846008026124f5565b1980831691505092915050565b600061252c8383612502565b9150826002028217905092915050565b612545826121a5565b67ffffffffffffffff81111561255e5761255d611db7565b5b612568825461235f565b6125738282856124af565b600060209050601f8311600181146125a65760008415612594578287015190505b61259e8582612520565b865550612606565b601f1984166125b486612390565b60005b828110156125dc578489015182556001820191506020850194506020810190506125b7565b868310156125f957848901516125f5601f891682612502565b8355505b6001600288020188555050505b505050505050565b60008154905061261d8161235f565b9050919050565b60008190508160005260206000209050919050565b81810361264757505061271f565b6126508261260e565b67ffffffffffffffff81111561266957612668611db7565b5b612673825461235f565b61267e8282856124af565b6000601f8311600181146126ad576000841561269b578287015490505b6126a58582612520565b865550612718565b601f1984166126bb87612624565b96506126c686612390565b60005b828110156126ee578489015482556001820191506001850194506020810190506126c9565b8683101561270b5784890154612707601f891682612502565b8355505b6001600288020188555050505b5050505050505b565b600081905092915050565b6000612737826121a5565b6127418185612721565b93506127518185602086016121c1565b80840191505092915050565b6000612769828461272c565b915081905092915050565b6000604082019050818103600083015261278e81856121eb565b905061279d602083018461229d565b9392505050565b6000815490506127b38161235f565b9050919050565b8181036127c85750506128a0565b6127d1826127a4565b67ffffffffffffffff8111156127ea576127e9611db7565b5b6127f4825461235f565b6127ff8282856124af565b6000601f83116001811461282e576000841561281c578287015490505b6128268582612520565b865550612899565b601f19841661283c87612390565b965061284786612390565b60005b8281101561286f5784890154825560018201915060018501945060208101905061284a565b8683101561288c5784890154612888601f891682612502565b8355505b6001600288020188555050505b5050505050505b565b6128ab81611f3e565b82525050565b60006080820190506128c660008301876128a2565b81810360208301526128d881866121eb565b90506128e7604083018561229d565b6128f4606083018461229d565b95945050505050565b6000815461290a8161235f565b61291481866121b0565b9450600182166000811461292f576001811461294557612978565b60ff198316865281151560200286019350612978565b61294e85612390565b60005b8381101561297057815481890152600182019150602081019050612951565b808801955050505b50505092915050565b600060408201905061299660008301856128a2565b81810360208301526129a881846128fd565b90509392505050565b600081519050919050565b6129c5826129b1565b67ffffffffffffffff8111156129de576129dd611db7565b5b6129e8825461235f565b6129f38282856124af565b600060209050601f831160018114612a265760008415612a14578287015190505b612a1e8582612520565b865550612a86565b601f198416612a3486612390565b60005b82811015612a5c57848901518255600182019150602085019450602081019050612a37565b86831015612a795784890151612a75601f891682612502565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612afb602f83612a8e565b9150612b0682612a9f565b604082019050919050565b60006020820190508181036000830152612b2a81612aee565b9050919050565b6000606082019050612b4660008301866128a2565b612b53602083018561229d565b612b60604083018461229d565b949350505050565b6000604082019050612b7d60008301856128a2565b612b8a602083018461229d565b9392505050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612bd2601783612b91565b9150612bdd82612b9c565b601782019050919050565b6000612bf3826129b1565b612bfd8185612b91565b9350612c0d8185602086016121c1565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612c4f601183612b91565b9150612c5a82612c19565b601182019050919050565b6000612c7082612bc5565b9150612c7c8285612be8565b9150612c8782612c42565b9150612c938284612be8565b91508190509392505050565b6000612caa826129b1565b612cb48185612a8e565b9350612cc48185602086016121c1565b612ccd81611da6565b840191505092915050565b60006020820190508181036000830152612cf28184612c9f565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d3482611c7e565b9150612d3f83611c7e565b9250828202612d4d81611c7e565b91508282048414831517612d6457612d63612cfa565b5b5092915050565b6000612d7682611c7e565b9150612d8183611c7e565b9250828201905080821115612d9957612d98612cfa565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612dd982611c7e565b915060008203612dec57612deb612cfa565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612e2d602083612a8e565b9150612e3882612df7565b602082019050919050565b60006020820190508181036000830152612e5c81612e20565b905091905056fea26469706673582212201426216124f28696d0daa8a2e3cabc263b336a6ba225e0daf6e2321f011c049c64736f6c63430008110033000000000000000000000000c7f8095dd2564af9bb3c5f759ecc660ad1fef5c3
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c80635100240f116100c3578063a217fddf1161007c578063a217fddf14610449578063abcd62a014610467578063c9b2874914610497578063d547741f146104c7578063e7094380146104e3578063f48d60ca1461051357610158565b80635100240f1461033b5780636a3000c41461036b5780636c6f02a51461039b5780637b103999146103cb57806391d14854146103e9578063980064611461041957610158565b806327bd069e1161011557806327bd069e146102695780632f2ff15d1461028557806336568abe146102a157806339c7639c146102bd57806342f1e879146102ed57806349fcbc541461030b57610158565b806301c6d0351461015d57806301ffc9a71461018d57806306985fb1146101bd5780630c91d342146101ed57806315d4647414610209578063248a9ca314610239575b600080fd5b61017760048036038101906101729190611cb4565b610543565b6040516101849190611cfc565b60405180910390f35b6101a760048036038101906101a29190611d6f565b610570565b6040516101b49190611cfc565b60405180910390f35b6101d760048036038101906101d29190611ee2565b6105ea565b6040516101e49190611cfc565b60405180910390f35b61020760048036038101906102029190611f7e565b610759565b005b610223600480360381019061021e9190611cb4565b610b51565b6040516102309190611cfc565b60405180910390f35b610253600480360381019061024e9190612067565b610e53565b60405161026091906120a3565b60405180910390f35b610283600480360381019061027e91906120be565b610e72565b005b61029f600480360381019061029a9190612165565b610ef8565b005b6102bb60048036038101906102b69190612165565b610f19565b005b6102d760048036038101906102d29190611cb4565b610f9c565b6040516102e49190611cfc565b60405180910390f35b6102f5610fc9565b60405161030291906120a3565b60405180910390f35b61032560048036038101906103209190611cb4565b610fed565b6040516103329190611cfc565b60405180910390f35b61035560048036038101906103509190611cb4565b611099565b6040516103629190612224565b60405180910390f35b61038560048036038101906103809190611cb4565b611141565b6040516103929190612224565b60405180910390f35b6103b560048036038101906103b09190611cb4565b6111e9565b6040516103c29190612224565b60405180910390f35b6103d3611291565b6040516103e09190612255565b60405180910390f35b61040360048036038101906103fe9190612165565b6112b7565b6040516104109190611cfc565b60405180910390f35b610433600480360381019061042e9190612270565b611321565b6040516104409190611cfc565b60405180910390f35b61045161152c565b60405161045e91906120a3565b60405180910390f35b610481600480360381019061047c9190611cb4565b611533565b60405161048e91906122ac565b60405180910390f35b6104b160048036038101906104ac91906122c7565b611553565b6040516104be9190611cfc565b60405180910390f35b6104e160048036038101906104dc9190612165565b61166a565b005b6104fd60048036038101906104f89190611cb4565b61168b565b60405161050a91906122ac565b60405180910390f35b61052d60048036038101906105289190611cb4565b6116ab565b60405161053a9190611cfc565b60405180910390f35b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806105e357506105e2826116d8565b5b9050919050565b60006106167fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b61067b57600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610672929190612307565b60405180910390fd5b600015156002600085815260200190815260200160002060050160009054906101000a900460ff161515036106b35760009050610753565b816002600085815260200190815260200160002060060190816106d6919061253c565b5060026000848152602001908152602001600020600601600160006002600087815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600601908161074d9190612639565b50600190505b92915050565b6107837fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6107e857600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016107df929190612307565b60405180910390fd5b60006003846040516107fa919061275d565b9081526020016040518091039020541461086b578260038460405161081f919061275d565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610862929190612774565b60405180910390fd5b83600160008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000190816108a2919061253c565b5081600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002018190555082600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206003019081610909919061253c565b5080600160008767ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206004018190555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff02191690831515021790555060018060008767ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff021916908315150217905550600160008667ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002600084815260200190815260200160002060008201816000019081610a0b91906127ba565b506001820160009054906101000a900467ffffffffffffffff168160010160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055506002820154816002015560038201816003019081610a6d91906127ba565b50600482015481600401556005820160009054906101000a900460ff168160050160006101000a81548160ff0219169083151502179055506005820160019054906101000a900460ff168160050160016101000a81548160ff02191690831515021790555060068201816006019081610ae691906127ba565b5090505081600384604051610afb919061275d565b9081526020016040518091039020819055507fc276b207558b882d6e0e49fc3e221e9fd140cced79dd16fae88e0de97f4a2f0d85858385604051610b4294939291906128b1565b60405180910390a15050505050565b6000610b7d7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b610be257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c000000000000000000000000000000000000000000000000000000008152600401610bd9929190612307565b60405180910390fd5b600015156002600084815260200190815260200160002060050160009054906101000a900460ff16151503610c1a5760009050610e4e565b60006002600084815260200190815260200160002060010160009054906101000a900467ffffffffffffffff1690506002600084815260200190815260200160002060008082016000610c6d9190611c0d565b6001820160006101000a81549067ffffffffffffffff02191690556002820160009055600382016000610ca09190611c0d565b60048201600090556005820160006101000a81549060ff02191690556005820160016101000a81549060ff0219169055600682016000610ce09190611c0d565b50506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160006101000a81548160ff0219169083151502179055506000600160008367ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055507fe6c7218fcae4ed4870b84ce0215faaeda5c8ea428f00b5f039cd1edb815bd28681600160008467ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600001604051610df2929190612981565b60405180910390a16040518060400160405280600181526020016000815250600160008367ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206000019081610e4791906129bc565b5060019150505b919050565b6000806000838152602001908152602001600020600101549050919050565b6000600382604051610e84919061275d565b90815260200160405180910390205414610ef55780600382604051610ea9919061275d565b9081526020016040518091039020546040517f3bcbf6c4000000000000000000000000000000000000000000000000000000008152600401610eec929190612774565b60405180910390fd5b50565b610f0182610e53565b610f0a81611742565b610f148383611756565b505050565b610f21611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8590612b11565b60405180910390fd5b610f98828261183e565b5050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b6000806002600084815260200190815260200160002060040154905060006002600085815260200190815260200160002060010160009054906101000a900467ffffffffffffffff16905060004283119050801561108c577f32199dcc0060c4db7165056978b8be48adaf24c6886946cc17aa1953e4c4bef482868560405161107893929190612b31565b60405180910390a160019350505050611094565b600093505050505b919050565b60606002600083815260200190815260200160002060030180546110bc9061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546110e89061235f565b80156111355780601f1061110a57610100808354040283529160200191611135565b820191906000526020600020905b81548152906001019060200180831161111857829003601f168201915b50505050509050919050565b60606002600083815260200190815260200160002060030180546111649061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546111909061235f565b80156111dd5780601f106111b2576101008083540402835291602001916111dd565b820191906000526020600020905b8154815290600101906020018083116111c057829003601f168201915b50505050509050919050565b606060026000838152602001908152602001600020600601805461120c9061235f565b80601f01602080910402602001604051908101604052809291908181526020018280546112389061235f565b80156112855780601f1061125a57610100808354040283529160200191611285565b820191906000526020600020905b81548152906001019060200180831161126857829003601f168201915b50505050509050919050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061134d7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6113b257600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016113a9929190612307565b60405180910390fd5b60001515600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160019054906101000a900460ff161515036113fe5760009050611527565b6000600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160016101000a81548160ff0219169083151502179055506000600160008467ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020600201819055506040518060400160405280600181526020016000815250600160008467ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060000190816114be91906129bc565b507fecd217e09f488cce368823cf22a1f3877c30635645f181319c79ce88292845fb82600160008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000206002015460405161151a929190612b68565b60405180910390a1600190505b919050565b6000801b81565b600060026000838152602001908152602001600020600201549050919050565b600061157f7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42336112b7565b6115e457600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336040517f3274939c0000000000000000000000000000000000000000000000000000000081526004016115db929190612307565b60405180910390fd5b60001515600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060050160009054906101000a900460ff161515036116305760009050611664565b81600160008567ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002060020181905550600190505b92915050565b61167382610e53565b61167c81611742565b611686838361183e565b505050565b600060026000838152602001908152602001600020600401549050919050565b60006002600083815260200190815260200160002060050160019054906101000a900460ff169050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6117538161174e611836565b61191f565b50565b61176082826112b7565b61183257600160008084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506117d7611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b600033905090565b61184882826112b7565b1561191b57600080600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506118c0611836565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b61192982826112b7565b6119a057611936816119a4565b6119448360001c60206119d1565b604051602001611955929190612c65565b6040516020818303038152906040526040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119979190612cd8565b60405180910390fd5b5050565b60606119ca8273ffffffffffffffffffffffffffffffffffffffff16601460ff166119d1565b9050919050565b6060600060028360026119e49190612d29565b6119ee9190612d6b565b67ffffffffffffffff811115611a0757611a06611db7565b5b6040519080825280601f01601f191660200182016040528015611a395781602001600182028036833780820191505090505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110611a7157611a70612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110611ad557611ad4612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006001846002611b159190612d29565b611b1f9190612d6b565b90505b6001811115611bbf577f3031323334353637383961626364656600000000000000000000000000000000600f861660108110611b6157611b60612d9f565b5b1a60f81b828281518110611b7857611b77612d9f565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600485901c945080611bb890612dce565b9050611b22565b5060008414611c03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bfa90612e43565b60405180910390fd5b8091505092915050565b508054611c199061235f565b6000825580601f10611c2b5750611c4a565b601f016020900490600052602060002090810190611c499190611c4d565b5b50565b5b80821115611c66576000816000905550600101611c4e565b5090565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b611c9181611c7e565b8114611c9c57600080fd5b50565b600081359050611cae81611c88565b92915050565b600060208284031215611cca57611cc9611c74565b5b6000611cd884828501611c9f565b91505092915050565b60008115159050919050565b611cf681611ce1565b82525050565b6000602082019050611d116000830184611ced565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d4c81611d17565b8114611d5757600080fd5b50565b600081359050611d6981611d43565b92915050565b600060208284031215611d8557611d84611c74565b5b6000611d9384828501611d5a565b91505092915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611def82611da6565b810181811067ffffffffffffffff82111715611e0e57611e0d611db7565b5b80604052505050565b6000611e21611c6a565b9050611e2d8282611de6565b919050565b600067ffffffffffffffff821115611e4d57611e4c611db7565b5b611e5682611da6565b9050602081019050919050565b82818337600083830152505050565b6000611e85611e8084611e32565b611e17565b905082815260208101848484011115611ea157611ea0611da1565b5b611eac848285611e63565b509392505050565b600082601f830112611ec957611ec8611d9c565b5b8135611ed9848260208601611e72565b91505092915050565b60008060408385031215611ef957611ef8611c74565b5b6000611f0785828601611c9f565b925050602083013567ffffffffffffffff811115611f2857611f27611c79565b5b611f3485828601611eb4565b9150509250929050565b600067ffffffffffffffff82169050919050565b611f5b81611f3e565b8114611f6657600080fd5b50565b600081359050611f7881611f52565b92915050565b600080600080600060a08688031215611f9a57611f99611c74565b5b6000611fa888828901611f69565b955050602086013567ffffffffffffffff811115611fc957611fc8611c79565b5b611fd588828901611eb4565b945050604086013567ffffffffffffffff811115611ff657611ff5611c79565b5b61200288828901611eb4565b935050606061201388828901611c9f565b925050608061202488828901611c9f565b9150509295509295909350565b6000819050919050565b61204481612031565b811461204f57600080fd5b50565b6000813590506120618161203b565b92915050565b60006020828403121561207d5761207c611c74565b5b600061208b84828501612052565b91505092915050565b61209d81612031565b82525050565b60006020820190506120b86000830184612094565b92915050565b6000602082840312156120d4576120d3611c74565b5b600082013567ffffffffffffffff8111156120f2576120f1611c79565b5b6120fe84828501611eb4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061213282612107565b9050919050565b61214281612127565b811461214d57600080fd5b50565b60008135905061215f81612139565b92915050565b6000806040838503121561217c5761217b611c74565b5b600061218a85828601612052565b925050602061219b85828601612150565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b838110156121df5780820151818401526020810190506121c4565b60008484015250505050565b60006121f6826121a5565b61220081856121b0565b93506122108185602086016121c1565b61221981611da6565b840191505092915050565b6000602082019050818103600083015261223e81846121eb565b905092915050565b61224f81612127565b82525050565b600060208201905061226a6000830184612246565b92915050565b60006020828403121561228657612285611c74565b5b600061229484828501611f69565b91505092915050565b6122a681611c7e565b82525050565b60006020820190506122c1600083018461229d565b92915050565b600080604083850312156122de576122dd611c74565b5b60006122ec85828601611f69565b92505060206122fd85828601611c9f565b9150509250929050565b600060408201905061231c6000830185612246565b6123296020830184612246565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061237757607f821691505b60208210810361238a57612389612330565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026123f27fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826123b5565b6123fc86836123b5565b95508019841693508086168417925050509392505050565b6000819050919050565b600061243961243461242f84611c7e565b612414565b611c7e565b9050919050565b6000819050919050565b6124538361241e565b61246761245f82612440565b8484546123c2565b825550505050565b600090565b61247c61246f565b61248781848461244a565b505050565b5b818110156124ab576124a0600082612474565b60018101905061248d565b5050565b601f8211156124f0576124c181612390565b6124ca846123a5565b810160208510156124d9578190505b6124ed6124e5856123a5565b83018261248c565b50505b505050565b600082821c905092915050565b6000612513600019846008026124f5565b1980831691505092915050565b600061252c8383612502565b9150826002028217905092915050565b612545826121a5565b67ffffffffffffffff81111561255e5761255d611db7565b5b612568825461235f565b6125738282856124af565b600060209050601f8311600181146125a65760008415612594578287015190505b61259e8582612520565b865550612606565b601f1984166125b486612390565b60005b828110156125dc578489015182556001820191506020850194506020810190506125b7565b868310156125f957848901516125f5601f891682612502565b8355505b6001600288020188555050505b505050505050565b60008154905061261d8161235f565b9050919050565b60008190508160005260206000209050919050565b81810361264757505061271f565b6126508261260e565b67ffffffffffffffff81111561266957612668611db7565b5b612673825461235f565b61267e8282856124af565b6000601f8311600181146126ad576000841561269b578287015490505b6126a58582612520565b865550612718565b601f1984166126bb87612624565b96506126c686612390565b60005b828110156126ee578489015482556001820191506001850194506020810190506126c9565b8683101561270b5784890154612707601f891682612502565b8355505b6001600288020188555050505b5050505050505b565b600081905092915050565b6000612737826121a5565b6127418185612721565b93506127518185602086016121c1565b80840191505092915050565b6000612769828461272c565b915081905092915050565b6000604082019050818103600083015261278e81856121eb565b905061279d602083018461229d565b9392505050565b6000815490506127b38161235f565b9050919050565b8181036127c85750506128a0565b6127d1826127a4565b67ffffffffffffffff8111156127ea576127e9611db7565b5b6127f4825461235f565b6127ff8282856124af565b6000601f83116001811461282e576000841561281c578287015490505b6128268582612520565b865550612899565b601f19841661283c87612390565b965061284786612390565b60005b8281101561286f5784890154825560018201915060018501945060208101905061284a565b8683101561288c5784890154612888601f891682612502565b8355505b6001600288020188555050505b5050505050505b565b6128ab81611f3e565b82525050565b60006080820190506128c660008301876128a2565b81810360208301526128d881866121eb565b90506128e7604083018561229d565b6128f4606083018461229d565b95945050505050565b6000815461290a8161235f565b61291481866121b0565b9450600182166000811461292f576001811461294557612978565b60ff198316865281151560200286019350612978565b61294e85612390565b60005b8381101561297057815481890152600182019150602081019050612951565b808801955050505b50505092915050565b600060408201905061299660008301856128a2565b81810360208301526129a881846128fd565b90509392505050565b600081519050919050565b6129c5826129b1565b67ffffffffffffffff8111156129de576129dd611db7565b5b6129e8825461235f565b6129f38282856124af565b600060209050601f831160018114612a265760008415612a14578287015190505b612a1e8582612520565b865550612a86565b601f198416612a3486612390565b60005b82811015612a5c57848901518255600182019150602085019450602081019050612a37565b86831015612a795784890151612a75601f891682612502565b8355505b6001600288020188555050505b505050505050565b600082825260208201905092915050565b7f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560008201527f20726f6c657320666f722073656c660000000000000000000000000000000000602082015250565b6000612afb602f83612a8e565b9150612b0682612a9f565b604082019050919050565b60006020820190508181036000830152612b2a81612aee565b9050919050565b6000606082019050612b4660008301866128a2565b612b53602083018561229d565b612b60604083018461229d565b949350505050565b6000604082019050612b7d60008301856128a2565b612b8a602083018461229d565b9392505050565b600081905092915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000600082015250565b6000612bd2601783612b91565b9150612bdd82612b9c565b601782019050919050565b6000612bf3826129b1565b612bfd8185612b91565b9350612c0d8185602086016121c1565b80840191505092915050565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000600082015250565b6000612c4f601183612b91565b9150612c5a82612c19565b601182019050919050565b6000612c7082612bc5565b9150612c7c8285612be8565b9150612c8782612c42565b9150612c938284612be8565b91508190509392505050565b6000612caa826129b1565b612cb48185612a8e565b9350612cc48185602086016121c1565b612ccd81611da6565b840191505092915050565b60006020820190508181036000830152612cf28184612c9f565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d3482611c7e565b9150612d3f83611c7e565b9250828202612d4d81611c7e565b91508282048414831517612d6457612d63612cfa565b5b5092915050565b6000612d7682611c7e565b9150612d8183611c7e565b9250828201905080821115612d9957612d98612cfa565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612dd982611c7e565b915060008203612dec57612deb612cfa565b5b600182039050919050565b7f537472696e67733a20686578206c656e67746820696e73756666696369656e74600082015250565b6000612e2d602083612a8e565b9150612e3882612df7565b602082019050919050565b60006020820190508181036000830152612e5c81612e20565b905091905056fea26469706673582212201426216124f28696d0daa8a2e3cabc263b336a6ba225e0daf6e2321f011c049c64736f6c63430008110033