Address Details
contract
token
0x9aBb29023A0e36CAe39431cb466AD22bfA10F7ad
- Token
- ApeNFT (APE)
- Creator
- 0xe66d5d–046d77 at 0xa1024b–dc169e
- Balance
- 0 CELO ( )
- Locked CELO Balance
- 0.00 CELO
- Voting CELO Balance
- 0.00 CELO
- Pending Unlocked Gold
- 0.00 CELO
- Tokens
-
Fetching tokens...
- Transactions
- 11 Transactions
- Transfers
- 0 Transfers
- Gas Used
- 423,544
- Last Balance Update
- 14440933
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- ApeNFT
- Optimization enabled
- false
- Compiler version
- v0.8.17+commit.8df45f5f
- EVM Version
- london
- Verified at
- 2023-01-26T20:49:45.232330Z
contracts/test/ApeNFT.sol
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract ApeNFT is ERC721 { string public constant TOKEN_URI = "ipfs://QmTSSAKndtMFeneWHbEKHfJpaGBbrfJtrnG8iqt4t4xQUj"; uint256 private s_counter; constructor() ERC721("ApeNFT", "APE") { s_counter = 0; } function mintNFT() public returns (uint256) { _safeMint(msg.sender, s_counter); s_counter = s_counter + 1; return s_counter; } function getTokenCounter() public view returns (uint256) { return s_counter; } function tokenURI(uint256 tokenId) public pure override returns (string memory) { return TOKEN_URI; } }
/_openzeppelin/contracts/token/ERC721/ERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ 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: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual 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 token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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 an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly 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 {} }
/_openzeppelin/contracts/token/ERC721/IERC721.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
/_openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
/_openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
/_openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/_openzeppelin/contracts/utils/Context.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
/_openzeppelin/contracts/utils/Strings.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // 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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
/_openzeppelin/contracts/utils/introspection/ERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/_openzeppelin/contracts/utils/introspection/IERC165.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"TOKEN_URI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTokenCounter","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintNFT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]}]
Contract Creation Code
0x60806040523480156200001157600080fd5b506040518060400160405280600681526020017f4170654e465400000000000000000000000000000000000000000000000000008152506040518060400160405280600381526020017f415045000000000000000000000000000000000000000000000000000000000081525081600090816200008f91906200032c565b508060019081620000a191906200032c565b505050600060068190555062000413565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200013457607f821691505b6020821081036200014a5762000149620000ec565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620001b47fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000175565b620001c0868362000175565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b60006200020d620002076200020184620001d8565b620001e2565b620001d8565b9050919050565b6000819050919050565b6200022983620001ec565b62000241620002388262000214565b84845462000182565b825550505050565b600090565b6200025862000249565b620002658184846200021e565b505050565b5b818110156200028d57620002816000826200024e565b6001810190506200026b565b5050565b601f821115620002dc57620002a68162000150565b620002b18462000165565b81016020851015620002c1578190505b620002d9620002d08562000165565b8301826200026a565b50505b505050565b600082821c905092915050565b60006200030160001984600802620002e1565b1980831691505092915050565b60006200031c8383620002ee565b9150826002028217905092915050565b6200033782620000b2565b67ffffffffffffffff811115620003535762000352620000bd565b5b6200035f82546200011b565b6200036c82828562000291565b600060209050601f831160018114620003a457600084156200038f578287015190505b6200039b85826200030e565b8655506200040b565b601f198416620003b48662000150565b60005b82811015620003de57848901518255600182019150602085019450602081019050620003b7565b86831015620003fe5784890151620003fa601f891682620002ee565b8355505b6001600288020188555050505b505050505050565b61226980620004236000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c80636e02007d11610097578063a22cb46511610066578063a22cb465146102af578063b88d4fde146102cb578063c87b56dd146102e7578063e985e9c51461031757610100565b80636e02007d1461022557806370a082311461024357806378ce90351461027357806395d89b411461029157610100565b806314f710fe116100d357806314f710fe1461019f57806323b872dd146101bd57806342842e0e146101d95780636352211e146101f557610100565b806301ffc9a71461010557806306fdde0314610135578063081812fc14610153578063095ea7b314610183575b600080fd5b61011f600480360381019061011a9190611528565b610347565b60405161012c9190611570565b60405180910390f35b61013d610429565b60405161014a919061161b565b60405180910390f35b61016d60048036038101906101689190611673565b6104bb565b60405161017a91906116e1565b60405180910390f35b61019d60048036038101906101989190611728565b610501565b005b6101a7610618565b6040516101b49190611777565b60405180910390f35b6101d760048036038101906101d29190611792565b610643565b005b6101f360048036038101906101ee9190611792565b6106a3565b005b61020f600480360381019061020a9190611673565b6106c3565b60405161021c91906116e1565b60405180910390f35b61022d610774565b60405161023a9190611777565b60405180910390f35b61025d600480360381019061025891906117e5565b61077e565b60405161026a9190611777565b60405180910390f35b61027b610835565b604051610288919061161b565b60405180910390f35b610299610851565b6040516102a6919061161b565b60405180910390f35b6102c960048036038101906102c4919061183e565b6108e3565b005b6102e560048036038101906102e091906119b3565b6108f9565b005b61030160048036038101906102fc9190611673565b61095b565b60405161030e919061161b565b60405180910390f35b610331600480360381019061032c9190611a36565b61097d565b60405161033e9190611570565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061041257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610422575061042182610a11565b5b9050919050565b60606000805461043890611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461046490611aa5565b80156104b15780601f10610486576101008083540402835291602001916104b1565b820191906000526020600020905b81548152906001019060200180831161049457829003601f168201915b5050505050905090565b60006104c682610a7b565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061050c826106c3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361057c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057390611b48565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661059b610ac6565b73ffffffffffffffffffffffffffffffffffffffff1614806105ca57506105c9816105c4610ac6565b61097d565b5b610609576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060090611bda565b60405180910390fd5b6106138383610ace565b505050565b600061062633600654610b87565b60016006546106359190611c29565b600681905550600654905090565b61065461064e610ac6565b82610ba5565b610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a90611ccf565b60405180910390fd5b61069e838383610c3a565b505050565b6106be838383604051806020016040528060008152506108f9565b505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290611d3b565b60405180910390fd5b80915050919050565b6000600654905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e590611dcd565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060600160405280603581526020016121ff6035913981565b60606001805461086090611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461088c90611aa5565b80156108d95780601f106108ae576101008083540402835291602001916108d9565b820191906000526020600020905b8154815290600101906020018083116108bc57829003601f168201915b5050505050905090565b6108f56108ee610ac6565b8383610ea0565b5050565b61090a610904610ac6565b83610ba5565b610949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094090611ccf565b60405180910390fd5b6109558484848461100c565b50505050565b60606040518060600160405280603581526020016121ff603591399050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610a8481611068565b610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90611d3b565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610b41836106c3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610ba18282604051806020016040528060008152506110d4565b5050565b600080610bb1836106c3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610bf35750610bf2818561097d565b5b80610c3157508373ffffffffffffffffffffffffffffffffffffffff16610c19846104bb565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610c5a826106c3565b73ffffffffffffffffffffffffffffffffffffffff1614610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790611e5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1690611ef1565b60405180910390fd5b610d2a83838361112f565b610d35600082610ace565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d859190611f11565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ddc9190611c29565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e9b838383611134565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0590611f91565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610fff9190611570565b60405180910390a3505050565b611017848484610c3a565b61102384848484611139565b611062576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105990612023565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6110de83836112c0565b6110eb6000848484611139565b61112a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112190612023565b60405180910390fd5b505050565b505050565b505050565b600061115a8473ffffffffffffffffffffffffffffffffffffffff16611499565b156112b3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611183610ac6565b8786866040518563ffffffff1660e01b81526004016111a59493929190612098565b6020604051808303816000875af19250505080156111e157506040513d601f19601f820116820180604052508101906111de91906120f9565b60015b611263573d8060008114611211576040519150601f19603f3d011682016040523d82523d6000602084013e611216565b606091505b50600081510361125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125290612023565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506112b8565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361132f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132690612172565b60405180910390fd5b61133881611068565b15611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f906121de565b60405180910390fd5b6113846000838361112f565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113d49190611c29565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461149560008383611134565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611505816114d0565b811461151057600080fd5b50565b600081359050611522816114fc565b92915050565b60006020828403121561153e5761153d6114c6565b5b600061154c84828501611513565b91505092915050565b60008115159050919050565b61156a81611555565b82525050565b60006020820190506115856000830184611561565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156115c55780820151818401526020810190506115aa565b60008484015250505050565b6000601f19601f8301169050919050565b60006115ed8261158b565b6115f78185611596565b93506116078185602086016115a7565b611610816115d1565b840191505092915050565b6000602082019050818103600083015261163581846115e2565b905092915050565b6000819050919050565b6116508161163d565b811461165b57600080fd5b50565b60008135905061166d81611647565b92915050565b600060208284031215611689576116886114c6565b5b60006116978482850161165e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006116cb826116a0565b9050919050565b6116db816116c0565b82525050565b60006020820190506116f660008301846116d2565b92915050565b611705816116c0565b811461171057600080fd5b50565b600081359050611722816116fc565b92915050565b6000806040838503121561173f5761173e6114c6565b5b600061174d85828601611713565b925050602061175e8582860161165e565b9150509250929050565b6117718161163d565b82525050565b600060208201905061178c6000830184611768565b92915050565b6000806000606084860312156117ab576117aa6114c6565b5b60006117b986828701611713565b93505060206117ca86828701611713565b92505060406117db8682870161165e565b9150509250925092565b6000602082840312156117fb576117fa6114c6565b5b600061180984828501611713565b91505092915050565b61181b81611555565b811461182657600080fd5b50565b60008135905061183881611812565b92915050565b60008060408385031215611855576118546114c6565b5b600061186385828601611713565b925050602061187485828601611829565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6118c0826115d1565b810181811067ffffffffffffffff821117156118df576118de611888565b5b80604052505050565b60006118f26114bc565b90506118fe82826118b7565b919050565b600067ffffffffffffffff82111561191e5761191d611888565b5b611927826115d1565b9050602081019050919050565b82818337600083830152505050565b600061195661195184611903565b6118e8565b90508281526020810184848401111561197257611971611883565b5b61197d848285611934565b509392505050565b600082601f83011261199a5761199961187e565b5b81356119aa848260208601611943565b91505092915050565b600080600080608085870312156119cd576119cc6114c6565b5b60006119db87828801611713565b94505060206119ec87828801611713565b93505060406119fd8782880161165e565b925050606085013567ffffffffffffffff811115611a1e57611a1d6114cb565b5b611a2a87828801611985565b91505092959194509250565b60008060408385031215611a4d57611a4c6114c6565b5b6000611a5b85828601611713565b9250506020611a6c85828601611713565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611abd57607f821691505b602082108103611ad057611acf611a76565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b32602183611596565b9150611b3d82611ad6565b604082019050919050565b60006020820190508181036000830152611b6181611b25565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b6000611bc4603e83611596565b9150611bcf82611b68565b604082019050919050565b60006020820190508181036000830152611bf381611bb7565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611c348261163d565b9150611c3f8361163d565b9250828201905080821115611c5757611c56611bfa565b5b92915050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6000611cb9602e83611596565b9150611cc482611c5d565b604082019050919050565b60006020820190508181036000830152611ce881611cac565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000611d25601883611596565b9150611d3082611cef565b602082019050919050565b60006020820190508181036000830152611d5481611d18565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000611db7602983611596565b9150611dc282611d5b565b604082019050919050565b60006020820190508181036000830152611de681611daa565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000611e49602583611596565b9150611e5482611ded565b604082019050919050565b60006020820190508181036000830152611e7881611e3c565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611edb602483611596565b9150611ee682611e7f565b604082019050919050565b60006020820190508181036000830152611f0a81611ece565b9050919050565b6000611f1c8261163d565b9150611f278361163d565b9250828203905081811115611f3f57611f3e611bfa565b5b92915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000611f7b601983611596565b9150611f8682611f45565b602082019050919050565b60006020820190508181036000830152611faa81611f6e565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061200d603283611596565b915061201882611fb1565b604082019050919050565b6000602082019050818103600083015261203c81612000565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061206a82612043565b612074818561204e565b93506120848185602086016115a7565b61208d816115d1565b840191505092915050565b60006080820190506120ad60008301876116d2565b6120ba60208301866116d2565b6120c76040830185611768565b81810360608301526120d9818461205f565b905095945050505050565b6000815190506120f3816114fc565b92915050565b60006020828403121561210f5761210e6114c6565b5b600061211d848285016120e4565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061215c602083611596565b915061216782612126565b602082019050919050565b6000602082019050818103600083015261218b8161214f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006121c8601c83611596565b91506121d382612192565b602082019050919050565b600060208201905081810360008301526121f7816121bb565b905091905056fe697066733a2f2f516d545353414b6e64744d46656e65574862454b48664a706147426272664a74726e47386971743474347851556aa26469706673582212204bf3954853970a891ef4a63377291d4799b5b792ce6bd4ba64cc61f09aeb3e2464736f6c63430008110033
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80636e02007d11610097578063a22cb46511610066578063a22cb465146102af578063b88d4fde146102cb578063c87b56dd146102e7578063e985e9c51461031757610100565b80636e02007d1461022557806370a082311461024357806378ce90351461027357806395d89b411461029157610100565b806314f710fe116100d357806314f710fe1461019f57806323b872dd146101bd57806342842e0e146101d95780636352211e146101f557610100565b806301ffc9a71461010557806306fdde0314610135578063081812fc14610153578063095ea7b314610183575b600080fd5b61011f600480360381019061011a9190611528565b610347565b60405161012c9190611570565b60405180910390f35b61013d610429565b60405161014a919061161b565b60405180910390f35b61016d60048036038101906101689190611673565b6104bb565b60405161017a91906116e1565b60405180910390f35b61019d60048036038101906101989190611728565b610501565b005b6101a7610618565b6040516101b49190611777565b60405180910390f35b6101d760048036038101906101d29190611792565b610643565b005b6101f360048036038101906101ee9190611792565b6106a3565b005b61020f600480360381019061020a9190611673565b6106c3565b60405161021c91906116e1565b60405180910390f35b61022d610774565b60405161023a9190611777565b60405180910390f35b61025d600480360381019061025891906117e5565b61077e565b60405161026a9190611777565b60405180910390f35b61027b610835565b604051610288919061161b565b60405180910390f35b610299610851565b6040516102a6919061161b565b60405180910390f35b6102c960048036038101906102c4919061183e565b6108e3565b005b6102e560048036038101906102e091906119b3565b6108f9565b005b61030160048036038101906102fc9190611673565b61095b565b60405161030e919061161b565b60405180910390f35b610331600480360381019061032c9190611a36565b61097d565b60405161033e9190611570565b60405180910390f35b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061041257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610422575061042182610a11565b5b9050919050565b60606000805461043890611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461046490611aa5565b80156104b15780601f10610486576101008083540402835291602001916104b1565b820191906000526020600020905b81548152906001019060200180831161049457829003601f168201915b5050505050905090565b60006104c682610a7b565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061050c826106c3565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361057c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057390611b48565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661059b610ac6565b73ffffffffffffffffffffffffffffffffffffffff1614806105ca57506105c9816105c4610ac6565b61097d565b5b610609576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060090611bda565b60405180910390fd5b6106138383610ace565b505050565b600061062633600654610b87565b60016006546106359190611c29565b600681905550600654905090565b61065461064e610ac6565b82610ba5565b610693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068a90611ccf565b60405180910390fd5b61069e838383610c3a565b505050565b6106be838383604051806020016040528060008152506108f9565b505050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361076b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161076290611d3b565b60405180910390fd5b80915050919050565b6000600654905090565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e590611dcd565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6040518060600160405280603581526020016121ff6035913981565b60606001805461086090611aa5565b80601f016020809104026020016040519081016040528092919081815260200182805461088c90611aa5565b80156108d95780601f106108ae576101008083540402835291602001916108d9565b820191906000526020600020905b8154815290600101906020018083116108bc57829003601f168201915b5050505050905090565b6108f56108ee610ac6565b8383610ea0565b5050565b61090a610904610ac6565b83610ba5565b610949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161094090611ccf565b60405180910390fd5b6109558484848461100c565b50505050565b60606040518060600160405280603581526020016121ff603591399050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610a8481611068565b610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba90611d3b565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16610b41836106c3565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610ba18282604051806020016040528060008152506110d4565b5050565b600080610bb1836106c3565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610bf35750610bf2818561097d565b5b80610c3157508373ffffffffffffffffffffffffffffffffffffffff16610c19846104bb565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff16610c5a826106c3565b73ffffffffffffffffffffffffffffffffffffffff1614610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790611e5f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610d1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1690611ef1565b60405180910390fd5b610d2a83838361112f565b610d35600082610ace565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d859190611f11565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ddc9190611c29565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610e9b838383611134565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0590611f91565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610fff9190611570565b60405180910390a3505050565b611017848484610c3a565b61102384848484611139565b611062576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105990612023565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b6110de83836112c0565b6110eb6000848484611139565b61112a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112190612023565b60405180910390fd5b505050565b505050565b505050565b600061115a8473ffffffffffffffffffffffffffffffffffffffff16611499565b156112b3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02611183610ac6565b8786866040518563ffffffff1660e01b81526004016111a59493929190612098565b6020604051808303816000875af19250505080156111e157506040513d601f19601f820116820180604052508101906111de91906120f9565b60015b611263573d8060008114611211576040519150601f19603f3d011682016040523d82523d6000602084013e611216565b606091505b50600081510361125b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125290612023565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506112b8565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361132f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132690612172565b60405180910390fd5b61133881611068565b15611378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136f906121de565b60405180910390fd5b6113846000838361112f565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546113d49190611c29565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461149560008383611134565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611505816114d0565b811461151057600080fd5b50565b600081359050611522816114fc565b92915050565b60006020828403121561153e5761153d6114c6565b5b600061154c84828501611513565b91505092915050565b60008115159050919050565b61156a81611555565b82525050565b60006020820190506115856000830184611561565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156115c55780820151818401526020810190506115aa565b60008484015250505050565b6000601f19601f8301169050919050565b60006115ed8261158b565b6115f78185611596565b93506116078185602086016115a7565b611610816115d1565b840191505092915050565b6000602082019050818103600083015261163581846115e2565b905092915050565b6000819050919050565b6116508161163d565b811461165b57600080fd5b50565b60008135905061166d81611647565b92915050565b600060208284031215611689576116886114c6565b5b60006116978482850161165e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006116cb826116a0565b9050919050565b6116db816116c0565b82525050565b60006020820190506116f660008301846116d2565b92915050565b611705816116c0565b811461171057600080fd5b50565b600081359050611722816116fc565b92915050565b6000806040838503121561173f5761173e6114c6565b5b600061174d85828601611713565b925050602061175e8582860161165e565b9150509250929050565b6117718161163d565b82525050565b600060208201905061178c6000830184611768565b92915050565b6000806000606084860312156117ab576117aa6114c6565b5b60006117b986828701611713565b93505060206117ca86828701611713565b92505060406117db8682870161165e565b9150509250925092565b6000602082840312156117fb576117fa6114c6565b5b600061180984828501611713565b91505092915050565b61181b81611555565b811461182657600080fd5b50565b60008135905061183881611812565b92915050565b60008060408385031215611855576118546114c6565b5b600061186385828601611713565b925050602061187485828601611829565b9150509250929050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6118c0826115d1565b810181811067ffffffffffffffff821117156118df576118de611888565b5b80604052505050565b60006118f26114bc565b90506118fe82826118b7565b919050565b600067ffffffffffffffff82111561191e5761191d611888565b5b611927826115d1565b9050602081019050919050565b82818337600083830152505050565b600061195661195184611903565b6118e8565b90508281526020810184848401111561197257611971611883565b5b61197d848285611934565b509392505050565b600082601f83011261199a5761199961187e565b5b81356119aa848260208601611943565b91505092915050565b600080600080608085870312156119cd576119cc6114c6565b5b60006119db87828801611713565b94505060206119ec87828801611713565b93505060406119fd8782880161165e565b925050606085013567ffffffffffffffff811115611a1e57611a1d6114cb565b5b611a2a87828801611985565b91505092959194509250565b60008060408385031215611a4d57611a4c6114c6565b5b6000611a5b85828601611713565b9250506020611a6c85828601611713565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680611abd57607f821691505b602082108103611ad057611acf611a76565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000611b32602183611596565b9150611b3d82611ad6565b604082019050919050565b60006020820190508181036000830152611b6181611b25565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b6000611bc4603e83611596565b9150611bcf82611b68565b604082019050919050565b60006020820190508181036000830152611bf381611bb7565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611c348261163d565b9150611c3f8361163d565b9250828201905080821115611c5757611c56611bfa565b5b92915050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b6000611cb9602e83611596565b9150611cc482611c5d565b604082019050919050565b60006020820190508181036000830152611ce881611cac565b9050919050565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b6000611d25601883611596565b9150611d3082611cef565b602082019050919050565b60006020820190508181036000830152611d5481611d18565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b6000611db7602983611596565b9150611dc282611d5b565b604082019050919050565b60006020820190508181036000830152611de681611daa565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b6000611e49602583611596565b9150611e5482611ded565b604082019050919050565b60006020820190508181036000830152611e7881611e3c565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611edb602483611596565b9150611ee682611e7f565b604082019050919050565b60006020820190508181036000830152611f0a81611ece565b9050919050565b6000611f1c8261163d565b9150611f278361163d565b9250828203905081811115611f3f57611f3e611bfa565b5b92915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b6000611f7b601983611596565b9150611f8682611f45565b602082019050919050565b60006020820190508181036000830152611faa81611f6e565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061200d603283611596565b915061201882611fb1565b604082019050919050565b6000602082019050818103600083015261203c81612000565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061206a82612043565b612074818561204e565b93506120848185602086016115a7565b61208d816115d1565b840191505092915050565b60006080820190506120ad60008301876116d2565b6120ba60208301866116d2565b6120c76040830185611768565b81810360608301526120d9818461205f565b905095945050505050565b6000815190506120f3816114fc565b92915050565b60006020828403121561210f5761210e6114c6565b5b600061211d848285016120e4565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061215c602083611596565b915061216782612126565b602082019050919050565b6000602082019050818103600083015261218b8161214f565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b60006121c8601c83611596565b91506121d382612192565b602082019050919050565b600060208201905081810360008301526121f7816121bb565b905091905056fe697066733a2f2f516d545353414b6e64744d46656e65574862454b48664a706147426272664a74726e47386971743474347851556aa26469706673582212204bf3954853970a891ef4a63377291d4799b5b792ce6bd4ba64cc61f09aeb3e2464736f6c63430008110033