Token
Overview ERC-1155
Total Supply:
0 N/A
Holders:
2 addresses
Transfers:
-
Profile Summary
Contract:
[ Download CSV Export ]
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xc2415761Ef332A60650c3bdb805a7649f26a5522
Contract Name:
Rooms
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155URIStorage.sol) pragma solidity ^0.8.0; import "../../../utils/Strings.sol"; import "../ERC1155.sol"; /** * @dev ERC1155 token with storage based token URI management. * Inspired by the ERC721URIStorage extension * * _Available since v4.6._ */ abstract contract ERC1155URIStorage is ERC1155 { using Strings for uint256; // Optional base URI string private _baseURI = ""; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the concatenation of the `_baseURI` * and the token-specific uri if the latter is set * * This enables the following behaviors: * * - if `_tokenURIs[tokenId]` is set, then the result is the concatenation * of `_baseURI` and `_tokenURIs[tokenId]` (keep in mind that `_baseURI` * is empty per default); * * - if `_tokenURIs[tokenId]` is NOT set then we fallback to `super.uri()` * which in most cases will contain `ERC1155._uri`; * * - if `_tokenURIs[tokenId]` is NOT set, and if the parents do not have a * uri value set, then the result is empty. */ function uri(uint256 tokenId) public view virtual override returns (string memory) { string memory tokenURI = _tokenURIs[tokenId]; // If token URI is set, concatenate base URI and tokenURI (via abi.encodePacked). return bytes(tokenURI).length > 0 ? string(abi.encodePacked(_baseURI, tokenURI)) : super.uri(tokenId); } /** * @dev Sets `tokenURI` as the tokenURI of `tokenId`. */ function _setURI(uint256 tokenId, string memory tokenURI) internal virtual { _tokenURIs[tokenId] = tokenURI; emit URI(uri(tokenId), tokenId); } /** * @dev Sets `baseURI` as the `_baseURI` for all tokens */ function _setBaseURI(string memory baseURI) internal virtual { _baseURI = baseURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/utils/ERC1155Holder.sol) pragma solidity ^0.8.0; import "./ERC1155Receiver.sol"; /** * Simple implementation of `ERC1155Receiver` that will allow a contract to hold ERC1155 tokens. * * IMPORTANT: When inheriting this contract, you must include a way to use the received tokens, otherwise they will be * stuck. * * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received( address, address, uint256, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] memory, uint256[] memory, bytes memory ) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol) pragma solidity ^0.8.0; import "../IERC1155Receiver.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract Rooms is ERC1155URIStorage, ERC1155Holder { using Counters for Counters.Counter; Counters.Counter private tokenIds; uint CreatorzToken; uint VideoListingPrice; address Owner; struct Video { uint id; address owner; string URI; bool isListed; bool isPublished; uint Price; uint RoomId; } struct Room { uint id; address owner; string URI; bool isListed; uint[] videos; uint Price; } mapping(uint => Video) public videos; mapping(uint => Room) public rooms; event VideoMinted(uint id, address owner, string URI); event VideoListed(uint id, address owner, uint price); event VideoSold(uint id, address owner, address buyer, uint price); event VideoPublished(uint id, address owner, uint RoomId); event VideoUnlisted(uint id, address owner); event RoomMinted(uint id, address owner, string URI); event RoomListed(uint id, address owner, uint price); event RoomSold(uint id, address owner, address buyer, uint price); event RoomUnlisted(uint id, address owner); constructor() ERC1155("") { CreatorzToken = tokenIds.current(); VideoListingPrice = 0.00001 ether; Owner = msg.sender; } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC1155, ERC1155Receiver) returns (bool) { return super.supportsInterface(interfaceId); } function mintVideo(string memory _URI) external { tokenIds.increment(); uint256 _id = tokenIds.current(); _mint(msg.sender, _id, 1, ""); _setURI(_id, _URI); videos[_id] = Video(_id, msg.sender, _URI, false, false, 0, 0); emit VideoMinted(_id, msg.sender, _URI); } function listVideo(uint _id, uint _price) external payable { require( videos[_id].owner == msg.sender, "You are not the owner of this video" ); require(videos[_id].isListed == false, "Video is already listed"); require( balanceOf(msg.sender, CreatorzToken) >= VideoListingPrice, "You don't have enough Creatorz Tokens to list this video" ); _safeTransferFrom( msg.sender, address(this), CreatorzToken, VideoListingPrice, "" ); _safeTransferFrom(msg.sender, address(this), _id, 1, ""); videos[_id].isListed = true; videos[_id].Price = _price; emit VideoListed(_id, msg.sender, _price); } function buyVideo(uint _id) external payable { require(videos[_id].isListed == true, "Video is not listed"); require( videos[_id].Price == msg.value, "You are not paying the correct price" ); _safeTransferFrom(address(this), msg.sender, _id, 1, ""); _safeTransferFrom( msg.sender, videos[_id].owner, CreatorzToken, videos[_id].Price, "" ); videos[_id].isListed = false; videos[_id].isPublished = true; videos[_id].owner = msg.sender; emit VideoSold(_id, videos[_id].owner, msg.sender, videos[_id].Price); } function publishVideo(uint _id, uint _RoomId) external { require( videos[_id].owner == msg.sender, "You are not the owner of this video" ); require(videos[_id].isPublished == false, "Video is already published"); require( rooms[_RoomId].owner == msg.sender, "You are not the owner of this room" ); rooms[_RoomId].videos.push(_id); videos[_id].isPublished = true; videos[_id].RoomId = _RoomId; emit VideoPublished(_id, msg.sender, _RoomId); } function getCreatorzTokens(uint _amount) public { _mint(msg.sender, CreatorzToken, _amount, ""); } function mintRoom(string memory URI) public { tokenIds.increment(); uint256 _id = tokenIds.current(); _mint(msg.sender, _id, 1, ""); _setURI(_id, URI); rooms[_id] = Room(_id, msg.sender, URI, false, new uint[](0), 0); emit RoomMinted(_id, msg.sender, URI); } function listRoom(uint _id, uint _price) public payable { require( rooms[_id].owner == msg.sender, "You are not the owner of this room" ); require(rooms[_id].isListed == false, "Room is already listed"); _safeTransferFrom(msg.sender, address(this), _id, 1, ""); rooms[_id].isListed = true; rooms[_id].Price = _price; for (uint i = 0; i < rooms[_id].videos.length; i++) { videos[rooms[_id].videos[i]].isListed = true; videos[rooms[_id].videos[i]].Price = _price; _safeTransferFrom( msg.sender, address(this), rooms[_id].videos[i], 1, "" ); } emit RoomListed(_id, msg.sender, _price); } function buyRoom(uint _id) public payable { require(rooms[_id].isListed == true, "Room is not listed"); _safeTransferFrom(address(this), msg.sender, _id, 1, ""); _safeTransferFrom( msg.sender, rooms[_id].owner, CreatorzToken, rooms[_id].Price, "" ); rooms[_id].isListed = false; rooms[_id].owner = msg.sender; for (uint i = 0; i < rooms[_id].videos.length; i++) { videos[rooms[_id].videos[i]].owner = msg.sender; _safeTransferFrom( address(this), msg.sender, rooms[_id].videos[i], 1, "" ); } emit RoomSold(_id, rooms[_id].owner, msg.sender, rooms[_id].Price); } function unListRoom(uint _id) public { require( rooms[_id].owner == msg.sender, "You are not the owner of this room" ); require(rooms[_id].isListed == true, "Room is not listed"); _safeTransferFrom(address(this), msg.sender, _id, 1, ""); rooms[_id].isListed = false; emit RoomUnlisted(_id, msg.sender); } function unListVideo(uint _id) public { require( videos[_id].owner == msg.sender, "You are not the owner of this video" ); require(videos[_id].isListed == true, "Video is not listed"); _safeTransferFrom(address(this), msg.sender, _id, 1, ""); videos[_id].isListed = false; emit VideoUnlisted(_id, msg.sender); } function getRoomByID(uint _id) public view returns (Room memory) { return rooms[_id]; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"RoomListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"URI","type":"string"}],"name":"RoomMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"RoomSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"RoomUnlisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"VideoListed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"URI","type":"string"}],"name":"VideoMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"RoomId","type":"uint256"}],"name":"VideoPublished","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"VideoSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"VideoUnlisted","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"buyRoom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"buyVideo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getCreatorzTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getRoomByID","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"URI","type":"string"},{"internalType":"bool","name":"isListed","type":"bool"},{"internalType":"uint256[]","name":"videos","type":"uint256[]"},{"internalType":"uint256","name":"Price","type":"uint256"}],"internalType":"struct Rooms.Room","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"listRoom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"listVideo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"mintRoom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"mintVideo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_RoomId","type":"uint256"}],"name":"publishVideo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rooms","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"URI","type":"string"},{"internalType":"bool","name":"isListed","type":"bool"},{"internalType":"uint256","name":"Price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unListRoom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unListVideo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"videos","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"URI","type":"string"},{"internalType":"bool","name":"isListed","type":"bool"},{"internalType":"bool","name":"isPublished","type":"bool"},{"internalType":"uint256","name":"Price","type":"uint256"},{"internalType":"uint256","name":"RoomId","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052604051806020016040528060008152506003908162000024919062000363565b503480156200003257600080fd5b50604051806020016040528060008152506200005481620000c660201b60201c565b506200006c6005620000db60201b620021e21760201c565b6006819055506509184e72a00060078190555033600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200044a565b8060029081620000d7919062000363565b5050565b600081600001549050919050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200016b57607f821691505b60208210810362000181576200018062000123565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620001eb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620001ac565b620001f78683620001ac565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620002446200023e62000238846200020f565b62000219565b6200020f565b9050919050565b6000819050919050565b620002608362000223565b620002786200026f826200024b565b848454620001b9565b825550505050565b600090565b6200028f62000280565b6200029c81848462000255565b505050565b5b81811015620002c457620002b860008262000285565b600181019050620002a2565b5050565b601f8211156200031357620002dd8162000187565b620002e8846200019c565b81016020851015620002f8578190505b6200031062000307856200019c565b830182620002a1565b50505b505050565b600082821c905092915050565b6000620003386000198460080262000318565b1980831691505092915050565b600062000353838362000325565b9150826002028217905092915050565b6200036e82620000e9565b67ffffffffffffffff8111156200038a5762000389620000f4565b5b62000396825462000152565b620003a3828285620002c8565b600060209050601f831160018114620003db5760008415620003c6578287015190505b620003d2858262000345565b86555062000442565b601f198416620003eb8662000187565b60005b828110156200041557848901518255600182019150602085019450602081019050620003ee565b8683101562000435578489015162000431601f89168262000325565b8355505b6001600288020188555050505b505050505050565b61518e806200045a6000396000f3fe60806040526004361061013f5760003560e01c8063918a13ab116100b6578063de13f02e1161006f578063de13f02e14610466578063e6821bf51461048f578063e985e9c5146104d2578063ed8f9cf91461050f578063f23a6e611461052b578063f242432a146105685761013f565b8063918a13ab1461035c5780639eb95f6614610385578063a22cb465146103ae578063b29accf6146103d7578063bc197c8114610400578063da93bf5e1461043d5761013f565b80632eb2c2d6116101085780632eb2c2d6146102795780633a2b1021146102a25780634e1273f4146102be578063720e84da146102fb5780637425f61f146103245780638452755c146103405761013f565b8062fdd58e1461014457806301ffc9a714610181578063045d54db146101be5780630e89341c146101fb5780631bae0ac814610238575b600080fd5b34801561015057600080fd5b5061016b60048036038101906101669190613360565b610591565b60405161017891906133af565b60405180910390f35b34801561018d57600080fd5b506101a860048036038101906101a39190613422565b610659565b6040516101b5919061346a565b60405180910390f35b3480156101ca57600080fd5b506101e560048036038101906101e09190613485565b61066b565b6040516101f291906136ae565b60405180910390f35b34801561020757600080fd5b50610222600480360381019061021d9190613485565b610807565b60405161022f919061371a565b60405180910390f35b34801561024457600080fd5b5061025f600480360381019061025a9190613485565b6108ec565b60405161027095949392919061374b565b60405180910390f35b34801561028557600080fd5b506102a0600480360381019061029b91906139a2565b6109d7565b005b6102bc60048036038101906102b79190613485565b610a78565b005b3480156102ca57600080fd5b506102e560048036038101906102e09190613b34565b610d00565b6040516102f29190613c1b565b60405180910390f35b34801561030757600080fd5b50610322600480360381019061031d9190613c3d565b610e19565b005b61033e60048036038101906103399190613c3d565b611091565b005b61035a60048036038101906103559190613c3d565b61137a565b005b34801561036857600080fd5b50610383600480360381019061037e9190613485565b61159e565b005b34801561039157600080fd5b506103ac60048036038101906103a79190613485565b6115be565b005b3480156103ba57600080fd5b506103d560048036038101906103d09190613ca9565b611754565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613d8a565b61176a565b005b34801561040c57600080fd5b50610427600480360381019061042291906139a2565b611909565b6040516104349190613de2565b60405180910390f35b34801561044957600080fd5b50610464600480360381019061045f9190613d8a565b61191e565b005b34801561047257600080fd5b5061048d60048036038101906104889190613485565b611aef565b005b34801561049b57600080fd5b506104b660048036038101906104b19190613485565b611c85565b6040516104c99796959493929190613dfd565b60405180910390f35b3480156104de57600080fd5b506104f960048036038101906104f49190613e73565b611d89565b604051610506919061346a565b60405180910390f35b61052960048036038101906105249190613485565b611e1d565b005b34801561053757600080fd5b50610552600480360381019061054d9190613eb3565b61212c565b60405161055f9190613de2565b60405180910390f35b34801561057457600080fd5b5061058f600480360381019061058a9190613eb3565b612141565b005b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f890613fbc565b60405180910390fd5b60008083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000610664826121f0565b9050919050565b610673613200565b600a60008381526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820180546107019061400b565b80601f016020809104026020016040519081016040528092919081815260200182805461072d9061400b565b801561077a5780601f1061074f5761010080835404028352916020019161077a565b820191906000526020600020905b81548152906001019060200180831161075d57829003601f168201915b505050505081526020016003820160009054906101000a900460ff16151515158152602001600482018054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b8154815260200190600101908083116107d9575b505050505081526020016005820154815250509050919050565b606060006004600084815260200190815260200160002080546108299061400b565b80601f01602080910402602001604051908101604052809291908181526020018280546108559061400b565b80156108a25780601f10610877576101008083540402835291602001916108a2565b820191906000526020600020905b81548152906001019060200180831161088557829003601f168201915b5050505050905060008151116108c0576108bb8361226a565b6108e4565b6003816040516020016108d4929190614110565b6040516020818303038152906040525b915050919050565b600a6020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169080600201805461093b9061400b565b80601f01602080910402602001604051908101604052809291908181526020018280546109679061400b565b80156109b45780601f10610989576101008083540402835291602001916109b4565b820191906000526020600020905b81548152906001019060200180831161099757829003601f168201915b5050505050908060030160009054906101000a900460ff16908060050154905085565b6109df6122fe565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610a255750610a2485610a1f6122fe565b611d89565b5b610a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5b906141a6565b60405180910390fd5b610a718585858585612306565b5050505050565b600115156009600083815260200190815260200160002060030160009054906101000a900460ff16151514610ae2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad990614212565b60405180910390fd5b34600960008381526020019081526020016000206004015414610b3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b31906142a4565b60405180910390fd5b610b57303383600160405180602001604052806000815250612627565b610bc1336009600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600654600960008681526020019081526020016000206004015460405180602001604052806000815250612627565b60006009600083815260200190815260200160002060030160006101000a81548160ff02191690831515021790555060016009600083815260200190815260200160002060030160016101000a81548160ff021916908315150217905550336009600083815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5602c6149ceb04db647774e641902cdc3842e1afbe86b9f194c7fb2e6b64be49816009600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16336009600086815260200190815260200160002060040154604051610cf594939291906142c4565b60405180910390a150565b60608151835114610d46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3d9061437b565b60405180910390fd5b6000835167ffffffffffffffff811115610d6357610d626137aa565b5b604051908082528060200260200182016040528015610d915781602001602082028036833780820191505090505b50905060005b8451811015610e0e57610dde858281518110610db657610db561439b565b5b6020026020010151858381518110610dd157610dd061439b565b5b6020026020010151610591565b828281518110610df157610df061439b565b5b60200260200101818152505080610e07906143f9565b9050610d97565b508091505092915050565b3373ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ebd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb4906144b3565b60405180910390fd5b600015156009600084815260200190815260200160002060030160019054906101000a900460ff16151514610f27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1e9061451f565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600a600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc2906145b1565b60405180910390fd5b600a600082815260200190815260200160002060040182908060018154018082558091505060019003906000526020600020016000909190919091505560016009600084815260200190815260200160002060030160016101000a81548160ff0219169083151502179055508060096000848152602001908152602001600020600501819055507f028c0dd21a2afc028b18039bc11cc2cbbcf47de3e1458d8d4073cbd8c029c027823383604051611085939291906145d1565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff16600a600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611135576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112c906145b1565b60405180910390fd5b60001515600a600084815260200190815260200160002060030160009054906101000a900460ff1615151461119f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119690614654565b60405180910390fd5b6111bc333084600160405180602001604052806000815250612627565b6001600a600084815260200190815260200160002060030160006101000a81548160ff02191690831515021790555080600a60008481526020019081526020016000206005018190555060005b600a60008481526020019081526020016000206004018054905081101561133a57600160096000600a600087815260200190815260200160002060040184815481106112585761125761439b565b5b9060005260206000200154815260200190815260200160002060030160006101000a81548160ff0219169083151502179055508160096000600a600087815260200190815260200160002060040184815481106112b8576112b761439b565b5b90600052602060002001548152602001908152602001600020600401819055506113273330600a600087815260200190815260200160002060040184815481106113055761130461439b565b5b9060005260206000200154600160405180602001604052806000815250612627565b8080611332906143f9565b915050611209565b507f389270ea8d6701be731ce43299bd8a4c3efc407e757826b862e59c1ddfa24e6082338360405161136e939291906145d1565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611415906144b3565b60405180910390fd5b600015156009600084815260200190815260200160002060030160009054906101000a900460ff16151514611488576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147f906146c0565b60405180910390fd5b60075461149733600654610591565b10156114d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cf90614752565b60405180910390fd5b6114f8333060065460075460405180602001604052806000815250612627565b611515333084600160405180602001604052806000815250612627565b60016009600084815260200190815260200160002060030160006101000a81548160ff0219169083151502179055508060096000848152602001908152602001600020600401819055507f08c6842f8643bed5c91f6a6b666a4993677025a2318340ea9448ff873ec54d1a823383604051611592939291906145d1565b60405180910390a15050565b6115bb3360065483604051806020016040528060008152506128c2565b50565b3373ffffffffffffffffffffffffffffffffffffffff16600a600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611662576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611659906145b1565b60405180910390fd5b60011515600a600083815260200190815260200160002060030160009054906101000a900460ff161515146116cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c3906147be565b60405180910390fd5b6116e9303383600160405180602001604052806000815250612627565b6000600a600083815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f6b694a5d43cb1a8c907566b2cb1ea9965947c83f2f5bda51eddc50d2cfcf99d481336040516117499291906147de565b60405180910390a150565b61176661175f6122fe565b8383612a72565b5050565b6117746005612bde565b600061178060056121e2565b905061179e33826001604051806020016040528060008152506128c2565b6117a88183612bf4565b6040518060e001604052808281526020013373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600015158152602001600015158152602001600081526020016000815250600960008381526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002019081611872919061499e565b5060608201518160030160006101000a81548160ff02191690831515021790555060808201518160030160016101000a81548160ff02191690831515021790555060a0820151816004015560c082015181600501559050507f345ec4f39edb769b4ebde6e2d87bdb5999b5abd3e670067b142e6bb57004c5918133846040516118fd93929190614a70565b60405180910390a15050565b600063bc197c8160e01b905095945050505050565b6119286005612bde565b600061193460056121e2565b905061195233826001604051806020016040528060008152506128c2565b61195c8183612bf4565b6040518060c001604052808281526020013373ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600015158152602001600067ffffffffffffffff8111156119b3576119b26137aa565b5b6040519080825280602002602001820160405280156119e15781602001602082028036833780820191505090505b5081526020016000815250600a60008381526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002019081611a65919061499e565b5060608201518160030160006101000a81548160ff0219169083151502179055506080820151816004019080519060200190611aa292919061324e565b5060a082015181600501559050507f859894266d1898c4211932aa381baa3e92318cc8d3b52f63edf2796fe8eb77ca813384604051611ae393929190614a70565b60405180910390a15050565b3373ffffffffffffffffffffffffffffffffffffffff166009600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611b93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8a906144b3565b60405180910390fd5b600115156009600083815260200190815260200160002060030160009054906101000a900460ff16151514611bfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf490614212565b60405180910390fd5b611c1a303383600160405180602001604052806000815250612627565b60006009600083815260200190815260200160002060030160006101000a81548160ff0219169083151502179055507f9d32b416bfc65e227bb4be384a7ed4ba0a2d4462a5b4383502887882fb8342488133604051611c7a9291906147de565b60405180910390a150565b60096020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806002018054611cd49061400b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d009061400b565b8015611d4d5780601f10611d2257610100808354040283529160200191611d4d565b820191906000526020600020905b815481529060010190602001808311611d3057829003601f168201915b5050505050908060030160009054906101000a900460ff16908060030160019054906101000a900460ff16908060040154908060050154905087565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60011515600a600083815260200190815260200160002060030160009054906101000a900460ff16151514611e87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e7e906147be565b60405180910390fd5b611ea4303383600160405180602001604052806000815250612627565b611f0e33600a600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600654600a60008681526020019081526020016000206005015460405180602001604052806000815250612627565b6000600a600083815260200190815260200160002060030160006101000a81548160ff02191690831515021790555033600a600083815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060005b600a60008381526020019081526020016000206004018054905081101561209f573360096000600a60008681526020019081526020016000206004018481548110611fe357611fe261439b565b5b9060005260206000200154815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061208c3033600a6000868152602001908152602001600020600401848154811061206a5761206961439b565b5b9060005260206000200154600160405180602001604052806000815250612627565b8080612097906143f9565b915050611f95565b507f05af85f6691ae57b13549b34f67f76f134522f61f8045e48611e2963988b079381600a600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600a60008681526020019081526020016000206005015460405161212194939291906142c4565b60405180910390a150565b600063f23a6e6160e01b905095945050505050565b6121496122fe565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061218f575061218e856121896122fe565b611d89565b5b6121ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c5906141a6565b60405180910390fd5b6121db8585858585612627565b5050505050565b600081600001549050919050565b60007f4e2312e0000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612263575061226282612c59565b5b9050919050565b6060600280546122799061400b565b80601f01602080910402602001604051908101604052809291908181526020018280546122a59061400b565b80156122f25780601f106122c7576101008083540402835291602001916122f2565b820191906000526020600020905b8154815290600101906020018083116122d557829003601f168201915b50505050509050919050565b600033905090565b815183511461234a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161234190614b20565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036123b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b090614bb2565b60405180910390fd5b60006123c36122fe565b90506123d3818787878787612d3b565b60005b84518110156125845760008582815181106123f4576123f361439b565b5b6020026020010151905060008583815181106124135761241261439b565b5b60200260200101519050600080600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156124b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ab90614c44565b60405180910390fd5b81810360008085815260200190815260200160002060008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546125699190614c64565b925050819055505050508061257d906143f9565b90506123d6565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516125fb929190614c98565b60405180910390a4612611818787878787612d43565b61261f818787878787612d4b565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612696576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268d90614bb2565b60405180910390fd5b60006126a06122fe565b905060006126ad85612f22565b905060006126ba85612f22565b90506126ca838989858589612d3b565b600080600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905085811015612761576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161275890614c44565b60405180910390fd5b85810360008089815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508560008089815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128169190614c64565b925050819055508773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051612893929190614ccf565b60405180910390a46128a9848a8a86868a612d43565b6128b7848a8a8a8a8a612f9c565b505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603612931576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161292890614d6a565b60405180910390fd5b600061293b6122fe565b9050600061294885612f22565b9050600061295585612f22565b905061296683600089858589612d3b565b8460008088815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129c59190614c64565b925050819055508673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051612a43929190614ccf565b60405180910390a4612a5a83600089858589612d43565b612a6983600089898989612f9c565b50505050505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612ae0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ad790614dfc565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612bd1919061346a565b60405180910390a3505050565b6001816000016000828254019250508190555050565b80600460008481526020019081526020016000209081612c14919061499e565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b612c4084610807565b604051612c4d919061371a565b60405180910390a25050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612d2457507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612d345750612d3382613173565b5b9050919050565b505050505050565b505050505050565b612d6a8473ffffffffffffffffffffffffffffffffffffffff166131dd565b15612f1a578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401612db0959493929190614e71565b6020604051808303816000875af1925050508015612dec57506040513d601f19601f82011682018060405250810190612de99190614eee565b60015b612e9157612df8614f28565b806308c379a003612e545750612e0c614f4a565b80612e175750612e56565b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e4b919061371a565b60405180910390fd5b505b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e889061504c565b60405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612f18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f0f906150de565b60405180910390fd5b505b505050505050565b60606000600167ffffffffffffffff811115612f4157612f406137aa565b5b604051908082528060200260200182016040528015612f6f5781602001602082028036833780820191505090505b5090508281600081518110612f8757612f8661439b565b5b60200260200101818152505080915050919050565b612fbb8473ffffffffffffffffffffffffffffffffffffffff166131dd565b1561316b578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b81526004016130019594939291906150fe565b6020604051808303816000875af192505050801561303d57506040513d601f19601f8201168201806040525081019061303a9190614eee565b60015b6130e257613049614f28565b806308c379a0036130a5575061305d614f4a565b8061306857506130a7565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161309c919061371a565b60405180910390fd5b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130d99061504c565b60405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613169576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613160906150de565b60405180910390fd5b505b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6040518060c0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016060815260200160001515815260200160608152602001600081525090565b82805482825590600052602060002090810192821561328a579160200282015b8281111561328957825182559160200191906001019061326e565b5b509050613297919061329b565b5090565b5b808211156132b457600081600090555060010161329c565b5090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006132f7826132cc565b9050919050565b613307816132ec565b811461331257600080fd5b50565b600081359050613324816132fe565b92915050565b6000819050919050565b61333d8161332a565b811461334857600080fd5b50565b60008135905061335a81613334565b92915050565b60008060408385031215613377576133766132c2565b5b600061338585828601613315565b92505060206133968582860161334b565b9150509250929050565b6133a98161332a565b82525050565b60006020820190506133c460008301846133a0565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6133ff816133ca565b811461340a57600080fd5b50565b60008135905061341c816133f6565b92915050565b600060208284031215613438576134376132c2565b5b60006134468482850161340d565b91505092915050565b60008115159050919050565b6134648161344f565b82525050565b600060208201905061347f600083018461345b565b92915050565b60006020828403121561349b5761349a6132c2565b5b60006134a98482850161334b565b91505092915050565b6134bb8161332a565b82525050565b6134ca816132ec565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561350a5780820151818401526020810190506134ef565b60008484015250505050565b6000601f19601f8301169050919050565b6000613532826134d0565b61353c81856134db565b935061354c8185602086016134ec565b61355581613516565b840191505092915050565b6135698161344f565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60006135a783836134b2565b60208301905092915050565b6000602082019050919050565b60006135cb8261356f565b6135d5818561357a565b93506135e08361358b565b8060005b838110156136115781516135f8888261359b565b9750613603836135b3565b9250506001810190506135e4565b5085935050505092915050565b600060c08301600083015161363660008601826134b2565b50602083015161364960208601826134c1565b50604083015184820360408601526136618282613527565b91505060608301516136766060860182613560565b506080830151848203608086015261368e82826135c0565b91505060a08301516136a360a08601826134b2565b508091505092915050565b600060208201905081810360008301526136c8818461361e565b905092915050565b600082825260208201905092915050565b60006136ec826134d0565b6136f681856136d0565b93506137068185602086016134ec565b61370f81613516565b840191505092915050565b6000602082019050818103600083015261373481846136e1565b905092915050565b613745816132ec565b82525050565b600060a08201905061376060008301886133a0565b61376d602083018761373c565b818103604083015261377f81866136e1565b905061378e606083018561345b565b61379b60808301846133a0565b9695505050505050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6137e282613516565b810181811067ffffffffffffffff82111715613801576138006137aa565b5b80604052505050565b60006138146132b8565b905061382082826137d9565b919050565b600067ffffffffffffffff8211156138405761383f6137aa565b5b602082029050602081019050919050565b600080fd5b600061386961386484613825565b61380a565b9050808382526020820190506020840283018581111561388c5761388b613851565b5b835b818110156138b557806138a1888261334b565b84526020840193505060208101905061388e565b5050509392505050565b600082601f8301126138d4576138d36137a5565b5b81356138e4848260208601613856565b91505092915050565b600080fd5b600067ffffffffffffffff82111561390d5761390c6137aa565b5b61391682613516565b9050602081019050919050565b82818337600083830152505050565b6000613945613940846138f2565b61380a565b905082815260208101848484011115613961576139606138ed565b5b61396c848285613923565b509392505050565b600082601f830112613989576139886137a5565b5b8135613999848260208601613932565b91505092915050565b600080600080600060a086880312156139be576139bd6132c2565b5b60006139cc88828901613315565b95505060206139dd88828901613315565b945050604086013567ffffffffffffffff8111156139fe576139fd6132c7565b5b613a0a888289016138bf565b935050606086013567ffffffffffffffff811115613a2b57613a2a6132c7565b5b613a37888289016138bf565b925050608086013567ffffffffffffffff811115613a5857613a576132c7565b5b613a6488828901613974565b9150509295509295909350565b600067ffffffffffffffff821115613a8c57613a8b6137aa565b5b602082029050602081019050919050565b6000613ab0613aab84613a71565b61380a565b90508083825260208201905060208402830185811115613ad357613ad2613851565b5b835b81811015613afc5780613ae88882613315565b845260208401935050602081019050613ad5565b5050509392505050565b600082601f830112613b1b57613b1a6137a5565b5b8135613b2b848260208601613a9d565b91505092915050565b60008060408385031215613b4b57613b4a6132c2565b5b600083013567ffffffffffffffff811115613b6957613b686132c7565b5b613b7585828601613b06565b925050602083013567ffffffffffffffff811115613b9657613b956132c7565b5b613ba2858286016138bf565b9150509250929050565b600082825260208201905092915050565b6000613bc88261356f565b613bd28185613bac565b9350613bdd8361358b565b8060005b83811015613c0e578151613bf5888261359b565b9750613c00836135b3565b925050600181019050613be1565b5085935050505092915050565b60006020820190508181036000830152613c358184613bbd565b905092915050565b60008060408385031215613c5457613c536132c2565b5b6000613c628582860161334b565b9250506020613c738582860161334b565b9150509250929050565b613c868161344f565b8114613c9157600080fd5b50565b600081359050613ca381613c7d565b92915050565b60008060408385031215613cc057613cbf6132c2565b5b6000613cce85828601613315565b9250506020613cdf85828601613c94565b9150509250929050565b600067ffffffffffffffff821115613d0457613d036137aa565b5b613d0d82613516565b9050602081019050919050565b6000613d2d613d2884613ce9565b61380a565b905082815260208101848484011115613d4957613d486138ed565b5b613d54848285613923565b509392505050565b600082601f830112613d7157613d706137a5565b5b8135613d81848260208601613d1a565b91505092915050565b600060208284031215613da057613d9f6132c2565b5b600082013567ffffffffffffffff811115613dbe57613dbd6132c7565b5b613dca84828501613d5c565b91505092915050565b613ddc816133ca565b82525050565b6000602082019050613df76000830184613dd3565b92915050565b600060e082019050613e12600083018a6133a0565b613e1f602083018961373c565b8181036040830152613e3181886136e1565b9050613e40606083018761345b565b613e4d608083018661345b565b613e5a60a08301856133a0565b613e6760c08301846133a0565b98975050505050505050565b60008060408385031215613e8a57613e896132c2565b5b6000613e9885828601613315565b9250506020613ea985828601613315565b9150509250929050565b600080600080600060a08688031215613ecf57613ece6132c2565b5b6000613edd88828901613315565b9550506020613eee88828901613315565b9450506040613eff8882890161334b565b9350506060613f108882890161334b565b925050608086013567ffffffffffffffff811115613f3157613f306132c7565b5b613f3d88828901613974565b9150509295509295909350565b7f455243313135353a2061646472657373207a65726f206973206e6f742061207660008201527f616c6964206f776e657200000000000000000000000000000000000000000000602082015250565b6000613fa6602a836136d0565b9150613fb182613f4a565b604082019050919050565b60006020820190508181036000830152613fd581613f99565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061402357607f821691505b60208210810361403657614035613fdc565b5b50919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546140698161400b565b614073818661403c565b9450600182166000811461408e57600181146140a3576140d6565b60ff19831686528115158202860193506140d6565b6140ac85614047565b60005b838110156140ce578154818901526001820191506020810190506140af565b838801955050505b50505092915050565b60006140ea826134d0565b6140f4818561403c565b93506141048185602086016134ec565b80840191505092915050565b600061411c828561405c565b915061412882846140df565b91508190509392505050565b7f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60008201527f6572206f7220617070726f766564000000000000000000000000000000000000602082015250565b6000614190602e836136d0565b915061419b82614134565b604082019050919050565b600060208201905081810360008301526141bf81614183565b9050919050565b7f566964656f206973206e6f74206c697374656400000000000000000000000000600082015250565b60006141fc6013836136d0565b9150614207826141c6565b602082019050919050565b6000602082019050818103600083015261422b816141ef565b9050919050565b7f596f7520617265206e6f7420706179696e672074686520636f7272656374207060008201527f7269636500000000000000000000000000000000000000000000000000000000602082015250565b600061428e6024836136d0565b915061429982614232565b604082019050919050565b600060208201905081810360008301526142bd81614281565b9050919050565b60006080820190506142d960008301876133a0565b6142e6602083018661373c565b6142f3604083018561373c565b61430060608301846133a0565b95945050505050565b7f455243313135353a206163636f756e747320616e6420696473206c656e67746860008201527f206d69736d617463680000000000000000000000000000000000000000000000602082015250565b60006143656029836136d0565b915061437082614309565b604082019050919050565b6000602082019050818103600083015261439481614358565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006144048261332a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614436576144356143ca565b5b600182019050919050565b7f596f7520617265206e6f7420746865206f776e6572206f66207468697320766960008201527f64656f0000000000000000000000000000000000000000000000000000000000602082015250565b600061449d6023836136d0565b91506144a882614441565b604082019050919050565b600060208201905081810360008301526144cc81614490565b9050919050565b7f566964656f20697320616c7265616479207075626c6973686564000000000000600082015250565b6000614509601a836136d0565b9150614514826144d3565b602082019050919050565b60006020820190508181036000830152614538816144fc565b9050919050565b7f596f7520617265206e6f7420746865206f776e6572206f66207468697320726f60008201527f6f6d000000000000000000000000000000000000000000000000000000000000602082015250565b600061459b6022836136d0565b91506145a68261453f565b604082019050919050565b600060208201905081810360008301526145ca8161458e565b9050919050565b60006060820190506145e660008301866133a0565b6145f3602083018561373c565b61460060408301846133a0565b949350505050565b7f526f6f6d20697320616c7265616479206c697374656400000000000000000000600082015250565b600061463e6016836136d0565b915061464982614608565b602082019050919050565b6000602082019050818103600083015261466d81614631565b9050919050565b7f566964656f20697320616c7265616479206c6973746564000000000000000000600082015250565b60006146aa6017836136d0565b91506146b582614674565b602082019050919050565b600060208201905081810360008301526146d98161469d565b9050919050565b7f596f7520646f6e2774206861766520656e6f7567682043726561746f727a205460008201527f6f6b656e7320746f206c697374207468697320766964656f0000000000000000602082015250565b600061473c6038836136d0565b9150614747826146e0565b604082019050919050565b6000602082019050818103600083015261476b8161472f565b9050919050565b7f526f6f6d206973206e6f74206c69737465640000000000000000000000000000600082015250565b60006147a86012836136d0565b91506147b382614772565b602082019050919050565b600060208201905081810360008301526147d78161479b565b9050919050565b60006040820190506147f360008301856133a0565b614800602083018461373c565b9392505050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614817565b61485e8683614817565b95508019841693508086168417925050509392505050565b6000819050919050565b600061489b6148966148918461332a565b614876565b61332a565b9050919050565b6000819050919050565b6148b583614880565b6148c96148c1826148a2565b848454614824565b825550505050565b600090565b6148de6148d1565b6148e98184846148ac565b505050565b5b8181101561490d576149026000826148d6565b6001810190506148ef565b5050565b601f8211156149525761492381614047565b61492c84614807565b8101602085101561493b578190505b61494f61494785614807565b8301826148ee565b50505b505050565b600082821c905092915050565b600061497560001984600802614957565b1980831691505092915050565b600061498e8383614964565b9150826002028217905092915050565b6149a7826134d0565b67ffffffffffffffff8111156149c0576149bf6137aa565b5b6149ca825461400b565b6149d5828285614911565b600060209050601f831160018114614a0857600084156149f6578287015190505b614a008582614982565b865550614a68565b601f198416614a1686614047565b60005b82811015614a3e57848901518255600182019150602085019450602081019050614a19565b86831015614a5b5784890151614a57601f891682614964565b8355505b6001600288020188555050505b505050505050565b6000606082019050614a8560008301866133a0565b614a92602083018561373c565b8181036040830152614aa481846136e1565b9050949350505050565b7f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060008201527f6d69736d61746368000000000000000000000000000000000000000000000000602082015250565b6000614b0a6028836136d0565b9150614b1582614aae565b604082019050919050565b60006020820190508181036000830152614b3981614afd565b9050919050565b7f455243313135353a207472616e7366657220746f20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000614b9c6025836136d0565b9150614ba782614b40565b604082019050919050565b60006020820190508181036000830152614bcb81614b8f565b9050919050565b7f455243313135353a20696e73756666696369656e742062616c616e636520666f60008201527f72207472616e7366657200000000000000000000000000000000000000000000602082015250565b6000614c2e602a836136d0565b9150614c3982614bd2565b604082019050919050565b60006020820190508181036000830152614c5d81614c21565b9050919050565b6000614c6f8261332a565b9150614c7a8361332a565b9250828201905080821115614c9257614c916143ca565b5b92915050565b60006040820190508181036000830152614cb28185613bbd565b90508181036020830152614cc68184613bbd565b90509392505050565b6000604082019050614ce460008301856133a0565b614cf160208301846133a0565b9392505050565b7f455243313135353a206d696e7420746f20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000614d546021836136d0565b9150614d5f82614cf8565b604082019050919050565b60006020820190508181036000830152614d8381614d47565b9050919050565b7f455243313135353a2073657474696e6720617070726f76616c2073746174757360008201527f20666f722073656c660000000000000000000000000000000000000000000000602082015250565b6000614de66029836136d0565b9150614df182614d8a565b604082019050919050565b60006020820190508181036000830152614e1581614dd9565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614e4382614e1c565b614e4d8185614e27565b9350614e5d8185602086016134ec565b614e6681613516565b840191505092915050565b600060a082019050614e86600083018861373c565b614e93602083018761373c565b8181036040830152614ea58186613bbd565b90508181036060830152614eb98185613bbd565b90508181036080830152614ecd8184614e38565b90509695505050505050565b600081519050614ee8816133f6565b92915050565b600060208284031215614f0457614f036132c2565b5b6000614f1284828501614ed9565b91505092915050565b60008160e01c9050919050565b600060033d1115614f475760046000803e614f44600051614f1b565b90505b90565b600060443d10614fd757614f5c6132b8565b60043d036004823e80513d602482011167ffffffffffffffff82111715614f84575050614fd7565b808201805167ffffffffffffffff811115614fa25750505050614fd7565b80602083010160043d038501811115614fbf575050505050614fd7565b614fce826020018501866137d9565b82955050505050505b90565b7f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560008201527f526563656976657220696d706c656d656e746572000000000000000000000000602082015250565b60006150366034836136d0565b915061504182614fda565b604082019050919050565b6000602082019050818103600083015261506581615029565b9050919050565b7f455243313135353a204552433131353552656365697665722072656a6563746560008201527f6420746f6b656e73000000000000000000000000000000000000000000000000602082015250565b60006150c86028836136d0565b91506150d38261506c565b604082019050919050565b600060208201905081810360008301526150f7816150bb565b9050919050565b600060a082019050615113600083018861373c565b615120602083018761373c565b61512d60408301866133a0565b61513a60608301856133a0565b818103608083015261514c8184614e38565b9050969550505050505056fea264697066735822122097d99b4c8d147fed365d31a01f2b041f794649426912c252ffb4ca55e001c66064736f6c63430008120033