ERC-721
Overview
Max Total Supply
135 BYTHENPOD
Holders
117
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 BYTHENPODLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BythenPod
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/access/extensions/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; error InvalidPaymentData(string errMsg); error FailedToCollectPayment(); error LastAdminRole(); error InvalidSignRequest(string errMsg); error UIDAlreadyMinted(); error NotAllowedToList(); error InvalidRecipientAddress(); contract BythenPod is ERC721Enumerable, ERC721URIStorage, ERC721Pausable, AccessControlEnumerable, EIP712 { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); uint256 private _nextTokenId; address private _primarySaleRecipient; bytes32 private constant SIGN_MINT_TYPEHASH = keccak256("MintRequest(address to,string uri,uint256 price,uint256 validityStartTimestamp,uint256 validityEndTimestamp,bytes32 uid)"); string private _collectionURI; mapping(bytes32 => bool) private _minted; struct MintRequest { address to; string uri; uint256 price; uint256 validityStartTimestamp; uint256 validityEndTimestamp; bytes32 uid; } bool private _isAllowToList = false; event PrimarySaleRecipientUpdated(address indexed recipient); event TokensMintedWithSignature(address indexed signer, address indexed mintedTo, uint256 indexed tokenIdMinted, MintRequest mintRequest); event TokensMinted(address indexed mintedTo, uint256 indexed tokenIdMinted); event TokensBurned(uint256 indexed tokenIdBurned); constructor(string memory name, string memory symbol, address admin, address primarySaleRecipient_, string memory collectionURI_) ERC721(name, symbol) EIP712(name, "1.0.0") { _collectionURI = collectionURI_; _grantRole(DEFAULT_ADMIN_ROLE, admin); _setupPrimarySaleRecipient(primarySaleRecipient_); } modifier whenAllowedToList() { if (!_isAllowToList) revert NotAllowedToList(); _; } function mint(address to, string memory uri, bytes32 uid) public onlyRole(MINTER_ROLE) { _checkUID(uid); uint256 tokenId = _nextTokenId++; _safeMint(to, tokenId); _setTokenURI(tokenId, uri); emit TokensMinted(to, tokenId); } function burn(uint256 tokenId) public onlyRole(BURNER_ROLE) { _update(address(0), tokenId, _msgSender()); emit TokensBurned(tokenId); } function mintWithSignature(MintRequest calldata _req, bytes calldata _signature) external payable { // Verify and process payload. address signer = _processRequest(_req, _signature); address receiver = _req.to; _collectPayment(_req.price); uint256 tokenId = _nextTokenId++; _safeMint(receiver, tokenId); _setTokenURI(tokenId,_req.uri); emit TokensMintedWithSignature(signer, receiver, tokenId, _req); } function pause() public onlyRole(DEFAULT_ADMIN_ROLE) { _pause(); } function unpause() public onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); } function setCollectionURI(string memory newCollectionURI) public onlyRole(DEFAULT_ADMIN_ROLE) { _collectionURI = newCollectionURI; emit BatchMetadataUpdate(0, _nextTokenId - 1); } function setTokenURI(uint256 tokenId, string memory _tokenURI) public onlyRole(MINTER_ROLE) { _setTokenURI(tokenId, _tokenURI); } function primarySaleRecipient() public view returns (address) { return _primarySaleRecipient; } function setPrimarySaleRecipient(address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { _setupPrimarySaleRecipient(_saleRecipient); } function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) onlyRole(getRoleAdmin(role)) { super.revokeRole(role, account); if (role == DEFAULT_ADMIN_ROLE && getRoleMemberCount(DEFAULT_ADMIN_ROLE) <= 0) { revert LastAdminRole(); } } function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { super.renounceRole(role, account); if (role == DEFAULT_ADMIN_ROLE && getRoleMemberCount(DEFAULT_ADMIN_ROLE) <= 0) { revert LastAdminRole(); } } function setAllowToList(bool isAllow) public onlyRole(DEFAULT_ADMIN_ROLE) { _isAllowToList = isAllow; } function approve(address to, uint256 tokenId) public override(ERC721, IERC721) whenAllowedToList { super.approve(to, tokenId); } function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) whenAllowedToList { super.setApprovalForAll(operator, approved); } function _collectPayment(uint256 price) internal { if (price <= 0) { revert InvalidPaymentData("Invalid price"); } if(msg.value != price) { revert InvalidPaymentData("msg value not match with total price"); } address recipient = primarySaleRecipient(); (bool success,) = recipient.call{value: price}(""); if(!success) { revert FailedToCollectPayment(); } } function _setupPrimarySaleRecipient(address _saleRecipient) internal { _checkAddress(_saleRecipient); _primarySaleRecipient = _saleRecipient; emit PrimarySaleRecipientUpdated(_saleRecipient); } function _checkUID(bytes32 uid) internal { if (_minted[uid]) { revert UIDAlreadyMinted(); } _minted[uid] = true; } function _checkAddress(address addr) internal view { if (addr == address(0)) revert InvalidRecipientAddress(); uint size; assembly { size := extcodesize(addr) } if (size > 0) revert InvalidRecipientAddress(); } // The following functions are overrides required by Solidity. function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, ERC721URIStorage, AccessControlEnumerable) returns (bool) { return super.supportsInterface(interfaceId); } function _baseURI() internal view override(ERC721) returns (string memory) { return _collectionURI; } function _encodeMintRequest(MintRequest calldata req) internal pure returns (bytes memory) { return abi.encode( SIGN_MINT_TYPEHASH, req.to, keccak256(bytes(req.uri)), req.price, req.validityStartTimestamp, req.validityEndTimestamp, req.uid ); } function _processRequest(MintRequest calldata req, bytes calldata signature) internal returns (address signer) { if (bytes(req.uri).length == 0) { revert InvalidSignRequest("Invalid uri"); } if (req.to == address(0) || req.to != msg.sender) { revert InvalidSignRequest("Invalid recipient"); } signer = ECDSA.recover(_hashTypedDataV4(keccak256(_encodeMintRequest(req))), signature); if (!hasRole(MINTER_ROLE, signer)) { revert InvalidSignRequest("Invalid signer"); } if (req.validityStartTimestamp > block.timestamp || req.validityEndTimestamp < block.timestamp) { revert InvalidSignRequest("Invalid time"); } _checkUID(req.uid); return signer; } function _update(address to, uint256 tokenId, address auth) internal override(ERC721, ERC721Enumerable, ERC721Pausable) returns (address) { return super._update(to, tokenId, auth); } function _increaseBalance(address account, uint128 value) internal override(ERC721, ERC721Enumerable) { super._increaseBalance(account, value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol) pragma solidity ^0.8.20; import {IAccessControl} from "./IAccessControl.sol"; import {Context} from "../utils/Context.sol"; import {ERC165} from "../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: * * ```solidity * 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}: * * ```solidity * 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. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address account => bool) hasRole; bytes32 adminRole; } mapping(bytes32 role => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with an {AccessControlUnauthorizedAccount} error including the required role. */ 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 returns (bool) { return _roles[role].hasRole[account]; } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()` * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier. */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account` * is missing `role`. */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert AccessControlUnauthorizedAccount(account, role); } } /** * @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 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 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 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 `callerConfirmation`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address callerConfirmation) public virtual { if (callerConfirmation != _msgSender()) { revert AccessControlBadConfirmation(); } _revokeRole(role, callerConfirmation); } /** * @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual returns (bool) { if (!hasRole(role, account)) { _roles[role].hasRole[account] = true; emit RoleGranted(role, account, _msgSender()); return true; } else { return false; } } /** * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual returns (bool) { if (hasRole(role, account)) { _roles[role].hasRole[account] = false; emit RoleRevoked(role, account, _msgSender()); return true; } else { return false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol) pragma solidity ^0.8.20; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev The `account` is missing a role. */ error AccessControlUnauthorizedAccount(address account, bytes32 neededRole); /** * @dev The caller of a function is not the expected one. * * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}. */ error AccessControlBadConfirmation(); /** * @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. */ 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 `callerConfirmation`. */ function renounceRole(bytes32 role, address callerConfirmation) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/AccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControlEnumerable} from "./IAccessControlEnumerable.sol"; import {AccessControl} from "../AccessControl.sol"; import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 role => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {AccessControl-_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override returns (bool) { bool granted = super._grantRole(role, account); if (granted) { _roleMembers[role].add(account); } return granted; } /** * @dev Overload {AccessControl-_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override returns (bool) { bool revoked = super._revokeRole(role, account); if (revoked) { _roleMembers[role].remove(account); } return revoked; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/extensions/IAccessControlEnumerable.sol) pragma solidity ^0.8.20; import {IAccessControl} from "../IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4906.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; import {IERC721} from "./IERC721.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165, IERC721 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) pragma solidity ^0.8.20; interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "./IERC721.sol"; import {IERC721Receiver} from "./IERC721Receiver.sol"; import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {Strings} from "../../utils/Strings.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets * the `spender` for the specific `tokenId`. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); _checkOnERC721Received(address(0), to, tokenId, data); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC721 standard to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be * reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; import {IERC721Enumerable} from "./IERC721Enumerable.sol"; import {IERC165} from "../../../utils/introspection/ERC165.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds enumerability * of all the token ids in the contract as well as all token ids owned by each account. * * CAUTION: `ERC721` extensions that implement custom `balanceOf` logic, such as `ERC721Consecutive`, * interfere with enumerability and should not be used together with `ERC721Enumerable`. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address owner => mapping(uint256 index => uint256)) private _ownedTokens; mapping(uint256 tokenId => uint256) private _ownedTokensIndex; uint256[] private _allTokens; mapping(uint256 tokenId => uint256) private _allTokensIndex; /** * @dev An `owner`'s token query was out of bounds for `index`. * * NOTE: The owner being `address(0)` indicates a global out of bounds index. */ error ERC721OutOfBoundsIndex(address owner, uint256 index); /** * @dev Batch mint is not allowed. */ error ERC721EnumerableForbiddenBatchMint(); /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual returns (uint256) { if (index >= balanceOf(owner)) { revert ERC721OutOfBoundsIndex(owner, index); } return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual returns (uint256) { if (index >= totalSupply()) { revert ERC721OutOfBoundsIndex(address(0), index); } return _allTokens[index]; } /** * @dev See {ERC721-_update}. */ function _update(address to, uint256 tokenId, address auth) internal virtual override returns (address) { address previousOwner = super._update(to, tokenId, auth); if (previousOwner == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (previousOwner != to) { _removeTokenFromOwnerEnumeration(previousOwner, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (previousOwner != to) { _addTokenToOwnerEnumeration(to, tokenId); } return previousOwner; } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = balanceOf(to) - 1; _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = balanceOf(from); uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } /** * See {ERC721-_increaseBalance}. We need that to account tokens that were minted in batch */ function _increaseBalance(address account, uint128 amount) internal virtual override { if (amount > 0) { revert ERC721EnumerableForbiddenBatchMint(); } super._increaseBalance(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; import {Pausable} from "../../../utils/Pausable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * IMPORTANT: This contract does not include public pause and unpause functions. In * addition to inheriting this contract, you must define both functions, invoking the * {Pausable-_pause} and {Pausable-_unpause} internal functions, with appropriate * access control, e.g. using {AccessControl} or {Ownable}. Not doing so will * make the contract pause mechanism of the contract unreachable, and thus unusable. */ abstract contract ERC721Pausable is ERC721, Pausable { /** * @dev See {ERC721-_update}. * * Requirements: * * - the contract must not be paused. */ function _update( address to, uint256 tokenId, address auth ) internal virtual override whenNotPaused returns (address) { return super._update(to, tokenId, auth); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.20; import {ERC721} from "../ERC721.sol"; import {Strings} from "../../../utils/Strings.sol"; import {IERC4906} from "../../../interfaces/IERC4906.sol"; import {IERC165} from "../../../interfaces/IERC165.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is IERC4906, ERC721 { using Strings for uint256; // Interface ID as defined in ERC-4906. This does not correspond to a traditional interface ID as ERC-4906 only // defines events and does not include any external function. bytes4 private constant ERC4906_INTERFACE_ID = bytes4(0x49064906); // Optional mapping for token URIs mapping(uint256 tokenId => string) private _tokenURIs; /** * @dev See {IERC165-supportsInterface} */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { return interfaceId == ERC4906_INTERFACE_ID || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireOwned(tokenId); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via string.concat). if (bytes(_tokenURI).length > 0) { return string.concat(base, _tokenURI); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Emits {MetadataUpdate}. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { _tokenURIs[tokenId] = _tokenURI; emit MetadataUpdate(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @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) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) pragma solidity ^0.8.20; import {MessageHashUtils} from "./MessageHashUtils.sol"; import {ShortStrings, ShortString} from "../ShortStrings.sol"; import {IERC5267} from "../../interfaces/IERC5267.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the 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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._positions[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._positions[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "paris", "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"admin","type":"address"},{"internalType":"address","name":"primarySaleRecipient_","type":"address"},{"internalType":"string","name":"collectionURI_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"ERC721EnumerableForbiddenBatchMint","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"ERC721OutOfBoundsIndex","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedToCollectPayment","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"InvalidPaymentData","type":"error"},{"inputs":[],"name":"InvalidRecipientAddress","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[{"internalType":"string","name":"errMsg","type":"string"}],"name":"InvalidSignRequest","type":"error"},{"inputs":[],"name":"LastAdminRole","type":"error"},{"inputs":[],"name":"NotAllowedToList","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"UIDAlreadyMinted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"}],"name":"PrimarySaleRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenIdBurned","type":"uint256"}],"name":"TokensBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"mintedTo","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenIdMinted","type":"uint256"}],"name":"TokensMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":true,"internalType":"address","name":"mintedTo","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenIdMinted","type":"uint256"},{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"validityStartTimestamp","type":"uint256"},{"internalType":"uint256","name":"validityEndTimestamp","type":"uint256"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"indexed":false,"internalType":"struct BythenPod.MintRequest","name":"mintRequest","type":"tuple"}],"name":"TokensMintedWithSignature","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"validityStartTimestamp","type":"uint256"},{"internalType":"uint256","name":"validityEndTimestamp","type":"uint256"},{"internalType":"bytes32","name":"uid","type":"bytes32"}],"internalType":"struct BythenPod.MintRequest","name":"_req","type":"tuple"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mintWithSignature","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"primarySaleRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isAllow","type":"bool"}],"name":"setAllowToList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newCollectionURI","type":"string"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_saleRecipient","type":"address"}],"name":"setPrimarySaleRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101606040526000601460006101000a81548160ff0219169083151502179055503480156200002d57600080fd5b5060405162006758380380620067588339818101604052810190620000539190620008c7565b846040518060400160405280600581526020017f312e302e30000000000000000000000000000000000000000000000000000000815250868681600090816200009d919062000bf7565b508060019081620000af919062000bf7565b5050506000600b60006101000a81548160ff021916908315150217905550620000e3600e83620001c160201b90919060201c565b610120818152505062000101600f82620001c160201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a08181525050620001406200021960201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050505080601290816200018e919062000bf7565b50620001a46000801b846200027660201b60201c565b50620001b682620002c760201b60201c565b505050505062000e90565b6000602083511015620001e757620001df836200035f60201b60201c565b905062000213565b82620001f983620003cc60201b60201c565b60000190816200020a919062000bf7565b5060ff60001b90505b92915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e0516101005146306040516020016200025b95949392919062000d1b565b60405160208183030381529060405280519060200120905090565b6000806200028b8484620003d660201b60201c565b90508015620002bd57620002bb83600d6000878152602001908152602001600020620004da60201b90919060201c565b505b8091505092915050565b620002d8816200051260201b60201c565b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33360405160405180910390a250565b600080829050601f81511115620003af57826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401620003a6919062000dca565b60405180910390fd5b805181620003bd9062000e20565b60001c1760001b915050919050565b6000819050919050565b6000620003ea8383620005bf60201b60201c565b620004cf576001600c600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200046b6200062a60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050620004d4565b600090505b92915050565b60006200050a836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6200063260201b60201c565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160362000579576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000813b90506000811115620005bb576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6000600c600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600033905090565b6000620006468383620006ac60201b60201c565b620006a1578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050620006a6565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200073882620006ed565b810181811067ffffffffffffffff821117156200075a5762000759620006fe565b5b80604052505050565b60006200076f620006cf565b90506200077d82826200072d565b919050565b600067ffffffffffffffff821115620007a0576200079f620006fe565b5b620007ab82620006ed565b9050602081019050919050565b60005b83811015620007d8578082015181840152602081019050620007bb565b60008484015250505050565b6000620007fb620007f58462000782565b62000763565b9050828152602081018484840111156200081a5762000819620006e8565b5b62000827848285620007b8565b509392505050565b600082601f830112620008475762000846620006e3565b5b815162000859848260208601620007e4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200088f8262000862565b9050919050565b620008a18162000882565b8114620008ad57600080fd5b50565b600081519050620008c18162000896565b92915050565b600080600080600060a08688031215620008e657620008e5620006d9565b5b600086015167ffffffffffffffff811115620009075762000906620006de565b5b62000915888289016200082f565b955050602086015167ffffffffffffffff811115620009395762000938620006de565b5b62000947888289016200082f565b94505060406200095a88828901620008b0565b93505060606200096d88828901620008b0565b925050608086015167ffffffffffffffff811115620009915762000990620006de565b5b6200099f888289016200082f565b9150509295509295909350565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620009ff57607f821691505b60208210810362000a155762000a14620009b7565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830262000a7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000a40565b62000a8b868362000a40565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b600062000ad862000ad262000acc8462000aa3565b62000aad565b62000aa3565b9050919050565b6000819050919050565b62000af48362000ab7565b62000b0c62000b038262000adf565b84845462000a4d565b825550505050565b600090565b62000b2362000b14565b62000b3081848462000ae9565b505050565b5b8181101562000b585762000b4c60008262000b19565b60018101905062000b36565b5050565b601f82111562000ba75762000b718162000a1b565b62000b7c8462000a30565b8101602085101562000b8c578190505b62000ba462000b9b8562000a30565b83018262000b35565b50505b505050565b600082821c905092915050565b600062000bcc6000198460080262000bac565b1980831691505092915050565b600062000be7838362000bb9565b9150826002028217905092915050565b62000c0282620009ac565b67ffffffffffffffff81111562000c1e5762000c1d620006fe565b5b62000c2a8254620009e6565b62000c3782828562000b5c565b600060209050601f83116001811462000c6f576000841562000c5a578287015190505b62000c66858262000bd9565b86555062000cd6565b601f19841662000c7f8662000a1b565b60005b8281101562000ca95784890151825560018201915060208501945060208101905062000c82565b8683101562000cc9578489015162000cc5601f89168262000bb9565b8355505b6001600288020188555050505b505050505050565b6000819050919050565b62000cf38162000cde565b82525050565b62000d048162000aa3565b82525050565b62000d158162000882565b82525050565b600060a08201905062000d32600083018862000ce8565b62000d41602083018762000ce8565b62000d50604083018662000ce8565b62000d5f606083018562000cf9565b62000d6e608083018462000d0a565b9695505050505050565b600082825260208201905092915050565b600062000d9682620009ac565b62000da2818562000d78565b935062000db4818560208601620007b8565b62000dbf81620006ed565b840191505092915050565b6000602082019050818103600083015262000de6818462000d89565b905092915050565b600081519050919050565b6000819050602082019050919050565b600062000e17825162000cde565b80915050919050565b600062000e2d8262000dee565b8262000e398462000df9565b905062000e468162000e09565b9250602082101562000e895762000e847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080262000a40565b831692505b5050919050565b60805160a05160c05160e05161010051610120516101405161586d62000eeb60003960006119940152600061195901526000613a7d01526000613a5c01526000612e9b01526000612ef101526000612f1a015261586d6000f3fe6080604052600436106102255760003560e01c80635c975abb1161012357806395d89b41116100ab578063ca15c8731161006f578063ca15c87314610820578063d34047b61461085d578063d539139314610886578063d547741f146108b1578063e985e9c5146108da57610225565b806395d89b411461073b578063a217fddf14610766578063a22cb46514610791578063b88d4fde146107ba578063c87b56dd146107e357610225565b80638456cb59116100f25780638456cb591461065d57806384b0196e146106745780638c3a7844146106a55780639010d07c146106c157806391d14854146106fe57610225565b80635c975abb1461058f5780636352211e146105ba5780636f4f2837146105f757806370a082311461062057610225565b80632639f460116101b157806336568abe1161017557806336568abe146104c05780633f4ba83a146104e957806342842e0e1461050057806342966c68146105295780634f6ccce71461055257610225565b80632639f460146103dd578063282c51f3146104065780632f2ff15d146104315780632f4826551461045a5780632f745c591461048357610225565b8063095ea7b3116101f8578063095ea7b3146102fa578063162094c41461032357806318160ddd1461034c57806323b872dd14610377578063248a9ca3146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063079fe40e14610292578063081812fc146102bd575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190614051565b610917565b60405161025e9190614099565b60405180910390f35b34801561027357600080fd5b5061027c610929565b6040516102899190614144565b60405180910390f35b34801561029e57600080fd5b506102a76109bb565b6040516102b491906141a7565b60405180910390f35b3480156102c957600080fd5b506102e460048036038101906102df91906141f8565b6109e5565b6040516102f191906141a7565b60405180910390f35b34801561030657600080fd5b50610321600480360381019061031c9190614251565b610a01565b005b34801561032f57600080fd5b5061034a600480360381019061034591906143c6565b610a55565b005b34801561035857600080fd5b50610361610a8e565b60405161036e9190614431565b60405180910390f35b34801561038357600080fd5b5061039e6004803603810190610399919061444c565b610a9b565b005b3480156103ac57600080fd5b506103c760048036038101906103c291906144d5565b610b9d565b6040516103d49190614511565b60405180910390f35b3480156103e957600080fd5b5061040460048036038101906103ff919061452c565b610bbd565b005b34801561041257600080fd5b5061041b610c26565b6040516104289190614511565b60405180910390f35b34801561043d57600080fd5b5061045860048036038101906104539190614575565b610c4a565b005b34801561046657600080fd5b50610481600480360381019061047c91906145e1565b610c6c565b005b34801561048f57600080fd5b506104aa60048036038101906104a59190614251565b610c97565b6040516104b79190614431565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190614575565b610d40565b005b3480156104f557600080fd5b506104fe610da3565b005b34801561050c57600080fd5b506105276004803603810190610522919061444c565b610dbb565b005b34801561053557600080fd5b50610550600480360381019061054b91906141f8565b610ddb565b005b34801561055e57600080fd5b50610579600480360381019061057491906141f8565b610e4a565b6040516105869190614431565b60405180910390f35b34801561059b57600080fd5b506105a4610ec0565b6040516105b19190614099565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc91906141f8565b610ed7565b6040516105ee91906141a7565b60405180910390f35b34801561060357600080fd5b5061061e6004803603810190610619919061460e565b610ee9565b005b34801561062c57600080fd5b506106476004803603810190610642919061460e565b610f03565b6040516106549190614431565b60405180910390f35b34801561066957600080fd5b50610672610fbd565b005b34801561068057600080fd5b50610689610fd5565b60405161069c9796959493929190614734565b60405180910390f35b6106bf60048036038101906106ba919061483c565b61107f565b005b3480156106cd57600080fd5b506106e860048036038101906106e391906148b8565b6111a1565b6040516106f591906141a7565b60405180910390f35b34801561070a57600080fd5b5061072560048036038101906107209190614575565b6111d0565b6040516107329190614099565b60405180910390f35b34801561074757600080fd5b5061075061123b565b60405161075d9190614144565b60405180910390f35b34801561077257600080fd5b5061077b6112cd565b6040516107889190614511565b60405180910390f35b34801561079d57600080fd5b506107b860048036038101906107b391906148f8565b6112d4565b005b3480156107c657600080fd5b506107e160048036038101906107dc91906149d9565b611328565b005b3480156107ef57600080fd5b5061080a600480360381019061080591906141f8565b611345565b6040516108179190614144565b60405180910390f35b34801561082c57600080fd5b50610847600480360381019061084291906144d5565b611357565b6040516108549190614431565b60405180910390f35b34801561086957600080fd5b50610884600480360381019061087f9190614a5c565b61137b565b005b34801561089257600080fd5b5061089b611428565b6040516108a89190614511565b60405180910390f35b3480156108bd57600080fd5b506108d860048036038101906108d39190614575565b61144c565b005b3480156108e657600080fd5b5061090160048036038101906108fc9190614acb565b6114c2565b60405161090e9190614099565b60405180910390f35b600061092282611556565b9050919050565b60606000805461093890614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461096490614b3a565b80156109b15780601f10610986576101008083540402835291602001916109b1565b820191906000526020600020905b81548152906001019060200180831161099457829003601f168201915b5050505050905090565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006109f0826115d0565b506109fa82611658565b9050919050565b601460009054906101000a900460ff16610a47576040517f687d0d1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a518282611695565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a7f816116ab565b610a8983836116bf565b505050565b6000600880549050905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0d5760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610b0491906141a7565b60405180910390fd5b6000610b218383610b1c61171b565b611723565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b97578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401610b8e93929190614b6b565b60405180910390fd5b50505050565b6000600c6000838152602001908152602001600020600101549050919050565b6000801b610bca816116ab565b8160129081610bd99190614d4e565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60006001601054610c0c9190614e4f565b604051610c1a929190614ebe565b60405180910390a15050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b610c5382610b9d565b610c5c816116ab565b610c668383611739565b50505050565b6000801b610c79816116ab565b81601460006101000a81548160ff0219169083151502179055505050565b6000610ca283610f03565b8210610ce75782826040517fa57d13dc000000000000000000000000000000000000000000000000000000008152600401610cde929190614ee7565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610d4a828261177f565b6000801b82148015610d6857506000610d656000801b611357565b11155b15610d9f576040517fc0b3105e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6000801b610db0816116ab565b610db86117fa565b50565b610dd683838360405180602001604052806000815250611328565b505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848610e05816116ab565b610e18600083610e1361171b565b611723565b50817f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac760405160405180910390a25050565b6000610e54610a8e565b8210610e9a576000826040517fa57d13dc000000000000000000000000000000000000000000000000000000008152600401610e91929190614ee7565b60405180910390fd5b60088281548110610eae57610ead614f10565b5b90600052602060002001549050919050565b6000600b60009054906101000a900460ff16905090565b6000610ee2826115d0565b9050919050565b6000801b610ef6816116ab565b610eff8261185d565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f765760006040517f89c62b64000000000000000000000000000000000000000000000000000000008152600401610f6d91906141a7565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000801b610fca816116ab565b610fd26118ed565b50565b600060608060008060006060610fe9611950565b610ff161198b565b46306000801b600067ffffffffffffffff8111156110125761101161429b565b5b6040519080825280602002602001820160405280156110405781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b600061108c8484846119c6565b905060008460000160208101906110a3919061460e565b90506110b28560400135611c1f565b6000601060008154809291906110c790614f3f565b9190505590506110d78282611d58565b611133818780602001906110eb9190614f96565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506116bf565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f6763e49528a38ac19ed4f080536419222e58bc7ed3160b24559d7e2856557a4a8960405161119191906151c7565b60405180910390a4505050505050565b60006111c882600d6000868152602001908152602001600020611d7690919063ffffffff16565b905092915050565b6000600c600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606001805461124a90614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461127690614b3a565b80156112c35780601f10611298576101008083540402835291602001916112c3565b820191906000526020600020905b8154815290600101906020018083116112a657829003601f168201915b5050505050905090565b6000801b81565b601460009054906101000a900460ff1661131a576040517f687d0d1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113248282611d90565b5050565b611333848484610a9b565b61133f84848484611da6565b50505050565b606061135082611f5d565b9050919050565b6000611374600d6000848152602001908152602001600020612070565b9050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66113a5816116ab565b6113ae82612085565b6000601060008154809291906113c390614f3f565b9190505590506113d38582611d58565b6113dd81856116bf565b808573ffffffffffffffffffffffffffffffffffffffff167f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360405160405180910390a35050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61145582610b9d565b61145e816116ab565b611468838361210c565b6000801b83148015611486575060006114836000801b611357565b11155b156114bd576040517fc0b3105e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806115c957506115c88261212e565b5b9050919050565b6000806115dc836121a8565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361164f57826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016116469190614431565b60405180910390fd5b80915050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6116a782826116a261171b565b6121e5565b5050565b6116bc816116b761171b565b6121f7565b50565b80600a600084815260200190815260200160002090816116df9190614d4e565b507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78260405161170f9190614431565b60405180910390a15050565b600033905090565b6000611730848484612248565b90509392505050565b6000806117468484612266565b905080156117755761177383600d600087815260200190815260200160002061235890919063ffffffff16565b505b8091505092915050565b61178761171b565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146117eb576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117f58282612388565b505050565b6118026123ce565b6000600b60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61184661171b565b60405161185391906141a7565b60405180910390a1565b6118668161240e565b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33360405160405180910390a250565b6118f56124b9565b6001600b60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861193961171b565b60405161194691906141a7565b60405180910390a1565b6060611986600e7f00000000000000000000000000000000000000000000000000000000000000006124fa90919063ffffffff16565b905090565b60606119c1600f7f00000000000000000000000000000000000000000000000000000000000000006124fa90919063ffffffff16565b905090565b6000808480602001906119d99190614f96565b905003611a1b576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611a1290615235565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16846000016020810190611a46919061460e565b73ffffffffffffffffffffffffffffffffffffffff161480611aa657503373ffffffffffffffffffffffffffffffffffffffff16846000016020810190611a8d919061460e565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611ae6576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611add906152a1565b60405180910390fd5b611b4b611b01611af5866125aa565b80519060200120612645565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061265f565b9050611b777f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826111d0565b611bb6576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611bad9061530d565b60405180910390fd5b4284606001351180611bcb5750428460800135105b15611c0b576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611c0290615379565b60405180910390fd5b611c188460a00135612085565b9392505050565b60008111611c62576040517fa015a50c000000000000000000000000000000000000000000000000000000008152600401611c59906153e5565b60405180910390fd5b803414611ca4576040517fa015a50c000000000000000000000000000000000000000000000000000000008152600401611c9b90615477565b60405180910390fd5b6000611cae6109bb565b905060008173ffffffffffffffffffffffffffffffffffffffff1683604051611cd6906154c8565b60006040518083038185875af1925050503d8060008114611d13576040519150601f19603f3d011682016040523d82523d6000602084013e611d18565b606091505b5050905080611d53576040517f8c5c290800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b611d7282826040518060200160405280600081525061268b565b5050565b6000611d8583600001836126a7565b60001c905092915050565b611da2611d9b61171b565b83836126d2565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff163b1115611f57578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02611dea61171b565b8685856040518563ffffffff1660e01b8152600401611e0c9493929190615532565b6020604051808303816000875af1925050508015611e4857506040513d601f19601f82011682018060405250810190611e459190615593565b60015b611ecc573d8060008114611e78576040519150601f19603f3d011682016040523d82523d6000602084013e611e7d565b606091505b506000815103611ec457836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611ebb91906141a7565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611f5557836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f4c91906141a7565b60405180910390fd5b505b50505050565b6060611f68826115d0565b506000600a60008481526020019081526020016000208054611f8990614b3a565b80601f0160208091040260200160405190810160405280929190818152602001828054611fb590614b3a565b80156120025780601f10611fd757610100808354040283529160200191612002565b820191906000526020600020905b815481529060010190602001808311611fe557829003601f168201915b505050505090506000612013612841565b9050600081510361202857819250505061206b565b60008251111561205d5780826040516020016120459291906155fc565b6040516020818303038152906040529250505061206b565b612066846128d3565b925050505b919050565b600061207e8260000161293c565b9050919050565b6013600082815260200190815260200160002060009054906101000a900460ff16156120dd576040517feced38d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016013600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61211582610b9d565b61211e816116ab565b6121288383612388565b50505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121a157506121a08261294d565b5b9050919050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6121f283838360016129ae565b505050565b61220182826111d0565b6122445780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161223b929190615620565b60405180910390fd5b5050565b60006122526124b9565b61225d848484612b73565b90509392505050565b600061227283836111d0565b61234d576001600c600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506122ea61171b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050612352565b600090505b92915050565b6000612380836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612c90565b905092915050565b6000806123958484612d00565b905080156123c4576123c283600d6000878152602001908152602001600020612df390919063ffffffff16565b505b8091505092915050565b6123d6610ec0565b61240c576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612474576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000813b905060008111156124b5576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6124c1610ec0565b156124f8576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b606060ff60001b83146125175761251083612e23565b90506125a4565b81805461252390614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461254f90614b3a565b801561259c5780601f106125715761010080835404028352916020019161259c565b820191906000526020600020905b81548152906001019060200180831161257f57829003601f168201915b505050505090505b92915050565b60607e4d182f6ec24d9ebf16b2c86dd290d16d110dcbc2315e2e9f68dc1573e2acdf8260000160208101906125df919061460e565b8380602001906125ef9190614f96565b6040516125fd92919061566e565b60405180910390208460400135856060013586608001358760a0013560405160200161262f9796959493929190615687565b6040516020818303038152906040529050919050565b6000612658612652612e97565b83612f4e565b9050919050565b60008060008061266f8686612f8f565b92509250925061267f8282612feb565b82935050505092915050565b612695838361314f565b6126a26000848484611da6565b505050565b60008260000182815481106126bf576126be614f10565b5b9060005260206000200154905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361274357816040517f5b08ba1800000000000000000000000000000000000000000000000000000000815260040161273a91906141a7565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516128349190614099565b60405180910390a3505050565b60606012805461285090614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461287c90614b3a565b80156128c95780601f1061289e576101008083540402835291602001916128c9565b820191906000526020600020905b8154815290600101906020018083116128ac57829003601f168201915b5050505050905090565b60606128de826115d0565b5060006128e9612841565b905060008151116129095760405180602001604052806000815250612934565b8061291384613248565b6040516020016129249291906155fc565b6040516020818303038152906040525b915050919050565b600081600001805490509050919050565b6000634906490660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806129a757506129a682613316565b5b9050919050565b80806129e75750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612b1b5760006129f7846115d0565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612a6257508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015612a755750612a7381846114c2565b155b15612ab757826040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152600401612aae91906141a7565b60405180910390fd5b8115612b1957838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600080612b81858585613390565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bc557612bc0846135aa565b612c04565b8473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c0357612c0281856135f3565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612c4657612c4184613754565b612c85565b8473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c8457612c838585613825565b5b5b809150509392505050565b6000612c9c83836138b0565b612cf5578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612cfa565b600090505b92915050565b6000612d0c83836111d0565b15612de8576000600c600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612d8561171b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050612ded565b600090505b92915050565b6000612e1b836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6138d3565b905092915050565b60606000612e30836139e7565b90506000602067ffffffffffffffff811115612e4f57612e4e61429b565b5b6040519080825280601f01601f191660200182016040528015612e815781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015612f1357507f000000000000000000000000000000000000000000000000000000000000000046145b15612f40577f00000000000000000000000000000000000000000000000000000000000000009050612f4b565b612f48613a37565b90505b90565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b60008060006041845103612fd45760008060006020870151925060408701519150606087015160001a9050612fc688828585613acd565b955095509550505050612fe4565b60006002855160001b9250925092505b9250925092565b60006003811115612fff57612ffe6156f6565b5b826003811115613012576130116156f6565b5b031561314b576001600381111561302c5761302b6156f6565b5b82600381111561303f5761303e6156f6565b5b03613076576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561308a576130896156f6565b5b82600381111561309d5761309c6156f6565b5b036130e2578060001c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016130d99190614431565b60405180910390fd5b6003808111156130f5576130f46156f6565b5b826003811115613108576131076156f6565b5b0361314a57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016131419190614511565b60405180910390fd5b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036131c15760006040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016131b891906141a7565b60405180910390fd5b60006131cf83836000611723565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146132435760006040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260040161323a91906141a7565b60405180910390fd5b505050565b60606000600161325784613bc1565b01905060008167ffffffffffffffff8111156132765761327561429b565b5b6040519080825280601f01601f1916602001820160405280156132a85781602001600182028036833780820191505090505b509050600082602001820190505b60011561330b578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816132ff576132fe615725565b5b049450600085036132b6575b819350505050919050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480613389575061338882613d14565b5b9050919050565b60008061339c846121a8565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146133de576133dd818486613df6565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461346f576134206000856000806129ae565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146134f2576001600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846002600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006135fe83610f03565b90506000600760008481526020019081526020016000205490508181146136e3576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506137689190614e4f565b905060006009600084815260200190815260200160002054905060006008838154811061379857613797614f10565b5b9060005260206000200154905080600883815481106137ba576137b9614f10565b5b90600052602060002001819055508160096000838152602001908152602001600020819055506009600085815260200190815260200160002060009055600880548061380957613808615754565b5b6001900381819060005260206000200160009055905550505050565b6000600161383284610f03565b61383c9190614e4f565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600080836001016000848152602001908152602001600020541415905092915050565b600080836001016000848152602001908152602001600020549050600081146139db5760006001826139059190614e4f565b905060006001866000018054905061391d9190614e4f565b905080821461398c57600086600001828154811061393e5761393d614f10565b5b906000526020600020015490508087600001848154811061396257613961614f10565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806139a05761399f615754565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506139e1565b60009150505b92915050565b60008060ff8360001c169050601f811115613a2e576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000004630604051602001613ab2959493929190615783565b60405160208183030381529060405280519060200120905090565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115613b0d576000600385925092509250613bb7565b600060018888888860405160008152602001604052604051613b3294939291906157f2565b6020604051602081039080840390855afa158015613b54573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613ba857600060016000801b93509350935050613bb7565b8060008060001b935093509350505b9450945094915050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613c1f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381613c1557613c14615725565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310613c5c576d04ee2d6d415b85acef81000000008381613c5257613c51615725565b5b0492506020810190505b662386f26fc100008310613c8b57662386f26fc100008381613c8157613c80615725565b5b0492506010810190505b6305f5e1008310613cb4576305f5e1008381613caa57613ca9615725565b5b0492506008810190505b6127108310613cd9576127108381613ccf57613cce615725565b5b0492506004810190505b60648310613cfc5760648381613cf257613cf1615725565b5b0492506002810190505b600a8310613d0b576001810190505b80915050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480613ddf57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80613def5750613dee82613eba565b5b9050919050565b613e01838383613f24565b613eb557600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613e7657806040517f7e273289000000000000000000000000000000000000000000000000000000008152600401613e6d9190614431565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401613eac929190614ee7565b60405180910390fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015613fdc57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480613f9d5750613f9c84846114c2565b5b80613fdb57508273ffffffffffffffffffffffffffffffffffffffff16613fc383611658565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61402e81613ff9565b811461403957600080fd5b50565b60008135905061404b81614025565b92915050565b60006020828403121561406757614066613fef565b5b60006140758482850161403c565b91505092915050565b60008115159050919050565b6140938161407e565b82525050565b60006020820190506140ae600083018461408a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156140ee5780820151818401526020810190506140d3565b60008484015250505050565b6000601f19601f8301169050919050565b6000614116826140b4565b61412081856140bf565b93506141308185602086016140d0565b614139816140fa565b840191505092915050565b6000602082019050818103600083015261415e818461410b565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061419182614166565b9050919050565b6141a181614186565b82525050565b60006020820190506141bc6000830184614198565b92915050565b6000819050919050565b6141d5816141c2565b81146141e057600080fd5b50565b6000813590506141f2816141cc565b92915050565b60006020828403121561420e5761420d613fef565b5b600061421c848285016141e3565b91505092915050565b61422e81614186565b811461423957600080fd5b50565b60008135905061424b81614225565b92915050565b6000806040838503121561426857614267613fef565b5b60006142768582860161423c565b9250506020614287858286016141e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6142d3826140fa565b810181811067ffffffffffffffff821117156142f2576142f161429b565b5b80604052505050565b6000614305613fe5565b905061431182826142ca565b919050565b600067ffffffffffffffff8211156143315761433061429b565b5b61433a826140fa565b9050602081019050919050565b82818337600083830152505050565b600061436961436484614316565b6142fb565b90508281526020810184848401111561438557614384614296565b5b614390848285614347565b509392505050565b600082601f8301126143ad576143ac614291565b5b81356143bd848260208601614356565b91505092915050565b600080604083850312156143dd576143dc613fef565b5b60006143eb858286016141e3565b925050602083013567ffffffffffffffff81111561440c5761440b613ff4565b5b61441885828601614398565b9150509250929050565b61442b816141c2565b82525050565b60006020820190506144466000830184614422565b92915050565b60008060006060848603121561446557614464613fef565b5b60006144738682870161423c565b93505060206144848682870161423c565b9250506040614495868287016141e3565b9150509250925092565b6000819050919050565b6144b28161449f565b81146144bd57600080fd5b50565b6000813590506144cf816144a9565b92915050565b6000602082840312156144eb576144ea613fef565b5b60006144f9848285016144c0565b91505092915050565b61450b8161449f565b82525050565b60006020820190506145266000830184614502565b92915050565b60006020828403121561454257614541613fef565b5b600082013567ffffffffffffffff8111156145605761455f613ff4565b5b61456c84828501614398565b91505092915050565b6000806040838503121561458c5761458b613fef565b5b600061459a858286016144c0565b92505060206145ab8582860161423c565b9150509250929050565b6145be8161407e565b81146145c957600080fd5b50565b6000813590506145db816145b5565b92915050565b6000602082840312156145f7576145f6613fef565b5b6000614605848285016145cc565b91505092915050565b60006020828403121561462457614623613fef565b5b60006146328482850161423c565b91505092915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6146708161463b565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6146ab816141c2565b82525050565b60006146bd83836146a2565b60208301905092915050565b6000602082019050919050565b60006146e182614676565b6146eb8185614681565b93506146f683614692565b8060005b8381101561472757815161470e88826146b1565b9750614719836146c9565b9250506001810190506146fa565b5085935050505092915050565b600060e082019050614749600083018a614667565b818103602083015261475b818961410b565b9050818103604083015261476f818861410b565b905061477e6060830187614422565b61478b6080830186614198565b61479860a0830185614502565b81810360c08301526147aa81846146d6565b905098975050505050505050565b600080fd5b600060c082840312156147d3576147d26147b8565b5b81905092915050565b600080fd5b600080fd5b60008083601f8401126147fc576147fb614291565b5b8235905067ffffffffffffffff811115614819576148186147dc565b5b602083019150836001820283011115614835576148346147e1565b5b9250929050565b60008060006040848603121561485557614854613fef565b5b600084013567ffffffffffffffff81111561487357614872613ff4565b5b61487f868287016147bd565b935050602084013567ffffffffffffffff8111156148a05761489f613ff4565b5b6148ac868287016147e6565b92509250509250925092565b600080604083850312156148cf576148ce613fef565b5b60006148dd858286016144c0565b92505060206148ee858286016141e3565b9150509250929050565b6000806040838503121561490f5761490e613fef565b5b600061491d8582860161423c565b925050602061492e858286016145cc565b9150509250929050565b600067ffffffffffffffff8211156149535761495261429b565b5b61495c826140fa565b9050602081019050919050565b600061497c61497784614938565b6142fb565b90508281526020810184848401111561499857614997614296565b5b6149a3848285614347565b509392505050565b600082601f8301126149c0576149bf614291565b5b81356149d0848260208601614969565b91505092915050565b600080600080608085870312156149f3576149f2613fef565b5b6000614a018782880161423c565b9450506020614a128782880161423c565b9350506040614a23878288016141e3565b925050606085013567ffffffffffffffff811115614a4457614a43613ff4565b5b614a50878288016149ab565b91505092959194509250565b600080600060608486031215614a7557614a74613fef565b5b6000614a838682870161423c565b935050602084013567ffffffffffffffff811115614aa457614aa3613ff4565b5b614ab086828701614398565b9250506040614ac1868287016144c0565b9150509250925092565b60008060408385031215614ae257614ae1613fef565b5b6000614af08582860161423c565b9250506020614b018582860161423c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614b5257607f821691505b602082108103614b6557614b64614b0b565b5b50919050565b6000606082019050614b806000830186614198565b614b8d6020830185614422565b614b9a6040830184614198565b949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614c047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614bc7565b614c0e8683614bc7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000614c4b614c46614c41846141c2565b614c26565b6141c2565b9050919050565b6000819050919050565b614c6583614c30565b614c79614c7182614c52565b848454614bd4565b825550505050565b600090565b614c8e614c81565b614c99818484614c5c565b505050565b5b81811015614cbd57614cb2600082614c86565b600181019050614c9f565b5050565b601f821115614d0257614cd381614ba2565b614cdc84614bb7565b81016020851015614ceb578190505b614cff614cf785614bb7565b830182614c9e565b50505b505050565b600082821c905092915050565b6000614d2560001984600802614d07565b1980831691505092915050565b6000614d3e8383614d14565b9150826002028217905092915050565b614d57826140b4565b67ffffffffffffffff811115614d7057614d6f61429b565b5b614d7a8254614b3a565b614d85828285614cc1565b600060209050601f831160018114614db85760008415614da6578287015190505b614db08582614d32565b865550614e18565b601f198416614dc686614ba2565b60005b82811015614dee57848901518255600182019150602085019450602081019050614dc9565b86831015614e0b5784890151614e07601f891682614d14565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614e5a826141c2565b9150614e65836141c2565b9250828203905081811115614e7d57614e7c614e20565b5b92915050565b6000819050919050565b6000614ea8614ea3614e9e84614e83565b614c26565b6141c2565b9050919050565b614eb881614e8d565b82525050565b6000604082019050614ed36000830185614eaf565b614ee06020830184614422565b9392505050565b6000604082019050614efc6000830185614198565b614f096020830184614422565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614f4a826141c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614f7c57614f7b614e20565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112614fb357614fb2614f87565b5b80840192508235915067ffffffffffffffff821115614fd557614fd4614f8c565b5b602083019250600182023603831315614ff157614ff0614f91565b5b509250929050565b6000615008602084018461423c565b905092915050565b61501981614186565b82525050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261504b5761504a615029565b5b83810192508235915060208301925067ffffffffffffffff8211156150735761507261501f565b5b60018202360383131561508957615088615024565b5b509250929050565b600082825260208201905092915050565b60006150ae8385615091565b93506150bb838584614347565b6150c4836140fa565b840190509392505050565b60006150de60208401846141e3565b905092915050565b60006150f560208401846144c0565b905092915050565b6151068161449f565b82525050565b600060c0830161511f6000840184614ff9565b61512c6000860182615010565b5061513a602084018461502e565b858303602087015261514d8382846150a2565b9250505061515e60408401846150cf565b61516b60408601826146a2565b5061517960608401846150cf565b61518660608601826146a2565b5061519460808401846150cf565b6151a160808601826146a2565b506151af60a08401846150e6565b6151bc60a08601826150fd565b508091505092915050565b600060208201905081810360008301526151e1818461510c565b905092915050565b7f496e76616c696420757269000000000000000000000000000000000000000000600082015250565b600061521f600b836140bf565b915061522a826151e9565b602082019050919050565b6000602082019050818103600083015261524e81615212565b9050919050565b7f496e76616c696420726563697069656e74000000000000000000000000000000600082015250565b600061528b6011836140bf565b915061529682615255565b602082019050919050565b600060208201905081810360008301526152ba8161527e565b9050919050565b7f496e76616c6964207369676e6572000000000000000000000000000000000000600082015250565b60006152f7600e836140bf565b9150615302826152c1565b602082019050919050565b60006020820190508181036000830152615326816152ea565b9050919050565b7f496e76616c69642074696d650000000000000000000000000000000000000000600082015250565b6000615363600c836140bf565b915061536e8261532d565b602082019050919050565b6000602082019050818103600083015261539281615356565b9050919050565b7f496e76616c696420707269636500000000000000000000000000000000000000600082015250565b60006153cf600d836140bf565b91506153da82615399565b602082019050919050565b600060208201905081810360008301526153fe816153c2565b9050919050565b7f6d73672076616c7565206e6f74206d61746368207769746820746f74616c207060008201527f7269636500000000000000000000000000000000000000000000000000000000602082015250565b60006154616024836140bf565b915061546c82615405565b604082019050919050565b6000602082019050818103600083015261549081615454565b9050919050565b600081905092915050565b50565b60006154b2600083615497565b91506154bd826154a2565b600082019050919050565b60006154d3826154a5565b9150819050919050565b600081519050919050565b600082825260208201905092915050565b6000615504826154dd565b61550e81856154e8565b935061551e8185602086016140d0565b615527816140fa565b840191505092915050565b60006080820190506155476000830187614198565b6155546020830186614198565b6155616040830185614422565b818103606083015261557381846154f9565b905095945050505050565b60008151905061558d81614025565b92915050565b6000602082840312156155a9576155a8613fef565b5b60006155b78482850161557e565b91505092915050565b600081905092915050565b60006155d6826140b4565b6155e081856155c0565b93506155f08185602086016140d0565b80840191505092915050565b600061560882856155cb565b915061561482846155cb565b91508190509392505050565b60006040820190506156356000830185614198565b6156426020830184614502565b9392505050565b60006156558385615497565b9350615662838584614347565b82840190509392505050565b600061567b828486615649565b91508190509392505050565b600060e08201905061569c600083018a614502565b6156a96020830189614198565b6156b66040830188614502565b6156c36060830187614422565b6156d06080830186614422565b6156dd60a0830185614422565b6156ea60c0830184614502565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060a0820190506157986000830188614502565b6157a56020830187614502565b6157b26040830186614502565b6157bf6060830185614422565b6157cc6080830184614198565b9695505050505050565b600060ff82169050919050565b6157ec816157d6565b82525050565b60006080820190506158076000830187614502565b61581460208301866157e3565b6158216040830185614502565b61582e6060830184614502565b9594505050505056fea2646970667358221220e7fa94ce1777cfcecff3d790131cc28a7e94e2ad1cd160d8aa6afa7866ea75ef64736f6c6343000814003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000d46d5d0f4e39da031a0ca6137d2a528aab32db860000000000000000000000004ebbf1ea0b218ac7fc28ee2b9c057994e341db880000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000a62797468656e20506f6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942595448454e504f4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d56575174414758756e46595a744432616d697053363767574d4c344c734159675579636e7836644b4b765a4e2f00000000000000000000
Deployed Bytecode
0x6080604052600436106102255760003560e01c80635c975abb1161012357806395d89b41116100ab578063ca15c8731161006f578063ca15c87314610820578063d34047b61461085d578063d539139314610886578063d547741f146108b1578063e985e9c5146108da57610225565b806395d89b411461073b578063a217fddf14610766578063a22cb46514610791578063b88d4fde146107ba578063c87b56dd146107e357610225565b80638456cb59116100f25780638456cb591461065d57806384b0196e146106745780638c3a7844146106a55780639010d07c146106c157806391d14854146106fe57610225565b80635c975abb1461058f5780636352211e146105ba5780636f4f2837146105f757806370a082311461062057610225565b80632639f460116101b157806336568abe1161017557806336568abe146104c05780633f4ba83a146104e957806342842e0e1461050057806342966c68146105295780634f6ccce71461055257610225565b80632639f460146103dd578063282c51f3146104065780632f2ff15d146104315780632f4826551461045a5780632f745c591461048357610225565b8063095ea7b3116101f8578063095ea7b3146102fa578063162094c41461032357806318160ddd1461034c57806323b872dd14610377578063248a9ca3146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063079fe40e14610292578063081812fc146102bd575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190614051565b610917565b60405161025e9190614099565b60405180910390f35b34801561027357600080fd5b5061027c610929565b6040516102899190614144565b60405180910390f35b34801561029e57600080fd5b506102a76109bb565b6040516102b491906141a7565b60405180910390f35b3480156102c957600080fd5b506102e460048036038101906102df91906141f8565b6109e5565b6040516102f191906141a7565b60405180910390f35b34801561030657600080fd5b50610321600480360381019061031c9190614251565b610a01565b005b34801561032f57600080fd5b5061034a600480360381019061034591906143c6565b610a55565b005b34801561035857600080fd5b50610361610a8e565b60405161036e9190614431565b60405180910390f35b34801561038357600080fd5b5061039e6004803603810190610399919061444c565b610a9b565b005b3480156103ac57600080fd5b506103c760048036038101906103c291906144d5565b610b9d565b6040516103d49190614511565b60405180910390f35b3480156103e957600080fd5b5061040460048036038101906103ff919061452c565b610bbd565b005b34801561041257600080fd5b5061041b610c26565b6040516104289190614511565b60405180910390f35b34801561043d57600080fd5b5061045860048036038101906104539190614575565b610c4a565b005b34801561046657600080fd5b50610481600480360381019061047c91906145e1565b610c6c565b005b34801561048f57600080fd5b506104aa60048036038101906104a59190614251565b610c97565b6040516104b79190614431565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190614575565b610d40565b005b3480156104f557600080fd5b506104fe610da3565b005b34801561050c57600080fd5b506105276004803603810190610522919061444c565b610dbb565b005b34801561053557600080fd5b50610550600480360381019061054b91906141f8565b610ddb565b005b34801561055e57600080fd5b50610579600480360381019061057491906141f8565b610e4a565b6040516105869190614431565b60405180910390f35b34801561059b57600080fd5b506105a4610ec0565b6040516105b19190614099565b60405180910390f35b3480156105c657600080fd5b506105e160048036038101906105dc91906141f8565b610ed7565b6040516105ee91906141a7565b60405180910390f35b34801561060357600080fd5b5061061e6004803603810190610619919061460e565b610ee9565b005b34801561062c57600080fd5b506106476004803603810190610642919061460e565b610f03565b6040516106549190614431565b60405180910390f35b34801561066957600080fd5b50610672610fbd565b005b34801561068057600080fd5b50610689610fd5565b60405161069c9796959493929190614734565b60405180910390f35b6106bf60048036038101906106ba919061483c565b61107f565b005b3480156106cd57600080fd5b506106e860048036038101906106e391906148b8565b6111a1565b6040516106f591906141a7565b60405180910390f35b34801561070a57600080fd5b5061072560048036038101906107209190614575565b6111d0565b6040516107329190614099565b60405180910390f35b34801561074757600080fd5b5061075061123b565b60405161075d9190614144565b60405180910390f35b34801561077257600080fd5b5061077b6112cd565b6040516107889190614511565b60405180910390f35b34801561079d57600080fd5b506107b860048036038101906107b391906148f8565b6112d4565b005b3480156107c657600080fd5b506107e160048036038101906107dc91906149d9565b611328565b005b3480156107ef57600080fd5b5061080a600480360381019061080591906141f8565b611345565b6040516108179190614144565b60405180910390f35b34801561082c57600080fd5b50610847600480360381019061084291906144d5565b611357565b6040516108549190614431565b60405180910390f35b34801561086957600080fd5b50610884600480360381019061087f9190614a5c565b61137b565b005b34801561089257600080fd5b5061089b611428565b6040516108a89190614511565b60405180910390f35b3480156108bd57600080fd5b506108d860048036038101906108d39190614575565b61144c565b005b3480156108e657600080fd5b5061090160048036038101906108fc9190614acb565b6114c2565b60405161090e9190614099565b60405180910390f35b600061092282611556565b9050919050565b60606000805461093890614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461096490614b3a565b80156109b15780601f10610986576101008083540402835291602001916109b1565b820191906000526020600020905b81548152906001019060200180831161099457829003601f168201915b5050505050905090565b6000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006109f0826115d0565b506109fa82611658565b9050919050565b601460009054906101000a900460ff16610a47576040517f687d0d1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a518282611695565b5050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610a7f816116ab565b610a8983836116bf565b505050565b6000600880549050905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610b0d5760006040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401610b0491906141a7565b60405180910390fd5b6000610b218383610b1c61171b565b611723565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b97578382826040517f64283d7b000000000000000000000000000000000000000000000000000000008152600401610b8e93929190614b6b565b60405180910390fd5b50505050565b6000600c6000838152602001908152602001600020600101549050919050565b6000801b610bca816116ab565b8160129081610bd99190614d4e565b507f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60006001601054610c0c9190614e4f565b604051610c1a929190614ebe565b60405180910390a15050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b610c5382610b9d565b610c5c816116ab565b610c668383611739565b50505050565b6000801b610c79816116ab565b81601460006101000a81548160ff0219169083151502179055505050565b6000610ca283610f03565b8210610ce75782826040517fa57d13dc000000000000000000000000000000000000000000000000000000008152600401610cde929190614ee7565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b610d4a828261177f565b6000801b82148015610d6857506000610d656000801b611357565b11155b15610d9f576040517fc0b3105e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6000801b610db0816116ab565b610db86117fa565b50565b610dd683838360405180602001604052806000815250611328565b505050565b7f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a848610e05816116ab565b610e18600083610e1361171b565b611723565b50817f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac760405160405180910390a25050565b6000610e54610a8e565b8210610e9a576000826040517fa57d13dc000000000000000000000000000000000000000000000000000000008152600401610e91929190614ee7565b60405180910390fd5b60088281548110610eae57610ead614f10565b5b90600052602060002001549050919050565b6000600b60009054906101000a900460ff16905090565b6000610ee2826115d0565b9050919050565b6000801b610ef6816116ab565b610eff8261185d565b5050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610f765760006040517f89c62b64000000000000000000000000000000000000000000000000000000008152600401610f6d91906141a7565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000801b610fca816116ab565b610fd26118ed565b50565b600060608060008060006060610fe9611950565b610ff161198b565b46306000801b600067ffffffffffffffff8111156110125761101161429b565b5b6040519080825280602002602001820160405280156110405781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b600061108c8484846119c6565b905060008460000160208101906110a3919061460e565b90506110b28560400135611c1f565b6000601060008154809291906110c790614f3f565b9190505590506110d78282611d58565b611133818780602001906110eb9190614f96565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506116bf565b808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f6763e49528a38ac19ed4f080536419222e58bc7ed3160b24559d7e2856557a4a8960405161119191906151c7565b60405180910390a4505050505050565b60006111c882600d6000868152602001908152602001600020611d7690919063ffffffff16565b905092915050565b6000600c600084815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60606001805461124a90614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461127690614b3a565b80156112c35780601f10611298576101008083540402835291602001916112c3565b820191906000526020600020905b8154815290600101906020018083116112a657829003601f168201915b5050505050905090565b6000801b81565b601460009054906101000a900460ff1661131a576040517f687d0d1b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113248282611d90565b5050565b611333848484610a9b565b61133f84848484611da6565b50505050565b606061135082611f5d565b9050919050565b6000611374600d6000848152602001908152602001600020612070565b9050919050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a66113a5816116ab565b6113ae82612085565b6000601060008154809291906113c390614f3f565b9190505590506113d38582611d58565b6113dd81856116bf565b808573ffffffffffffffffffffffffffffffffffffffff167f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360405160405180910390a35050505050565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b61145582610b9d565b61145e816116ab565b611468838361210c565b6000801b83148015611486575060006114836000801b611357565b11155b156114bd576040517fc0b3105e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f5a05180f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806115c957506115c88261212e565b5b9050919050565b6000806115dc836121a8565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361164f57826040517f7e2732890000000000000000000000000000000000000000000000000000000081526004016116469190614431565b60405180910390fd5b80915050919050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6116a782826116a261171b565b6121e5565b5050565b6116bc816116b761171b565b6121f7565b50565b80600a600084815260200190815260200160002090816116df9190614d4e565b507ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78260405161170f9190614431565b60405180910390a15050565b600033905090565b6000611730848484612248565b90509392505050565b6000806117468484612266565b905080156117755761177383600d600087815260200190815260200160002061235890919063ffffffff16565b505b8091505092915050565b61178761171b565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146117eb576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117f58282612388565b505050565b6118026123ce565b6000600b60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61184661171b565b60405161185391906141a7565b60405180910390a1565b6118668161240e565b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f299d17e95023f496e0ffc4909cff1a61f74bb5eb18de6f900f4155bfa1b3b33360405160405180910390a250565b6118f56124b9565b6001600b60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861193961171b565b60405161194691906141a7565b60405180910390a1565b6060611986600e7f62797468656e20506f640000000000000000000000000000000000000000000a6124fa90919063ffffffff16565b905090565b60606119c1600f7f312e302e300000000000000000000000000000000000000000000000000000056124fa90919063ffffffff16565b905090565b6000808480602001906119d99190614f96565b905003611a1b576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611a1290615235565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16846000016020810190611a46919061460e565b73ffffffffffffffffffffffffffffffffffffffff161480611aa657503373ffffffffffffffffffffffffffffffffffffffff16846000016020810190611a8d919061460e565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611ae6576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611add906152a1565b60405180910390fd5b611b4b611b01611af5866125aa565b80519060200120612645565b84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061265f565b9050611b777f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826111d0565b611bb6576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611bad9061530d565b60405180910390fd5b4284606001351180611bcb5750428460800135105b15611c0b576040517ffade93a5000000000000000000000000000000000000000000000000000000008152600401611c0290615379565b60405180910390fd5b611c188460a00135612085565b9392505050565b60008111611c62576040517fa015a50c000000000000000000000000000000000000000000000000000000008152600401611c59906153e5565b60405180910390fd5b803414611ca4576040517fa015a50c000000000000000000000000000000000000000000000000000000008152600401611c9b90615477565b60405180910390fd5b6000611cae6109bb565b905060008173ffffffffffffffffffffffffffffffffffffffff1683604051611cd6906154c8565b60006040518083038185875af1925050503d8060008114611d13576040519150601f19603f3d011682016040523d82523d6000602084013e611d18565b606091505b5050905080611d53576040517f8c5c290800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b611d7282826040518060200160405280600081525061268b565b5050565b6000611d8583600001836126a7565b60001c905092915050565b611da2611d9b61171b565b83836126d2565b5050565b60008373ffffffffffffffffffffffffffffffffffffffff163b1115611f57578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02611dea61171b565b8685856040518563ffffffff1660e01b8152600401611e0c9493929190615532565b6020604051808303816000875af1925050508015611e4857506040513d601f19601f82011682018060405250810190611e459190615593565b60015b611ecc573d8060008114611e78576040519150601f19603f3d011682016040523d82523d6000602084013e611e7d565b606091505b506000815103611ec457836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611ebb91906141a7565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611f5557836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401611f4c91906141a7565b60405180910390fd5b505b50505050565b6060611f68826115d0565b506000600a60008481526020019081526020016000208054611f8990614b3a565b80601f0160208091040260200160405190810160405280929190818152602001828054611fb590614b3a565b80156120025780601f10611fd757610100808354040283529160200191612002565b820191906000526020600020905b815481529060010190602001808311611fe557829003601f168201915b505050505090506000612013612841565b9050600081510361202857819250505061206b565b60008251111561205d5780826040516020016120459291906155fc565b6040516020818303038152906040529250505061206b565b612066846128d3565b925050505b919050565b600061207e8260000161293c565b9050919050565b6013600082815260200190815260200160002060009054906101000a900460ff16156120dd576040517feced38d100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016013600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b61211582610b9d565b61211e816116ab565b6121288383612388565b50505050565b60007f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121a157506121a08261294d565b5b9050919050565b60006002600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6121f283838360016129ae565b505050565b61220182826111d0565b6122445780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161223b929190615620565b60405180910390fd5b5050565b60006122526124b9565b61225d848484612b73565b90509392505050565b600061227283836111d0565b61234d576001600c600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506122ea61171b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050612352565b600090505b92915050565b6000612380836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612c90565b905092915050565b6000806123958484612d00565b905080156123c4576123c283600d6000878152602001908152602001600020612df390919063ffffffff16565b505b8091505092915050565b6123d6610ec0565b61240c576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612474576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000813b905060008111156124b5576040517f44d99fea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6124c1610ec0565b156124f8576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b606060ff60001b83146125175761251083612e23565b90506125a4565b81805461252390614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461254f90614b3a565b801561259c5780601f106125715761010080835404028352916020019161259c565b820191906000526020600020905b81548152906001019060200180831161257f57829003601f168201915b505050505090505b92915050565b60607e4d182f6ec24d9ebf16b2c86dd290d16d110dcbc2315e2e9f68dc1573e2acdf8260000160208101906125df919061460e565b8380602001906125ef9190614f96565b6040516125fd92919061566e565b60405180910390208460400135856060013586608001358760a0013560405160200161262f9796959493929190615687565b6040516020818303038152906040529050919050565b6000612658612652612e97565b83612f4e565b9050919050565b60008060008061266f8686612f8f565b92509250925061267f8282612feb565b82935050505092915050565b612695838361314f565b6126a26000848484611da6565b505050565b60008260000182815481106126bf576126be614f10565b5b9060005260206000200154905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361274357816040517f5b08ba1800000000000000000000000000000000000000000000000000000000815260040161273a91906141a7565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516128349190614099565b60405180910390a3505050565b60606012805461285090614b3a565b80601f016020809104026020016040519081016040528092919081815260200182805461287c90614b3a565b80156128c95780601f1061289e576101008083540402835291602001916128c9565b820191906000526020600020905b8154815290600101906020018083116128ac57829003601f168201915b5050505050905090565b60606128de826115d0565b5060006128e9612841565b905060008151116129095760405180602001604052806000815250612934565b8061291384613248565b6040516020016129249291906155fc565b6040516020818303038152906040525b915050919050565b600081600001805490509050919050565b6000634906490660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806129a757506129a682613316565b5b9050919050565b80806129e75750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612b1b5760006129f7846115d0565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612a6257508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015612a755750612a7381846114c2565b155b15612ab757826040517fa9fbf51f000000000000000000000000000000000000000000000000000000008152600401612aae91906141a7565b60405180910390fd5b8115612b1957838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836004600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600080612b81858585613390565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612bc557612bc0846135aa565b612c04565b8473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c0357612c0281856135f3565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603612c4657612c4184613754565b612c85565b8473ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c8457612c838585613825565b5b5b809150509392505050565b6000612c9c83836138b0565b612cf5578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050612cfa565b600090505b92915050565b6000612d0c83836111d0565b15612de8576000600c600085815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612d8561171b565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050612ded565b600090505b92915050565b6000612e1b836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6138d3565b905092915050565b60606000612e30836139e7565b90506000602067ffffffffffffffff811115612e4f57612e4e61429b565b5b6040519080825280601f01601f191660200182016040528015612e815781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b60007f000000000000000000000000b8687a5bbb85c89c41162d09e41a57dbf56aa4af73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff16148015612f1357507f000000000000000000000000000000000000000000000000000000000000000146145b15612f40577f8163c9c4a832ba793278148fdd5b470445ba0b87b3d270c870e9027b37801de99050612f4b565b612f48613a37565b90505b90565b60006040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b60008060006041845103612fd45760008060006020870151925060408701519150606087015160001a9050612fc688828585613acd565b955095509550505050612fe4565b60006002855160001b9250925092505b9250925092565b60006003811115612fff57612ffe6156f6565b5b826003811115613012576130116156f6565b5b031561314b576001600381111561302c5761302b6156f6565b5b82600381111561303f5761303e6156f6565b5b03613076576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600381111561308a576130896156f6565b5b82600381111561309d5761309c6156f6565b5b036130e2578060001c6040517ffce698f70000000000000000000000000000000000000000000000000000000081526004016130d99190614431565b60405180910390fd5b6003808111156130f5576130f46156f6565b5b826003811115613108576131076156f6565b5b0361314a57806040517fd78bce0c0000000000000000000000000000000000000000000000000000000081526004016131419190614511565b60405180910390fd5b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036131c15760006040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016131b891906141a7565b60405180910390fd5b60006131cf83836000611723565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146132435760006040517f73c6ac6e00000000000000000000000000000000000000000000000000000000815260040161323a91906141a7565b60405180910390fd5b505050565b60606000600161325784613bc1565b01905060008167ffffffffffffffff8111156132765761327561429b565b5b6040519080825280601f01601f1916602001820160405280156132a85781602001600182028036833780820191505090505b509050600082602001820190505b60011561330b578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85816132ff576132fe615725565b5b049450600085036132b6575b819350505050919050565b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480613389575061338882613d14565b5b9050919050565b60008061339c846121a8565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146133de576133dd818486613df6565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461346f576134206000856000806129ae565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146134f2576001600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846002600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b60006135fe83610f03565b90506000600760008481526020019081526020016000205490508181146136e3576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506137689190614e4f565b905060006009600084815260200190815260200160002054905060006008838154811061379857613797614f10565b5b9060005260206000200154905080600883815481106137ba576137b9614f10565b5b90600052602060002001819055508160096000838152602001908152602001600020819055506009600085815260200190815260200160002060009055600880548061380957613808615754565b5b6001900381819060005260206000200160009055905550505050565b6000600161383284610f03565b61383c9190614e4f565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600080836001016000848152602001908152602001600020541415905092915050565b600080836001016000848152602001908152602001600020549050600081146139db5760006001826139059190614e4f565b905060006001866000018054905061391d9190614e4f565b905080821461398c57600086600001828154811061393e5761393d614f10565b5b906000526020600020015490508087600001848154811061396257613961614f10565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b856000018054806139a05761399f615754565b5b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506139e1565b60009150505b92915050565b60008060ff8360001c169050601f811115613a2e576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f49b1e224a2a8745043c07b56ddb4522db7227dd73a8889ae811456ffb0c422417f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c4630604051602001613ab2959493929190615783565b60405160208183030381529060405280519060200120905090565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c1115613b0d576000600385925092509250613bb7565b600060018888888860405160008152602001604052604051613b3294939291906157f2565b6020604051602081039080840390855afa158015613b54573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603613ba857600060016000801b93509350935050613bb7565b8060008060001b935093509350505b9450945094915050565b600080600090507a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613c1f577a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008381613c1557613c14615725565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310613c5c576d04ee2d6d415b85acef81000000008381613c5257613c51615725565b5b0492506020810190505b662386f26fc100008310613c8b57662386f26fc100008381613c8157613c80615725565b5b0492506010810190505b6305f5e1008310613cb4576305f5e1008381613caa57613ca9615725565b5b0492506008810190505b6127108310613cd9576127108381613ccf57613cce615725565b5b0492506004810190505b60648310613cfc5760648381613cf257613cf1615725565b5b0492506002810190505b600a8310613d0b576001810190505b80915050919050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480613ddf57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80613def5750613dee82613eba565b5b9050919050565b613e01838383613f24565b613eb557600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613e7657806040517f7e273289000000000000000000000000000000000000000000000000000000008152600401613e6d9190614431565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401613eac929190614ee7565b60405180910390fd5b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015613fdc57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480613f9d5750613f9c84846114c2565b5b80613fdb57508273ffffffffffffffffffffffffffffffffffffffff16613fc383611658565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61402e81613ff9565b811461403957600080fd5b50565b60008135905061404b81614025565b92915050565b60006020828403121561406757614066613fef565b5b60006140758482850161403c565b91505092915050565b60008115159050919050565b6140938161407e565b82525050565b60006020820190506140ae600083018461408a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156140ee5780820151818401526020810190506140d3565b60008484015250505050565b6000601f19601f8301169050919050565b6000614116826140b4565b61412081856140bf565b93506141308185602086016140d0565b614139816140fa565b840191505092915050565b6000602082019050818103600083015261415e818461410b565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061419182614166565b9050919050565b6141a181614186565b82525050565b60006020820190506141bc6000830184614198565b92915050565b6000819050919050565b6141d5816141c2565b81146141e057600080fd5b50565b6000813590506141f2816141cc565b92915050565b60006020828403121561420e5761420d613fef565b5b600061421c848285016141e3565b91505092915050565b61422e81614186565b811461423957600080fd5b50565b60008135905061424b81614225565b92915050565b6000806040838503121561426857614267613fef565b5b60006142768582860161423c565b9250506020614287858286016141e3565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6142d3826140fa565b810181811067ffffffffffffffff821117156142f2576142f161429b565b5b80604052505050565b6000614305613fe5565b905061431182826142ca565b919050565b600067ffffffffffffffff8211156143315761433061429b565b5b61433a826140fa565b9050602081019050919050565b82818337600083830152505050565b600061436961436484614316565b6142fb565b90508281526020810184848401111561438557614384614296565b5b614390848285614347565b509392505050565b600082601f8301126143ad576143ac614291565b5b81356143bd848260208601614356565b91505092915050565b600080604083850312156143dd576143dc613fef565b5b60006143eb858286016141e3565b925050602083013567ffffffffffffffff81111561440c5761440b613ff4565b5b61441885828601614398565b9150509250929050565b61442b816141c2565b82525050565b60006020820190506144466000830184614422565b92915050565b60008060006060848603121561446557614464613fef565b5b60006144738682870161423c565b93505060206144848682870161423c565b9250506040614495868287016141e3565b9150509250925092565b6000819050919050565b6144b28161449f565b81146144bd57600080fd5b50565b6000813590506144cf816144a9565b92915050565b6000602082840312156144eb576144ea613fef565b5b60006144f9848285016144c0565b91505092915050565b61450b8161449f565b82525050565b60006020820190506145266000830184614502565b92915050565b60006020828403121561454257614541613fef565b5b600082013567ffffffffffffffff8111156145605761455f613ff4565b5b61456c84828501614398565b91505092915050565b6000806040838503121561458c5761458b613fef565b5b600061459a858286016144c0565b92505060206145ab8582860161423c565b9150509250929050565b6145be8161407e565b81146145c957600080fd5b50565b6000813590506145db816145b5565b92915050565b6000602082840312156145f7576145f6613fef565b5b6000614605848285016145cc565b91505092915050565b60006020828403121561462457614623613fef565b5b60006146328482850161423c565b91505092915050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6146708161463b565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6146ab816141c2565b82525050565b60006146bd83836146a2565b60208301905092915050565b6000602082019050919050565b60006146e182614676565b6146eb8185614681565b93506146f683614692565b8060005b8381101561472757815161470e88826146b1565b9750614719836146c9565b9250506001810190506146fa565b5085935050505092915050565b600060e082019050614749600083018a614667565b818103602083015261475b818961410b565b9050818103604083015261476f818861410b565b905061477e6060830187614422565b61478b6080830186614198565b61479860a0830185614502565b81810360c08301526147aa81846146d6565b905098975050505050505050565b600080fd5b600060c082840312156147d3576147d26147b8565b5b81905092915050565b600080fd5b600080fd5b60008083601f8401126147fc576147fb614291565b5b8235905067ffffffffffffffff811115614819576148186147dc565b5b602083019150836001820283011115614835576148346147e1565b5b9250929050565b60008060006040848603121561485557614854613fef565b5b600084013567ffffffffffffffff81111561487357614872613ff4565b5b61487f868287016147bd565b935050602084013567ffffffffffffffff8111156148a05761489f613ff4565b5b6148ac868287016147e6565b92509250509250925092565b600080604083850312156148cf576148ce613fef565b5b60006148dd858286016144c0565b92505060206148ee858286016141e3565b9150509250929050565b6000806040838503121561490f5761490e613fef565b5b600061491d8582860161423c565b925050602061492e858286016145cc565b9150509250929050565b600067ffffffffffffffff8211156149535761495261429b565b5b61495c826140fa565b9050602081019050919050565b600061497c61497784614938565b6142fb565b90508281526020810184848401111561499857614997614296565b5b6149a3848285614347565b509392505050565b600082601f8301126149c0576149bf614291565b5b81356149d0848260208601614969565b91505092915050565b600080600080608085870312156149f3576149f2613fef565b5b6000614a018782880161423c565b9450506020614a128782880161423c565b9350506040614a23878288016141e3565b925050606085013567ffffffffffffffff811115614a4457614a43613ff4565b5b614a50878288016149ab565b91505092959194509250565b600080600060608486031215614a7557614a74613fef565b5b6000614a838682870161423c565b935050602084013567ffffffffffffffff811115614aa457614aa3613ff4565b5b614ab086828701614398565b9250506040614ac1868287016144c0565b9150509250925092565b60008060408385031215614ae257614ae1613fef565b5b6000614af08582860161423c565b9250506020614b018582860161423c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680614b5257607f821691505b602082108103614b6557614b64614b0b565b5b50919050565b6000606082019050614b806000830186614198565b614b8d6020830185614422565b614b9a6040830184614198565b949350505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614c047fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614bc7565b614c0e8683614bc7565b95508019841693508086168417925050509392505050565b6000819050919050565b6000614c4b614c46614c41846141c2565b614c26565b6141c2565b9050919050565b6000819050919050565b614c6583614c30565b614c79614c7182614c52565b848454614bd4565b825550505050565b600090565b614c8e614c81565b614c99818484614c5c565b505050565b5b81811015614cbd57614cb2600082614c86565b600181019050614c9f565b5050565b601f821115614d0257614cd381614ba2565b614cdc84614bb7565b81016020851015614ceb578190505b614cff614cf785614bb7565b830182614c9e565b50505b505050565b600082821c905092915050565b6000614d2560001984600802614d07565b1980831691505092915050565b6000614d3e8383614d14565b9150826002028217905092915050565b614d57826140b4565b67ffffffffffffffff811115614d7057614d6f61429b565b5b614d7a8254614b3a565b614d85828285614cc1565b600060209050601f831160018114614db85760008415614da6578287015190505b614db08582614d32565b865550614e18565b601f198416614dc686614ba2565b60005b82811015614dee57848901518255600182019150602085019450602081019050614dc9565b86831015614e0b5784890151614e07601f891682614d14565b8355505b6001600288020188555050505b505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614e5a826141c2565b9150614e65836141c2565b9250828203905081811115614e7d57614e7c614e20565b5b92915050565b6000819050919050565b6000614ea8614ea3614e9e84614e83565b614c26565b6141c2565b9050919050565b614eb881614e8d565b82525050565b6000604082019050614ed36000830185614eaf565b614ee06020830184614422565b9392505050565b6000604082019050614efc6000830185614198565b614f096020830184614422565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000614f4a826141c2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614f7c57614f7b614e20565b5b600182019050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112614fb357614fb2614f87565b5b80840192508235915067ffffffffffffffff821115614fd557614fd4614f8c565b5b602083019250600182023603831315614ff157614ff0614f91565b5b509250929050565b6000615008602084018461423c565b905092915050565b61501981614186565b82525050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261504b5761504a615029565b5b83810192508235915060208301925067ffffffffffffffff8211156150735761507261501f565b5b60018202360383131561508957615088615024565b5b509250929050565b600082825260208201905092915050565b60006150ae8385615091565b93506150bb838584614347565b6150c4836140fa565b840190509392505050565b60006150de60208401846141e3565b905092915050565b60006150f560208401846144c0565b905092915050565b6151068161449f565b82525050565b600060c0830161511f6000840184614ff9565b61512c6000860182615010565b5061513a602084018461502e565b858303602087015261514d8382846150a2565b9250505061515e60408401846150cf565b61516b60408601826146a2565b5061517960608401846150cf565b61518660608601826146a2565b5061519460808401846150cf565b6151a160808601826146a2565b506151af60a08401846150e6565b6151bc60a08601826150fd565b508091505092915050565b600060208201905081810360008301526151e1818461510c565b905092915050565b7f496e76616c696420757269000000000000000000000000000000000000000000600082015250565b600061521f600b836140bf565b915061522a826151e9565b602082019050919050565b6000602082019050818103600083015261524e81615212565b9050919050565b7f496e76616c696420726563697069656e74000000000000000000000000000000600082015250565b600061528b6011836140bf565b915061529682615255565b602082019050919050565b600060208201905081810360008301526152ba8161527e565b9050919050565b7f496e76616c6964207369676e6572000000000000000000000000000000000000600082015250565b60006152f7600e836140bf565b9150615302826152c1565b602082019050919050565b60006020820190508181036000830152615326816152ea565b9050919050565b7f496e76616c69642074696d650000000000000000000000000000000000000000600082015250565b6000615363600c836140bf565b915061536e8261532d565b602082019050919050565b6000602082019050818103600083015261539281615356565b9050919050565b7f496e76616c696420707269636500000000000000000000000000000000000000600082015250565b60006153cf600d836140bf565b91506153da82615399565b602082019050919050565b600060208201905081810360008301526153fe816153c2565b9050919050565b7f6d73672076616c7565206e6f74206d61746368207769746820746f74616c207060008201527f7269636500000000000000000000000000000000000000000000000000000000602082015250565b60006154616024836140bf565b915061546c82615405565b604082019050919050565b6000602082019050818103600083015261549081615454565b9050919050565b600081905092915050565b50565b60006154b2600083615497565b91506154bd826154a2565b600082019050919050565b60006154d3826154a5565b9150819050919050565b600081519050919050565b600082825260208201905092915050565b6000615504826154dd565b61550e81856154e8565b935061551e8185602086016140d0565b615527816140fa565b840191505092915050565b60006080820190506155476000830187614198565b6155546020830186614198565b6155616040830185614422565b818103606083015261557381846154f9565b905095945050505050565b60008151905061558d81614025565b92915050565b6000602082840312156155a9576155a8613fef565b5b60006155b78482850161557e565b91505092915050565b600081905092915050565b60006155d6826140b4565b6155e081856155c0565b93506155f08185602086016140d0565b80840191505092915050565b600061560882856155cb565b915061561482846155cb565b91508190509392505050565b60006040820190506156356000830185614198565b6156426020830184614502565b9392505050565b60006156558385615497565b9350615662838584614347565b82840190509392505050565b600061567b828486615649565b91508190509392505050565b600060e08201905061569c600083018a614502565b6156a96020830189614198565b6156b66040830188614502565b6156c36060830187614422565b6156d06080830186614422565b6156dd60a0830185614422565b6156ea60c0830184614502565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600060a0820190506157986000830188614502565b6157a56020830187614502565b6157b26040830186614502565b6157bf6060830185614422565b6157cc6080830184614198565b9695505050505050565b600060ff82169050919050565b6157ec816157d6565b82525050565b60006080820190506158076000830187614502565b61581460208301866157e3565b6158216040830185614502565b61582e6060830184614502565b9594505050505056fea2646970667358221220e7fa94ce1777cfcecff3d790131cc28a7e94e2ad1cd160d8aa6afa7866ea75ef64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000d46d5d0f4e39da031a0ca6137d2a528aab32db860000000000000000000000004ebbf1ea0b218ac7fc28ee2b9c057994e341db880000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000a62797468656e20506f6400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942595448454e504f4400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d56575174414758756e46595a744432616d697053363767574d4c344c734159675579636e7836644b4b765a4e2f00000000000000000000
-----Decoded View---------------
Arg [0] : name (string): bythen Pod
Arg [1] : symbol (string): BYTHENPOD
Arg [2] : admin (address): 0xd46d5d0f4E39dA031a0cA6137D2A528aAB32dB86
Arg [3] : primarySaleRecipient_ (address): 0x4eBbf1EA0b218aC7Fc28EE2B9C057994E341DB88
Arg [4] : collectionURI_ (string): ipfs://QmVWQtAGXunFYZtD2amipS67gWML4LsAYgUycnx6dKKvZN/
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 000000000000000000000000d46d5d0f4e39da031a0ca6137d2a528aab32db86
Arg [3] : 0000000000000000000000004ebbf1ea0b218ac7fc28ee2b9c057994e341db88
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [6] : 62797468656e20506f6400000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [8] : 42595448454e504f440000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [10] : 697066733a2f2f516d56575174414758756e46595a744432616d697053363767
Arg [11] : 574d4c344c734159675579636e7836644b4b765a4e2f00000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.