ERC-721
Overview
Max Total Supply
1,269 MeDMD
Holders
258
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Balance
13 MeDMDLoading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
NFTDMD
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 8500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./RandomlyAssigned.sol"; contract NFTDMD is ERC721Enumerable, RandomlyAssigned, Initializable, ReentrancyGuard, Ownable { using Strings for uint256; string baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public pricetoken; uint256 public maxNftSupply = 1269; uint256 public maxMintPerAddress; uint256 public maxMintPerTx; bool public pausedERC20 = true; bool public onlyWhitelisted = false; bool public revealed = false; address[] public whitelistedAddresses; address public token = 0x0000000000000000000000000000000000000000; mapping(address => uint256) public addressMintedBalance; event NFTrecover(address indexed nft, uint256 tokenId); constructor() ERC721("NFTMember", "MeDMD") RandomlyAssigned(maxNftSupply, 1) {} function initialize( string memory _initBaseURI, string memory _initNotRevealedUri, uint256 _maxMintPerAddress, uint256 _maxMintPerTx ) external onlyOwner { setBaseURI(_initBaseURI); setNotRevealedURI(_initNotRevealedUri); setMaxMintPerAddress(_maxMintPerAddress); setMaxMintPerTx(_maxMintPerTx); } // internal function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function ReserveNFTS(uint256 _amount) public onlyOwner { uint256 supply = totalSupply(); require( supply + _amount <= maxNftSupply, "Can't mint more than max NFT supply" ); for (uint256 i = 1; i <= _amount; i++) { uint256 mintIndex = nextToken(); if (totalSupply() < maxNftSupply) { _safeMint(_msgSender(), mintIndex); } } } function buyNFT_WithERC20(uint256 _amount) public ensureAvailability nonReentrant { IERC20 tokenContract = IERC20(token); uint256 supply = totalSupply(); require(!pausedERC20, "this function is paused"); require(msg.sender == tx.origin, "Can't mint through another contract"); require( _amount > 0 && _amount <= maxMintPerTx, "exceeds the maximum per tx" ); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; require( ownerMintedCount + _amount <= maxMintPerAddress, "exceeds the maximum per address" ); require( supply + _amount <= maxNftSupply, "Can't mint more than max supply" ); if (msg.sender != owner()) { if (onlyWhitelisted == true) { require(isWhitelisted(msg.sender), "user is not whitelisted"); require( ownerMintedCount + _amount <= maxMintPerAddress, "exceeds the maximum per address" ); } uint256 _totalprice = pricetoken * _amount; require( tokenContract.balanceOf(msg.sender) >= _totalprice, "ERROR USER 404, wrong price sers" ); tokenContract.transferFrom( _msgSender(), address(this), _totalprice ); } for (uint256 i = 1; i <= _amount; i++) { uint256 mintIndex = nextToken(); if (totalSupply() < maxNftSupply) { _safeMint(_msgSender(), mintIndex); } } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { uint256 ownerTokenCount = balanceOf(_owner); uint256[] memory tokenIds = new uint256[](ownerTokenCount); for (uint256 i; i < ownerTokenCount; i++) { tokenIds[i] = tokenOfOwnerByIndex(_owner, i); } return tokenIds; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); if (revealed == false) { return notRevealedUri; } string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string( abi.encodePacked( currentBaseURI, tokenId.toString(), baseExtension ) ) : ""; } function isWhitelisted(address _user) public view returns (bool) { for (uint256 i = 0; i < whitelistedAddresses.length; i++) { if (whitelistedAddresses[i] == _user) { return true; } } return false; } function showNFTs() public onlyOwner { revealed = true; } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { notRevealedUri = _notRevealedURI; } function setBaseURI(string memory _newBaseURI) public onlyOwner { baseURI = _newBaseURI; } function setToken(address _Token) public onlyOwner { token = _Token; } function setpricetoken(uint256 _newpricetoken) public onlyOwner { pricetoken = _newpricetoken; } function setMaxMintPerTx(uint256 _newmaxMintPerTx) public onlyOwner { maxMintPerTx = _newmaxMintPerTx; } function setMaxMintPerAddress(uint256 _newmaxMintPerAddress) public onlyOwner { maxMintPerAddress = _newmaxMintPerAddress; } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { baseExtension = _newBaseExtension; } function setOnlyWhitelisted(bool _state) public onlyOwner { onlyWhitelisted = _state; } function pausedWithERC20(bool _state) public onlyOwner { pausedERC20 = _state; } function whitelistUsers(address[] calldata _users) public onlyOwner { delete whitelistedAddresses; whitelistedAddresses = _users; } function WithdrawERC20(address tokenAddress, uint256 tokenAmount) external nonReentrant onlyOwner { IERC20(tokenAddress).transfer(this.owner(), tokenAmount); } function recoverNFT(address _nft, uint256 _tokenId) external nonReentrant onlyOwner { IERC721(_nft).transferFrom( address(this), address(msg.sender), _tokenId ); emit NFTrecover(_nft, _tokenId); } function withdrawTo(address payable _to, uint256 _amount) external nonReentrant onlyOwner { _to.transfer(_amount); } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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); }
// SPDX-License-Identifier: MIT // 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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`, 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; }
// 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); }
// SPDX-License-Identifier: MIT // 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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: 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); } /** * @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); } /** * @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 of token that is not own"); 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); } /** * @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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @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` cannot be the zero address. * - `to` cannot be the zero address. * * 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 override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !Address.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "./WithLimitedSupply.sol"; /// @author 1001.digital /// @title Randomly assign tokenIDs from a given set of tokens. abstract contract RandomlyAssigned is WithLimitedSupply { // Used for random index assignment mapping(uint256 => uint256) private tokenMatrix; // The initial token ID uint256 private startFrom; /// Instanciate the contract /// @param _maxSupply how many tokens this collection should hold /// @param _startFrom the tokenID with which to start counting constructor(uint256 _maxSupply, uint256 _startFrom) WithLimitedSupply(_maxSupply) { startFrom = _startFrom; } /// Get the next token ID /// @dev Randomly gets a new token ID and keeps track of the ones that are still available. /// @return the next token ID function nextToken() internal override ensureAvailability returns (uint256) { uint256 maxIndex = maxSupply() - tokenCount(); uint256 random = uint256( keccak256( abi.encodePacked( msg.sender, block.coinbase, block.difficulty, block.gaslimit, block.timestamp ) ) ) % maxIndex; uint256 value = 0; if (tokenMatrix[random] == 0) { // If this matrix position is empty, set the value to the generated random number. value = random; } else { // Otherwise, use the previously stored number from the matrix. value = tokenMatrix[random]; } // If the last available tokenID is still unused... if (tokenMatrix[maxIndex - 1] == 0) { // ...store that ID in the current matrix position. tokenMatrix[random] = maxIndex - 1; } else { // ...otherwise copy over the stored number to the current matrix position. tokenMatrix[random] = tokenMatrix[maxIndex - 1]; } // Increment counts super.nextToken(); return value + startFrom; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/Counters.sol"; /// @author 1001.digital /// @title A token tracker that limits the token supply and increments token IDs on each new mint. abstract contract WithLimitedSupply { using Counters for Counters.Counter; // Keeps track of how many we have minted Counters.Counter private _tokenCount; /// @dev The maximum count of tokens this token tracker will hold. uint256 private _maxSupply; /// Instanciate the contract /// @param totalSupply_ how many tokens this collection should hold constructor(uint256 totalSupply_) { _maxSupply = totalSupply_; } /// @dev Get the max Supply /// @return the maximum token count function maxSupply() public view returns (uint256) { return _maxSupply; } /// @dev Get the current token count /// @return the created token count function tokenCount() public view returns (uint256) { return _tokenCount.current(); } /// @dev Check whether tokens are still available /// @return the available token count function availableTokenCount() public view returns (uint256) { return maxSupply() - tokenCount(); } /// @dev Increment the token count and fetch the latest count /// @return the next token id function nextToken() internal virtual ensureAvailability returns (uint256) { uint256 token = _tokenCount.current(); _tokenCount.increment(); return token; } /// @dev Check whether another token is still available modifier ensureAvailability() { require(availableTokenCount() > 0, "No more tokens available"); _; } /// @param amount Check whether number of tokens are still available /// @dev Check whether tokens are still available modifier ensureAvailabilityFor(uint256 amount) { require( availableTokenCount() >= amount, "Requested number of tokens not available" ); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
{ "optimizer": { "enabled": true, "runs": 8500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NFTrecover","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ReserveNFTS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"WithdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyNFT_WithERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"string","name":"_initNotRevealedUri","type":"string"},{"internalType":"uint256","name":"_maxMintPerAddress","type":"uint256"},{"internalType":"uint256","name":"_maxMintPerTx","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxNftSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"notRevealedUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pausedERC20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pausedWithERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pricetoken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"recoverNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newmaxMintPerAddress","type":"uint256"}],"name":"setMaxMintPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newmaxMintPerTx","type":"uint256"}],"name":"setMaxMintPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_notRevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOnlyWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_Token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newpricetoken","type":"uint256"}],"name":"setpricetoken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"showNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"whitelistUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistedAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60c06040526005608081905264173539b7b760d91b60a09081526200002891601291906200013a565b506104f56015556018805462ffffff19166001179055601a80546001600160a01b03191690553480156200005b57600080fd5b50601554604080518082018252600981526827232a26b2b6b132b960b91b602080830191825283518085019094526005845264135951135160da1b9084015281516001938593929091620000b2916000916200013a565b508051620000c89060019060208401906200013a565b505050600b55600d55506001600f55620000e233620000e8565b6200021d565b601080546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200014890620001e0565b90600052602060002090601f0160209004810192826200016c5760008555620001b7565b82601f106200018757805160ff1916838001178555620001b7565b82800160010185558215620001b7579182015b82811115620001b75782518255916020019190600101906200019a565b50620001c5929150620001c9565b5090565b5b80821115620001c55760008155600101620001ca565b600181811c90821680620001f557607f821691505b602082108114156200021757634e487b7160e01b600052602260045260246000fd5b50919050565b613f2d806200022d6000396000f3fe60806040526004361061034e5760003560e01c80636fe0e395116101bb578063be7426ae116100f7578063de7fcb1d11610095578063edec5f271161006f578063edec5f2714610964578063f2c4ce1e14610984578063f2fde38b146109a4578063fc0c546a146109c457600080fd5b8063de7fcb1d146108f0578063e14ca35314610906578063e985e9c51461091b57600080fd5b8063c87b56dd116100d1578063c87b56dd1461087b578063d5abeb011461089b578063d7db8cc5146108b0578063da3ef23f146108d057600080fd5b8063be7426ae14610826578063c6224fdf14610846578063c66828621461086657600080fd5b806395d89b4111610164578063a22cb4651161013e578063a22cb465146107b0578063a29ca449146107d0578063b88d4fde146107e6578063ba4e5c491461080657600080fd5b806395d89b41146107675780639c70b5121461077c5780639f181b5e1461079b57600080fd5b806384f3d8181161019557806384f3d818146107145780638da5cb5b14610734578063900782aa1461075257600080fd5b80636fe0e395146106bf57806370a08231146106df578063715018a6146106ff57600080fd5b80633319a00d1161028a5780634f6ccce711610233578063572849c41161020d578063572849c414610649578063616cdb1e1461065f5780636352211e1461067f578063675d1f031461069f57600080fd5b80634f6ccce7146105e9578063518302271461060957806355f804b31461062957600080fd5b80633e949e06116102645780633e949e061461058657806342842e0e1461059c578063438b6300146105bc57600080fd5b80633319a00d146105265780633af32abf146105465780633c9527641461056657600080fd5b806318160ddd116102f7578063205c2878116102d1578063205c2878146104ac57806323b872dd146104cc5780632c59f055146104ec5780632f745c591461050657600080fd5b806318160ddd1461044057806318cae2691461045f5780631e14d44b1461048c57600080fd5b8063081c8c4411610328578063081c8c44146103e9578063095ea7b3146103fe578063144fa6d71461042057600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b157600080fd5b3661035557005b600080fd5b34801561036657600080fd5b5061037a6103753660046136be565b6109e4565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610a40565b6040516103869190613751565b3480156103bd57600080fd5b506103d16103cc366004613764565b610ad2565b6040516001600160a01b039091168152602001610386565b3480156103f557600080fd5b506103a4610b7d565b34801561040a57600080fd5b5061041e610419366004613792565b610c0b565b005b34801561042c57600080fd5b5061041e61043b3660046137be565b610d3d565b34801561044c57600080fd5b506008545b604051908152602001610386565b34801561046b57600080fd5b5061045161047a3660046137be565b601b6020526000908152604090205481565b34801561049857600080fd5b5061041e6104a7366004613764565b610dd1565b3480156104b857600080fd5b5061041e6104c7366004613792565b610e30565b3480156104d857600080fd5b5061041e6104e73660046137db565b610f22565b3480156104f857600080fd5b5060185461037a9060ff1681565b34801561051257600080fd5b50610451610521366004613792565b610fa9565b34801561053257600080fd5b5061041e610541366004613792565b611051565b34801561055257600080fd5b5061037a6105613660046137be565b6111ce565b34801561057257600080fd5b5061041e61058136600461382a565b611238565b34801561059257600080fd5b5061045160145481565b3480156105a857600080fd5b5061041e6105b73660046137db565b6112c9565b3480156105c857600080fd5b506105dc6105d73660046137be565b6112e4565b6040516103869190613847565b3480156105f557600080fd5b50610451610604366004613764565b611386565b34801561061557600080fd5b5060185461037a9062010000900460ff1681565b34801561063557600080fd5b5061041e61064436600461396e565b61142a565b34801561065557600080fd5b5061045160165481565b34801561066b57600080fd5b5061041e61067a366004613764565b61149b565b34801561068b57600080fd5b506103d161069a366004613764565b6114fa565b3480156106ab57600080fd5b5061041e6106ba36600461382a565b611585565b3480156106cb57600080fd5b5061041e6106da3660046139a3565b611610565b3480156106eb57600080fd5b506104516106fa3660046137be565b611694565b34801561070b57600080fd5b5061041e61172e565b34801561072057600080fd5b5061041e61072f366004613764565b611794565b34801561074057600080fd5b506010546001600160a01b03166103d1565b34801561075e57600080fd5b5061041e6118c3565b34801561077357600080fd5b506103a461194c565b34801561078857600080fd5b5060185461037a90610100900460ff1681565b3480156107a757600080fd5b5061045161195b565b3480156107bc57600080fd5b5061041e6107cb366004613a17565b61196b565b3480156107dc57600080fd5b5061045160155481565b3480156107f257600080fd5b5061041e610801366004613a50565b611976565b34801561081257600080fd5b506103d1610821366004613764565b6119fe565b34801561083257600080fd5b5061041e610841366004613792565b611a28565b34801561085257600080fd5b5061041e610861366004613764565b611bf2565b34801561087257600080fd5b506103a4612173565b34801561088757600080fd5b506103a4610896366004613764565b612180565b3480156108a757600080fd5b50600b54610451565b3480156108bc57600080fd5b5061041e6108cb366004613764565b61230e565b3480156108dc57600080fd5b5061041e6108eb36600461396e565b61236d565b3480156108fc57600080fd5b5061045160175481565b34801561091257600080fd5b506104516123da565b34801561092757600080fd5b5061037a610936366004613ad0565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561097057600080fd5b5061041e61097f366004613afe565b6123f1565b34801561099057600080fd5b5061041e61099f36600461396e565b612463565b3480156109b057600080fd5b5061041e6109bf3660046137be565b6124d0565b3480156109d057600080fd5b50601a546103d1906001600160a01b031681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610a3a5750610a3a826125b2565b92915050565b606060008054610a4f90613b73565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7b90613b73565b8015610ac85780601f10610a9d57610100808354040283529160200191610ac8565b820191906000526020600020905b815481529060010190602001808311610aab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60138054610b8a90613b73565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb690613b73565b8015610c035780601f10610bd857610100808354040283529160200191610c03565b820191906000526020600020905b815481529060010190602001808311610be657829003601f168201915b505050505081565b6000610c16826114fa565b9050806001600160a01b0316836001600160a01b03161415610ca05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b58565b336001600160a01b0382161480610cbc5750610cbc8133610936565b610d2e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b58565b610d388383612695565b505050565b6010546001600160a01b03163314610d975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6010546001600160a01b03163314610e2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601655565b6002600f541415610e835760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b03163314610ee25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610f18573d6000803e3d6000fd5b50506001600f5550565b610f2c338261271b565b610f9e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b58565b610d38838383612823565b6000610fb483611694565b82106110285760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b58565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600f5414156110a45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b031633146111035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b50505050816001600160a01b03167f7005de8f25a48011439dfc13a9864513a94adce84a51df0f649a032bae8f37ef826040516111bd91815260200190565b60405180910390a250506001600f55565b6000805b60195481101561122f57826001600160a01b0316601982815481106111f9576111f9613bc7565b6000918252602090912001546001600160a01b0316141561121d5750600192915050565b8061122781613c25565b9150506111d2565b50600092915050565b6010546001600160a01b031633146112925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b60188054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b610d3883838360405180602001604052806000815250611976565b606060006112f183611694565b905060008167ffffffffffffffff81111561130e5761130e61388b565b604051908082528060200260200182016040528015611337578160200160208202803683370190505b50905060005b8281101561137e5761134f8582610fa9565b82828151811061136157611361613bc7565b60209081029190910101528061137681613c25565b91505061133d565b509392505050565b600061139160085490565b82106114055760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b58565b6008828154811061141857611418613bc7565b90600052602060002001549050919050565b6010546001600160a01b031633146114845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601190602084019061356e565b5050565b6010546001600160a01b031633146114f55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601755565b6000818152600260205260408120546001600160a01b031680610a3a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b58565b6010546001600160a01b031633146115df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6010546001600160a01b0316331461166a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6116738461142a565b61167c83612463565b61168582610dd1565b61168e8161149b565b50505050565b60006001600160a01b0382166117125760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b58565b506001600160a01b031660009081526003602052604090205490565b6010546001600160a01b031633146117885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6117926000612a13565b565b6010546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b60006117f960085490565b6015549091506118098383613c5e565b111561187d5760405162461bcd60e51b815260206004820152602360248201527f43616e2774206d696e74206d6f7265207468616e206d6178204e46542073757060448201527f706c7900000000000000000000000000000000000000000000000000000000006064820152608401610b58565b60015b828111610d38576000611891612a7d565b905060155461189f60085490565b10156118b0576118b0335b82612c28565b50806118bb81613c25565b915050611880565b6010546001600160a01b0316331461191d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1662010000179055565b606060018054610a4f90613b73565b6000611966600a5490565b905090565b611497338383612c42565b611980338361271b565b6119f25760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b58565b61168e84848484612d2f565b60198181548110611a0e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6002600f541415611a7b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b03163314611ada5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b816001600160a01b031663a9059cbb306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2257600080fd5b505afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a9190613c76565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015611bba57600080fd5b505af1158015611bce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f189190613c93565b6000611bfc6123da565b11611c495760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6002600f541415611c9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f55601a546001600160a01b03166000611cb860085490565b60185490915060ff1615611d0e5760405162461bcd60e51b815260206004820152601760248201527f746869732066756e6374696f6e206973207061757365640000000000000000006044820152606401610b58565b333214611d835760405162461bcd60e51b815260206004820152602360248201527f43616e2774206d696e74207468726f75676820616e6f7468657220636f6e747260448201527f61637400000000000000000000000000000000000000000000000000000000006064820152608401610b58565b600083118015611d9557506017548311155b611de15760405162461bcd60e51b815260206004820152601a60248201527f6578636565647320746865206d6178696d756d207065722074780000000000006044820152606401610b58565b336000908152601b6020526040902054601654611dfe8583613c5e565b1115611e4c5760405162461bcd60e51b815260206004820152601f60248201527f6578636565647320746865206d6178696d756d207065722061646472657373006044820152606401610b58565b601554611e598584613c5e565b1115611ea75760405162461bcd60e51b815260206004820152601f60248201527f43616e2774206d696e74206d6f7265207468616e206d617820737570706c79006044820152606401610b58565b6010546001600160a01b031633146121235760185460ff61010090910416151560011415611f7f57611ed8336111ce565b611f245760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610b58565b601654611f318583613c5e565b1115611f7f5760405162461bcd60e51b815260206004820152601f60248201527f6578636565647320746865206d6178696d756d207065722061646472657373006044820152606401610b58565b600084601454611f8f9190613cb0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290915081906001600160a01b038616906370a082319060240160206040518083038186803b158015611fec57600080fd5b505afa158015612000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120249190613ced565b10156120725760405162461bcd60e51b815260206004820181905260248201527f4552524f522055534552203430342c2077726f6e6720707269636520736572736044820152606401610b58565b6001600160a01b0384166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015230602482015260448101849052606401602060405180830381600087803b1580156120e857600080fd5b505af11580156120fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121209190613c93565b50505b60015b848111612167576000612137612a7d565b905060155461214560085490565b101561215457612154336118aa565b508061215f81613c25565b915050612126565b50506001600f55505050565b60128054610b8a90613b73565b6000818152600260205260409020546060906001600160a01b031661220d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b58565b60185462010000900460ff166122af576013805461222a90613b73565b80601f016020809104026020016040519081016040528092919081815260200182805461225690613b73565b80156122a35780601f10612278576101008083540402835291602001916122a3565b820191906000526020600020905b81548152906001019060200180831161228657829003601f168201915b50505050509050919050565b60006122b9612db8565b905060008151116122d95760405180602001604052806000815250612307565b806122e384612dc7565b60126040516020016122f793929190613d06565b6040516020818303038152906040525b9392505050565b6010546001600160a01b031633146123685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601455565b6010546001600160a01b031633146123c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601290602084019061356e565b60006123e461195b565b600b546119669190613e01565b6010546001600160a01b0316331461244b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b612457601960006135f2565b610d3860198383613610565b6010546001600160a01b031633146124bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601390602084019061356e565b6010546001600160a01b0316331461252a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6001600160a01b0381166125a65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b58565b6125af81612a13565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061264557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a3a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a3a565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906126e2826114fa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166127a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b58565b60006127b0836114fa565b9050806001600160a01b0316846001600160a01b031614806127eb5750836001600160a01b03166127e084610ad2565b6001600160a01b0316145b8061281b57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612836826114fa565b6001600160a01b0316146128b25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b58565b6001600160a01b03821661292d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b58565b612938838383612ef9565b612943600082612695565b6001600160a01b038316600090815260036020526040812080546001929061296c908490613e01565b90915550506001600160a01b038216600090815260036020526040812080546001929061299a908490613c5e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080612a886123da565b11612ad55760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6000612adf61195b565b600b54612aec9190613e01565b6040517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000033606090811b8216602084015241901b166034820152446048820152456068820152426088820152909150600090829060a8016040516020818303038152906040528051906020012060001c612b669190613e47565b6000818152600c602052604081205491925090612b84575080612b95565b506000818152600c60205260409020545b600c6000612ba4600186613e01565b81526020019081526020016000205460001415612bda57612bc6600184613e01565b6000838152600c6020526040902055612c0a565b600c6000612be9600186613e01565b81526020808201929092526040908101600090812054858252600c90935220555b612c12612fb1565b50600d54612c209082613c5e565b935050505090565b611497828260405180602001604052806000815250613024565b816001600160a01b0316836001600160a01b03161415612ca45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b58565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612d3a848484612823565b612d46848484846130ad565b61168e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b606060118054610a4f90613b73565b606081612e0757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612e315780612e1b81613c25565b9150612e2a9050600a83613e5b565b9150612e0b565b60008167ffffffffffffffff811115612e4c57612e4c61388b565b6040519080825280601f01601f191660200182016040528015612e76576020820181803683370190505b5090505b841561281b57612e8b600183613e01565b9150612e98600a86613e47565b612ea3906030613c5e565b60f81b818381518110612eb857612eb8613bc7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612ef2600a86613e5b565b9450612e7a565b6001600160a01b038316612f5457612f4f81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612f77565b816001600160a01b0316836001600160a01b031614612f7757612f778382613278565b6001600160a01b038216612f8e57610d3881613315565b826001600160a01b0316826001600160a01b031614610d3857610d3882826133c4565b600080612fbc6123da565b116130095760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6000613014600a5490565b9050611966600a80546001019055565b61302e8383613408565b61303b60008484846130ad565b610d385760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b60006001600160a01b0384163b1561326d576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061310a903390899088908890600401613e6f565b602060405180830381600087803b15801561312457600080fd5b505af1925050508015613172575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261316f91810190613eab565b60015b613222573d8080156131a0576040519150601f19603f3d011682016040523d82523d6000602084013e6131a5565b606091505b50805161321a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061281b565b506001949350505050565b6000600161328584611694565b61328f9190613e01565b6000838152600760205260409020549091508082146132e2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061332790600190613e01565b6000838152600960205260408120546008805493945090928490811061334f5761334f613bc7565b90600052602060002001549050806008838154811061337057613370613bc7565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806133a8576133a8613ec8565b6001900381819060005260206000200160009055905550505050565b60006133cf83611694565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661345e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b58565b6000818152600260205260409020546001600160a01b0316156134c35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b58565b6134cf60008383612ef9565b6001600160a01b03821660009081526003602052604081208054600192906134f8908490613c5e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461357a90613b73565b90600052602060002090601f01602090048101928261359c57600085556135e2565b82601f106135b557805160ff19168380011785556135e2565b828001600101855582156135e2579182015b828111156135e25782518255916020019190600101906135c7565b506135ee92915061367b565b5090565b50805460008255906000526020600020908101906125af919061367b565b8280548282559060005260206000209081019282156135e2579160200282015b828111156135e25781547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03843516178255602090920191600190910190613630565b5b808211156135ee576000815560010161367c565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146125af57600080fd5b6000602082840312156136d057600080fd5b813561230781613690565b60005b838110156136f65781810151838201526020016136de565b8381111561168e5750506000910152565b6000815180845261371f8160208601602086016136db565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006123076020830184613707565b60006020828403121561377657600080fd5b5035919050565b6001600160a01b03811681146125af57600080fd5b600080604083850312156137a557600080fd5b82356137b08161377d565b946020939093013593505050565b6000602082840312156137d057600080fd5b81356123078161377d565b6000806000606084860312156137f057600080fd5b83356137fb8161377d565b9250602084013561380b8161377d565b929592945050506040919091013590565b80151581146125af57600080fd5b60006020828403121561383c57600080fd5b81356123078161381c565b6020808252825182820181905260009190848201906040850190845b8181101561387f57835183529284019291840191600101613863565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156138d5576138d561388b565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561391b5761391b61388b565b8160405280935085815286868601111561393457600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261395f57600080fd5b612307838335602085016138ba565b60006020828403121561398057600080fd5b813567ffffffffffffffff81111561399757600080fd5b61281b8482850161394e565b600080600080608085870312156139b957600080fd5b843567ffffffffffffffff808211156139d157600080fd5b6139dd8883890161394e565b955060208701359150808211156139f357600080fd5b50613a008782880161394e565b949794965050505060408301359260600135919050565b60008060408385031215613a2a57600080fd5b8235613a358161377d565b91506020830135613a458161381c565b809150509250929050565b60008060008060808587031215613a6657600080fd5b8435613a718161377d565b93506020850135613a818161377d565b925060408501359150606085013567ffffffffffffffff811115613aa457600080fd5b8501601f81018713613ab557600080fd5b613ac4878235602084016138ba565b91505092959194509250565b60008060408385031215613ae357600080fd5b8235613aee8161377d565b91506020830135613a458161377d565b60008060208385031215613b1157600080fd5b823567ffffffffffffffff80821115613b2957600080fd5b818501915085601f830112613b3d57600080fd5b813581811115613b4c57600080fd5b8660208260051b8501011115613b6157600080fd5b60209290920196919550909350505050565b600181811c90821680613b8757607f821691505b60208210811415613bc1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c5757613c57613bf6565b5060010190565b60008219821115613c7157613c71613bf6565b500190565b600060208284031215613c8857600080fd5b81516123078161377d565b600060208284031215613ca557600080fd5b81516123078161381c565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ce857613ce8613bf6565b500290565b600060208284031215613cff57600080fd5b5051919050565b600084516020613d198285838a016136db565b855191840191613d2c8184848a016136db565b8554920191600090600181811c9080831680613d4957607f831692505b858310811415613d80577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b808015613d945760018114613dc357613df0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00851688528388019550613df0565b60008b81526020902060005b85811015613de85781548a820152908401908801613dcf565b505083880195505b50939b9a5050505050505050505050565b600082821015613e1357613e13613bf6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613e5657613e56613e18565b500690565b600082613e6a57613e6a613e18565b500490565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613ea16080830184613707565b9695505050505050565b600060208284031215613ebd57600080fd5b815161230781613690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212200b832d3c06378eeeedc491b26447020cac657a00b2b9e66b2057bf5e787dc1de64736f6c63430008090033
Deployed Bytecode
0x60806040526004361061034e5760003560e01c80636fe0e395116101bb578063be7426ae116100f7578063de7fcb1d11610095578063edec5f271161006f578063edec5f2714610964578063f2c4ce1e14610984578063f2fde38b146109a4578063fc0c546a146109c457600080fd5b8063de7fcb1d146108f0578063e14ca35314610906578063e985e9c51461091b57600080fd5b8063c87b56dd116100d1578063c87b56dd1461087b578063d5abeb011461089b578063d7db8cc5146108b0578063da3ef23f146108d057600080fd5b8063be7426ae14610826578063c6224fdf14610846578063c66828621461086657600080fd5b806395d89b4111610164578063a22cb4651161013e578063a22cb465146107b0578063a29ca449146107d0578063b88d4fde146107e6578063ba4e5c491461080657600080fd5b806395d89b41146107675780639c70b5121461077c5780639f181b5e1461079b57600080fd5b806384f3d8181161019557806384f3d818146107145780638da5cb5b14610734578063900782aa1461075257600080fd5b80636fe0e395146106bf57806370a08231146106df578063715018a6146106ff57600080fd5b80633319a00d1161028a5780634f6ccce711610233578063572849c41161020d578063572849c414610649578063616cdb1e1461065f5780636352211e1461067f578063675d1f031461069f57600080fd5b80634f6ccce7146105e9578063518302271461060957806355f804b31461062957600080fd5b80633e949e06116102645780633e949e061461058657806342842e0e1461059c578063438b6300146105bc57600080fd5b80633319a00d146105265780633af32abf146105465780633c9527641461056657600080fd5b806318160ddd116102f7578063205c2878116102d1578063205c2878146104ac57806323b872dd146104cc5780632c59f055146104ec5780632f745c591461050657600080fd5b806318160ddd1461044057806318cae2691461045f5780631e14d44b1461048c57600080fd5b8063081c8c4411610328578063081c8c44146103e9578063095ea7b3146103fe578063144fa6d71461042057600080fd5b806301ffc9a71461035a57806306fdde031461038f578063081812fc146103b157600080fd5b3661035557005b600080fd5b34801561036657600080fd5b5061037a6103753660046136be565b6109e4565b60405190151581526020015b60405180910390f35b34801561039b57600080fd5b506103a4610a40565b6040516103869190613751565b3480156103bd57600080fd5b506103d16103cc366004613764565b610ad2565b6040516001600160a01b039091168152602001610386565b3480156103f557600080fd5b506103a4610b7d565b34801561040a57600080fd5b5061041e610419366004613792565b610c0b565b005b34801561042c57600080fd5b5061041e61043b3660046137be565b610d3d565b34801561044c57600080fd5b506008545b604051908152602001610386565b34801561046b57600080fd5b5061045161047a3660046137be565b601b6020526000908152604090205481565b34801561049857600080fd5b5061041e6104a7366004613764565b610dd1565b3480156104b857600080fd5b5061041e6104c7366004613792565b610e30565b3480156104d857600080fd5b5061041e6104e73660046137db565b610f22565b3480156104f857600080fd5b5060185461037a9060ff1681565b34801561051257600080fd5b50610451610521366004613792565b610fa9565b34801561053257600080fd5b5061041e610541366004613792565b611051565b34801561055257600080fd5b5061037a6105613660046137be565b6111ce565b34801561057257600080fd5b5061041e61058136600461382a565b611238565b34801561059257600080fd5b5061045160145481565b3480156105a857600080fd5b5061041e6105b73660046137db565b6112c9565b3480156105c857600080fd5b506105dc6105d73660046137be565b6112e4565b6040516103869190613847565b3480156105f557600080fd5b50610451610604366004613764565b611386565b34801561061557600080fd5b5060185461037a9062010000900460ff1681565b34801561063557600080fd5b5061041e61064436600461396e565b61142a565b34801561065557600080fd5b5061045160165481565b34801561066b57600080fd5b5061041e61067a366004613764565b61149b565b34801561068b57600080fd5b506103d161069a366004613764565b6114fa565b3480156106ab57600080fd5b5061041e6106ba36600461382a565b611585565b3480156106cb57600080fd5b5061041e6106da3660046139a3565b611610565b3480156106eb57600080fd5b506104516106fa3660046137be565b611694565b34801561070b57600080fd5b5061041e61172e565b34801561072057600080fd5b5061041e61072f366004613764565b611794565b34801561074057600080fd5b506010546001600160a01b03166103d1565b34801561075e57600080fd5b5061041e6118c3565b34801561077357600080fd5b506103a461194c565b34801561078857600080fd5b5060185461037a90610100900460ff1681565b3480156107a757600080fd5b5061045161195b565b3480156107bc57600080fd5b5061041e6107cb366004613a17565b61196b565b3480156107dc57600080fd5b5061045160155481565b3480156107f257600080fd5b5061041e610801366004613a50565b611976565b34801561081257600080fd5b506103d1610821366004613764565b6119fe565b34801561083257600080fd5b5061041e610841366004613792565b611a28565b34801561085257600080fd5b5061041e610861366004613764565b611bf2565b34801561087257600080fd5b506103a4612173565b34801561088757600080fd5b506103a4610896366004613764565b612180565b3480156108a757600080fd5b50600b54610451565b3480156108bc57600080fd5b5061041e6108cb366004613764565b61230e565b3480156108dc57600080fd5b5061041e6108eb36600461396e565b61236d565b3480156108fc57600080fd5b5061045160175481565b34801561091257600080fd5b506104516123da565b34801561092757600080fd5b5061037a610936366004613ad0565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561097057600080fd5b5061041e61097f366004613afe565b6123f1565b34801561099057600080fd5b5061041e61099f36600461396e565b612463565b3480156109b057600080fd5b5061041e6109bf3660046137be565b6124d0565b3480156109d057600080fd5b50601a546103d1906001600160a01b031681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610a3a5750610a3a826125b2565b92915050565b606060008054610a4f90613b73565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7b90613b73565b8015610ac85780601f10610a9d57610100808354040283529160200191610ac8565b820191906000526020600020905b815481529060010190602001808311610aab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60138054610b8a90613b73565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb690613b73565b8015610c035780601f10610bd857610100808354040283529160200191610c03565b820191906000526020600020905b815481529060010190602001808311610be657829003601f168201915b505050505081565b6000610c16826114fa565b9050806001600160a01b0316836001600160a01b03161415610ca05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b58565b336001600160a01b0382161480610cbc5750610cbc8133610936565b610d2e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b58565b610d388383612695565b505050565b6010546001600160a01b03163314610d975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6010546001600160a01b03163314610e2b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601655565b6002600f541415610e835760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b03163314610ee25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610f18573d6000803e3d6000fd5b50506001600f5550565b610f2c338261271b565b610f9e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b58565b610d38838383612823565b6000610fb483611694565b82106110285760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b58565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600f5414156110a45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b031633146111035760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd90606401600060405180830381600087803b15801561116a57600080fd5b505af115801561117e573d6000803e3d6000fd5b50505050816001600160a01b03167f7005de8f25a48011439dfc13a9864513a94adce84a51df0f649a032bae8f37ef826040516111bd91815260200190565b60405180910390a250506001600f55565b6000805b60195481101561122f57826001600160a01b0316601982815481106111f9576111f9613bc7565b6000918252602090912001546001600160a01b0316141561121d5750600192915050565b8061122781613c25565b9150506111d2565b50600092915050565b6010546001600160a01b031633146112925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b60188054911515610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff909216919091179055565b610d3883838360405180602001604052806000815250611976565b606060006112f183611694565b905060008167ffffffffffffffff81111561130e5761130e61388b565b604051908082528060200260200182016040528015611337578160200160208202803683370190505b50905060005b8281101561137e5761134f8582610fa9565b82828151811061136157611361613bc7565b60209081029190910101528061137681613c25565b91505061133d565b509392505050565b600061139160085490565b82106114055760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b58565b6008828154811061141857611418613bc7565b90600052602060002001549050919050565b6010546001600160a01b031633146114845760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601190602084019061356e565b5050565b6010546001600160a01b031633146114f55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601755565b6000818152600260205260408120546001600160a01b031680610a3a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610b58565b6010546001600160a01b031633146115df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b6010546001600160a01b0316331461166a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6116738461142a565b61167c83612463565b61168582610dd1565b61168e8161149b565b50505050565b60006001600160a01b0382166117125760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b58565b506001600160a01b031660009081526003602052604090205490565b6010546001600160a01b031633146117885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6117926000612a13565b565b6010546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b60006117f960085490565b6015549091506118098383613c5e565b111561187d5760405162461bcd60e51b815260206004820152602360248201527f43616e2774206d696e74206d6f7265207468616e206d6178204e46542073757060448201527f706c7900000000000000000000000000000000000000000000000000000000006064820152608401610b58565b60015b828111610d38576000611891612a7d565b905060155461189f60085490565b10156118b0576118b0335b82612c28565b50806118bb81613c25565b915050611880565b6010546001600160a01b0316331461191d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff1662010000179055565b606060018054610a4f90613b73565b6000611966600a5490565b905090565b611497338383612c42565b611980338361271b565b6119f25760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b58565b61168e84848484612d2f565b60198181548110611a0e57600080fd5b6000918252602090912001546001600160a01b0316905081565b6002600f541415611a7b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f556010546001600160a01b03163314611ada5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b816001600160a01b031663a9059cbb306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b2257600080fd5b505afa158015611b36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5a9190613c76565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015611bba57600080fd5b505af1158015611bce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f189190613c93565b6000611bfc6123da565b11611c495760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6002600f541415611c9c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b58565b6002600f55601a546001600160a01b03166000611cb860085490565b60185490915060ff1615611d0e5760405162461bcd60e51b815260206004820152601760248201527f746869732066756e6374696f6e206973207061757365640000000000000000006044820152606401610b58565b333214611d835760405162461bcd60e51b815260206004820152602360248201527f43616e2774206d696e74207468726f75676820616e6f7468657220636f6e747260448201527f61637400000000000000000000000000000000000000000000000000000000006064820152608401610b58565b600083118015611d9557506017548311155b611de15760405162461bcd60e51b815260206004820152601a60248201527f6578636565647320746865206d6178696d756d207065722074780000000000006044820152606401610b58565b336000908152601b6020526040902054601654611dfe8583613c5e565b1115611e4c5760405162461bcd60e51b815260206004820152601f60248201527f6578636565647320746865206d6178696d756d207065722061646472657373006044820152606401610b58565b601554611e598584613c5e565b1115611ea75760405162461bcd60e51b815260206004820152601f60248201527f43616e2774206d696e74206d6f7265207468616e206d617820737570706c79006044820152606401610b58565b6010546001600160a01b031633146121235760185460ff61010090910416151560011415611f7f57611ed8336111ce565b611f245760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c69737465640000000000000000006044820152606401610b58565b601654611f318583613c5e565b1115611f7f5760405162461bcd60e51b815260206004820152601f60248201527f6578636565647320746865206d6178696d756d207065722061646472657373006044820152606401610b58565b600084601454611f8f9190613cb0565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815233600482015290915081906001600160a01b038616906370a082319060240160206040518083038186803b158015611fec57600080fd5b505afa158015612000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120249190613ced565b10156120725760405162461bcd60e51b815260206004820181905260248201527f4552524f522055534552203430342c2077726f6e6720707269636520736572736044820152606401610b58565b6001600160a01b0384166323b872dd336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b03909116600482015230602482015260448101849052606401602060405180830381600087803b1580156120e857600080fd5b505af11580156120fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121209190613c93565b50505b60015b848111612167576000612137612a7d565b905060155461214560085490565b101561215457612154336118aa565b508061215f81613c25565b915050612126565b50506001600f55505050565b60128054610b8a90613b73565b6000818152600260205260409020546060906001600160a01b031661220d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610b58565b60185462010000900460ff166122af576013805461222a90613b73565b80601f016020809104026020016040519081016040528092919081815260200182805461225690613b73565b80156122a35780601f10612278576101008083540402835291602001916122a3565b820191906000526020600020905b81548152906001019060200180831161228657829003601f168201915b50505050509050919050565b60006122b9612db8565b905060008151116122d95760405180602001604052806000815250612307565b806122e384612dc7565b60126040516020016122f793929190613d06565b6040516020818303038152906040525b9392505050565b6010546001600160a01b031633146123685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b601455565b6010546001600160a01b031633146123c75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601290602084019061356e565b60006123e461195b565b600b546119669190613e01565b6010546001600160a01b0316331461244b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b612457601960006135f2565b610d3860198383613610565b6010546001600160a01b031633146124bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b805161149790601390602084019061356e565b6010546001600160a01b0316331461252a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b58565b6001600160a01b0381166125a65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b58565b6125af81612a13565b50565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061264557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a3a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a3a565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906126e2826114fa565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166127a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610b58565b60006127b0836114fa565b9050806001600160a01b0316846001600160a01b031614806127eb5750836001600160a01b03166127e084610ad2565b6001600160a01b0316145b8061281b57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612836826114fa565b6001600160a01b0316146128b25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610b58565b6001600160a01b03821661292d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b58565b612938838383612ef9565b612943600082612695565b6001600160a01b038316600090815260036020526040812080546001929061296c908490613e01565b90915550506001600160a01b038216600090815260036020526040812080546001929061299a908490613c5e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080612a886123da565b11612ad55760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6000612adf61195b565b600b54612aec9190613e01565b6040517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000033606090811b8216602084015241901b166034820152446048820152456068820152426088820152909150600090829060a8016040516020818303038152906040528051906020012060001c612b669190613e47565b6000818152600c602052604081205491925090612b84575080612b95565b506000818152600c60205260409020545b600c6000612ba4600186613e01565b81526020019081526020016000205460001415612bda57612bc6600184613e01565b6000838152600c6020526040902055612c0a565b600c6000612be9600186613e01565b81526020808201929092526040908101600090812054858252600c90935220555b612c12612fb1565b50600d54612c209082613c5e565b935050505090565b611497828260405180602001604052806000815250613024565b816001600160a01b0316836001600160a01b03161415612ca45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b58565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612d3a848484612823565b612d46848484846130ad565b61168e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b606060118054610a4f90613b73565b606081612e0757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612e315780612e1b81613c25565b9150612e2a9050600a83613e5b565b9150612e0b565b60008167ffffffffffffffff811115612e4c57612e4c61388b565b6040519080825280601f01601f191660200182016040528015612e76576020820181803683370190505b5090505b841561281b57612e8b600183613e01565b9150612e98600a86613e47565b612ea3906030613c5e565b60f81b818381518110612eb857612eb8613bc7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612ef2600a86613e5b565b9450612e7a565b6001600160a01b038316612f5457612f4f81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612f77565b816001600160a01b0316836001600160a01b031614612f7757612f778382613278565b6001600160a01b038216612f8e57610d3881613315565b826001600160a01b0316826001600160a01b031614610d3857610d3882826133c4565b600080612fbc6123da565b116130095760405162461bcd60e51b815260206004820152601860248201527f4e6f206d6f726520746f6b656e7320617661696c61626c6500000000000000006044820152606401610b58565b6000613014600a5490565b9050611966600a80546001019055565b61302e8383613408565b61303b60008484846130ad565b610d385760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b60006001600160a01b0384163b1561326d576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061310a903390899088908890600401613e6f565b602060405180830381600087803b15801561312457600080fd5b505af1925050508015613172575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261316f91810190613eab565b60015b613222573d8080156131a0576040519150601f19603f3d011682016040523d82523d6000602084013e6131a5565b606091505b50805161321a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b58565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061281b565b506001949350505050565b6000600161328584611694565b61328f9190613e01565b6000838152600760205260409020549091508082146132e2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061332790600190613e01565b6000838152600960205260408120546008805493945090928490811061334f5761334f613bc7565b90600052602060002001549050806008838154811061337057613370613bc7565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806133a8576133a8613ec8565b6001900381819060005260206000200160009055905550505050565b60006133cf83611694565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b03821661345e5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b58565b6000818152600260205260409020546001600160a01b0316156134c35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b58565b6134cf60008383612ef9565b6001600160a01b03821660009081526003602052604081208054600192906134f8908490613c5e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461357a90613b73565b90600052602060002090601f01602090048101928261359c57600085556135e2565b82601f106135b557805160ff19168380011785556135e2565b828001600101855582156135e2579182015b828111156135e25782518255916020019190600101906135c7565b506135ee92915061367b565b5090565b50805460008255906000526020600020908101906125af919061367b565b8280548282559060005260206000209081019282156135e2579160200282015b828111156135e25781547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03843516178255602090920191600190910190613630565b5b808211156135ee576000815560010161367c565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146125af57600080fd5b6000602082840312156136d057600080fd5b813561230781613690565b60005b838110156136f65781810151838201526020016136de565b8381111561168e5750506000910152565b6000815180845261371f8160208601602086016136db565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006123076020830184613707565b60006020828403121561377657600080fd5b5035919050565b6001600160a01b03811681146125af57600080fd5b600080604083850312156137a557600080fd5b82356137b08161377d565b946020939093013593505050565b6000602082840312156137d057600080fd5b81356123078161377d565b6000806000606084860312156137f057600080fd5b83356137fb8161377d565b9250602084013561380b8161377d565b929592945050506040919091013590565b80151581146125af57600080fd5b60006020828403121561383c57600080fd5b81356123078161381c565b6020808252825182820181905260009190848201906040850190845b8181101561387f57835183529284019291840191600101613863565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff808411156138d5576138d561388b565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561391b5761391b61388b565b8160405280935085815286868601111561393457600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261395f57600080fd5b612307838335602085016138ba565b60006020828403121561398057600080fd5b813567ffffffffffffffff81111561399757600080fd5b61281b8482850161394e565b600080600080608085870312156139b957600080fd5b843567ffffffffffffffff808211156139d157600080fd5b6139dd8883890161394e565b955060208701359150808211156139f357600080fd5b50613a008782880161394e565b949794965050505060408301359260600135919050565b60008060408385031215613a2a57600080fd5b8235613a358161377d565b91506020830135613a458161381c565b809150509250929050565b60008060008060808587031215613a6657600080fd5b8435613a718161377d565b93506020850135613a818161377d565b925060408501359150606085013567ffffffffffffffff811115613aa457600080fd5b8501601f81018713613ab557600080fd5b613ac4878235602084016138ba565b91505092959194509250565b60008060408385031215613ae357600080fd5b8235613aee8161377d565b91506020830135613a458161377d565b60008060208385031215613b1157600080fd5b823567ffffffffffffffff80821115613b2957600080fd5b818501915085601f830112613b3d57600080fd5b813581811115613b4c57600080fd5b8660208260051b8501011115613b6157600080fd5b60209290920196919550909350505050565b600181811c90821680613b8757607f821691505b60208210811415613bc1577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c5757613c57613bf6565b5060010190565b60008219821115613c7157613c71613bf6565b500190565b600060208284031215613c8857600080fd5b81516123078161377d565b600060208284031215613ca557600080fd5b81516123078161381c565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ce857613ce8613bf6565b500290565b600060208284031215613cff57600080fd5b5051919050565b600084516020613d198285838a016136db565b855191840191613d2c8184848a016136db565b8554920191600090600181811c9080831680613d4957607f831692505b858310811415613d80577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b808015613d945760018114613dc357613df0565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00851688528388019550613df0565b60008b81526020902060005b85811015613de85781548a820152908401908801613dcf565b505083880195505b50939b9a5050505050505050505050565b600082821015613e1357613e13613bf6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613e5657613e56613e18565b500690565b600082613e6a57613e6a613e18565b500490565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613ea16080830184613707565b9695505050505050565b600060208284031215613ebd57600080fd5b815161230781613690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea26469706673582212200b832d3c06378eeeedc491b26447020cac657a00b2b9e66b2057bf5e787dc1de64736f6c63430008090033
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.