ERC-721
Overview
Max Total Supply
411 TLM
Holders
268
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 TLMLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
NFTv1
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import "openzeppelin-contracts/contracts/token/ERC721/ERC721.sol"; import "openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "openzeppelin-contracts/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "openzeppelin-contracts/contracts/utils/Strings.sol"; import "openzeppelin-contracts/contracts/access/Ownable.sol"; import "openzeppelin-contracts/contracts/utils/Counters.sol"; import "openzeppelin-contracts/contracts/utils/Base64.sol"; contract NFTv1 is ERC721,ERC721Burnable, ERC721Enumerable, Ownable{ using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public maxSupply; bool public isSale = false; uint256 public cost = 200000000000000000; uint256 public maxMintPerTx = 10; string public tokenName = unicode'The Laughing Man Original'; string public description = unicode"StorySyncNFT(Original)\\nDive into the world of Japanese cyberpunk.\\n\\nCopycat or ghost, which will you choose? \\n\\nOfficial Project of Ghost in the Shell STAND ALONE COMPLEX\\n©Shirow Masamune・Production I.G/KODANSHA All Rights Reserved."; constructor( string memory _name, string memory _symbol, uint256 _maxSupply ) ERC721(_name, _symbol) { maxSupply = _maxSupply; } function mint(uint256 _amount) public payable { require(isSale, 'NFTV1Error: Sale unavailable'); require(_amount > 0, 'NFTV1Error: Mint amount invalid'); uint256 tokenId = _tokenIdCounter.current(); require(tokenId + _amount <= maxSupply,'NFTV1Error: Mint amount overloaded'); require(_amount <= maxMintPerTx,'NFTV1Error: Mint per Tx overloaded'); if (msg.sender != owner()) { require(msg.value >= cost * _amount,'NFTV1Error: Insufficient fund'); } for (uint256 i = 1; i <= _amount; i++) { _tokenIdCounter.increment(); _safeMint(msg.sender, _tokenIdCounter.current()); } } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId, batchSize); } function getCurrentTokenId() view public returns (uint256){ return _tokenIdCounter.current(); } function setSaleOpen() public onlyOwner { isSale = true; } function setSaleClose() public onlyOwner { isSale = false; } function setCost(uint256 _cost) public onlyOwner { cost = _cost; } function setMaxMintPerTx(uint256 _maxMintPerTx) public onlyOwner { maxMintPerTx = _maxMintPerTx; } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } function withdraw() public payable onlyOwner { (bool os, ) = payable(owner()).call{value: address(this).balance}(""); require(os); } function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory svg = getSVG(); bytes memory json = abi.encodePacked( '{"name": "', tokenName, '", "description": "', description, '", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '"}' ); return string(abi.encodePacked("data:application/json;base64,", Base64.encode(json))); } function getSVG() private pure returns (string memory) { return string( abi.encodePacked( unicode'<svg id="master-artboard" viewBox="0 0 1400 980" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" style="enable-background:new 0 0 1400 980" width="1400" height="980" xmlns:xlink="http://www.w3.org/1999/xlink"><path id="ee-background" style="fill:#fff;fill-opacity:0;pointer-events:none" d="M0 0h1400v980H0z"/><defs><style id="ee-google-fonts">.filler{fill:#002C59}.stroker{stroke:#002C59}@import url(https://fonts.googleapis.com/css?family=Fjalla+One:400|Roboto:100,100italic,300,300italic,400,400italic,500,500italic,700,700italic,900,900italic);</style></defs><g/><g transform="matrix(1.96 0 0 1.96 214.164 .558)"><path d="M0 0h500v500H0V0Z" class="cls-4" transform="rotate(90 250.12 250.12)" style="fill:#FFFFFF;fill-opacity:1" id="background"/><path class="stroker" d="M50 250C50 96.04 216.667-.185 350 76.795 411.88 112.52 450 178.547 450 250c0 153.96-166.667 250.185-300 173.205C88.12 387.48 50 321.453 50 250" stroke-width="10" fill="#FFF" style="fill-opacity:1;stroke-width:12" transform="matrix(.98619 0 0 .98085 3.454 4.788)"/><path id="tlms" d="M85 250c0-127.017 137.5-206.403 247.5-142.894C383.551 136.58 415 191.05 415 250c0 127.017-137.5 206.403-247.5 142.894C116.449 363.42 85 308.95 85 250" stroke="transparent" fill="#FFF" style="fill-opacity:1"/><animateTransform attributeName="transform" type="rotate" from="0 250 250" to="-360 250 250" dur="10s" repeatCount="indefinite" xlink:href="#tlms"/><path class="stroker" d="M110 250c0-107.772 116.667-175.13 210-121.244 43.316 25.009 70 71.227 70 121.244 0 107.772-116.667 175.13-210 121.244-43.316-25.009-70-71.227-70-121.244" stroke-width="20" fill="#FFF" style="stroke-width:23;fill-opacity:1" transform="translate(4.7 5.21) scale(.98038)"/><path class="filler" d="M147 279a104.907 104.907 0 0 0 49.17 71.33c15.76 9.52 34.2 14.98 53.85 14.98s38.08-5.46 53.85-14.98c25.44-15.45 43.7-41.05 49.17-71.33H138.91 147Zm156.86 44.48c-14.52 12.49-33.25 20-53.85 20s-39.33-7.49-53.85-20c-7.49-6.24-13.74-13.89-18.42-22.48h144.53c-4.68 8.58-11.08 16.23-18.42 22.48h.01Z" style="fill-opacity:1" transform="translate(-5.067 -16.232) scale(1.01855)"/><text class="filler" font-size="30" font-weight="bold" font-family="Impact" style="font-size:30px;font-weight:700;font-family:Impact;white-space:pre;fill-opacity:1" transform="matrix(.957 0 0 .957 9.58 8.932)"><textPath style="fill-opacity:1" xlink:href="#tlms">Or should I? Or should I? Or should I? Or should I?</textPath></text></g><g transform="matrix(6.78306 0 0 .44565 38.907 388.43)"><g id="g-9"><path class="filler" d="M58 49h100v100H58V49z" id="g-10"/></g></g><g transform="translate(56.168 335.413) scale(1.60923)"><g id="g-3" transform="translate(-3.497)"><path class="filler" d="M652 46c27.6 0 50 22.4 50 50s-22.4 50-50 50-50-22.4-50-50 22.4-50 50-50z" id="g-4"/></g></g><g transform="matrix(1.65263 0 0 .71434 838.123 419.821)"><g id="g-1"><path class="st0" d="M58 49h100v100H58V49z" style="fill:#fff" transform="translate(2.614)" id="g-2"/></g></g><g transform="matrix(.37601 0 0 .42555 960.479 506.376)"><g id="g-15"><path class="filler" d="M58 49h100v100H58V49z" style="stroke:#000;stroke-width:0" transform="matrix(3.41126 0 0 1.02518 -139.853 -3.705)" id="g-16"/></g></g><path d="M99 240h22v10H99v-10Z" stroke="transparent" fill="#FFF" transform="matrix(2.28176 0 0 1.65915 184.97 56.594)" style="fill-opacity:1"/><path class="filler stroker" d="M541.605 513.229s3.957-49.543 52.256-50.157c48.3-.614 52.89 50.973 52.89 50.973s-17.017-22.225-52.425-22.728c-29.803-.423-52.846 21.86-52.72 21.912Z" style="fill-opacity:1;stroke-opacity:0;stroke-width:20;paint-order:fill" transform="translate(214.56 1.517)"/><path class="filler stroker" d="M541.605 513.229s3.957-49.543 52.256-50.157c48.3-.614 52.89 50.973 52.89 50.973s-17.017-22.225-52.425-22.728c-29.803-.423-52.846 21.86-52.72 21.912Z" style="fill-opacity:1;stroke-opacity:0;stroke-width:20;paint-order:fill" transform="translate(.636 1.517)"/><g transform="translate(627.316 183.456) scale(.13313)"><g id="g-5"><path class="filler" d="M652 46c27.6 0 50 22.4 50 50s-22.4 50-50 50-50-22.4-50-50 22.4-50 50-50z" id="g-6"/></g></g><g transform="translate(604.46 183.456) scale(.13313)"><g id="g-11"><path class="filler" d="M652 46c27.6 0 50 22.4 50 50s-22.4 50-50 50-50-22.4-50-50 22.4-50 50-50z" id="g-12"/></g></g><g transform="matrix(.24113 0 0 .13447 676.94 182.992)"><g id="Layer_2_4_"><path class="filler" d="M58 49h100v100H58V49z" id="Layer_1-2_4_"/></g></g><g transform="matrix(.36113 0 0 .13387 663.66 189.562)"><g id="g-17"><path class="filler" d="M58 49h100v100H58V49z" id="g-18"/></g></g><g transform="translate(635.188 422.09) scale(.7138)"><g id="g-19" transform="translate(3.034 -.268)"><path class="st0" d="M652 46c27.6 0 50 22.4 50 50s-22.4 50-50 50-50-22.4-50-50 22.4-50 50-50z" style="fill:#fff" id="g-20"/></g></g></svg>' ) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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 _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {} /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such * that `ownerOf(tokenId)` is `a`. */ // solhint-disable-next-line func-name-mixedcase function __unsafe_increaseBalance(address account, uint256 amount) internal { _balances[account] += amount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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 See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; 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 (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// 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 (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 (last updated v4.5.0) (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); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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); }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"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":"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":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintPerTx","type":"uint256"}],"name":"setMaxMintPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleClose","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenName","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
600d805460ff191690556702c68af0bb140000600e55600a600f5560c0604052601960809081527f546865204c61756768696e67204d616e204f726967696e616c0000000000000060a052601090620000599082620001f8565b5060405180610120016040528060f3815260200162003e4360f39139601190620000849082620001f8565b503480156200009257600080fd5b5060405162003f3638038062003f36833981016040819052620000b59162000373565b82826000620000c58382620001f8565b506001620000d48282620001f8565b505050620000f1620000eb620000fd60201b60201c565b62000101565b600c5550620003e69050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200017e57607f821691505b6020821081036200019f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001f357600081815260208120601f850160051c81016020861015620001ce5750805b601f850160051c820191505b81811015620001ef57828155600101620001da565b5050505b505050565b81516001600160401b0381111562000214576200021462000153565b6200022c8162000225845462000169565b84620001a5565b602080601f8311600181146200026457600084156200024b5750858301515b600019600386901b1c1916600185901b178555620001ef565b600085815260208120601f198616915b82811015620002955788860151825594840194600190910190840162000274565b5085821015620002b45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620002d657600080fd5b81516001600160401b0380821115620002f357620002f362000153565b604051601f8301601f19908116603f011681019082821181831017156200031e576200031e62000153565b816040528381526020925086838588010111156200033b57600080fd5b600091505b838210156200035f578582018301518183018401529082019062000340565b600093810190920192909252949350505050565b6000806000606084860312156200038957600080fd5b83516001600160401b0380821115620003a157600080fd5b620003af87838801620002c4565b94506020860151915080821115620003c657600080fd5b50620003d586828701620002c4565b925050604084015190509250925092565b613a4d80620003f66000396000f3fe6080604052600436106101ee5760003560e01c80636352211e1161010d578063a0712d68116100a0578063d5abeb011161006f578063d5abeb0114610529578063de7fcb1d1461053f578063e985e9c514610555578063f2fde38b1461059e578063f8c1c186146105be57600080fd5b8063a0712d68146104b6578063a22cb465146104c9578063b88d4fde146104e9578063c87b56dd1461050957600080fd5b80637284e416116100dc5780637284e416146104595780637de861ae1461046e5780638da5cb5b1461048357806395d89b41146104a157600080fd5b80636352211e146103ef5780636c02a9311461040f57806370a0823114610424578063715018a61461044457600080fd5b80632f745c591161018557806344a0d68a1161015457806344a0d68a1461037a5780634f6ccce71461039a57806356189236146103ba578063616cdb1e146103cf57600080fd5b80632f745c59146103125780633ccfd60b1461033257806342842e0e1461033a57806342966c681461035a57600080fd5b806313faede6116101c157806313faede6146102a457806318160ddd146102c857806319dad680146102dd57806323b872dd146102f257600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e36600461337c565b6105d8565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d6105e9565b60405161021f91906133f0565b34801561025657600080fd5b5061026a610265366004613403565b61067b565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d366004613438565b6106a2565b005b3480156102b057600080fd5b506102ba600e5481565b60405190815260200161021f565b3480156102d457600080fd5b506008546102ba565b3480156102e957600080fd5b506102a26107bc565b3480156102fe57600080fd5b506102a261030d366004613462565b6107d3565b34801561031e57600080fd5b506102ba61032d366004613438565b610805565b6102a261089b565b34801561034657600080fd5b506102a2610355366004613462565b610917565b34801561036657600080fd5b506102a2610375366004613403565b610932565b34801561038657600080fd5b506102a2610395366004613403565b610960565b3480156103a657600080fd5b506102ba6103b5366004613403565b61096d565b3480156103c657600080fd5b506102ba610a00565b3480156103db57600080fd5b506102a26103ea366004613403565b610a10565b3480156103fb57600080fd5b5061026a61040a366004613403565b610a1d565b34801561041b57600080fd5b5061023d610a7d565b34801561043057600080fd5b506102ba61043f36600461349e565b610b0b565b34801561045057600080fd5b506102a2610b91565b34801561046557600080fd5b5061023d610ba5565b34801561047a57600080fd5b506102a2610bb2565b34801561048f57600080fd5b50600a546001600160a01b031661026a565b3480156104ad57600080fd5b5061023d610bc6565b6102a26104c4366004613403565b610bd5565b3480156104d557600080fd5b506102a26104e43660046134b9565b610df3565b3480156104f557600080fd5b506102a261050436600461350b565b610e02565b34801561051557600080fd5b5061023d610524366004613403565b610e3a565b34801561053557600080fd5b506102ba600c5481565b34801561054b57600080fd5b506102ba600f5481565b34801561056157600080fd5b506102136105703660046135e7565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156105aa57600080fd5b506102a26105b936600461349e565b610f28565b3480156105ca57600080fd5b50600d546102139060ff1681565b60006105e382610f9e565b92915050565b6060600080546105f89061361a565b80601f01602080910402602001604051908101604052809291908181526020018280546106249061361a565b80156106715780601f1061064657610100808354040283529160200191610671565b820191906000526020600020905b81548152906001019060200180831161065457829003601f168201915b5050505050905090565b600061068682610fc3565b506000908152600460205260409020546001600160a01b031690565b60006106ad82610a1d565b9050806001600160a01b0316836001600160a01b03160361071f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061073b575061073b8133610570565b6107ad5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610716565b6107b78383611022565b505050565b6107c4611090565b600d805460ff19166001179055565b6107de335b826110ea565b6107fa5760405162461bcd60e51b815260040161071690613654565b6107b7838383611169565b600061081083610b0b565b82106108725760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610716565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6108a3611090565b60006108b7600a546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610901576040519150601f19603f3d011682016040523d82523d6000602084013e610906565b606091505b505090508061091457600080fd5b50565b6107b783838360405180602001604052806000815250610e02565b61093b336107d8565b6109575760405162461bcd60e51b815260040161071690613654565b610914816112da565b610968611090565b600e55565b600061097860085490565b82106109db5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b600882815481106109ee576109ee6136a1565b90600052602060002001549050919050565b6000610a0b600b5490565b905090565b610a18611090565b600f55565b6000818152600260205260408120546001600160a01b0316806105e35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b60108054610a8a9061361a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab69061361a565b8015610b035780601f10610ad857610100808354040283529160200191610b03565b820191906000526020600020905b815481529060010190602001808311610ae657829003601f168201915b505050505081565b60006001600160a01b038216610b755760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610716565b506001600160a01b031660009081526003602052604090205490565b610b99611090565b610ba3600061137d565b565b60118054610a8a9061361a565b610bba611090565b600d805460ff19169055565b6060600180546105f89061361a565b600d5460ff16610c275760405162461bcd60e51b815260206004820152601c60248201527f4e465456314572726f723a2053616c6520756e617661696c61626c65000000006044820152606401610716565b60008111610c775760405162461bcd60e51b815260206004820152601f60248201527f4e465456314572726f723a204d696e7420616d6f756e7420696e76616c6964006044820152606401610716565b6000610c82600b5490565b600c54909150610c9283836136cd565b1115610ceb5760405162461bcd60e51b815260206004820152602260248201527f4e465456314572726f723a204d696e7420616d6f756e74206f7665726c6f6164604482015261195960f21b6064820152608401610716565b600f54821115610d485760405162461bcd60e51b815260206004820152602260248201527f4e465456314572726f723a204d696e7420706572205478206f7665726c6f6164604482015261195960f21b6064820152608401610716565b600a546001600160a01b03163314610db75781600e54610d6891906136e0565b341015610db75760405162461bcd60e51b815260206004820152601d60248201527f4e465456314572726f723a20496e73756666696369656e742066756e640000006044820152606401610716565b60015b8281116107b757610dcf600b80546001019055565b610de133610ddc600b5490565b6113cf565b80610deb816136f7565b915050610dba565b610dfe3383836113e9565b5050565b610e0c33836110ea565b610e285760405162461bcd60e51b815260040161071690613654565b610e34848484846114b7565b50505050565b6000818152600260205260409020546060906001600160a01b0316610eb95760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610716565b6000610ec36114ea565b9050600060106011610ed484612c26565b604051602001610ee6939291906137ad565b6040516020818303038152906040529050610f0081612c26565b604051602001610f109190613856565b60405160208183030381529060405292505050919050565b610f30611090565b6001600160a01b038116610f955760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b6109148161137d565b60006001600160e01b0319821663780e9d6360e01b14806105e357506105e382612d79565b6000818152600260205260409020546001600160a01b03166109145760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061105782610a1d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600a546001600160a01b03163314610ba35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610716565b6000806110f683610a1d565b9050806001600160a01b0316846001600160a01b0316148061113d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806111615750836001600160a01b03166111568461067b565b6001600160a01b0316145b949350505050565b826001600160a01b031661117c82610a1d565b6001600160a01b0316146111a25760405162461bcd60e51b81526004016107169061389b565b6001600160a01b0382166112045760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610716565b6112118383836001612dc9565b826001600160a01b031661122482610a1d565b6001600160a01b03161461124a5760405162461bcd60e51b81526004016107169061389b565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006112e582610a1d565b90506112f5816000846001612dc9565b6112fe82610a1d565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610dfe828260405180602001604052806000815250612dd5565b816001600160a01b0316836001600160a01b03160361144a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610716565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6114c2848484611169565b6114ce84848484612e08565b610e345760405162461bcd60e51b8152600401610716906138e0565b6060604051602001612c12907f3c7376672069643d226d61737465722d617274626f617264222076696577426f81527f783d22302030203134303020393830222076657273696f6e3d22312e3122207860208201527f6d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766760408201527f2220783d22302220793d223022207374796c653d22656e61626c652d6261636b60608201527f67726f756e643a6e657720302030203134303020393830222077696474683d2260808201527f3134303022206865696768743d223938302220786d6c6e733a786c696e6b3d2260a08201527f687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e3c7060c08201527f6174682069643d2265652d6261636b67726f756e6422207374796c653d22666960e08201527f6c6c3a236666663b66696c6c2d6f7061636974793a303b706f696e7465722d656101008201527f76656e74733a6e6f6e652220643d224d30203068313430307639383048307a226101208201527f2f3e3c646566733e3c7374796c652069643d2265652d676f6f676c652d666f6e6101408201527f7473223e2e66696c6c65727b66696c6c3a233030324335397d2e7374726f6b656101608201527f727b7374726f6b653a233030324335397d40696d706f72742075726c286874746101808201527f70733a2f2f666f6e74732e676f6f676c65617069732e636f6d2f6373733f66616101a08201527f6d696c793d466a616c6c612b4f6e653a3430307c526f626f746f3a3130302c316101c08201527f30306974616c69632c3330302c3330306974616c69632c3430302c34303069746101e08201527f616c69632c3530302c3530306974616c69632c3730302c3730306974616c69636102008201527f2c3930302c3930306974616c6963293b3c2f7374796c653e3c2f646566733e3c6102208201527f672f3e3c67207472616e73666f726d3d226d617472697828312e3936203020306102408201527f20312e3936203231342e313634202e35353829223e3c7061746820643d224d306102608201527f20306835303076353030483056305a2220636c6173733d22636c732d342220746102808201527f72616e73666f726d3d22726f74617465283930203235302e3132203235302e316102a08201527f322922207374796c653d2266696c6c3a234646464646463b66696c6c2d6f70616102c08201527f636974793a31222069643d226261636b67726f756e64222f3e3c7061746820636102e08201527f6c6173733d227374726f6b65722220643d224d3530203235304335302039362e6103008201527f3034203231362e3636372d2e313835203335302037362e373935203431312e386103208201527f38203131322e353220343530203137382e3534372034353020323530633020316103408201527f35332e39362d3136362e363637203235302e3138352d333030203137332e32306103608201527f354338382e3132203338372e3438203530203332312e343533203530203235306103808201527f22207374726f6b652d77696474683d223130222066696c6c3d222346464622206103a08201527f7374796c653d2266696c6c2d6f7061636974793a313b7374726f6b652d7769646103c08201527f74683a313222207472616e73666f726d3d226d6174726978282e3938363139206103e08201527f302030202e393830383520332e34353420342e37383829222f3e3c70617468206104008201527f69643d22746c6d732220643d224d38352032353063302d3132372e30313720316104208201527f33372e352d3230362e343033203234372e352d3134322e383934433338332e356104408201527f3531203133362e353820343135203139312e30352034313520323530633020316104608201527f32372e3031372d3133372e35203230362e3430332d3234372e35203134322e386104808201527f3934433131362e343439203336332e3432203835203330382e393520383520326104a08201527f353022207374726f6b653d227472616e73706172656e74222066696c6c3d22236104c08201527f46464622207374796c653d2266696c6c2d6f7061636974793a31222f3e3c616e6104e08201527f696d6174655472616e73666f726d206174747269627574654e616d653d2274726105008201527f616e73666f726d2220747970653d22726f74617465222066726f6d3d223020326105208201527f3530203235302220746f3d222d333630203235302032353022206475723d22316105408201527f30732220726570656174436f756e743d22696e646566696e6974652220786c696105608201527f6e6b3a687265663d2223746c6d73222f3e3c7061746820636c6173733d2273746105808201527f726f6b65722220643d224d3131302032353063302d3130372e373732203131366105a08201527f2e3636372d3137352e3133203231302d3132312e3234342034332e33313620326105c08201527f352e3030392037302037312e323237203730203132312e3234342030203130376105e08201527f2e3737322d3131362e363637203137352e31332d323130203132312e3234342d6106008201527f34332e3331362d32352e3030392d37302d37312e3232372d37302d3132312e326106208201527f343422207374726f6b652d77696474683d223230222066696c6c3d22234646466106408201527f22207374796c653d227374726f6b652d77696474683a32333b66696c6c2d6f706106608201527f61636974793a3122207472616e73666f726d3d227472616e736c61746528342e6106808201527f3720352e323129207363616c65282e393830333829222f3e3c7061746820636c6106a08201527f6173733d2266696c6c65722220643d224d31343720323739613130342e3930376106c08201527f203130342e3930372030203020302034392e31372037312e33336331352e37366106e08201527f20392e35322033342e322031342e39382035332e38352031342e39387333382e6107008201527f30382d352e34362035332e38352d31342e39386332352e34342d31352e3435206107208201527f34332e372d34312e30352034392e31372d37312e3333483133382e39312031346107408201527f375a6d3135362e38362034342e3438632d31342e35322031322e34392d33332e6107608201527f32352032302d35332e3835203230732d33392e33332d372e34392d35332e38356107808201527f2d3230632d372e34392d362e32342d31332e37342d31332e38392d31382e34326107a08201527f2d32322e3438683134342e3533632d342e363820382e35382d31312e303820316107c08201527f362e32332d31382e34322032322e3438682e30315a22207374796c653d2266696107e08201527f6c6c2d6f7061636974793a3122207472616e73666f726d3d227472616e736c616108008201527f7465282d352e303637202d31362e32333229207363616c6528312e30313835356108208201527f29222f3e3c7465787420636c6173733d2266696c6c65722220666f6e742d73696108408201527f7a653d2233302220666f6e742d7765696768743d22626f6c642220666f6e742d6108608201527f66616d696c793d22496d7061637422207374796c653d22666f6e742d73697a656108808201527f3a333070783b666f6e742d7765696768743a3730303b666f6e742d66616d696c6108a08201527f793a496d706163743b77686974652d73706163653a7072653b66696c6c2d6f706108c08201527f61636974793a3122207472616e73666f726d3d226d6174726978282e393537206108e08201527f302030202e39353720392e353820382e39333229223e3c7465787450617468206109008201527f7374796c653d2266696c6c2d6f7061636974793a312220786c696e6b3a6872656109208201527f663d2223746c6d73223e4f722073686f756c6420493fe38080e38080e380804f6109408201527f722073686f756c6420493fe38080e38080e38080e380804f722073686f756c646109608201527f20493fe38080e38080e380804f722073686f756c6420493f3c2f7465787450616109808201527f74683e3c2f746578743e3c2f673e3c67207472616e73666f726d3d226d6174726109a08201527f697828362e373833303620302030202e34343536352033382e393037203338386109c08201527f2e343329223e3c672069643d22672d39223e3c7061746820636c6173733d22666109e08201527f696c6c65722220643d224d353820343968313030763130304835385634397a22610a008201527f202069643d22672d3130222f3e3c2f673e3c2f673e3c67207472616e73666f72610a208201527f6d3d227472616e736c6174652835362e313638203333352e3431332920736361610a408201527f6c6528312e363039323329223e3c672069643d22672d3322207472616e73666f610a608201527f726d3d227472616e736c617465282d332e34393729223e3c7061746820636c61610a808201527f73733d2266696c6c65722220643d224d3635322034366332372e362030203530610aa08201527f2032322e34203530203530732d32322e342035302d35302035302d35302d3232610ac08201527f2e342d35302d35302032322e342d35302035302d35307a22202069643d22672d610ae08201527f34222f3e3c2f673e3c2f673e3c67207472616e73666f726d3d226d6174726978610b008201527f28312e363532363320302030202e3731343334203833382e313233203431392e610b208201527f38323129223e3c672069643d22672d31223e3c7061746820636c6173733d2273610b408201527f74302220643d224d353820343968313030763130304835385634397a22207374610b608201527f796c653d2266696c6c3a2366666622207472616e73666f726d3d227472616e73610b808201527f6c61746528322e36313429222069643d22672d32222f3e3c2f673e3c2f673e3c610ba08201527f67207472616e73666f726d3d226d6174726978282e333736303120302030202e610bc08201527f3432353535203936302e343739203530362e33373629223e3c672069643d2267610be08201527f2d3135223e3c7061746820636c6173733d2266696c6c65722220643d224d3538610c008201527f20343968313030763130304835385634397a22207374796c653d227374726f6b610c208201527f653a233030303b7374726f6b652d77696474683a3022207472616e73666f726d610c408201527f3d226d617472697828332e34313132362030203020312e3032353138202d3133610c608201527f392e383533202d332e37303529222069643d22672d3136222f3e3c2f673e3c2f610c808201527f673e3c7061746820643d224d393920323430683232763130483939762d31305a610ca08201527f22207374726f6b653d227472616e73706172656e74222066696c6c3d22234646610cc08201527f4622207472616e73666f726d3d226d617472697828322e323831373620302030610ce08201527f20312e3635393135203138342e39372035362e3539342922207374796c653d22610d008201527f66696c6c2d6f7061636974793a31222f3e3c7061746820636c6173733d226669610d208201527f6c6c6572207374726f6b65722220643d224d3534312e363035203531332e3232610d408201527f3973332e3935372d34392e3534332035322e3235362d35302e3135376334382e610d608201527f332d2e3631342035322e38392035302e3937332035322e38392035302e393733610d808201527f732d31372e3031372d32322e3232352d35322e3432352d32322e373238632d32610da08201527f392e3830332d2e3432332d35322e3834362032312e38362d35322e3732203231610dc08201527f2e3931325a22207374796c653d2266696c6c2d6f7061636974793a313b737472610de08201527f6f6b652d6f7061636974793a303b7374726f6b652d77696474683a32303b7061610e008201527f696e742d6f726465723a66696c6c22207472616e73666f726d3d227472616e73610e208201527f6c617465283231342e353620312e35313729222f3e3c7061746820636c617373610e408201527f3d2266696c6c6572207374726f6b65722220643d224d3534312e363035203531610e608201527f332e32323973332e3935372d34392e3534332035322e3235362d35302e313537610e808201527f6334382e332d2e3631342035322e38392035302e3937332035322e3839203530610ea08201527f2e393733732d31372e3031372d32322e3232352d35322e3432352d32322e3732610ec08201527f38632d32392e3830332d2e3432332d35322e3834362032312e38362d35322e37610ee08201527f322032312e3931325a22207374796c653d2266696c6c2d6f7061636974793a31610f008201527f3b7374726f6b652d6f7061636974793a303b7374726f6b652d77696474683a32610f208201527f303b7061696e742d6f726465723a66696c6c22207472616e73666f726d3d2274610f408201527f72616e736c617465282e36333620312e35313729222f3e3c67207472616e7366610f608201527f6f726d3d227472616e736c617465283632372e333136203138332e3435362920610f808201527f7363616c65282e313333313329223e3c672069643d22672d35223e3c70617468610fa08201527f20636c6173733d2266696c6c65722220643d224d3635322034366332372e3620610fc08201527f302035302032322e34203530203530732d32322e342035302d35302035302d35610fe08201527f302d32322e342d35302d35302032322e342d35302035302d35307a22202069646110008201527f3d22672d36222f3e3c2f673e3c2f673e3c67207472616e73666f726d3d2274726110208201527f616e736c617465283630342e3436203138332e34353629207363616c65282e316110408201527f3333313329223e3c672069643d22672d3131223e3c7061746820636c6173733d6110608201527f2266696c6c65722220643d224d3635322034366332372e3620302035302032326110808201527f2e34203530203530732d32322e342035302d35302035302d35302d32322e342d6110a08201527f35302d35302032322e342d35302035302d35307a222069643d22672d3132222f6110c08201527f3e3c2f673e3c2f673e3c67207472616e73666f726d3d226d6174726978282e326110e08201527f3431313320302030202e3133343437203637362e3934203138322e39393229226111008201527f3e3c672069643d224c617965725f325f345f223e3c7061746820636c6173733d6111208201527f2266696c6c65722220643d224d353820343968313030763130304835385634396111408201527f7a222069643d224c617965725f312d325f345f222f3e3c2f673e3c2f673e3c676111608201527f207472616e73666f726d3d226d6174726978282e333631313320302030202e316111808201527f33333837203636332e3636203138392e35363229223e3c672069643d22672d316111a08201527f37223e3c7061746820636c6173733d2266696c6c65722220643d224d353820346111c08201527f3968313030763130304835385634397a222069643d22672d3138222f3e3c2f676111e08201527f3e3c2f673e3c67207472616e73666f726d3d227472616e736c617465283633356112008201527f2e313838203432322e303929207363616c65282e3731333829223e3c672069646112208201527f3d22672d313922207472616e73666f726d3d227472616e736c61746528332e306112408201527f3334202d2e32363829223e3c7061746820636c6173733d227374302220643d226112608201527f4d3635322034366332372e3620302035302032322e34203530203530732d32326112808201527f2e342035302d35302035302d35302d32322e342d35302d35302032322e342d356112a08201527f302035302d35307a22207374796c653d2266696c6c3a23666666222069643d226112c0820152743396991811179f1e17b39f1e17b39f1e17b9bb339f60591b6112e08201526112f50190565b604051602081830303815290604052905090565b60608151600003612c4557505060408051602081019091526000815290565b60006040518060600160405280604081526020016139d86040913990506000600384516002612c7491906136cd565b612c7e9190613932565b612c899060046136e0565b67ffffffffffffffff811115612ca157612ca16134f5565b6040519080825280601f01601f191660200182016040528015612ccb576020820181803683370190505b509050600182016020820185865187015b80821015612d37576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612cdc565b5050600386510660018114612d535760028114612d6657612d6e565b603d6001830353603d6002830353612d6e565b603d60018303535b509195945050505050565b60006001600160e01b031982166380ac58cd60e01b1480612daa57506001600160e01b03198216635b5e139f60e01b145b806105e357506301ffc9a760e01b6001600160e01b03198316146105e3565b610e3484848484612f09565b612ddf838361303d565b612dec6000848484612e08565b6107b75760405162461bcd60e51b8152600401610716906138e0565b60006001600160a01b0384163b15612efe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612e4c903390899088908890600401613954565b6020604051808303816000875af1925050508015612e87575060408051601f3d908101601f19168201909252612e8491810190613991565b60015b612ee4573d808015612eb5576040519150601f19603f3d011682016040523d82523d6000602084013e612eba565b606091505b508051600003612edc5760405162461bcd60e51b8152600401610716906138e0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611161565b506001949350505050565b6001811115612f785760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610716565b816001600160a01b038516612fd457612fcf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612ff7565b836001600160a01b0316856001600160a01b031614612ff757612ff785826131d6565b6001600160a01b0384166130135761300e81613273565b613036565b846001600160a01b0316846001600160a01b031614613036576130368482613322565b5050505050565b6001600160a01b0382166130935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152600260205260409020546001600160a01b0316156130f85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b613106600083836001612dc9565b6000818152600260205260409020546001600160a01b03161561316b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600060016131e384610b0b565b6131ed91906139ae565b600083815260076020526040902054909150808214613240576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613285906001906139ae565b600083815260096020526040812054600880549394509092849081106132ad576132ad6136a1565b9060005260206000200154905080600883815481106132ce576132ce6136a1565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613306576133066139c1565b6001900381819060005260206000200160009055905550505050565b600061332d83610b0b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b03198116811461091457600080fd5b60006020828403121561338e57600080fd5b813561339981613366565b9392505050565b60005b838110156133bb5781810151838201526020016133a3565b50506000910152565b600081518084526133dc8160208601602086016133a0565b601f01601f19169290920160200192915050565b60208152600061339960208301846133c4565b60006020828403121561341557600080fd5b5035919050565b80356001600160a01b038116811461343357600080fd5b919050565b6000806040838503121561344b57600080fd5b6134548361341c565b946020939093013593505050565b60008060006060848603121561347757600080fd5b6134808461341c565b925061348e6020850161341c565b9150604084013590509250925092565b6000602082840312156134b057600080fd5b6133998261341c565b600080604083850312156134cc57600080fd5b6134d58361341c565b9150602083013580151581146134ea57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561352157600080fd5b61352a8561341c565b93506135386020860161341c565b925060408501359150606085013567ffffffffffffffff8082111561355c57600080fd5b818701915087601f83011261357057600080fd5b813581811115613582576135826134f5565b604051601f8201601f19908116603f011681019083821181831017156135aa576135aa6134f5565b816040528281528a60208487010111156135c357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156135fa57600080fd5b6136038361341c565b91506136116020840161341c565b90509250929050565b600181811c9082168061362e57607f821691505b60208210810361364e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105e3576105e36136b7565b80820281158282048414176105e3576105e36136b7565b600060018201613709576137096136b7565b5060010190565b8054600090600181811c908083168061372a57607f831692505b6020808410820361374b57634e487b7160e01b600052602260045260246000fd5b81801561375f5760018114613774576137a1565b60ff19861689528415158502890196506137a1565b60008881526020902060005b868110156137995781548b820152908501908301613780565b505084890196505b50505050505092915050565b693d913730b6b2911d101160b11b815260006137cc600a830186613710565b72111610113232b9b1b934b83a34b7b7111d101160691b81526137f26013820186613710565b90507f222c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b81526618985cd94d8d0b60ca1b6020820152835161383a8160278401602088016133a0565b61227d60f01b6027929091019182015260290195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161388e81601d8501602087016133a0565b91909101601d0192915050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261394f57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613987908301846133c4565b9695505050505050565b6000602082840312156139a357600080fd5b815161339981613366565b818103818111156105e3576105e36136b7565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220c2cebed0d48240c4b7d102d66f9d4f95c71967b8b42b8da6a7e1d522a1bd556f64736f6c6343000812003353746f727953796e634e4654efbc884f726967696e616cefbc895c6e4469766520696e746f2074686520776f726c64206f66204a6170616e65736520637962657270756e6b2e5c6e5c6e436f7079636174206f722067686f73742c2077686963682077696c6c20796f752063686f6f73653f205c6e5c6e4f6666696369616c2050726f6a656374206f662047686f737420696e20746865205368656c6c205354414e4420414c4f4e4520434f4d504c45585c6ec2a9536869726f77204d6173616d756e65e383bb50726f64756374696f6e20492e472f4b4f44414e53484120416c6c205269676874732052657365727665642e000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000000000000000000000000000000000000000000019546865204c61756768696e67204d616e204f726967696e616c000000000000000000000000000000000000000000000000000000000000000000000000000003544c4d0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101ee5760003560e01c80636352211e1161010d578063a0712d68116100a0578063d5abeb011161006f578063d5abeb0114610529578063de7fcb1d1461053f578063e985e9c514610555578063f2fde38b1461059e578063f8c1c186146105be57600080fd5b8063a0712d68146104b6578063a22cb465146104c9578063b88d4fde146104e9578063c87b56dd1461050957600080fd5b80637284e416116100dc5780637284e416146104595780637de861ae1461046e5780638da5cb5b1461048357806395d89b41146104a157600080fd5b80636352211e146103ef5780636c02a9311461040f57806370a0823114610424578063715018a61461044457600080fd5b80632f745c591161018557806344a0d68a1161015457806344a0d68a1461037a5780634f6ccce71461039a57806356189236146103ba578063616cdb1e146103cf57600080fd5b80632f745c59146103125780633ccfd60b1461033257806342842e0e1461033a57806342966c681461035a57600080fd5b806313faede6116101c157806313faede6146102a457806318160ddd146102c857806319dad680146102dd57806323b872dd146102f257600080fd5b806301ffc9a7146101f357806306fdde0314610228578063081812fc1461024a578063095ea7b314610282575b600080fd5b3480156101ff57600080fd5b5061021361020e36600461337c565b6105d8565b60405190151581526020015b60405180910390f35b34801561023457600080fd5b5061023d6105e9565b60405161021f91906133f0565b34801561025657600080fd5b5061026a610265366004613403565b61067b565b6040516001600160a01b03909116815260200161021f565b34801561028e57600080fd5b506102a261029d366004613438565b6106a2565b005b3480156102b057600080fd5b506102ba600e5481565b60405190815260200161021f565b3480156102d457600080fd5b506008546102ba565b3480156102e957600080fd5b506102a26107bc565b3480156102fe57600080fd5b506102a261030d366004613462565b6107d3565b34801561031e57600080fd5b506102ba61032d366004613438565b610805565b6102a261089b565b34801561034657600080fd5b506102a2610355366004613462565b610917565b34801561036657600080fd5b506102a2610375366004613403565b610932565b34801561038657600080fd5b506102a2610395366004613403565b610960565b3480156103a657600080fd5b506102ba6103b5366004613403565b61096d565b3480156103c657600080fd5b506102ba610a00565b3480156103db57600080fd5b506102a26103ea366004613403565b610a10565b3480156103fb57600080fd5b5061026a61040a366004613403565b610a1d565b34801561041b57600080fd5b5061023d610a7d565b34801561043057600080fd5b506102ba61043f36600461349e565b610b0b565b34801561045057600080fd5b506102a2610b91565b34801561046557600080fd5b5061023d610ba5565b34801561047a57600080fd5b506102a2610bb2565b34801561048f57600080fd5b50600a546001600160a01b031661026a565b3480156104ad57600080fd5b5061023d610bc6565b6102a26104c4366004613403565b610bd5565b3480156104d557600080fd5b506102a26104e43660046134b9565b610df3565b3480156104f557600080fd5b506102a261050436600461350b565b610e02565b34801561051557600080fd5b5061023d610524366004613403565b610e3a565b34801561053557600080fd5b506102ba600c5481565b34801561054b57600080fd5b506102ba600f5481565b34801561056157600080fd5b506102136105703660046135e7565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156105aa57600080fd5b506102a26105b936600461349e565b610f28565b3480156105ca57600080fd5b50600d546102139060ff1681565b60006105e382610f9e565b92915050565b6060600080546105f89061361a565b80601f01602080910402602001604051908101604052809291908181526020018280546106249061361a565b80156106715780601f1061064657610100808354040283529160200191610671565b820191906000526020600020905b81548152906001019060200180831161065457829003601f168201915b5050505050905090565b600061068682610fc3565b506000908152600460205260409020546001600160a01b031690565b60006106ad82610a1d565b9050806001600160a01b0316836001600160a01b03160361071f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061073b575061073b8133610570565b6107ad5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610716565b6107b78383611022565b505050565b6107c4611090565b600d805460ff19166001179055565b6107de335b826110ea565b6107fa5760405162461bcd60e51b815260040161071690613654565b6107b7838383611169565b600061081083610b0b565b82106108725760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610716565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6108a3611090565b60006108b7600a546001600160a01b031690565b6001600160a01b03164760405160006040518083038185875af1925050503d8060008114610901576040519150601f19603f3d011682016040523d82523d6000602084013e610906565b606091505b505090508061091457600080fd5b50565b6107b783838360405180602001604052806000815250610e02565b61093b336107d8565b6109575760405162461bcd60e51b815260040161071690613654565b610914816112da565b610968611090565b600e55565b600061097860085490565b82106109db5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b600882815481106109ee576109ee6136a1565b90600052602060002001549050919050565b6000610a0b600b5490565b905090565b610a18611090565b600f55565b6000818152600260205260408120546001600160a01b0316806105e35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b60108054610a8a9061361a565b80601f0160208091040260200160405190810160405280929190818152602001828054610ab69061361a565b8015610b035780601f10610ad857610100808354040283529160200191610b03565b820191906000526020600020905b815481529060010190602001808311610ae657829003601f168201915b505050505081565b60006001600160a01b038216610b755760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610716565b506001600160a01b031660009081526003602052604090205490565b610b99611090565b610ba3600061137d565b565b60118054610a8a9061361a565b610bba611090565b600d805460ff19169055565b6060600180546105f89061361a565b600d5460ff16610c275760405162461bcd60e51b815260206004820152601c60248201527f4e465456314572726f723a2053616c6520756e617661696c61626c65000000006044820152606401610716565b60008111610c775760405162461bcd60e51b815260206004820152601f60248201527f4e465456314572726f723a204d696e7420616d6f756e7420696e76616c6964006044820152606401610716565b6000610c82600b5490565b600c54909150610c9283836136cd565b1115610ceb5760405162461bcd60e51b815260206004820152602260248201527f4e465456314572726f723a204d696e7420616d6f756e74206f7665726c6f6164604482015261195960f21b6064820152608401610716565b600f54821115610d485760405162461bcd60e51b815260206004820152602260248201527f4e465456314572726f723a204d696e7420706572205478206f7665726c6f6164604482015261195960f21b6064820152608401610716565b600a546001600160a01b03163314610db75781600e54610d6891906136e0565b341015610db75760405162461bcd60e51b815260206004820152601d60248201527f4e465456314572726f723a20496e73756666696369656e742066756e640000006044820152606401610716565b60015b8281116107b757610dcf600b80546001019055565b610de133610ddc600b5490565b6113cf565b80610deb816136f7565b915050610dba565b610dfe3383836113e9565b5050565b610e0c33836110ea565b610e285760405162461bcd60e51b815260040161071690613654565b610e34848484846114b7565b50505050565b6000818152600260205260409020546060906001600160a01b0316610eb95760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610716565b6000610ec36114ea565b9050600060106011610ed484612c26565b604051602001610ee6939291906137ad565b6040516020818303038152906040529050610f0081612c26565b604051602001610f109190613856565b60405160208183030381529060405292505050919050565b610f30611090565b6001600160a01b038116610f955760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b6109148161137d565b60006001600160e01b0319821663780e9d6360e01b14806105e357506105e382612d79565b6000818152600260205260409020546001600160a01b03166109145760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610716565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061105782610a1d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600a546001600160a01b03163314610ba35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610716565b6000806110f683610a1d565b9050806001600160a01b0316846001600160a01b0316148061113d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806111615750836001600160a01b03166111568461067b565b6001600160a01b0316145b949350505050565b826001600160a01b031661117c82610a1d565b6001600160a01b0316146111a25760405162461bcd60e51b81526004016107169061389b565b6001600160a01b0382166112045760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610716565b6112118383836001612dc9565b826001600160a01b031661122482610a1d565b6001600160a01b03161461124a5760405162461bcd60e51b81526004016107169061389b565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006112e582610a1d565b90506112f5816000846001612dc9565b6112fe82610a1d565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610dfe828260405180602001604052806000815250612dd5565b816001600160a01b0316836001600160a01b03160361144a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610716565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6114c2848484611169565b6114ce84848484612e08565b610e345760405162461bcd60e51b8152600401610716906138e0565b6060604051602001612c12907f3c7376672069643d226d61737465722d617274626f617264222076696577426f81527f783d22302030203134303020393830222076657273696f6e3d22312e3122207860208201527f6d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766760408201527f2220783d22302220793d223022207374796c653d22656e61626c652d6261636b60608201527f67726f756e643a6e657720302030203134303020393830222077696474683d2260808201527f3134303022206865696768743d223938302220786d6c6e733a786c696e6b3d2260a08201527f687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e3c7060c08201527f6174682069643d2265652d6261636b67726f756e6422207374796c653d22666960e08201527f6c6c3a236666663b66696c6c2d6f7061636974793a303b706f696e7465722d656101008201527f76656e74733a6e6f6e652220643d224d30203068313430307639383048307a226101208201527f2f3e3c646566733e3c7374796c652069643d2265652d676f6f676c652d666f6e6101408201527f7473223e2e66696c6c65727b66696c6c3a233030324335397d2e7374726f6b656101608201527f727b7374726f6b653a233030324335397d40696d706f72742075726c286874746101808201527f70733a2f2f666f6e74732e676f6f676c65617069732e636f6d2f6373733f66616101a08201527f6d696c793d466a616c6c612b4f6e653a3430307c526f626f746f3a3130302c316101c08201527f30306974616c69632c3330302c3330306974616c69632c3430302c34303069746101e08201527f616c69632c3530302c3530306974616c69632c3730302c3730306974616c69636102008201527f2c3930302c3930306974616c6963293b3c2f7374796c653e3c2f646566733e3c6102208201527f672f3e3c67207472616e73666f726d3d226d617472697828312e3936203020306102408201527f20312e3936203231342e313634202e35353829223e3c7061746820643d224d306102608201527f20306835303076353030483056305a2220636c6173733d22636c732d342220746102808201527f72616e73666f726d3d22726f74617465283930203235302e3132203235302e316102a08201527f322922207374796c653d2266696c6c3a234646464646463b66696c6c2d6f70616102c08201527f636974793a31222069643d226261636b67726f756e64222f3e3c7061746820636102e08201527f6c6173733d227374726f6b65722220643d224d3530203235304335302039362e6103008201527f3034203231362e3636372d2e313835203335302037362e373935203431312e386103208201527f38203131322e353220343530203137382e3534372034353020323530633020316103408201527f35332e39362d3136362e363637203235302e3138352d333030203137332e32306103608201527f354338382e3132203338372e3438203530203332312e343533203530203235306103808201527f22207374726f6b652d77696474683d223130222066696c6c3d222346464622206103a08201527f7374796c653d2266696c6c2d6f7061636974793a313b7374726f6b652d7769646103c08201527f74683a313222207472616e73666f726d3d226d6174726978282e3938363139206103e08201527f302030202e393830383520332e34353420342e37383829222f3e3c70617468206104008201527f69643d22746c6d732220643d224d38352032353063302d3132372e30313720316104208201527f33372e352d3230362e343033203234372e352d3134322e383934433338332e356104408201527f3531203133362e353820343135203139312e30352034313520323530633020316104608201527f32372e3031372d3133372e35203230362e3430332d3234372e35203134322e386104808201527f3934433131362e343439203336332e3432203835203330382e393520383520326104a08201527f353022207374726f6b653d227472616e73706172656e74222066696c6c3d22236104c08201527f46464622207374796c653d2266696c6c2d6f7061636974793a31222f3e3c616e6104e08201527f696d6174655472616e73666f726d206174747269627574654e616d653d2274726105008201527f616e73666f726d2220747970653d22726f74617465222066726f6d3d223020326105208201527f3530203235302220746f3d222d333630203235302032353022206475723d22316105408201527f30732220726570656174436f756e743d22696e646566696e6974652220786c696105608201527f6e6b3a687265663d2223746c6d73222f3e3c7061746820636c6173733d2273746105808201527f726f6b65722220643d224d3131302032353063302d3130372e373732203131366105a08201527f2e3636372d3137352e3133203231302d3132312e3234342034332e33313620326105c08201527f352e3030392037302037312e323237203730203132312e3234342030203130376105e08201527f2e3737322d3131362e363637203137352e31332d323130203132312e3234342d6106008201527f34332e3331362d32352e3030392d37302d37312e3232372d37302d3132312e326106208201527f343422207374726f6b652d77696474683d223230222066696c6c3d22234646466106408201527f22207374796c653d227374726f6b652d77696474683a32333b66696c6c2d6f706106608201527f61636974793a3122207472616e73666f726d3d227472616e736c61746528342e6106808201527f3720352e323129207363616c65282e393830333829222f3e3c7061746820636c6106a08201527f6173733d2266696c6c65722220643d224d31343720323739613130342e3930376106c08201527f203130342e3930372030203020302034392e31372037312e33336331352e37366106e08201527f20392e35322033342e322031342e39382035332e38352031342e39387333382e6107008201527f30382d352e34362035332e38352d31342e39386332352e34342d31352e3435206107208201527f34332e372d34312e30352034392e31372d37312e3333483133382e39312031346107408201527f375a6d3135362e38362034342e3438632d31342e35322031322e34392d33332e6107608201527f32352032302d35332e3835203230732d33392e33332d372e34392d35332e38356107808201527f2d3230632d372e34392d362e32342d31332e37342d31332e38392d31382e34326107a08201527f2d32322e3438683134342e3533632d342e363820382e35382d31312e303820316107c08201527f362e32332d31382e34322032322e3438682e30315a22207374796c653d2266696107e08201527f6c6c2d6f7061636974793a3122207472616e73666f726d3d227472616e736c616108008201527f7465282d352e303637202d31362e32333229207363616c6528312e30313835356108208201527f29222f3e3c7465787420636c6173733d2266696c6c65722220666f6e742d73696108408201527f7a653d2233302220666f6e742d7765696768743d22626f6c642220666f6e742d6108608201527f66616d696c793d22496d7061637422207374796c653d22666f6e742d73697a656108808201527f3a333070783b666f6e742d7765696768743a3730303b666f6e742d66616d696c6108a08201527f793a496d706163743b77686974652d73706163653a7072653b66696c6c2d6f706108c08201527f61636974793a3122207472616e73666f726d3d226d6174726978282e393537206108e08201527f302030202e39353720392e353820382e39333229223e3c7465787450617468206109008201527f7374796c653d2266696c6c2d6f7061636974793a312220786c696e6b3a6872656109208201527f663d2223746c6d73223e4f722073686f756c6420493fe38080e38080e380804f6109408201527f722073686f756c6420493fe38080e38080e38080e380804f722073686f756c646109608201527f20493fe38080e38080e380804f722073686f756c6420493f3c2f7465787450616109808201527f74683e3c2f746578743e3c2f673e3c67207472616e73666f726d3d226d6174726109a08201527f697828362e373833303620302030202e34343536352033382e393037203338386109c08201527f2e343329223e3c672069643d22672d39223e3c7061746820636c6173733d22666109e08201527f696c6c65722220643d224d353820343968313030763130304835385634397a22610a008201527f202069643d22672d3130222f3e3c2f673e3c2f673e3c67207472616e73666f72610a208201527f6d3d227472616e736c6174652835362e313638203333352e3431332920736361610a408201527f6c6528312e363039323329223e3c672069643d22672d3322207472616e73666f610a608201527f726d3d227472616e736c617465282d332e34393729223e3c7061746820636c61610a808201527f73733d2266696c6c65722220643d224d3635322034366332372e362030203530610aa08201527f2032322e34203530203530732d32322e342035302d35302035302d35302d3232610ac08201527f2e342d35302d35302032322e342d35302035302d35307a22202069643d22672d610ae08201527f34222f3e3c2f673e3c2f673e3c67207472616e73666f726d3d226d6174726978610b008201527f28312e363532363320302030202e3731343334203833382e313233203431392e610b208201527f38323129223e3c672069643d22672d31223e3c7061746820636c6173733d2273610b408201527f74302220643d224d353820343968313030763130304835385634397a22207374610b608201527f796c653d2266696c6c3a2366666622207472616e73666f726d3d227472616e73610b808201527f6c61746528322e36313429222069643d22672d32222f3e3c2f673e3c2f673e3c610ba08201527f67207472616e73666f726d3d226d6174726978282e333736303120302030202e610bc08201527f3432353535203936302e343739203530362e33373629223e3c672069643d2267610be08201527f2d3135223e3c7061746820636c6173733d2266696c6c65722220643d224d3538610c008201527f20343968313030763130304835385634397a22207374796c653d227374726f6b610c208201527f653a233030303b7374726f6b652d77696474683a3022207472616e73666f726d610c408201527f3d226d617472697828332e34313132362030203020312e3032353138202d3133610c608201527f392e383533202d332e37303529222069643d22672d3136222f3e3c2f673e3c2f610c808201527f673e3c7061746820643d224d393920323430683232763130483939762d31305a610ca08201527f22207374726f6b653d227472616e73706172656e74222066696c6c3d22234646610cc08201527f4622207472616e73666f726d3d226d617472697828322e323831373620302030610ce08201527f20312e3635393135203138342e39372035362e3539342922207374796c653d22610d008201527f66696c6c2d6f7061636974793a31222f3e3c7061746820636c6173733d226669610d208201527f6c6c6572207374726f6b65722220643d224d3534312e363035203531332e3232610d408201527f3973332e3935372d34392e3534332035322e3235362d35302e3135376334382e610d608201527f332d2e3631342035322e38392035302e3937332035322e38392035302e393733610d808201527f732d31372e3031372d32322e3232352d35322e3432352d32322e373238632d32610da08201527f392e3830332d2e3432332d35322e3834362032312e38362d35322e3732203231610dc08201527f2e3931325a22207374796c653d2266696c6c2d6f7061636974793a313b737472610de08201527f6f6b652d6f7061636974793a303b7374726f6b652d77696474683a32303b7061610e008201527f696e742d6f726465723a66696c6c22207472616e73666f726d3d227472616e73610e208201527f6c617465283231342e353620312e35313729222f3e3c7061746820636c617373610e408201527f3d2266696c6c6572207374726f6b65722220643d224d3534312e363035203531610e608201527f332e32323973332e3935372d34392e3534332035322e3235362d35302e313537610e808201527f6334382e332d2e3631342035322e38392035302e3937332035322e3839203530610ea08201527f2e393733732d31372e3031372d32322e3232352d35322e3432352d32322e3732610ec08201527f38632d32392e3830332d2e3432332d35322e3834362032312e38362d35322e37610ee08201527f322032312e3931325a22207374796c653d2266696c6c2d6f7061636974793a31610f008201527f3b7374726f6b652d6f7061636974793a303b7374726f6b652d77696474683a32610f208201527f303b7061696e742d6f726465723a66696c6c22207472616e73666f726d3d2274610f408201527f72616e736c617465282e36333620312e35313729222f3e3c67207472616e7366610f608201527f6f726d3d227472616e736c617465283632372e333136203138332e3435362920610f808201527f7363616c65282e313333313329223e3c672069643d22672d35223e3c70617468610fa08201527f20636c6173733d2266696c6c65722220643d224d3635322034366332372e3620610fc08201527f302035302032322e34203530203530732d32322e342035302d35302035302d35610fe08201527f302d32322e342d35302d35302032322e342d35302035302d35307a22202069646110008201527f3d22672d36222f3e3c2f673e3c2f673e3c67207472616e73666f726d3d2274726110208201527f616e736c617465283630342e3436203138332e34353629207363616c65282e316110408201527f3333313329223e3c672069643d22672d3131223e3c7061746820636c6173733d6110608201527f2266696c6c65722220643d224d3635322034366332372e3620302035302032326110808201527f2e34203530203530732d32322e342035302d35302035302d35302d32322e342d6110a08201527f35302d35302032322e342d35302035302d35307a222069643d22672d3132222f6110c08201527f3e3c2f673e3c2f673e3c67207472616e73666f726d3d226d6174726978282e326110e08201527f3431313320302030202e3133343437203637362e3934203138322e39393229226111008201527f3e3c672069643d224c617965725f325f345f223e3c7061746820636c6173733d6111208201527f2266696c6c65722220643d224d353820343968313030763130304835385634396111408201527f7a222069643d224c617965725f312d325f345f222f3e3c2f673e3c2f673e3c676111608201527f207472616e73666f726d3d226d6174726978282e333631313320302030202e316111808201527f33333837203636332e3636203138392e35363229223e3c672069643d22672d316111a08201527f37223e3c7061746820636c6173733d2266696c6c65722220643d224d353820346111c08201527f3968313030763130304835385634397a222069643d22672d3138222f3e3c2f676111e08201527f3e3c2f673e3c67207472616e73666f726d3d227472616e736c617465283633356112008201527f2e313838203432322e303929207363616c65282e3731333829223e3c672069646112208201527f3d22672d313922207472616e73666f726d3d227472616e736c61746528332e306112408201527f3334202d2e32363829223e3c7061746820636c6173733d227374302220643d226112608201527f4d3635322034366332372e3620302035302032322e34203530203530732d32326112808201527f2e342035302d35302035302d35302d32322e342d35302d35302032322e342d356112a08201527f302035302d35307a22207374796c653d2266696c6c3a23666666222069643d226112c0820152743396991811179f1e17b39f1e17b39f1e17b9bb339f60591b6112e08201526112f50190565b604051602081830303815290604052905090565b60608151600003612c4557505060408051602081019091526000815290565b60006040518060600160405280604081526020016139d86040913990506000600384516002612c7491906136cd565b612c7e9190613932565b612c899060046136e0565b67ffffffffffffffff811115612ca157612ca16134f5565b6040519080825280601f01601f191660200182016040528015612ccb576020820181803683370190505b509050600182016020820185865187015b80821015612d37576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612cdc565b5050600386510660018114612d535760028114612d6657612d6e565b603d6001830353603d6002830353612d6e565b603d60018303535b509195945050505050565b60006001600160e01b031982166380ac58cd60e01b1480612daa57506001600160e01b03198216635b5e139f60e01b145b806105e357506301ffc9a760e01b6001600160e01b03198316146105e3565b610e3484848484612f09565b612ddf838361303d565b612dec6000848484612e08565b6107b75760405162461bcd60e51b8152600401610716906138e0565b60006001600160a01b0384163b15612efe57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612e4c903390899088908890600401613954565b6020604051808303816000875af1925050508015612e87575060408051601f3d908101601f19168201909252612e8491810190613991565b60015b612ee4573d808015612eb5576040519150601f19603f3d011682016040523d82523d6000602084013e612eba565b606091505b508051600003612edc5760405162461bcd60e51b8152600401610716906138e0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611161565b506001949350505050565b6001811115612f785760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610716565b816001600160a01b038516612fd457612fcf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612ff7565b836001600160a01b0316856001600160a01b031614612ff757612ff785826131d6565b6001600160a01b0384166130135761300e81613273565b613036565b846001600160a01b0316846001600160a01b031614613036576130368482613322565b5050505050565b6001600160a01b0382166130935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152600260205260409020546001600160a01b0316156130f85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b613106600083836001612dc9565b6000818152600260205260409020546001600160a01b03161561316b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600060016131e384610b0b565b6131ed91906139ae565b600083815260076020526040902054909150808214613240576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090613285906001906139ae565b600083815260096020526040812054600880549394509092849081106132ad576132ad6136a1565b9060005260206000200154905080600883815481106132ce576132ce6136a1565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613306576133066139c1565b6001900381819060005260206000200160009055905550505050565b600061332d83610b0b565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160e01b03198116811461091457600080fd5b60006020828403121561338e57600080fd5b813561339981613366565b9392505050565b60005b838110156133bb5781810151838201526020016133a3565b50506000910152565b600081518084526133dc8160208601602086016133a0565b601f01601f19169290920160200192915050565b60208152600061339960208301846133c4565b60006020828403121561341557600080fd5b5035919050565b80356001600160a01b038116811461343357600080fd5b919050565b6000806040838503121561344b57600080fd5b6134548361341c565b946020939093013593505050565b60008060006060848603121561347757600080fd5b6134808461341c565b925061348e6020850161341c565b9150604084013590509250925092565b6000602082840312156134b057600080fd5b6133998261341c565b600080604083850312156134cc57600080fd5b6134d58361341c565b9150602083013580151581146134ea57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561352157600080fd5b61352a8561341c565b93506135386020860161341c565b925060408501359150606085013567ffffffffffffffff8082111561355c57600080fd5b818701915087601f83011261357057600080fd5b813581811115613582576135826134f5565b604051601f8201601f19908116603f011681019083821181831017156135aa576135aa6134f5565b816040528281528a60208487010111156135c357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156135fa57600080fd5b6136038361341c565b91506136116020840161341c565b90509250929050565b600181811c9082168061362e57607f821691505b60208210810361364e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105e3576105e36136b7565b80820281158282048414176105e3576105e36136b7565b600060018201613709576137096136b7565b5060010190565b8054600090600181811c908083168061372a57607f831692505b6020808410820361374b57634e487b7160e01b600052602260045260246000fd5b81801561375f5760018114613774576137a1565b60ff19861689528415158502890196506137a1565b60008881526020902060005b868110156137995781548b820152908501908301613780565b505084890196505b50505050505092915050565b693d913730b6b2911d101160b11b815260006137cc600a830186613710565b72111610113232b9b1b934b83a34b7b7111d101160691b81526137f26013820186613710565b90507f222c2022696d616765223a2022646174613a696d6167652f7376672b786d6c3b81526618985cd94d8d0b60ca1b6020820152835161383a8160278401602088016133a0565b61227d60f01b6027929091019182015260290195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161388e81601d8501602087016133a0565b91909101601d0192915050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261394f57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613987908301846133c4565b9695505050505050565b6000602082840312156139a357600080fd5b815161339981613366565b818103818111156105e3576105e36136b7565b634e487b7160e01b600052603160045260246000fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220c2cebed0d48240c4b7d102d66f9d4f95c71967b8b42b8da6a7e1d522a1bd556f64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000fa00000000000000000000000000000000000000000000000000000000000000019546865204c61756768696e67204d616e204f726967696e616c000000000000000000000000000000000000000000000000000000000000000000000000000003544c4d0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): The Laughing Man Original
Arg [1] : _symbol (string): TLM
Arg [2] : _maxSupply (uint256): 4000
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000fa0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [4] : 546865204c61756768696e67204d616e204f726967696e616c00000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 544c4d0000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.