Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
7,999 HACK
Holders
1,276
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 HACKLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Hackoors
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* * https://twitter.com/HackoorsNFT * * ..?!~~~?.. * :GPY^.. ^~#BP: * ^B@@@P .^#@@#&B^ * .B&&&B~ :B&@@@@@&B. * !5?~!: . ::^^#@@#7^J5! * :&@@&PY!.:^. ::::#@B!.~P&@&: * ^&G5P7:::^:. ..::J7:..:^~7B&^ * 5G^::.:. :5&@5 * J@^.. :??????????????: ~P@J * ?@!. ~B&&@@@@@@@@@@@@@@@@&&#?^^~@? * ?@&&&@@@@@@@@@@@@@@@@@@@@@@@@@&&@? * ?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@? * ?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@? * ?@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@? * ^#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#^ * :.7::~5&@@@@@@@@@@@@@@@@@@@@@@@@@@@@&5~::7.: * :??. :Y&@@@@@@@@@@@@@@@@@@@@@@@@&Y: .??: * ^?^ :^^P@@@@@@@@@@@@@@@@@@@#J: ^?^ * ~? .. ... .:Y@@@@@@@@@@@@@@@@#7: ... ..7. ?~ * !5. !@&Y: :::.75P#@@@&&&&&&&&@@@@#Y7.::: :#&@7 ~#! * !J:::.7@@@&5^..^:::?B@@@&~^^^^^^~&@@@B?:::^..^5&@@G~:...?! * 7! .:!5B@@@@&&&&5YYJYB&@&#JJJJJJ#&@&BYJYY5&&&&@@@@PY!^: !7 * ~?.!YJG&==============================================&&&B!.?~ * :&B!~!~P@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@P~!~!B&: * JGP&@@&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@&PGJ * ?7?BG5P75@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@57P5GB77? * ~J~^^:::.5@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5.:.:!P~J~ * JG&P~^:::!B@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B!::^!G@&GJ * J@@@&&G57:Y@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Y:7B&@@@@@J * ~&@@@@@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&@@@@@@@&~ * ?BB#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#BB? * ^:::J@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@J:::^ * ~@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@~ * ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */ pragma solidity 0.8.18; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "./utils/DefaultOperatorFilter.sol"; import "./interface/IOnchainArt.sol"; contract Hackoors is DefaultOperatorFilterer, ERC2981, ERC721AQueryable, Ownable { using Strings for uint256; IERC721 constant PUNK = IERC721(0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB); IERC721 constant MAYC = IERC721(0x60E4d786628Fea6478F785A6d7e704777c86a7c6); IERC721 constant BEANZ = IERC721(0x306b1ea3ecdf94aB739F1910bbda052Ed4A9f949); IERC721 constant CRYPTODICKBUTTS = IERC721(0x42069ABFE407C60cf4ae4112bEDEaD391dBa1cdB); uint256 constant MAX_SUPPLY = 8000; uint256 constant MAX_MINT_PER_TX = 5; bool mintActive; bool useUpdatedScores; bool scoresSealed; bool artRevealed; bool useOnchainArt; address onchainArt; string _imageURI; uint16[10][9] RARITY_SCORES; mapping(bytes32 => bool) isGenotypeMinted; mapping(uint256 => bytes32) genotypes; error NoUniqueGenotypeFound(); error InsufficientEther(); error MaxSupplyReached(); error NoContractsAllowed(); error MintEnded(); error TooManyMintsRequested(); error ScoresAreSealed(); error TokenDoesNotExist(); modifier onlyEOA { if (msg.sender != tx.origin) revert NoContractsAllowed(); _; } modifier mintIsActive { if (!mintActive) revert MintEnded(); _; } constructor(string memory preRevealImageURI) ERC721A("Hackoors", "HACK") { _imageURI = preRevealImageURI; _setDefaultRoyalty(msg.sender, 200); // 2% mintActive = true; } //////////////////////////////////////////////////////// //////////////////// USER FUNCTIONS //////////////////// //////////////////////////////////////////////////////// /** * @notice Standard mint function. Generates a unique genotype for each tokenId * Max of 5 mints per transaction. */ function mint(uint256 amount, uint256 balanceFlag) external onlyEOA mintIsActive { if (_nextTokenId() + amount > MAX_SUPPLY) revert MaxSupplyReached(); if (amount > MAX_MINT_PER_TX) revert TooManyMintsRequested(); for(uint256 i=0; i<amount; ++i){ bytes32 genotype; if (i==0) { genotype = _getGenotype(_nextTokenId()+i, balanceFlag); } else { genotype = _getGenotype(_nextTokenId()+i, 0); } isGenotypeMinted[genotype] = true; genotypes[_nextTokenId()+i] = genotype; } _mint(msg.sender, amount); } /** * @notice Exposed for future usecases. Do not call this directly */ function burn(uint256 tokenId) external { _burn(tokenId, true); } ///////////////////////////////////////////////////////////// //////////////////// READ-ONLY FUNCTIONS //////////////////// ///////////////////////////////////////////////////////////// /** * @notice Returns the rarity score. See description below for _getPreComputedScore() */ function rarityScore(uint256 tokenId) external view returns(uint256) { if (tokenId>=_nextTokenId()) revert TokenDoesNotExist(); return useUpdatedScores ? _getUpdatedScore(tokenId) : _getPreComputedScore(tokenId); } /** * @notice Returns metadata. All metadata is on-chain, with only the image being off-chain (IPFS) */ function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { if (tokenId>=_nextTokenId()) revert TokenDoesNotExist(); bytes32 genotype = genotypes[tokenId]; bytes memory json = abi.encodePacked( '{"name": "Hackoors #',tokenId.toString(),'",', '"image": "', _getImageURI(tokenId), '","attributes": [' ); for (uint i=0; i<9; i++) { json = abi.encodePacked(json, _getTraitString(i, uint8(genotype[i]))); } json = abi.encodePacked(json, ']}'); return string(abi.encodePacked('data:application/json;base64,', Base64.encode(json))); } //////////////////////////////////////////////////////////// //////////////////// INTERNAL FUNCTIONS //////////////////// //////////////////////////////////////////////////////////// /** * @notice Each NFT has a unique 'genotype' which determines the traits. These are generated at the time of * minting, which means you will know the traits immedaitely. 7 attempts are made to generate * a unique genotype for each NFT before the transaction reverts. This is plenty and in practice, less than * 10% of all mints would need 1 re-roll, and only a handful (less than 20) would need 2 re-rolls. It is * highly unlikely that any NFT would need 3 or more re-rolls. */ function _getGenotype(uint256 tokenID, uint256 balanceFlag) internal view returns(bytes32) { // Generate random hash. This essentially serves as 16 very-pseudo-rng between 0 and 65535 // Highly doubt anyone will go through the trouble of predicting RNG for a freemint NFT, so this // is sufficient bytes32 randhash = keccak256(abi.encodePacked(block.timestamp,block.prevrandao,msg.sender,tokenID)); // Try generating a unique genotype upto 7 times for (uint i=0; i<7; i++) { // Generate a 9-digit number which determines the traits bytes32 genotype = _generateUniqueGenotypeFromHash(randhash, balanceFlag); // Check for uniqueness if (!isGenotypeMinted[genotype]) { return genotype; } // Shift 15 bits and try again. Slight offset to not repeat same numbers from last round randhash = bytes32(uint256(randhash) << 15); } // Failed after 7 attempts revert NoUniqueGenotypeFound(); } /** * @notice Generates the unique genotype, with the additional condition that if a wallet owns a Punk, MAYC, * Bean, or cryptodickbutt, then this is reflected in the "Laptop Sticker" trait. This is the only way to get * these 4 traits. */ function _generateUniqueGenotypeFromHash(bytes32 randHash, uint256 balanceFlag) internal view returns(bytes32 genotypeFixedBytes) { bytes memory genotypeDynamicBytes; // For each category for (uint i=0; i<9; i++) { uint16 randNumb = uint16(bytes2(randHash)); uint8 gene; if (i!=5) { gene = _getGene(randNumb, i); } else { // For laptop sticker trait only // Precedence order: Punk > MAYC > Bean > CDB if (balanceFlag == 1) { gene = PUNK.balanceOf(msg.sender) > 0 ? 8 : 0; } else if (balanceFlag == 2) { gene = MAYC.balanceOf(msg.sender) > 0 ? 9 : 0; } else if (balanceFlag == 3) { gene = BEANZ.balanceOf(msg.sender) > 0 ? 10 : 0; } else if (balanceFlag == 4) { gene = CRYPTODICKBUTTS.balanceOf(msg.sender) > 0 ? 11 : 0; } gene = gene == 0 ? _getGene(randNumb, i) : gene; } // Concatenate the genes genotypeDynamicBytes = abi.encodePacked(genotypeDynamicBytes, gene); // Shift 1 rng for next trait randHash = bytes32(uint256(randHash) << 16); } assembly { genotypeFixedBytes := mload(add(genotypeDynamicBytes, 32)) } } /** * @notice Determines the specific gene within the genotype. In other words, determines the individual traits as * defined by the trait odds. */ function _getGene(uint16 randNumb, uint256 i) internal pure returns(uint8) { // In-memory 2D array of cumulative rarities (65535 = 100%) for each category. Saves ~15k gas when minting // compared to using storage arrays uint16[10][9] memory TRAIT_ODDS = [ [16383, 32767, 52428, 65535, 0, 0, 0, 0, 0, 0], [10922, 21845, 32767, 43690, 54612, 65535, 0, 0, 0, 0], [7209, 15728, 24248, 28180, 36700, 45219, 53739, 60948, 63569, 65535], [18724, 42129, 65535, 0, 0, 0, 0, 0, 0, 0], [14838, 16074, 32561, 49048, 65535, 0, 0, 0, 0, 0], [8192, 16383, 24575, 32767, 40959, 49151, 57343, 65535, 0, 0], [58982, 62258, 65535, 0, 0, 0, 0, 0, 0, 0], [22937, 25559, 36700, 42270, 46858, 54722, 57998, 58130, 60292, 65535], [45875, 53083, 58326, 65535, 0, 0, 0, 0, 0, 0] ]; // Find which trait the rng corresponds to for category i for(uint j=0; j<10; j++) { if (randNumb < TRAIT_ODDS[i][j]) return uint8(j); } return 0; // This will never reach } /** * @notice Rarity score calculated with method outlined here: * https://raritytools.medium.com/ranking-rarity-understanding-rarity-calculation-methods-86ceaeb9b98c * * Essentially its: * (1/percentChanceOfTrait) * * Values are also multipled by 10 to preserve 1 decimal place * Keep in mind that these rarity scores would be close-approximates to the final rarity scores, since we can't guarantee * the final counts for each trait. * E.g. We can't guarantee that a trait with a 10% chance occurence from an 8000 NFT collection will have exactly 800 * pieces, so final rarities may slightly vary. See next function description * * Future on-chain governance voting power and puzzle burn mechanics may be decided with rarity score ;) */ function _getPreComputedScore(uint256 tokenId) internal view returns(uint256 score) { uint256[10][9] memory SCORES = [ [uint256(40), 40, 33, 50, 0, 0, 0, 0, 0, 0], [uint256(0), 0, 0, 0, 0, 0, 0, 0, 0, 0], // No score for "Table" as all traits have equal chance [uint256(91), 77, 77, 167, 77, 77, 77, 91, 250, 333], [uint256(35), 28, 28, 0, 0, 0, 0, 0, 0, 0], [uint256(44), 530, 40, 40, 40, 0, 0, 0, 0, 0], [uint256(0), 0, 0, 0, 0, 0, 0, 0, 0, 0], // No score for "Sticker" as all traits have equal chance, or based on other NFT holdings [uint256(11), 200, 200, 0, 0, 0, 0, 0, 0, 0], [uint256(29), 250, 59, 118, 143, 83, 200, 4965, 303, 125], [uint256(14), 91, 125, 91, 0, 0, 0, 0, 0, 0] ]; bytes32 genotype = genotypes[tokenId]; for (uint i=0; i<9; i++){ score += (!(i==1 || i==5)) ? uint256(SCORES[i][uint8(genotype[i])]) : 0; } } /** * @notice This is a backup method used if the resulting counts for each trait are sufficiently different to what is expected. * If this is the case, an updated rarity scores table (like the SCORES table above) will be pushed. See updateScores() below */ function _getUpdatedScore(uint256 tokenId) internal view returns(uint256) { bytes32 genotype = genotypes[tokenId]; uint16 score; for (uint i=0; i<9; i++){ score += (!(i==1 || i==5)) ? (RARITY_SCORES[i][uint8(genotype[i])]) : 0; } return uint256(score); } /** * @notice Though the metadata is on-chain, the art is currently off-chain (IPFS). Keep in mind that there is built-in flexibility * for moving the art fully on-chain in the future (currently this has a very high deployment cost for the Hackoors artwork) */ function _getImageURI(uint256 tokenID) internal view returns (string memory) { return useOnchainArt ? IOnchainArt(onchainArt).getSVG(tokenID) : artRevealed ? string(abi.encodePacked(_imageURI,tokenID.toString())) : _imageURI; } /** * @notice Helper function to format the metadata string */ function _getTraitString(uint256 categoryIndex, uint8 traitIndex) internal pure returns (string memory) { string[9] memory CATEGORIES = ["Background", "Table", "Hoody", "Laptop Model", "Laptop Colour", "Laptop Sticker", "Aura", "Face", "Pet"]; string[12][9] memory TRAITS = [ ["Bedroom", "Coast", "Veranda", "Server Warehouse", "", "", "", "", "", "", "", ""], ["Clean", "Criminal", "Gamer", "Messy", "Stoner", "Techie", "", "", "", "", "", ""], ["Black", "Blue", "Brown", "Daybreak", "Green", "Grey", "Red", "Denim", "Gi", "Iron Skin", "", ""], ["Bulky", "Slim", "Standard", "", "", "", "", "", "", "", "", ""], ["Black", "Gold", "Blue", "Grey", "White", "", "", "", "", "", "", ""], ["None", "Bitcoin", "Cicada 3301", "Dragonball", "Ethereum", "Murica", "Skull", "Nuclear", "Punk", "Ape", "Bean", "CryptoDickbutt"], ["None", "Lightning", "Sakura", "", "", "", "", "", "", "", "", ""], ["None", "Bloodline", "Shadow", "Gas Mask", "Kitsune", "Anonymous", "Shogun", "Recruit", "Ghost", "Scream", "", ""], ["None", "Mouse", "Kitten", "Owl", "", "", "", "", "", "", "", ""] ]; bytes memory res = abi.encodePacked('{"trait_type": "', CATEGORIES[categoryIndex],'", "value": "', TRAITS[categoryIndex][traitIndex], '"}'); // Preceding comma for json formatting if (categoryIndex > 0 && res.length > 0) { res = abi.encodePacked(",", res); } return string(res); } ////////////////////////////////////////////////////////////// //////////////////// OWNER ONLY FUNCTIONS //////////////////// ////////////////////////////////////////////////////////////// // // The 'owner' is planned to be transferred to a Governor contract once on-chain governance is implemented. // All functions below will require a succesful vote once ownership is transferred to the Governor contract. /** * @notice Reveal artwork! */ function revealImage(string memory revealedImageURI) external onlyOwner { _imageURI = revealedImageURI; artRevealed = true; } /** * @notice Close minting period. Only needed if collection doesn't hit max supply cap */ function closeMint() external onlyOwner { mintActive = false; } /** * @notice Irreversible switch which finalises the rarity scores. */ function sealScores() external onlyOwner { scoresSealed = true; } /** * @notice As mentioned above, pushes the updated rarity scores if the final trait counts are significantly different * than the intended percentages. Can also be use if the trait counts change by a large amount due to burning. Rarity * scores are not calculated on-chain as this would mean significantly higher minting gas costs, as each mint would need * to incremement the counter for each of the 10 attributes. */ function updateScores(uint16[10][9] memory temp) external onlyOwner { if (scoresSealed) revert ScoresAreSealed(); useUpdatedScores = true; RARITY_SCORES = temp; } /** * @notice Sets the on-chain art contract address */ function setOnchainArtAddress(address onchainArt_) external onlyOwner { onchainArt = onchainArt_; } /** * @notice A switch which can be turned on or off */ function switchOnchainArt() external onlyOwner { useOnchainArt = !useOnchainArt; } /** * @notice Withdraws any ETH mistakenly sent to this contract */ function withdraw() external onlyOwner() { payable(msg.sender).transfer(address(this).balance); } /** * @notice Rescue any ERC20 tokens mistakenly sent to this contract */ function rescueERC20(address token, address recipient) external onlyOwner() { IERC20(token).transfer(recipient, IERC20(token).balanceOf(address(this))); } /** * @notice Rescue any ERC721 NFTs mistakenly sent to this contract */ function rescueERC721(address token, uint256 tokenId, address recipient) external onlyOwner() { IERC721(token).transferFrom(address(this), recipient, tokenId); } /** * @notice Sets royalty info according to EIP2981 */ function setRoyalty(address recipient, uint96 royaltyBips) external onlyOwner() { _setDefaultRoyalty(recipient, royaltyBips); } ///////////////////////////////////////////////////////////////// //////////////////// OTHER UTILITY OVERRIDES //////////////////// ///////////////////////////////////////////////////////////////// function supportsInterface(bytes4 interfaceId) public view virtual override(ERC2981, ERC721A, IERC721A) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function transferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } fallback() external payable {} receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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.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 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 v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; interface IOnchainArt { function getSVG(uint256) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x9dC5EE2D52d014f8b81D662FA8f4CA525F27cD6b); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "../interface/IOperatorFilterRegistry.sol"; abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(operatorFilterRegistry).code.length > 0) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if ( !( operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender) && operatorFilterRegistry.isOperatorAllowed(address(this), from) ) ) { revert OperatorNotAllowed(msg.sender); } } _; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"preRevealImageURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InsufficientEther","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MaxSupplyReached","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintEnded","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoContractsAllowed","type":"error"},{"inputs":[],"name":"NoUniqueGenotypeFound","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ScoresAreSealed","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"inputs":[],"name":"TooManyMintsRequested","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","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":"closeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"balanceFlag","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rarityScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"revealedImageURI","type":"string"}],"name":"revealImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[],"name":"sealScores","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":"address","name":"onchainArt_","type":"address"}],"name":"setOnchainArtAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint96","name":"royaltyBips","type":"uint96"}],"name":"setRoyalty","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":"switchOnchainArt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[10][9]","name":"temp","type":"uint16[10][9]"}],"name":"updateScores","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005c4038038062005c408339810160408190526200003491620003a1565b60408051808201825260088152674861636b6f6f727360c01b602080830191909152825180840190935260048352634841434b60e01b9083015290739dc5ee2d52d014f8b81d662fa8f4ca525f27cd6b60016daaeb6d7670e522a718067333cd4e3b15620001cb5780156200011957604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015620000fa57600080fd5b505af11580156200010f573d6000803e3d6000fd5b50505050620001cb565b6001600160a01b038216156200016a5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000df565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001b157600080fd5b505af1158015620001c6573d6000803e3d6000fd5b505050505b5060049050620001dc838262000505565b506005620001eb828262000505565b5050600060025550620001fe3362000234565b600c6200020c828262000505565b506200021a3360c862000286565b50600a805460ff60a01b1916600160a01b179055620005d1565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620002fa5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620003525760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002f1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620003b557600080fd5b82516001600160401b0380821115620003cd57600080fd5b818501915085601f830112620003e257600080fd5b815181811115620003f757620003f76200038b565b604051601f8201601f19908116603f011681019083821181831017156200042257620004226200038b565b8160405282815288868487010111156200043b57600080fd5b600093505b828410156200045f578484018601518185018701529285019262000440565b600086848301015280965050505050505092915050565b600181811c908216806200048b57607f821691505b602082108103620004ac57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200050057600081815260208120601f850160051c81016020861015620004db5750805b601f850160051c820191505b81811015620004fc57828155600101620004e7565b5050505b505050565b81516001600160401b038111156200052157620005216200038b565b620005398162000532845462000476565b84620004b2565b602080601f831160018114620005715760008415620005585750858301515b600019600386901b1c1916600185901b178555620004fc565b600085815260208120601f198616915b82811015620005a25788860151825594840194600190910190840162000581565b5085821015620005c15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61565f80620005e16000396000f3fe6080604052600436106102175760003560e01c80637cab428d11610126578063b3d57008116100a7578063d43c7e9b11610079578063e985e9c511610061578063e985e9c514610620578063f2fde38b14610669578063fa3e47051461068957005b8063d43c7e9b146105f6578063e4f870211461060b57005b8063b3d5700814610576578063b88d4fde14610596578063c23dc68f146105a9578063c87b56dd146105d657005b806395d89b41116100f85780639f1f2054116100e05780639f1f205414610516578063a22cb46514610536578063a5573bd01461055657005b806395d89b41146104e157806399a2557a146104f657005b80637cab428d146104565780638462151c146104765780638da5cb5b146104a35780638f2fc60b146104c157005b80633ccfd60b116101b05780635d799f871161018257806364f101f01161016a57806364f101f01461040c57806370a0823114610421578063715018a61461044157005b80635d799f87146103cc5780636352211e146103ec57005b80633ccfd60b1461035757806342842e0e1461036c57806342966c681461037f5780635bbb21771461039f57005b806318160ddd116101e957806318160ddd146102c25780631b2ef1ca146102e557806323b872dd146103055780632a55205a1461031857005b806301ffc9a71461022057806306fdde0314610255578063081812fc14610277578063095ea7b3146102af57005b3661021e57005b005b34801561022c57600080fd5b5061024061023b366004614952565b6106a9565b60405190151581526020015b60405180910390f35b34801561026157600080fd5b5061026a6106ed565b60405161024c91906149bf565b34801561028357600080fd5b506102976102923660046149d2565b61077f565b6040516001600160a01b03909116815260200161024c565b61021e6102bd366004614a07565b6107dc565b3480156102ce57600080fd5b50600354600254035b60405190815260200161024c565b3480156102f157600080fd5b5061021e610300366004614a31565b6108a2565b61021e610313366004614a53565b610a65565b34801561032457600080fd5b50610338610333366004614a31565b610bc6565b604080516001600160a01b03909316835260208301919091520161024c565b34801561036357600080fd5b5061021e610c81565b61021e61037a366004614a53565b610cb8565b34801561038b57600080fd5b5061021e61039a3660046149d2565b610e09565b3480156103ab57600080fd5b506103bf6103ba366004614a8f565b610e14565b60405161024c9190614b04565b3480156103d857600080fd5b5061021e6103e7366004614b81565b610ee0565b3480156103f857600080fd5b506102976104073660046149d2565b610fce565b34801561041857600080fd5b5061021e610fd9565b34801561042d57600080fd5b506102d761043c366004614bb4565b61100b565b34801561044d57600080fd5b5061021e611073565b34801561046257600080fd5b5061021e610471366004614bb4565b611087565b34801561048257600080fd5b50610496610491366004614bb4565b6110be565b60405161024c9190614bcf565b3480156104af57600080fd5b50600a546001600160a01b0316610297565b3480156104cd57600080fd5b5061021e6104dc366004614c07565b6111bf565b3480156104ed57600080fd5b5061026a6111d1565b34801561050257600080fd5b50610496610511366004614c4f565b6111e0565b34801561052257600080fd5b5061021e610531366004614d17565b611373565b34801561054257600080fd5b5061021e610551366004614de2565b6113fa565b34801561056257600080fd5b506102d76105713660046149d2565b611466565b34801561058257600080fd5b5061021e610591366004614e74565b6114b8565b61021e6105a4366004614ebd565b6114fe565b3480156105b557600080fd5b506105c96105c43660046149d2565b61165d565b60405161024c9190614f39565b3480156105e257600080fd5b5061026a6105f13660046149d2565b6116d5565b34801561060257600080fd5b5061021e6117f5565b34801561061757600080fd5b5061021e61182d565b34801561062c57600080fd5b5061024061063b366004614b81565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561067557600080fd5b5061021e610684366004614bb4565b611871565b34801561069557600080fd5b5061021e6106a4366004614f7e565b6118fe565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806106e757506106e78261198c565b92915050565b6060600480546106fc90614fba565b80601f016020809104026020016040519081016040528092919081815260200182805461072890614fba565b80156107755780601f1061074a57610100808354040283529160200191610775565b820191906000526020600020905b81548152906001019060200180831161075857829003601f168201915b5050505050905090565b600061078a82611a25565b6107c0576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006107e782610fce565b9050336001600160a01b0382161461083957610803813361063b565b610839576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b3332146108db576040517f5a156d6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a54600160a01b900460ff1661091e576040517f49084b9400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f408261092b60025490565b610935919061500a565b111561096d576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058211156109a8576040517fd0b9d51c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82811015610a56576000816000036109e1576109da826109ca60025490565b6109d4919061500a565b84611a4d565b9050610a02565b6109ff826109ee60025490565b6109f8919061500a565b6000611a4d565b90505b6000818152601660205260408120805460ff19166001179055819060179084610a2a60025490565b610a34919061500a565b815260208101919091526040016000205550610a4f8161501d565b90506109ab565b50610a613383611b2f565b5050565b826daaeb6d7670e522a718067333cd4e3b15610bb557336001600160a01b03821603610a9b57610a96848484611c60565b610bc0565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190615036565b8015610b915750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b919190615036565b610bb557604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610bc0848484611c60565b50505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c455750604080518082019091526000546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c69906bffffffffffffffffffffffff1687615053565b610c73919061506a565b915196919550909350505050565b610c89611e36565b60405133904780156108fc02916000818181858888f19350505050158015610cb5573d6000803e3d6000fd5b50565b826daaeb6d7670e522a718067333cd4e3b15610dfe57336001600160a01b03821603610ce957610a96848484611e90565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5c9190615036565b8015610ddf5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190615036565b610dfe57604051633b79c77360e21b8152336004820152602401610bac565b610bc0848484611e90565b610cb5816001611eab565b60608160008167ffffffffffffffff811115610e3257610e32614c82565b604051908082528060200260200182016040528015610e8457816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610e505790505b50905060005b828114610ed757610eb2868683818110610ea657610ea661508c565b9050602002013561165d565b828281518110610ec457610ec461508c565b6020908102919091010152600101610e8a565b50949350505050565b610ee8611e36565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906150a2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190615036565b505050565b60006106e78261200f565b610fe1611e36565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b60006001600160a01b03821661104d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b61107b611e36565b611085600061208f565b565b61108f611e36565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060008060006110ce8561100b565b905060008167ffffffffffffffff8111156110eb576110eb614c82565b604051908082528060200260200182016040528015611114578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b8386146111b35761114c816120ee565b915081604001516111ab5781516001600160a01b03161561116c57815194505b876001600160a01b0316856001600160a01b0316036111ab578083878060010198508151811061119e5761119e61508c565b6020026020010181815250505b60010161113c565b50909695505050505050565b6111c7611e36565b610a61828261216d565b6060600580546106fc90614fba565b606081831061121b576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061122760025490565b905080841115611235578093505b60006112408761100b565b90508486101561125f5785850381811015611259578091505b50611263565b5060005b60008167ffffffffffffffff81111561127e5761127e614c82565b6040519080825280602002602001820160405280156112a7578160200160208202803683370190505b509050816000036112bd57935061136c92505050565b60006112c88861165d565b9050600081604001516112d9575080515b885b8881141580156112eb5750848714155b15611360576112f9816120ee565b925082604001516113585782516001600160a01b03161561131957825191505b8a6001600160a01b0316826001600160a01b031603611358578084888060010199508151811061134b5761134b61508c565b6020026020010181815250505b6001016112db565b50505092835250909150505b9392505050565b61137b611e36565b600a54600160b01b900460ff16156113bf576040517f14ca838700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055610a61600d826009614838565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061147160025490565b82106114905760405163677510db60e11b815260040160405180910390fd5b600a54600160a81b900460ff166114af576114aa82612287565b6106e7565b6106e78261263c565b6114c0611e36565b600c6114cc8282615101565b5050600a80547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16600160b81b179055565b836daaeb6d7670e522a718067333cd4e3b1561164a57336001600160a01b0382160361153557611530858585856126ee565b611656565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a89190615036565b801561162b5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162b9190615036565b61164a57604051633b79c77360e21b8152336004820152602401610bac565b611656858585856126ee565b5050505050565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905290915060025483106116b15792915050565b6116ba836120ee565b90508060400151156116cc5792915050565b61136c83612732565b60606116e060025490565b82106116ff5760405163677510db60e11b815260040160405180910390fd5b60008281526017602052604081205490611718846127aa565b6117218561284a565b6040516020016117329291906151c1565b604051602081830303815290604052905060005b60098110156117a1578161176c828584602081106117665761176661508c565b1a6129b9565b60405160200161177d929190615293565b604051602081830303815290604052915080806117999061501d565b915050611746565b50806040516020016117b391906152c2565b60405160208183030381529060405290506117cd81613d30565b6040516020016117dd9190615303565b60405160208183030381529060405292505050919050565b6117fd611e36565b600a80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff16600160b01b179055565b611835611e36565b600a80547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff8116600160c01b9182900460ff1615909102179055565b611879611e36565b6001600160a01b0381166118f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bac565b610cb58161208f565b611906611e36565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038281166024830152604482018490528416906323b872dd90606401600060405180830381600087803b15801561196f57600080fd5b505af1158015611983573d6000803e3d6000fd5b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806119ef57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106e75750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6000600254821080156106e7575050600090815260066020526040902054600160e01b161590565b60008042443386604051602001611a8f9493929190938452602084019290925260601b6bffffffffffffffffffffffff19166040830152605482015260740190565b60405160208183030381529060405280519060200120905060005b6007811015611afc576000611abf8386613e83565b60008181526016602052604090205490915060ff16611ae25792506106e7915050565b50600f9190911b9080611af48161501d565b915050611aaa565b506040517fae07455500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546000829003611b6d576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611c1c57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611be4565b5081600003611c57576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025550505050565b6000611c6b8261200f565b9050836001600160a01b0316816001600160a01b031614611cb8576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604090208054611ce48187335b6001600160a01b039081169116811491141790565b611d0f57611cf2863361063b565b611d0f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611d4f576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611d5a57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b84169003611dec57600184016000818152600660205260408120549003611dea576002548114611dea5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600a546001600160a01b031633146110855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bac565b610fc9838383604051806020016040528060008152506114fe565b6000611eb68361200f565b905080600080611ed486600090815260086020526040902080549091565b915091508415611f1457611ee9818433611ccf565b611f1457611ef7833361063b565b611f1457604051632ce44b5f60e11b815260040160405180910390fd5b8015611f1f57600082555b6001600160a01b038316600081815260076020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260066020526040812091909155600160e11b85169003611fc657600186016000818152600660205260408120549003611fc4576002548114611fc45760008181526006602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060038054600101905550505050565b60008160025481101561205d5760008181526006602052604081205490600160e01b8216900361205b575b8060000361136c57506000190160008181526006602052604090205461203a565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526000828152600660205260409020546106e790604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6127106bffffffffffffffffffffffff821611156121f35760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610bac565b6001600160a01b0382166122495760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610bac565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600055565b6000806040518061012001604052806040518061014001604052806028815260200160288152602001602181526020016032815260200160008152602001600081526020016000815260200160008152602001600081526020016000815250815260200160405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280605b8152602001604d8152602001604d815260200160a78152602001604d8152602001604d8152602001604d8152602001605b815260200160fa815260200161014d815250815260200160405180610140016040528060238152602001601c8152602001601c815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280602c81526020016102128152602001602881526020016028815260200160288152602001600081526020016000815260200160008152602001600081526020016000815250815260200160405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280600b815260200160c8815260200160c8815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280601d815260200160fa8152602001603b815260200160768152602001608f81526020016053815260200160c88152602001611365815260200161012f8152602001607d8152508152602001604051806101400160405280600e8152602001605b8152602001607d8152602001605b815260200160008152602001600081526020016000815260200160008152602001600081526020016000815250815250905060006017600085815260200190815260200160002054905060005b60098110156126345780600114806125ca5750806005145b156125d6576000612616565b8281600981106125e8576125e861508c565b60200201518282602081106125ff576125ff61508c565b1a600a81106126105761261061508c565b60200201515b612620908561500a565b93508061262c8161501d565b9150506125b2565b505050919050565b60008181526017602052604081205481805b60098110156126e25780600114806126665750806005145b156126725760006126c4565b600d81600981106126855761268561508c565b018382602081106126985761269861508c565b1a600a81106126a9576126a961508c565b601091828204019190066002029054906101000a900461ffff165b6126ce9083615348565b9150806126da8161501d565b91505061264e565b5061ffff169392505050565b6126f9848484610a65565b6001600160a01b0383163b15610bc05761271584848484614165565b610bc0576040516368d2bf6b60e11b815260040160405180910390fd5b6040805160808101825260008082526020820181905291810182905260608101919091526106e76127628361200f565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606060006127b783614251565b600101905060008167ffffffffffffffff8111156127d7576127d7614c82565b6040519080825280601f01601f191660200182016040528015612801576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461280b57509392505050565b600a54606090600160c01b900460ff1661292f57600a54600160b81b900460ff166128ff57600c805461287c90614fba565b80601f01602080910402602001604051908101604052809291908181526020018280546128a890614fba565b80156128f55780601f106128ca576101008083540402835291602001916128f5565b820191906000526020600020905b8154815290600101906020018083116128d857829003601f168201915b50505050506106e7565b600c61290a836127aa565b60405160200161291b92919061536a565b6040516020818303038152906040526106e7565b600b546040517fbe985ac9000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063be985ac990602401600060405180830381865afa158015612991573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e791908101906153e8565b606060006040518061012001604052806040518060400160405280600a81526020017f4261636b67726f756e640000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f5461626c6500000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f486f6f647900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600c81526020017f4c6170746f70204d6f64656c000000000000000000000000000000000000000081525081526020016040518060400160405280600d81526020017f4c6170746f7020436f6c6f75720000000000000000000000000000000000000081525081526020016040518060400160405280600e81526020017f4c6170746f7020537469636b657200000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f417572610000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f466163650000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f5065740000000000000000000000000000000000000000000000000000000000815250815250905060006040518061012001604052806040518061018001604052806040518060400160405280600781526020017f426564726f6f6d0000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f436f61737400000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f566572616e64610000000000000000000000000000000000000000000000000081525081526020016040518060400160405280601081526020017f5365727665722057617265686f7573650000000000000000000000000000000081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081525081526020016040518061018001604052806040518060400160405280600581526020017f436c65616e00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f4372696d696e616c00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f47616d657200000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f4d6573737900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53746f6e6572000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f5465636869650000000000000000000000000000000000000000000000000000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815250815260200160405180610180016040528060405180604001604052806005815260200164426c61636b60d81b815250815260200160405180604001604052806004815260200163426c756560e01b81525081526020016040518060400160405280600581526020017f42726f776e00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f446179627265616b00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f477265656e0000000000000000000000000000000000000000000000000000008152508152602001604051806040016040528060048152602001634772657960e01b81525081526020016040518060400160405280600381526020017f526564000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f44656e696d00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600281526020017f476900000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f49726f6e20536b696e000000000000000000000000000000000000000000000081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081525081526020016040518061018001604052806040518060400160405280600581526020017f42756c6b7900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f536c696d0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f5374616e64617264000000000000000000000000000000000000000000000000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815250815260200160405180610180016040528060405180604001604052806005815260200164426c61636b60d81b81525081526020016040518060400160405280600481526020017f476f6c6400000000000000000000000000000000000000000000000000000000815250815260200160405180604001604052806004815260200163426c756560e01b8152508152602001604051806040016040528060048152602001634772657960e01b81525081526020016040518060400160405280600581526020017f57686974650000000000000000000000000000000000000000000000000000008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600781526020017f426974636f696e0000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600b81526020017f436963616461203333303100000000000000000000000000000000000000000081525081526020016040518060400160405280600a81526020017f447261676f6e62616c6c0000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f457468657265756d00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f4d7572696361000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f536b756c6c00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f4e75636c6561720000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f50756e6b0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f417065000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f4265616e0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600e81526020017f43727970746f4469636b627574740000000000000000000000000000000000008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600981526020017f4c696768746e696e67000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53616b75726100000000000000000000000000000000000000000000000000008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600981526020017f426c6f6f646c696e65000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f536861646f77000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f476173204d61736b00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f4b697473756e650000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f416e6f6e796d6f7573000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53686f67756e00000000000000000000000000000000000000000000000000008152508152602001604080518082018252600781527f52656372756974000000000000000000000000000000000000000000000000006020808301919091529083528151808301835260058082527f47686f737400000000000000000000000000000000000000000000000000000082840152848301919091528251808401845260068082527f53637265616d000000000000000000000000000000000000000000000000000082850152858501919091528351808401855260008082526060808801929092528551808601875281815260809788015296885284516101c08101865260046101808201908152634e6f6e6560e01b6101a08301528152855180870187529384527f4d6f7573650000000000000000000000000000000000000000000000000000008486015280850193909352845180860186529182527f4b697474656e0000000000000000000000000000000000000000000000000000828501528285019190915283518085018552600381527f4f776c0000000000000000000000000000000000000000000000000000000000818501529082015282518083018452858152938101939093528151808201835284815260a08401528151808201835284815260c08401528151808201835284815260e084015281518082018352848152610100840152815180820183528481526101208401528151808201835284815261014084015281518082019092528382526101608301919091529290920191909152909150828660098110613c9757613c9761508c565b6020020151828760098110613cae57613cae61508c565b60200201518660ff16600c8110613cc757613cc761508c565b6020020151604051602001613cdd929190615456565b6040516020818303038152906040529050600086118015613cff575060008151115b15613d275780604051602001613d159190615501565b60405160208183030381529060405290505b95945050505050565b60608151600003613d4f57505060408051602081019091526000815290565b60006040518060600160405280604081526020016155ea6040913990506000600384516002613d7e919061500a565b613d88919061506a565b613d93906004615053565b67ffffffffffffffff811115613dab57613dab614c82565b6040519080825280601f01601f191660200182016040528015613dd5576020820181803683370190505b509050600182016020820185865187015b80821015613e41576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250613de6565b5050600386510660018114613e5d5760028114613e7057613e78565b603d6001830353603d6002830353613e78565b603d60018303535b509195945050505050565b6000606060005b60098110156141595760f085901c600060058314613eb357613eac8284614333565b9050614117565b85600103613f47576040516370a0823160e01b815233600482015260009073b47e3cd837ddf8e4c57f05d70ab865de6e193bbb906370a0823190602401602060405180830381865afa158015613f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3191906150a2565b11613f3d576000613f40565b60085b90506140fb565b85600203613fd9576040516370a0823160e01b81523360048201526000907360e4d786628fea6478f785a6d7e704777c86a7c6906370a0823190602401602060405180830381865afa158015613fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fc591906150a2565b11613fd1576000613f40565b5060096140fb565b8560030361406b576040516370a0823160e01b815233600482015260009073306b1ea3ecdf94ab739f1910bbda052ed4a9f949906370a0823190602401602060405180830381865afa158015614033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405791906150a2565b11614063576000613f40565b50600a6140fb565b856004036140fb576040516370a0823160e01b81523360048201526000907342069abfe407c60cf4ae4112bedead391dba1cdb906370a0823190602401602060405180830381865afa1580156140c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e991906150a2565b116140f55760006140f8565b600b5b90505b60ff81161561410a5780614114565b6141148284614333565b90505b838160405160200161412a929190615546565b60408051601f1981840301815291905260109790971b96935082915061415190508161501d565b915050613e8a565b50602001519392505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061419a903390899088908890600401615590565b6020604051808303816000875af19250505080156141d5575060408051601f3d908101601f191682019092526141d2918101906155cc565b60015b614233573d808015614203576040519150601f19603f3d011682016040523d82523d6000602084013e614208565b606091505b50805160000361422b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061429a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106142c6576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106142e457662386f26fc10000830492506010015b6305f5e10083106142fc576305f5e100830492506008015b612710831061431057612710830492506004015b60648310614322576064830492506002015b600a83106106e75760010192915050565b600080604051806101200160405280604051806101400160405280613fff61ffff168152602001617fff61ffff16815260200161cccc61ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152508152602001604051806101400160405280612aaa61ffff16815260200161555561ffff168152602001617fff61ffff16815260200161aaaa61ffff16815260200161d55461ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152508152602001604051806101400160405280611c2961ffff168152602001613d7061ffff168152602001615eb861ffff168152602001616e1461ffff168152602001618f5c61ffff16815260200161b0a361ffff16815260200161d1eb61ffff16815260200161ee1461ffff16815260200161f85161ffff16815260200161ffff8016815250815260200160405180610140016040528061492461ffff16815260200161a49161ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff1681525081526020016040518061014001604052806139f661ffff168152602001613eca61ffff168152602001617f3161ffff16815260200161bf9861ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061200061ffff168152602001613fff61ffff168152602001615fff61ffff168152602001617fff61ffff168152602001619fff61ffff16815260200161bfff61ffff16815260200161dfff61ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061e66661ffff16815260200161f33261ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061599961ffff1681526020016163d761ffff168152602001618f5c61ffff16815260200161a51e61ffff16815260200161b70a61ffff16815260200161d5c261ffff16815260200161e28e61ffff16815260200161e31261ffff16815260200161eb8461ffff16815260200161ffff8016815250815260200160405180610140016040528061b33361ffff16815260200161cf5b61ffff16815260200161e3d661ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815250905060005b600a81101561482d578184600981106147e8576147e861508c565b602002015181600a81106147fe576147fe61508c565b602002015161ffff168561ffff16101561481b5791506106e79050565b806148258161501d565b9150506147cd565b506000949350505050565b8260098101928215614872579160200282015b82811115614872578251614862908390600a614882565b509160200191906001019061484b565b5061487e929150614914565b5090565b6001830191839082156149085791602002820160005b838211156148d857835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302614898565b80156149065782816101000a81549061ffff02191690556002016020816001010492830192600103026148d8565b505b5061487e929150614928565b8082111561487e5760008155600101614914565b8082111561487e5760008155600101614914565b6001600160e01b031981168114610cb557600080fd5b60006020828403121561496457600080fd5b813561136c8161493c565b60005b8381101561498a578181015183820152602001614972565b50506000910152565b600081518084526149ab81602086016020860161496f565b601f01601f19169290920160200192915050565b60208152600061136c6020830184614993565b6000602082840312156149e457600080fd5b5035919050565b80356001600160a01b0381168114614a0257600080fd5b919050565b60008060408385031215614a1a57600080fd5b614a23836149eb565b946020939093013593505050565b60008060408385031215614a4457600080fd5b50508035926020909101359150565b600080600060608486031215614a6857600080fd5b614a71846149eb565b9250614a7f602085016149eb565b9150604084013590509250925092565b60008060208385031215614aa257600080fd5b823567ffffffffffffffff80821115614aba57600080fd5b818501915085601f830112614ace57600080fd5b813581811115614add57600080fd5b8660208260051b8501011115614af257600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156111b357614b6e8385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101614b20565b60008060408385031215614b9457600080fd5b614b9d836149eb565b9150614bab602084016149eb565b90509250929050565b600060208284031215614bc657600080fd5b61136c826149eb565b6020808252825182820181905260009190848201906040850190845b818110156111b357835183529284019291840191600101614beb565b60008060408385031215614c1a57600080fd5b614c23836149eb565b915060208301356bffffffffffffffffffffffff81168114614c4457600080fd5b809150509250929050565b600080600060608486031215614c6457600080fd5b614c6d846149eb565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715614cbc57614cbc614c82565b60405290565b604051610140810167ffffffffffffffff81118282101715614cbc57614cbc614c82565b604051601f8201601f1916810167ffffffffffffffff81118282101715614d0f57614d0f614c82565b604052919050565b6000610b40808385031215614d2b57600080fd5b601f8481850112614d3b57600080fd5b614d43614c98565b918401918086841115614d5557600080fd5b855b84811015614dc9578784820112614d6e5760008081fd5b614d76614cc2565b8061014083018a811115614d8a5760008081fd5b835b81811015614db557803561ffff81168114614da75760008081fd5b845260209384019301614d8c565b505084525060209092019161014001614d57565b509695505050505050565b8015158114610cb557600080fd5b60008060408385031215614df557600080fd5b614dfe836149eb565b91506020830135614c4481614dd4565b600067ffffffffffffffff821115614e2857614e28614c82565b50601f01601f191660200190565b6000614e49614e4484614e0e565b614ce6565b9050828152838383011115614e5d57600080fd5b828260208301376000602084830101529392505050565b600060208284031215614e8657600080fd5b813567ffffffffffffffff811115614e9d57600080fd5b8201601f81018413614eae57600080fd5b61424984823560208401614e36565b60008060008060808587031215614ed357600080fd5b614edc856149eb565b9350614eea602086016149eb565b925060408501359150606085013567ffffffffffffffff811115614f0d57600080fd5b8501601f81018713614f1e57600080fd5b614f2d87823560208401614e36565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff1690820152608081016106e7565b600080600060608486031215614f9357600080fd5b614f9c846149eb565b925060208401359150614fb1604085016149eb565b90509250925092565b600181811c90821680614fce57607f821691505b602082108103614fee57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106e7576106e7614ff4565b60006001820161502f5761502f614ff4565b5060010190565b60006020828403121561504857600080fd5b815161136c81614dd4565b80820281158282048414176106e7576106e7614ff4565b60008261508757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150b457600080fd5b5051919050565b601f821115610fc957600081815260208120601f850160051c810160208610156150e25750805b601f850160051c820191505b81811015611e2e578281556001016150ee565b815167ffffffffffffffff81111561511b5761511b614c82565b61512f816151298454614fba565b846150bb565b602080601f831160018114615164576000841561514c5750858301515b600019600386901b1c1916600185901b178555611e2e565b600085815260208120601f198616915b8281101561519357888601518255948401946001909101908401615174565b50858210156151b15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f7b226e616d65223a20224861636b6f6f727320230000000000000000000000008152600083516151f981601485016020880161496f565b80830190507f222c00000000000000000000000000000000000000000000000000000000000060148201527f22696d616765223a2022000000000000000000000000000000000000000000006016820152835161525d81602084016020880161496f565b7f222c2261747472696275746573223a205b00000000000000000000000000000060209290910191820152603101949350505050565b600083516152a581846020880161496f565b8351908301906152b981836020880161496f565b01949350505050565b600082516152d481846020870161496f565b7f5d7d000000000000000000000000000000000000000000000000000000000000920191825250600201919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161533b81601d85016020870161496f565b91909101601d0192915050565b61ffff81811683821601908082111561536357615363614ff4565b5092915050565b600080845461537881614fba565b6001828116801561539057600181146153a5576153d4565b60ff19841687528215158302870194506153d4565b8860005260208060002060005b858110156153cb5781548a8201529084019082016153b2565b50505082870194505b5050505083516152b981836020880161496f565b6000602082840312156153fa57600080fd5b815167ffffffffffffffff81111561541157600080fd5b8201601f8101841361542257600080fd5b8051615430614e4482614e0e565b81815285602083850101111561544557600080fd5b613d2782602083016020860161496f565b7f7b2274726169745f74797065223a20220000000000000000000000000000000081526000835161548e81601085016020880161496f565b7f222c202276616c7565223a20220000000000000000000000000000000000000060109184019182015283516154cb81601d84016020880161496f565b7f227d000000000000000000000000000000000000000000000000000000000000601d9290910191820152601f01949350505050565b7f2c0000000000000000000000000000000000000000000000000000000000000081526000825161553981600185016020870161496f565b9190910160010192915050565b6000835161555881846020880161496f565b60f89390931b7fff00000000000000000000000000000000000000000000000000000000000000169190920190815260010192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526155c26080830184614993565b9695505050505050565b6000602082840312156155de57600080fd5b815161136c8161493c56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220969678d6190e6ee69dce3859aa1bf3eef93f7e07823829967f5932df0c70859664736f6c6343000812003300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d59376368416f6f4c48417377396f6f57504e4331766762704c435939764e466f596761544a4d484e5761454c0000000000000000000000
Deployed Bytecode
0x6080604052600436106102175760003560e01c80637cab428d11610126578063b3d57008116100a7578063d43c7e9b11610079578063e985e9c511610061578063e985e9c514610620578063f2fde38b14610669578063fa3e47051461068957005b8063d43c7e9b146105f6578063e4f870211461060b57005b8063b3d5700814610576578063b88d4fde14610596578063c23dc68f146105a9578063c87b56dd146105d657005b806395d89b41116100f85780639f1f2054116100e05780639f1f205414610516578063a22cb46514610536578063a5573bd01461055657005b806395d89b41146104e157806399a2557a146104f657005b80637cab428d146104565780638462151c146104765780638da5cb5b146104a35780638f2fc60b146104c157005b80633ccfd60b116101b05780635d799f871161018257806364f101f01161016a57806364f101f01461040c57806370a0823114610421578063715018a61461044157005b80635d799f87146103cc5780636352211e146103ec57005b80633ccfd60b1461035757806342842e0e1461036c57806342966c681461037f5780635bbb21771461039f57005b806318160ddd116101e957806318160ddd146102c25780631b2ef1ca146102e557806323b872dd146103055780632a55205a1461031857005b806301ffc9a71461022057806306fdde0314610255578063081812fc14610277578063095ea7b3146102af57005b3661021e57005b005b34801561022c57600080fd5b5061024061023b366004614952565b6106a9565b60405190151581526020015b60405180910390f35b34801561026157600080fd5b5061026a6106ed565b60405161024c91906149bf565b34801561028357600080fd5b506102976102923660046149d2565b61077f565b6040516001600160a01b03909116815260200161024c565b61021e6102bd366004614a07565b6107dc565b3480156102ce57600080fd5b50600354600254035b60405190815260200161024c565b3480156102f157600080fd5b5061021e610300366004614a31565b6108a2565b61021e610313366004614a53565b610a65565b34801561032457600080fd5b50610338610333366004614a31565b610bc6565b604080516001600160a01b03909316835260208301919091520161024c565b34801561036357600080fd5b5061021e610c81565b61021e61037a366004614a53565b610cb8565b34801561038b57600080fd5b5061021e61039a3660046149d2565b610e09565b3480156103ab57600080fd5b506103bf6103ba366004614a8f565b610e14565b60405161024c9190614b04565b3480156103d857600080fd5b5061021e6103e7366004614b81565b610ee0565b3480156103f857600080fd5b506102976104073660046149d2565b610fce565b34801561041857600080fd5b5061021e610fd9565b34801561042d57600080fd5b506102d761043c366004614bb4565b61100b565b34801561044d57600080fd5b5061021e611073565b34801561046257600080fd5b5061021e610471366004614bb4565b611087565b34801561048257600080fd5b50610496610491366004614bb4565b6110be565b60405161024c9190614bcf565b3480156104af57600080fd5b50600a546001600160a01b0316610297565b3480156104cd57600080fd5b5061021e6104dc366004614c07565b6111bf565b3480156104ed57600080fd5b5061026a6111d1565b34801561050257600080fd5b50610496610511366004614c4f565b6111e0565b34801561052257600080fd5b5061021e610531366004614d17565b611373565b34801561054257600080fd5b5061021e610551366004614de2565b6113fa565b34801561056257600080fd5b506102d76105713660046149d2565b611466565b34801561058257600080fd5b5061021e610591366004614e74565b6114b8565b61021e6105a4366004614ebd565b6114fe565b3480156105b557600080fd5b506105c96105c43660046149d2565b61165d565b60405161024c9190614f39565b3480156105e257600080fd5b5061026a6105f13660046149d2565b6116d5565b34801561060257600080fd5b5061021e6117f5565b34801561061757600080fd5b5061021e61182d565b34801561062c57600080fd5b5061024061063b366004614b81565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561067557600080fd5b5061021e610684366004614bb4565b611871565b34801561069557600080fd5b5061021e6106a4366004614f7e565b6118fe565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806106e757506106e78261198c565b92915050565b6060600480546106fc90614fba565b80601f016020809104026020016040519081016040528092919081815260200182805461072890614fba565b80156107755780601f1061074a57610100808354040283529160200191610775565b820191906000526020600020905b81548152906001019060200180831161075857829003601f168201915b5050505050905090565b600061078a82611a25565b6107c0576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b60006107e782610fce565b9050336001600160a01b0382161461083957610803813361063b565b610839576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b3332146108db576040517f5a156d6000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a54600160a01b900460ff1661091e576040517f49084b9400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f408261092b60025490565b610935919061500a565b111561096d576040517fd05cb60900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60058211156109a8576040517fd0b9d51c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b82811015610a56576000816000036109e1576109da826109ca60025490565b6109d4919061500a565b84611a4d565b9050610a02565b6109ff826109ee60025490565b6109f8919061500a565b6000611a4d565b90505b6000818152601660205260408120805460ff19166001179055819060179084610a2a60025490565b610a34919061500a565b815260208101919091526040016000205550610a4f8161501d565b90506109ab565b50610a613383611b2f565b5050565b826daaeb6d7670e522a718067333cd4e3b15610bb557336001600160a01b03821603610a9b57610a96848484611c60565b610bc0565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0e9190615036565b8015610b915750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b919190615036565b610bb557604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610bc0848484611c60565b50505050565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff16928201929092528291610c455750604080518082019091526000546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c69906bffffffffffffffffffffffff1687615053565b610c73919061506a565b915196919550909350505050565b610c89611e36565b60405133904780156108fc02916000818181858888f19350505050158015610cb5573d6000803e3d6000fd5b50565b826daaeb6d7670e522a718067333cd4e3b15610dfe57336001600160a01b03821603610ce957610a96848484611e90565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5c9190615036565b8015610ddf5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610dbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddf9190615036565b610dfe57604051633b79c77360e21b8152336004820152602401610bac565b610bc0848484611e90565b610cb5816001611eab565b60608160008167ffffffffffffffff811115610e3257610e32614c82565b604051908082528060200260200182016040528015610e8457816020015b604080516080810182526000808252602080830182905292820181905260608201528252600019909201910181610e505790505b50905060005b828114610ed757610eb2868683818110610ea657610ea661508c565b9050602002013561165d565b828281518110610ec457610ec461508c565b6020908102919091010152600101610e8a565b50949350505050565b610ee8611e36565b6040516370a0823160e01b81523060048201526001600160a01b0383169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610f36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5a91906150a2565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610fa5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc99190615036565b505050565b60006106e78261200f565b610fe1611e36565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff169055565b60006001600160a01b03821661104d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526007602052604090205467ffffffffffffffff1690565b61107b611e36565b611085600061208f565b565b61108f611e36565b600b805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b606060008060006110ce8561100b565b905060008167ffffffffffffffff8111156110eb576110eb614c82565b604051908082528060200260200182016040528015611114578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b8386146111b35761114c816120ee565b915081604001516111ab5781516001600160a01b03161561116c57815194505b876001600160a01b0316856001600160a01b0316036111ab578083878060010198508151811061119e5761119e61508c565b6020026020010181815250505b60010161113c565b50909695505050505050565b6111c7611e36565b610a61828261216d565b6060600580546106fc90614fba565b606081831061121b576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061122760025490565b905080841115611235578093505b60006112408761100b565b90508486101561125f5785850381811015611259578091505b50611263565b5060005b60008167ffffffffffffffff81111561127e5761127e614c82565b6040519080825280602002602001820160405280156112a7578160200160208202803683370190505b509050816000036112bd57935061136c92505050565b60006112c88861165d565b9050600081604001516112d9575080515b885b8881141580156112eb5750848714155b15611360576112f9816120ee565b925082604001516113585782516001600160a01b03161561131957825191505b8a6001600160a01b0316826001600160a01b031603611358578084888060010199508151811061134b5761134b61508c565b6020026020010181815250505b6001016112db565b50505092835250909150505b9392505050565b61137b611e36565b600a54600160b01b900460ff16156113bf576040517f14ca838700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16600160a81b179055610a61600d826009614838565b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600061147160025490565b82106114905760405163677510db60e11b815260040160405180910390fd5b600a54600160a81b900460ff166114af576114aa82612287565b6106e7565b6106e78261263c565b6114c0611e36565b600c6114cc8282615101565b5050600a80547fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff16600160b81b179055565b836daaeb6d7670e522a718067333cd4e3b1561164a57336001600160a01b0382160361153557611530858585856126ee565b611656565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611584573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a89190615036565b801561162b5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611607573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061162b9190615036565b61164a57604051633b79c77360e21b8152336004820152602401610bac565b611656858585856126ee565b5050505050565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905290915060025483106116b15792915050565b6116ba836120ee565b90508060400151156116cc5792915050565b61136c83612732565b60606116e060025490565b82106116ff5760405163677510db60e11b815260040160405180910390fd5b60008281526017602052604081205490611718846127aa565b6117218561284a565b6040516020016117329291906151c1565b604051602081830303815290604052905060005b60098110156117a1578161176c828584602081106117665761176661508c565b1a6129b9565b60405160200161177d929190615293565b604051602081830303815290604052915080806117999061501d565b915050611746565b50806040516020016117b391906152c2565b60405160208183030381529060405290506117cd81613d30565b6040516020016117dd9190615303565b60405160208183030381529060405292505050919050565b6117fd611e36565b600a80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff16600160b01b179055565b611835611e36565b600a80547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff8116600160c01b9182900460ff1615909102179055565b611879611e36565b6001600160a01b0381166118f55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bac565b610cb58161208f565b611906611e36565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038281166024830152604482018490528416906323b872dd90606401600060405180830381600087803b15801561196f57600080fd5b505af1158015611983573d6000803e3d6000fd5b50505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614806119ef57507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106e75750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6000600254821080156106e7575050600090815260066020526040902054600160e01b161590565b60008042443386604051602001611a8f9493929190938452602084019290925260601b6bffffffffffffffffffffffff19166040830152605482015260740190565b60405160208183030381529060405280519060200120905060005b6007811015611afc576000611abf8386613e83565b60008181526016602052604090205490915060ff16611ae25792506106e7915050565b50600f9190911b9080611af48161501d565b915050611aaa565b506040517fae07455500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546000829003611b6d576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526007602090815260408083208054680100000000000000018802019055848352600690915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611c1c57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611be4565b5081600003611c57576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025550505050565b6000611c6b8261200f565b9050836001600160a01b0316816001600160a01b031614611cb8576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526008602052604090208054611ce48187335b6001600160a01b039081169116811491141790565b611d0f57611cf2863361063b565b611d0f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611d4f576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015611d5a57600082555b6001600160a01b038681166000908152600760205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260066020526040812091909155600160e11b84169003611dec57600184016000818152600660205260408120549003611dea576002548114611dea5760008181526006602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b600a546001600160a01b031633146110855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610bac565b610fc9838383604051806020016040528060008152506114fe565b6000611eb68361200f565b905080600080611ed486600090815260086020526040902080549091565b915091508415611f1457611ee9818433611ccf565b611f1457611ef7833361063b565b611f1457604051632ce44b5f60e11b815260040160405180910390fd5b8015611f1f57600082555b6001600160a01b038316600081815260076020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260066020526040812091909155600160e11b85169003611fc657600186016000818152600660205260408120549003611fc4576002548114611fc45760008181526006602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505060038054600101905550505050565b60008160025481101561205d5760008181526006602052604081205490600160e01b8216900361205b575b8060000361136c57506000190160008181526006602052604090205461203a565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526000828152600660205260409020546106e790604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6127106bffffffffffffffffffffffff821611156121f35760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610bac565b6001600160a01b0382166122495760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610bac565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217600055565b6000806040518061012001604052806040518061014001604052806028815260200160288152602001602181526020016032815260200160008152602001600081526020016000815260200160008152602001600081526020016000815250815260200160405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280605b8152602001604d8152602001604d815260200160a78152602001604d8152602001604d8152602001604d8152602001605b815260200160fa815260200161014d815250815260200160405180610140016040528060238152602001601c8152602001601c815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280602c81526020016102128152602001602881526020016028815260200160288152602001600081526020016000815260200160008152602001600081526020016000815250815260200160405180610140016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280600b815260200160c8815260200160c8815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152508152602001604051806101400160405280601d815260200160fa8152602001603b815260200160768152602001608f81526020016053815260200160c88152602001611365815260200161012f8152602001607d8152508152602001604051806101400160405280600e8152602001605b8152602001607d8152602001605b815260200160008152602001600081526020016000815260200160008152602001600081526020016000815250815250905060006017600085815260200190815260200160002054905060005b60098110156126345780600114806125ca5750806005145b156125d6576000612616565b8281600981106125e8576125e861508c565b60200201518282602081106125ff576125ff61508c565b1a600a81106126105761261061508c565b60200201515b612620908561500a565b93508061262c8161501d565b9150506125b2565b505050919050565b60008181526017602052604081205481805b60098110156126e25780600114806126665750806005145b156126725760006126c4565b600d81600981106126855761268561508c565b018382602081106126985761269861508c565b1a600a81106126a9576126a961508c565b601091828204019190066002029054906101000a900461ffff165b6126ce9083615348565b9150806126da8161501d565b91505061264e565b5061ffff169392505050565b6126f9848484610a65565b6001600160a01b0383163b15610bc05761271584848484614165565b610bc0576040516368d2bf6b60e11b815260040160405180910390fd5b6040805160808101825260008082526020820181905291810182905260608101919091526106e76127628361200f565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b606060006127b783614251565b600101905060008167ffffffffffffffff8111156127d7576127d7614c82565b6040519080825280601f01601f191660200182016040528015612801576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461280b57509392505050565b600a54606090600160c01b900460ff1661292f57600a54600160b81b900460ff166128ff57600c805461287c90614fba565b80601f01602080910402602001604051908101604052809291908181526020018280546128a890614fba565b80156128f55780601f106128ca576101008083540402835291602001916128f5565b820191906000526020600020905b8154815290600101906020018083116128d857829003601f168201915b50505050506106e7565b600c61290a836127aa565b60405160200161291b92919061536a565b6040516020818303038152906040526106e7565b600b546040517fbe985ac9000000000000000000000000000000000000000000000000000000008152600481018490526001600160a01b039091169063be985ac990602401600060405180830381865afa158015612991573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106e791908101906153e8565b606060006040518061012001604052806040518060400160405280600a81526020017f4261636b67726f756e640000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f5461626c6500000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f486f6f647900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600c81526020017f4c6170746f70204d6f64656c000000000000000000000000000000000000000081525081526020016040518060400160405280600d81526020017f4c6170746f7020436f6c6f75720000000000000000000000000000000000000081525081526020016040518060400160405280600e81526020017f4c6170746f7020537469636b657200000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f417572610000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f466163650000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f5065740000000000000000000000000000000000000000000000000000000000815250815250905060006040518061012001604052806040518061018001604052806040518060400160405280600781526020017f426564726f6f6d0000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f436f61737400000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f566572616e64610000000000000000000000000000000000000000000000000081525081526020016040518060400160405280601081526020017f5365727665722057617265686f7573650000000000000000000000000000000081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081525081526020016040518061018001604052806040518060400160405280600581526020017f436c65616e00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f4372696d696e616c00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f47616d657200000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f4d6573737900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53746f6e6572000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f5465636869650000000000000000000000000000000000000000000000000000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815250815260200160405180610180016040528060405180604001604052806005815260200164426c61636b60d81b815250815260200160405180604001604052806004815260200163426c756560e01b81525081526020016040518060400160405280600581526020017f42726f776e00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f446179627265616b00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f477265656e0000000000000000000000000000000000000000000000000000008152508152602001604051806040016040528060048152602001634772657960e01b81525081526020016040518060400160405280600381526020017f526564000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f44656e696d00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600281526020017f476900000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f49726f6e20536b696e000000000000000000000000000000000000000000000081525081526020016040518060200160405280600081525081526020016040518060200160405280600081525081525081526020016040518061018001604052806040518060400160405280600581526020017f42756c6b7900000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f536c696d0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f5374616e64617264000000000000000000000000000000000000000000000000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815260200160405180602001604052806000815250815250815260200160405180610180016040528060405180604001604052806005815260200164426c61636b60d81b81525081526020016040518060400160405280600481526020017f476f6c6400000000000000000000000000000000000000000000000000000000815250815260200160405180604001604052806004815260200163426c756560e01b8152508152602001604051806040016040528060048152602001634772657960e01b81525081526020016040518060400160405280600581526020017f57686974650000000000000000000000000000000000000000000000000000008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600781526020017f426974636f696e0000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600b81526020017f436963616461203333303100000000000000000000000000000000000000000081525081526020016040518060400160405280600a81526020017f447261676f6e62616c6c0000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f457468657265756d00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f4d7572696361000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600581526020017f536b756c6c00000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f4e75636c6561720000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f50756e6b0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600381526020017f417065000000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600481526020017f4265616e0000000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600e81526020017f43727970746f4469636b627574740000000000000000000000000000000000008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600981526020017f4c696768746e696e67000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53616b75726100000000000000000000000000000000000000000000000000008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152602001604051806020016040528060008152508152508152602001604051806101800160405280604051806040016040528060048152602001634e6f6e6560e01b81525081526020016040518060400160405280600981526020017f426c6f6f646c696e65000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f536861646f77000000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600881526020017f476173204d61736b00000000000000000000000000000000000000000000000081525081526020016040518060400160405280600781526020017f4b697473756e650000000000000000000000000000000000000000000000000081525081526020016040518060400160405280600981526020017f416e6f6e796d6f7573000000000000000000000000000000000000000000000081525081526020016040518060400160405280600681526020017f53686f67756e00000000000000000000000000000000000000000000000000008152508152602001604080518082018252600781527f52656372756974000000000000000000000000000000000000000000000000006020808301919091529083528151808301835260058082527f47686f737400000000000000000000000000000000000000000000000000000082840152848301919091528251808401845260068082527f53637265616d000000000000000000000000000000000000000000000000000082850152858501919091528351808401855260008082526060808801929092528551808601875281815260809788015296885284516101c08101865260046101808201908152634e6f6e6560e01b6101a08301528152855180870187529384527f4d6f7573650000000000000000000000000000000000000000000000000000008486015280850193909352845180860186529182527f4b697474656e0000000000000000000000000000000000000000000000000000828501528285019190915283518085018552600381527f4f776c0000000000000000000000000000000000000000000000000000000000818501529082015282518083018452858152938101939093528151808201835284815260a08401528151808201835284815260c08401528151808201835284815260e084015281518082018352848152610100840152815180820183528481526101208401528151808201835284815261014084015281518082019092528382526101608301919091529290920191909152909150828660098110613c9757613c9761508c565b6020020151828760098110613cae57613cae61508c565b60200201518660ff16600c8110613cc757613cc761508c565b6020020151604051602001613cdd929190615456565b6040516020818303038152906040529050600086118015613cff575060008151115b15613d275780604051602001613d159190615501565b60405160208183030381529060405290505b95945050505050565b60608151600003613d4f57505060408051602081019091526000815290565b60006040518060600160405280604081526020016155ea6040913990506000600384516002613d7e919061500a565b613d88919061506a565b613d93906004615053565b67ffffffffffffffff811115613dab57613dab614c82565b6040519080825280601f01601f191660200182016040528015613dd5576020820181803683370190505b509050600182016020820185865187015b80821015613e41576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250613de6565b5050600386510660018114613e5d5760028114613e7057613e78565b603d6001830353603d6002830353613e78565b603d60018303535b509195945050505050565b6000606060005b60098110156141595760f085901c600060058314613eb357613eac8284614333565b9050614117565b85600103613f47576040516370a0823160e01b815233600482015260009073b47e3cd837ddf8e4c57f05d70ab865de6e193bbb906370a0823190602401602060405180830381865afa158015613f0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3191906150a2565b11613f3d576000613f40565b60085b90506140fb565b85600203613fd9576040516370a0823160e01b81523360048201526000907360e4d786628fea6478f785a6d7e704777c86a7c6906370a0823190602401602060405180830381865afa158015613fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fc591906150a2565b11613fd1576000613f40565b5060096140fb565b8560030361406b576040516370a0823160e01b815233600482015260009073306b1ea3ecdf94ab739f1910bbda052ed4a9f949906370a0823190602401602060405180830381865afa158015614033573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061405791906150a2565b11614063576000613f40565b50600a6140fb565b856004036140fb576040516370a0823160e01b81523360048201526000907342069abfe407c60cf4ae4112bedead391dba1cdb906370a0823190602401602060405180830381865afa1580156140c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140e991906150a2565b116140f55760006140f8565b600b5b90505b60ff81161561410a5780614114565b6141148284614333565b90505b838160405160200161412a929190615546565b60408051601f1981840301815291905260109790971b96935082915061415190508161501d565b915050613e8a565b50602001519392505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061419a903390899088908890600401615590565b6020604051808303816000875af19250505080156141d5575060408051601f3d908101601f191682019092526141d2918101906155cc565b60015b614233573d808015614203576040519150601f19603f3d011682016040523d82523d6000602084013e614208565b606091505b50805160000361422b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061429a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef810000000083106142c6576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106142e457662386f26fc10000830492506010015b6305f5e10083106142fc576305f5e100830492506008015b612710831061431057612710830492506004015b60648310614322576064830492506002015b600a83106106e75760010192915050565b600080604051806101200160405280604051806101400160405280613fff61ffff168152602001617fff61ffff16815260200161cccc61ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152508152602001604051806101400160405280612aaa61ffff16815260200161555561ffff168152602001617fff61ffff16815260200161aaaa61ffff16815260200161d55461ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152508152602001604051806101400160405280611c2961ffff168152602001613d7061ffff168152602001615eb861ffff168152602001616e1461ffff168152602001618f5c61ffff16815260200161b0a361ffff16815260200161d1eb61ffff16815260200161ee1461ffff16815260200161f85161ffff16815260200161ffff8016815250815260200160405180610140016040528061492461ffff16815260200161a49161ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff1681525081526020016040518061014001604052806139f661ffff168152602001613eca61ffff168152602001617f3161ffff16815260200161bf9861ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061200061ffff168152602001613fff61ffff168152602001615fff61ffff168152602001617fff61ffff168152602001619fff61ffff16815260200161bfff61ffff16815260200161dfff61ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061e66661ffff16815260200161f33261ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815260200160405180610140016040528061599961ffff1681526020016163d761ffff168152602001618f5c61ffff16815260200161a51e61ffff16815260200161b70a61ffff16815260200161d5c261ffff16815260200161e28e61ffff16815260200161e31261ffff16815260200161eb8461ffff16815260200161ffff8016815250815260200160405180610140016040528061b33361ffff16815260200161cf5b61ffff16815260200161e3d661ffff16815260200161ffff80168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff168152602001600061ffff16815250815250905060005b600a81101561482d578184600981106147e8576147e861508c565b602002015181600a81106147fe576147fe61508c565b602002015161ffff168561ffff16101561481b5791506106e79050565b806148258161501d565b9150506147cd565b506000949350505050565b8260098101928215614872579160200282015b82811115614872578251614862908390600a614882565b509160200191906001019061484b565b5061487e929150614914565b5090565b6001830191839082156149085791602002820160005b838211156148d857835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302614898565b80156149065782816101000a81549061ffff02191690556002016020816001010492830192600103026148d8565b505b5061487e929150614928565b8082111561487e5760008155600101614914565b8082111561487e5760008155600101614914565b6001600160e01b031981168114610cb557600080fd5b60006020828403121561496457600080fd5b813561136c8161493c565b60005b8381101561498a578181015183820152602001614972565b50506000910152565b600081518084526149ab81602086016020860161496f565b601f01601f19169290920160200192915050565b60208152600061136c6020830184614993565b6000602082840312156149e457600080fd5b5035919050565b80356001600160a01b0381168114614a0257600080fd5b919050565b60008060408385031215614a1a57600080fd5b614a23836149eb565b946020939093013593505050565b60008060408385031215614a4457600080fd5b50508035926020909101359150565b600080600060608486031215614a6857600080fd5b614a71846149eb565b9250614a7f602085016149eb565b9150604084013590509250925092565b60008060208385031215614aa257600080fd5b823567ffffffffffffffff80821115614aba57600080fd5b818501915085601f830112614ace57600080fd5b813581811115614add57600080fd5b8660208260051b8501011115614af257600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156111b357614b6e8385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101614b20565b60008060408385031215614b9457600080fd5b614b9d836149eb565b9150614bab602084016149eb565b90509250929050565b600060208284031215614bc657600080fd5b61136c826149eb565b6020808252825182820181905260009190848201906040850190845b818110156111b357835183529284019291840191600101614beb565b60008060408385031215614c1a57600080fd5b614c23836149eb565b915060208301356bffffffffffffffffffffffff81168114614c4457600080fd5b809150509250929050565b600080600060608486031215614c6457600080fd5b614c6d846149eb565b95602085013595506040909401359392505050565b634e487b7160e01b600052604160045260246000fd5b604051610120810167ffffffffffffffff81118282101715614cbc57614cbc614c82565b60405290565b604051610140810167ffffffffffffffff81118282101715614cbc57614cbc614c82565b604051601f8201601f1916810167ffffffffffffffff81118282101715614d0f57614d0f614c82565b604052919050565b6000610b40808385031215614d2b57600080fd5b601f8481850112614d3b57600080fd5b614d43614c98565b918401918086841115614d5557600080fd5b855b84811015614dc9578784820112614d6e5760008081fd5b614d76614cc2565b8061014083018a811115614d8a5760008081fd5b835b81811015614db557803561ffff81168114614da75760008081fd5b845260209384019301614d8c565b505084525060209092019161014001614d57565b509695505050505050565b8015158114610cb557600080fd5b60008060408385031215614df557600080fd5b614dfe836149eb565b91506020830135614c4481614dd4565b600067ffffffffffffffff821115614e2857614e28614c82565b50601f01601f191660200190565b6000614e49614e4484614e0e565b614ce6565b9050828152838383011115614e5d57600080fd5b828260208301376000602084830101529392505050565b600060208284031215614e8657600080fd5b813567ffffffffffffffff811115614e9d57600080fd5b8201601f81018413614eae57600080fd5b61424984823560208401614e36565b60008060008060808587031215614ed357600080fd5b614edc856149eb565b9350614eea602086016149eb565b925060408501359150606085013567ffffffffffffffff811115614f0d57600080fd5b8501601f81018713614f1e57600080fd5b614f2d87823560208401614e36565b91505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff1690820152608081016106e7565b600080600060608486031215614f9357600080fd5b614f9c846149eb565b925060208401359150614fb1604085016149eb565b90509250925092565b600181811c90821680614fce57607f821691505b602082108103614fee57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156106e7576106e7614ff4565b60006001820161502f5761502f614ff4565b5060010190565b60006020828403121561504857600080fd5b815161136c81614dd4565b80820281158282048414176106e7576106e7614ff4565b60008261508757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156150b457600080fd5b5051919050565b601f821115610fc957600081815260208120601f850160051c810160208610156150e25750805b601f850160051c820191505b81811015611e2e578281556001016150ee565b815167ffffffffffffffff81111561511b5761511b614c82565b61512f816151298454614fba565b846150bb565b602080601f831160018114615164576000841561514c5750858301515b600019600386901b1c1916600185901b178555611e2e565b600085815260208120601f198616915b8281101561519357888601518255948401946001909101908401615174565b50858210156151b15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f7b226e616d65223a20224861636b6f6f727320230000000000000000000000008152600083516151f981601485016020880161496f565b80830190507f222c00000000000000000000000000000000000000000000000000000000000060148201527f22696d616765223a2022000000000000000000000000000000000000000000006016820152835161525d81602084016020880161496f565b7f222c2261747472696275746573223a205b00000000000000000000000000000060209290910191820152603101949350505050565b600083516152a581846020880161496f565b8351908301906152b981836020880161496f565b01949350505050565b600082516152d481846020870161496f565b7f5d7d000000000000000000000000000000000000000000000000000000000000920191825250600201919050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161533b81601d85016020870161496f565b91909101601d0192915050565b61ffff81811683821601908082111561536357615363614ff4565b5092915050565b600080845461537881614fba565b6001828116801561539057600181146153a5576153d4565b60ff19841687528215158302870194506153d4565b8860005260208060002060005b858110156153cb5781548a8201529084019082016153b2565b50505082870194505b5050505083516152b981836020880161496f565b6000602082840312156153fa57600080fd5b815167ffffffffffffffff81111561541157600080fd5b8201601f8101841361542257600080fd5b8051615430614e4482614e0e565b81815285602083850101111561544557600080fd5b613d2782602083016020860161496f565b7f7b2274726169745f74797065223a20220000000000000000000000000000000081526000835161548e81601085016020880161496f565b7f222c202276616c7565223a20220000000000000000000000000000000000000060109184019182015283516154cb81601d84016020880161496f565b7f227d000000000000000000000000000000000000000000000000000000000000601d9290910191820152601f01949350505050565b7f2c0000000000000000000000000000000000000000000000000000000000000081526000825161553981600185016020870161496f565b9190910160010192915050565b6000835161555881846020880161496f565b60f89390931b7fff00000000000000000000000000000000000000000000000000000000000000169190920190815260010192915050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526155c26080830184614993565b9695505050505050565b6000602082840312156155de57600080fd5b815161136c8161493c56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220969678d6190e6ee69dce3859aa1bf3eef93f7e07823829967f5932df0c70859664736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d59376368416f6f4c48417377396f6f57504e4331766762704c435939764e466f596761544a4d484e5761454c0000000000000000000000
-----Decoded View---------------
Arg [0] : preRevealImageURI (string): ipfs://QmY7chAooLHAsw9ooWPNC1vgbpLCY9vNFoYgaTJMHNWaEL
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [2] : 697066733a2f2f516d59376368416f6f4c48417377396f6f57504e4331766762
Arg [3] : 704c435939764e466f596761544a4d484e5761454c0000000000000000000000
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.