- Contract name:
- TokenMagic
- Optimization enabled
- false
- Compiler version
- v0.8.8+commit.dddeac2f
- EVM Version
- default
- Verified at
- 2022-07-13T16:23:54.101568Z
Contract source code
// File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/token/ERC721/ERC721.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // File: @openzeppelin/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, _allowances[owner][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = _allowances[owner][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Spend `amount` form the allowance of `owner` toward `spender`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } // File: contracts/TokenMagic.sol pragma solidity 0.8.8; // This contract is owned by Decentralized Swapz Network // Decentralized Swapz Network is Mesh network based on Threshold Signature Scheme with 2/3 PoS Consensus. contract WrappedNonFungable is ERC721, Ownable { constructor(string memory name, string memory symbol) ERC721(name, symbol) { } function mint(address _address, uint256 _amount) public onlyOwner { _mint(_address, _amount); } function burn(address _address, uint256 _tokenId) public onlyOwner { address owner = ERC721.ownerOf(_tokenId); require(_address == owner, "OWNER"); _burn(_tokenId); } string private baseURI; function _baseURI() internal view override returns (string memory) { return baseURI; } function setBaseURI(string memory _baseUri) public onlyOwner { require(bytes(baseURI).length == 0, "SET"); baseURI = _baseUri; } function transfer(address to, uint256 amount) public returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } function tokenType() public pure returns (uint) { return 1; } } contract WrappedFungable is ERC20, Ownable { constructor(string memory name, string memory symbol) ERC20(name, symbol) { } function mint(address _address, uint256 _amount) public onlyOwner { _mint(_address, _amount); } function burn(address _address, uint256 _amount) public onlyOwner { _burn(_address, _amount); } function tokenType() public pure returns (uint) { return 0; } } // Crosschain Liquidity Pool contract TokenMagic { function create(uint contractType , string memory name, string memory symbol) public returns(address) { if (contractType == 0) { WrappedFungable t = new WrappedFungable(name, symbol); t.transferOwnership(msg.sender); return address(t); } if (contractType == 1) { WrappedNonFungable t = new WrappedNonFungable(name, symbol); t.transferOwnership(msg.sender); return address(t); } revert(); } }
Contract ABI
[{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"create","inputs":[{"type":"uint256","name":"contractType","internalType":"uint256"},{"type":"string","name":"name","internalType":"string"},{"type":"string","name":"symbol","internalType":"string"}]}]
Deployed ByteCode
0x60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80635a4463a81462000033575b600080fd5b6200005160048036038101906200004b9190620003c7565b62000069565b604051620000609190620004a6565b60405180910390f35b6000808414156200012c57600083836040516200008690620001fa565b6200009392919062000556565b604051809103906000f080158015620000b0573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401620000ee9190620004a6565b600060405180830381600087803b1580156200010957600080fd5b505af11580156200011e573d6000803e3d6000fd5b5050505080915050620001f3565b6001841415620001ee5760008383604051620001489062000208565b6200015592919062000556565b604051809103906000f08015801562000172573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff1663f2fde38b336040518263ffffffff1660e01b8152600401620001b09190620004a6565b600060405180830381600087803b158015620001cb57600080fd5b505af1158015620001e0573d6000803e3d6000fd5b5050505080915050620001f3565b600080fd5b9392505050565b6122a0806200059283390190565b6136a5806200283283390190565b6000604051905090565b600080fd5b600080fd5b6000819050919050565b6200023f816200022a565b81146200024b57600080fd5b50565b6000813590506200025f8162000234565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620002ba826200026f565b810181811067ffffffffffffffff82111715620002dc57620002db62000280565b5b80604052505050565b6000620002f162000216565b9050620002ff8282620002af565b919050565b600067ffffffffffffffff82111562000322576200032162000280565b5b6200032d826200026f565b9050602081019050919050565b82818337600083830152505050565b6000620003606200035a8462000304565b620002e5565b9050828152602081018484840111156200037f576200037e6200026a565b5b6200038c8482856200033a565b509392505050565b600082601f830112620003ac57620003ab62000265565b5b8135620003be84826020860162000349565b91505092915050565b600080600060608486031215620003e357620003e262000220565b5b6000620003f3868287016200024e565b935050602084013567ffffffffffffffff81111562000417576200041662000225565b5b620004258682870162000394565b925050604084013567ffffffffffffffff81111562000449576200044862000225565b5b620004578682870162000394565b9150509250925092565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200048e8262000461565b9050919050565b620004a08162000481565b82525050565b6000602082019050620004bd600083018462000495565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015620004ff578082015181840152602081019050620004e2565b838111156200050f576000848401525b50505050565b60006200052282620004c3565b6200052e8185620004ce565b935062000540818560208601620004df565b6200054b816200026f565b840191505092915050565b6000604082019050818103600083015262000572818562000515565b9050818103602083015262000588818462000515565b9050939250505056fe60806040523480156200001157600080fd5b50604051620022a0380380620022a08339818101604052810190620000379190620003b0565b818181600390805190602001906200005192919062000163565b5080600490805190602001906200006a92919062000163565b5050506200008d620000816200009560201b60201c565b6200009d60201b60201c565b50506200049a565b600033905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620001719062000464565b90600052602060002090601f016020900481019282620001955760008555620001e1565b82601f10620001b057805160ff1916838001178555620001e1565b82800160010185558215620001e1579182015b82811115620001e0578251825591602001919060010190620001c3565b5b509050620001f09190620001f4565b5090565b5b808211156200020f576000816000905550600101620001f5565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200027c8262000231565b810181811067ffffffffffffffff821117156200029e576200029d62000242565b5b80604052505050565b6000620002b362000213565b9050620002c1828262000271565b919050565b600067ffffffffffffffff821115620002e457620002e362000242565b5b620002ef8262000231565b9050602081019050919050565b60005b838110156200031c578082015181840152602081019050620002ff565b838111156200032c576000848401525b50505050565b6000620003496200034384620002c6565b620002a7565b9050828152602081018484840111156200036857620003676200022c565b5b62000375848285620002fc565b509392505050565b600082601f83011262000395576200039462000227565b5b8151620003a784826020860162000332565b91505092915050565b60008060408385031215620003ca57620003c96200021d565b5b600083015167ffffffffffffffff811115620003eb57620003ea62000222565b5b620003f9858286016200037d565b925050602083015167ffffffffffffffff8111156200041d576200041c62000222565b5b6200042b858286016200037d565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200047d57607f821691505b6020821081141562000494576200049362000435565b5b50919050565b611df680620004aa6000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a25780639dc29fac116100715780639dc29fac146102aa578063a457c2d7146102c6578063a9059cbb146102f6578063dd62ed3e14610326578063f2fde38b146103565761010b565b806370a0823114610234578063715018a6146102645780638da5cb5b1461026e57806395d89b411461028c5761010b565b806330fa738c116100de57806330fa738c146101ac578063313ce567146101ca57806339509351146101e857806340c10f19146102185761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015e57806323b872dd1461017c575b600080fd5b610118610372565b60405161012591906113c4565b60405180910390f35b6101486004803603810190610143919061147f565b610404565b60405161015591906114da565b60405180910390f35b610166610427565b6040516101739190611504565b60405180910390f35b6101966004803603810190610191919061151f565b610431565b6040516101a391906114da565b60405180910390f35b6101b4610460565b6040516101c19190611504565b60405180910390f35b6101d2610465565b6040516101df919061158e565b60405180910390f35b61020260048036038101906101fd919061147f565b61046e565b60405161020f91906114da565b60405180910390f35b610232600480360381019061022d919061147f565b610518565b005b61024e600480360381019061024991906115a9565b6105a2565b60405161025b9190611504565b60405180910390f35b61026c6105ea565b005b610276610672565b60405161028391906115e5565b60405180910390f35b61029461069c565b6040516102a191906113c4565b60405180910390f35b6102c460048036038101906102bf919061147f565b61072e565b005b6102e060048036038101906102db919061147f565b6107b8565b6040516102ed91906114da565b60405180910390f35b610310600480360381019061030b919061147f565b6108a2565b60405161031d91906114da565b60405180910390f35b610340600480360381019061033b9190611600565b6108c5565b60405161034d9190611504565b60405180910390f35b610370600480360381019061036b91906115a9565b61094c565b005b6060600380546103819061166f565b80601f01602080910402602001604051908101604052809291908181526020018280546103ad9061166f565b80156103fa5780601f106103cf576101008083540402835291602001916103fa565b820191906000526020600020905b8154815290600101906020018083116103dd57829003601f168201915b5050505050905090565b60008061040f610a44565b905061041c818585610a4c565b600191505092915050565b6000600254905090565b60008061043c610a44565b9050610449858285610c17565b610454858585610ca3565b60019150509392505050565b600090565b60006012905090565b600080610479610a44565b905061050d818585600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461050891906116d0565b610a4c565b600191505092915050565b610520610a44565b73ffffffffffffffffffffffffffffffffffffffff1661053e610672565b73ffffffffffffffffffffffffffffffffffffffff1614610594576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161058b90611772565b60405180910390fd5b61059e8282610f24565b5050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6105f2610a44565b73ffffffffffffffffffffffffffffffffffffffff16610610610672565b73ffffffffffffffffffffffffffffffffffffffff1614610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161065d90611772565b60405180910390fd5b6106706000611084565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546106ab9061166f565b80601f01602080910402602001604051908101604052809291908181526020018280546106d79061166f565b80156107245780601f106106f957610100808354040283529160200191610724565b820191906000526020600020905b81548152906001019060200180831161070757829003601f168201915b5050505050905090565b610736610a44565b73ffffffffffffffffffffffffffffffffffffffff16610754610672565b73ffffffffffffffffffffffffffffffffffffffff16146107aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a190611772565b60405180910390fd5b6107b4828261114a565b5050565b6000806107c3610a44565b90506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905083811015610889576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088090611804565b60405180910390fd5b6108968286868403610a4c565b60019250505092915050565b6000806108ad610a44565b90506108ba818585610ca3565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610954610a44565b73ffffffffffffffffffffffffffffffffffffffff16610972610672565b73ffffffffffffffffffffffffffffffffffffffff16146109c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bf90611772565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2f90611896565b60405180910390fd5b610a4181611084565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610abc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab390611928565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b23906119ba565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610c0a9190611504565b60405180910390a3505050565b6000610c2384846108c5565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610c9d5781811015610c8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8690611a26565b60405180910390fd5b610c9c8484848403610a4c565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0a90611ab8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7a90611b4a565b60405180910390fd5b610d8e838383611321565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b90611bdc565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ea791906116d0565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610f0b9190611504565b60405180910390a3610f1e848484611326565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8b90611c48565b60405180910390fd5b610fa060008383611321565b8060026000828254610fb291906116d0565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461100791906116d0565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161106c9190611504565b60405180910390a361108060008383611326565b5050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b190611cda565b60405180910390fd5b6111c682600083611321565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561124c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124390611d6c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008282546112a39190611d8c565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113089190611504565b60405180910390a361131c83600084611326565b505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561136557808201518184015260208101905061134a565b83811115611374576000848401525b50505050565b6000601f19601f8301169050919050565b60006113968261132b565b6113a08185611336565b93506113b0818560208601611347565b6113b98161137a565b840191505092915050565b600060208201905081810360008301526113de818461138b565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611416826113eb565b9050919050565b6114268161140b565b811461143157600080fd5b50565b6000813590506114438161141d565b92915050565b6000819050919050565b61145c81611449565b811461146757600080fd5b50565b60008135905061147981611453565b92915050565b60008060408385031215611496576114956113e6565b5b60006114a485828601611434565b92505060206114b58582860161146a565b9150509250929050565b60008115159050919050565b6114d4816114bf565b82525050565b60006020820190506114ef60008301846114cb565b92915050565b6114fe81611449565b82525050565b600060208201905061151960008301846114f5565b92915050565b600080600060608486031215611538576115376113e6565b5b600061154686828701611434565b935050602061155786828701611434565b92505060406115688682870161146a565b9150509250925092565b600060ff82169050919050565b61158881611572565b82525050565b60006020820190506115a3600083018461157f565b92915050565b6000602082840312156115bf576115be6113e6565b5b60006115cd84828501611434565b91505092915050565b6115df8161140b565b82525050565b60006020820190506115fa60008301846115d6565b92915050565b60008060408385031215611617576116166113e6565b5b600061162585828601611434565b925050602061163685828601611434565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061168757607f821691505b6020821081141561169b5761169a611640565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006116db82611449565b91506116e683611449565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561171b5761171a6116a1565b5b828201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061175c602083611336565b915061176782611726565b602082019050919050565b6000602082019050818103600083015261178b8161174f565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006117ee602583611336565b91506117f982611792565b604082019050919050565b6000602082019050818103600083015261181d816117e1565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611880602683611336565b915061188b82611824565b604082019050919050565b600060208201905081810360008301526118af81611873565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611912602483611336565b915061191d826118b6565b604082019050919050565b6000602082019050818103600083015261194181611905565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006119a4602283611336565b91506119af82611948565b604082019050919050565b600060208201905081810360008301526119d381611997565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000611a10601d83611336565b9150611a1b826119da565b602082019050919050565b60006020820190508181036000830152611a3f81611a03565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000611aa2602583611336565b9150611aad82611a46565b604082019050919050565b60006020820190508181036000830152611ad181611a95565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611b34602383611336565b9150611b3f82611ad8565b604082019050919050565b60006020820190508181036000830152611b6381611b27565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000611bc6602683611336565b9150611bd182611b6a565b604082019050919050565b60006020820190508181036000830152611bf581611bb9565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000611c32601f83611336565b9150611c3d82611bfc565b602082019050919050565b60006020820190508181036000830152611c6181611c25565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000611cc4602183611336565b9150611ccf82611c68565b604082019050919050565b60006020820190508181036000830152611cf381611cb7565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000611d56602283611336565b9150611d6182611cfa565b604082019050919050565b60006020820190508181036000830152611d8581611d49565b9050919050565b6000611d9782611449565b9150611da283611449565b925082821015611db557611db46116a1565b5b82820390509291505056fea2646970667358221220435648dc614ce75ec90d76adf78bdbe6ea014cd869d4917444089714887e12fe64736f6c6343000808003360806040523480156200001157600080fd5b50604051620036a5380380620036a58339818101604052810190620000379190620003b0565b818181600090805190602001906200005192919062000163565b5080600190805190602001906200006a92919062000163565b5050506200008d620000816200009560201b60201c565b6200009d60201b60201c565b50506200049a565b600033905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620001719062000464565b90600052602060002090601f016020900481019282620001955760008555620001e1565b82601f10620001b057805160ff1916838001178555620001e1565b82800160010185558215620001e1579182015b82811115620001e0578251825591602001919060010190620001c3565b5b509050620001f09190620001f4565b5090565b5b808211156200020f576000816000905550600101620001f5565b5090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200027c8262000231565b810181811067ffffffffffffffff821117156200029e576200029d62000242565b5b80604052505050565b6000620002b362000213565b9050620002c1828262000271565b919050565b600067ffffffffffffffff821115620002e457620002e362000242565b5b620002ef8262000231565b9050602081019050919050565b60005b838110156200031c578082015181840152602081019050620002ff565b838111156200032c576000848401525b50505050565b6000620003496200034384620002c6565b620002a7565b9050828152602081018484840111156200036857620003676200022c565b5b62000375848285620002fc565b509392505050565b600082601f83011262000395576200039462000227565b5b8151620003a784826020860162000332565b91505092915050565b60008060408385031215620003ca57620003c96200021d565b5b600083015167ffffffffffffffff811115620003eb57620003ea62000222565b5b620003f9858286016200037d565b925050602083015167ffffffffffffffff8111156200041d576200041c62000222565b5b6200042b858286016200037d565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200047d57607f821691505b6020821081141562000494576200049362000435565b5b50919050565b6131fb80620004aa6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806370a08231116100b8578063a22cb4651161007c578063a22cb46514610326578063a9059cbb14610342578063b88d4fde14610372578063c87b56dd1461038e578063e985e9c5146103be578063f2fde38b146103ee57610137565b806370a0823114610294578063715018a6146102c45780638da5cb5b146102ce57806395d89b41146102ec5780639dc29fac1461030a57610137565b806330fa738c116100ff57806330fa738c146101f257806340c10f191461021057806342842e0e1461022c57806355f804b3146102485780636352211e1461026457610137565b806301ffc9a71461013c57806306fdde031461016c578063081812fc1461018a578063095ea7b3146101ba57806323b872dd146101d6575b600080fd5b61015660048036038101906101519190611ebe565b61040a565b6040516101639190611f06565b60405180910390f35b6101746104ec565b6040516101819190611fba565b60405180910390f35b6101a4600480360381019061019f9190612012565b61057e565b6040516101b19190612080565b60405180910390f35b6101d460048036038101906101cf91906120c7565b610603565b005b6101f060048036038101906101eb9190612107565b61071b565b005b6101fa61077b565b6040516102079190612169565b60405180910390f35b61022a600480360381019061022591906120c7565b610784565b005b61024660048036038101906102419190612107565b61080e565b005b610262600480360381019061025d91906122b9565b61082e565b005b61027e60048036038101906102799190612012565b610915565b60405161028b9190612080565b60405180910390f35b6102ae60048036038101906102a99190612302565b6109c7565b6040516102bb9190612169565b60405180910390f35b6102cc610a7f565b005b6102d6610b07565b6040516102e39190612080565b60405180910390f35b6102f4610b31565b6040516103019190611fba565b60405180910390f35b610324600480360381019061031f91906120c7565b610bc3565b005b610340600480360381019061033b919061235b565b610cc8565b005b61035c600480360381019061035791906120c7565b610cde565b6040516103699190611f06565b60405180910390f35b61038c6004803603810190610387919061243c565b610d01565b005b6103a860048036038101906103a39190612012565b610d63565b6040516103b59190611fba565b60405180910390f35b6103d860048036038101906103d391906124bf565b610e0a565b6040516103e59190611f06565b60405180910390f35b61040860048036038101906104039190612302565b610e9e565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806104d557507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806104e557506104e482610f96565b5b9050919050565b6060600080546104fb9061252e565b80601f01602080910402602001604051908101604052809291908181526020018280546105279061252e565b80156105745780601f1061054957610100808354040283529160200191610574565b820191906000526020600020905b81548152906001019060200180831161055757829003601f168201915b5050505050905090565b600061058982611000565b6105c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105bf906125d2565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061060e82610915565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067690612664565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661069e61106c565b73ffffffffffffffffffffffffffffffffffffffff1614806106cd57506106cc816106c761106c565b610e0a565b5b61070c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610703906126f6565b60405180910390fd5b6107168383611074565b505050565b61072c61072661106c565b8261112d565b61076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290612788565b60405180910390fd5b61077683838361120b565b505050565b60006001905090565b61078c61106c565b73ffffffffffffffffffffffffffffffffffffffff166107aa610b07565b73ffffffffffffffffffffffffffffffffffffffff1614610800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f7906127f4565b60405180910390fd5b61080a8282611472565b5050565b61082983838360405180602001604052806000815250610d01565b505050565b61083661106c565b73ffffffffffffffffffffffffffffffffffffffff16610854610b07565b73ffffffffffffffffffffffffffffffffffffffff16146108aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a1906127f4565b60405180910390fd5b6000600780546108b99061252e565b9050146108fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f290612860565b60405180910390fd5b8060079080519060200190610911929190611daf565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156109be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b5906128f2565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2f90612984565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610a8761106c565b73ffffffffffffffffffffffffffffffffffffffff16610aa5610b07565b73ffffffffffffffffffffffffffffffffffffffff1614610afb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af2906127f4565b60405180910390fd5b610b05600061164c565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610b409061252e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b6c9061252e565b8015610bb95780601f10610b8e57610100808354040283529160200191610bb9565b820191906000526020600020905b815481529060010190602001808311610b9c57829003601f168201915b5050505050905090565b610bcb61106c565b73ffffffffffffffffffffffffffffffffffffffff16610be9610b07565b73ffffffffffffffffffffffffffffffffffffffff1614610c3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c36906127f4565b60405180910390fd5b6000610c4a82610915565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610cba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb1906129f0565b60405180910390fd5b610cc382611712565b505050565b610cda610cd361106c565b838361182f565b5050565b600080610ce961106c565b9050610cf681858561120b565b600191505092915050565b610d12610d0c61106c565b8361112d565b610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612788565b60405180910390fd5b610d5d8484848461199c565b50505050565b6060610d6e82611000565b610dad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da490612a82565b60405180910390fd5b6000610db76119f8565b90506000815111610dd75760405180602001604052806000815250610e02565b80610de184611a8a565b604051602001610df2929190612ade565b6040516020818303038152906040525b915050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b610ea661106c565b73ffffffffffffffffffffffffffffffffffffffff16610ec4610b07565b73ffffffffffffffffffffffffffffffffffffffff1614610f1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f11906127f4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8190612b74565b60405180910390fd5b610f938161164c565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166110e783610915565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061113882611000565b611177576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116e90612c06565b60405180910390fd5b600061118283610915565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806111f157508373ffffffffffffffffffffffffffffffffffffffff166111d98461057e565b73ffffffffffffffffffffffffffffffffffffffff16145b8061120257506112018185610e0a565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661122b82610915565b73ffffffffffffffffffffffffffffffffffffffff1614611281576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127890612c98565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156112f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e890612d2a565b60405180910390fd5b6112fc838383611beb565b611307600082611074565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113579190612d79565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113ae9190612dad565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461146d838383611bf0565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d990612e4f565b60405180910390fd5b6114eb81611000565b1561152b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152290612ebb565b60405180910390fd5b61153760008383611beb565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546115879190612dad565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461164860008383611bf0565b5050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600061171d82610915565b905061172b81600084611beb565b611736600083611074565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117869190612d79565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461182b81600084611bf0565b5050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561189e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189590612f27565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161198f9190611f06565b60405180910390a3505050565b6119a784848461120b565b6119b384848484611bf5565b6119f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e990612fb9565b60405180910390fd5b50505050565b606060078054611a079061252e565b80601f0160208091040260200160405190810160405280929190818152602001828054611a339061252e565b8015611a805780601f10611a5557610100808354040283529160200191611a80565b820191906000526020600020905b815481529060010190602001808311611a6357829003601f168201915b5050505050905090565b60606000821415611ad2576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050611be6565b600082905060005b60008214611b04578080611aed90612fd9565b915050600a82611afd9190613051565b9150611ada565b60008167ffffffffffffffff811115611b2057611b1f61218e565b5b6040519080825280601f01601f191660200182016040528015611b525781602001600182028036833780820191505090505b5090505b60008514611bdf57600182611b6b9190612d79565b9150600a85611b7a9190613082565b6030611b869190612dad565b60f81b818381518110611b9c57611b9b6130b3565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85611bd89190613051565b9450611b56565b8093505050505b919050565b505050565b505050565b6000611c168473ffffffffffffffffffffffffffffffffffffffff16611d8c565b15611d7f578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611c3f61106c565b8786866040518563ffffffff1660e01b8152600401611c619493929190613137565b602060405180830381600087803b158015611c7b57600080fd5b505af1925050508015611cac57506040513d601f19601f82011682018060405250810190611ca99190613198565b60015b611d2f573d8060008114611cdc576040519150601f19603f3d011682016040523d82523d6000602084013e611ce1565b606091505b50600081511415611d27576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1e90612fb9565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050611d84565b600190505b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b828054611dbb9061252e565b90600052602060002090601f016020900481019282611ddd5760008555611e24565b82601f10611df657805160ff1916838001178555611e24565b82800160010185558215611e24579182015b82811115611e23578251825591602001919060010190611e08565b5b509050611e319190611e35565b5090565b5b80821115611e4e576000816000905550600101611e36565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611e9b81611e66565b8114611ea657600080fd5b50565b600081359050611eb881611e92565b92915050565b600060208284031215611ed457611ed3611e5c565b5b6000611ee284828501611ea9565b91505092915050565b60008115159050919050565b611f0081611eeb565b82525050565b6000602082019050611f1b6000830184611ef7565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611f5b578082015181840152602081019050611f40565b83811115611f6a576000848401525b50505050565b6000601f19601f8301169050919050565b6000611f8c82611f21565b611f968185611f2c565b9350611fa6818560208601611f3d565b611faf81611f70565b840191505092915050565b60006020820190508181036000830152611fd48184611f81565b905092915050565b6000819050919050565b611fef81611fdc565b8114611ffa57600080fd5b50565b60008135905061200c81611fe6565b92915050565b60006020828403121561202857612027611e5c565b5b600061203684828501611ffd565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061206a8261203f565b9050919050565b61207a8161205f565b82525050565b60006020820190506120956000830184612071565b92915050565b6120a48161205f565b81146120af57600080fd5b50565b6000813590506120c18161209b565b92915050565b600080604083850312156120de576120dd611e5c565b5b60006120ec858286016120b2565b92505060206120fd85828601611ffd565b9150509250929050565b6000806000606084860312156121205761211f611e5c565b5b600061212e868287016120b2565b935050602061213f868287016120b2565b925050604061215086828701611ffd565b9150509250925092565b61216381611fdc565b82525050565b600060208201905061217e600083018461215a565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6121c682611f70565b810181811067ffffffffffffffff821117156121e5576121e461218e565b5b80604052505050565b60006121f8611e52565b905061220482826121bd565b919050565b600067ffffffffffffffff8211156122245761222361218e565b5b61222d82611f70565b9050602081019050919050565b82818337600083830152505050565b600061225c61225784612209565b6121ee565b90508281526020810184848401111561227857612277612189565b5b61228384828561223a565b509392505050565b600082601f8301126122a05761229f612184565b5b81356122b0848260208601612249565b91505092915050565b6000602082840312156122cf576122ce611e5c565b5b600082013567ffffffffffffffff8111156122ed576122ec611e61565b5b6122f98482850161228b565b91505092915050565b60006020828403121561231857612317611e5c565b5b6000612326848285016120b2565b91505092915050565b61233881611eeb565b811461234357600080fd5b50565b6000813590506123558161232f565b92915050565b6000806040838503121561237257612371611e5c565b5b6000612380858286016120b2565b925050602061239185828601612346565b9150509250929050565b600067ffffffffffffffff8211156123b6576123b561218e565b5b6123bf82611f70565b9050602081019050919050565b60006123df6123da8461239b565b6121ee565b9050828152602081018484840111156123fb576123fa612189565b5b61240684828561223a565b509392505050565b600082601f83011261242357612422612184565b5b81356124338482602086016123cc565b91505092915050565b6000806000806080858703121561245657612455611e5c565b5b6000612464878288016120b2565b9450506020612475878288016120b2565b935050604061248687828801611ffd565b925050606085013567ffffffffffffffff8111156124a7576124a6611e61565b5b6124b38782880161240e565b91505092959194509250565b600080604083850312156124d6576124d5611e5c565b5b60006124e4858286016120b2565b92505060206124f5858286016120b2565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061254657607f821691505b6020821081141561255a576125596124ff565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006125bc602c83611f2c565b91506125c782612560565b604082019050919050565b600060208201905081810360008301526125eb816125af565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b600061264e602183611f2c565b9150612659826125f2565b604082019050919050565b6000602082019050818103600083015261267d81612641565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006126e0603883611f2c565b91506126eb82612684565b604082019050919050565b6000602082019050818103600083015261270f816126d3565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b6000612772603183611f2c565b915061277d82612716565b604082019050919050565b600060208201905081810360008301526127a181612765565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006127de602083611f2c565b91506127e9826127a8565b602082019050919050565b6000602082019050818103600083015261280d816127d1565b9050919050565b7f5345540000000000000000000000000000000000000000000000000000000000600082015250565b600061284a600383611f2c565b915061285582612814565b602082019050919050565b600060208201905081810360008301526128798161283d565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b60006128dc602983611f2c565b91506128e782612880565b604082019050919050565b6000602082019050818103600083015261290b816128cf565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061296e602a83611f2c565b915061297982612912565b604082019050919050565b6000602082019050818103600083015261299d81612961565b9050919050565b7f4f574e4552000000000000000000000000000000000000000000000000000000600082015250565b60006129da600583611f2c565b91506129e5826129a4565b602082019050919050565b60006020820190508181036000830152612a09816129cd565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000612a6c602f83611f2c565b9150612a7782612a10565b604082019050919050565b60006020820190508181036000830152612a9b81612a5f565b9050919050565b600081905092915050565b6000612ab882611f21565b612ac28185612aa2565b9350612ad2818560208601611f3d565b80840191505092915050565b6000612aea8285612aad565b9150612af68284612aad565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612b5e602683611f2c565b9150612b6982612b02565b604082019050919050565b60006020820190508181036000830152612b8d81612b51565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000612bf0602c83611f2c565b9150612bfb82612b94565b604082019050919050565b60006020820190508181036000830152612c1f81612be3565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000612c82602583611f2c565b9150612c8d82612c26565b604082019050919050565b60006020820190508181036000830152612cb181612c75565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612d14602483611f2c565b9150612d1f82612cb8565b604082019050919050565b60006020820190508181036000830152612d4381612d07565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612d8482611fdc565b9150612d8f83611fdc565b925082821015612da257612da1612d4a565b5b828203905092915050565b6000612db882611fdc565b9150612dc383611fdc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612df857612df7612d4a565b5b828201905092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b6000612e39602083611f2c565b9150612e4482612e03565b602082019050919050565b60006020820190508181036000830152612e6881612e2c565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000612ea5601c83611f2c565b9150612eb082612e6f565b602082019050919050565b60006020820190508181036000830152612ed481612e98565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000612f11601983611f2c565b9150612f1c82612edb565b602082019050919050565b60006020820190508181036000830152612f4081612f04565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b6000612fa3603283611f2c565b9150612fae82612f47565b604082019050919050565b60006020820190508181036000830152612fd281612f96565b9050919050565b6000612fe482611fdc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561301757613016612d4a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061305c82611fdc565b915061306783611fdc565b92508261307757613076613022565b5b828204905092915050565b600061308d82611fdc565b915061309883611fdc565b9250826130a8576130a7613022565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600081519050919050565b600082825260208201905092915050565b6000613109826130e2565b61311381856130ed565b9350613123818560208601611f3d565b61312c81611f70565b840191505092915050565b600060808201905061314c6000830187612071565b6131596020830186612071565b613166604083018561215a565b818103606083015261317881846130fe565b905095945050505050565b60008151905061319281611e92565b92915050565b6000602082840312156131ae576131ad611e5c565b5b60006131bc84828501613183565b9150509291505056fea26469706673582212203ca40c72d3c3105e3cfedd748bc4f7f2de03279d754e038acba72b81b9e58e5b64736f6c63430008080033a264697066735822122002b485c818ff542ab59cbce2dc21b8348a7684104388294c5837a73a78683bd664736f6c63430008080033