ERC-721
Overview
Max Total Supply
5,279 PUNKPIX
Holders
170
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
25 PUNKPIXLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PunkPixels
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; pragma abicoder v2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "base64-sol/base64.sol"; import "erc721a/contracts/ERC721A.sol"; import "./sstore2/SSTORE2.sol"; import "./utils/DynamicBuffer.sol"; interface PunkDataInterface { function punkImage(uint16 index) external view returns (bytes memory); function punkAttributes(uint16 index) external view returns (string memory); } contract PunkPixels is Ownable, ERC721A { using DynamicBuffer for bytes; using Strings for uint256; uint public constant lovelyPrimeNumber = 8553257247280420960071286815308592234402294015157773986043468141624079; uint public constant costPerToken = 0.00025 ether; uint public constant maxSupply = 2_091_094; uint public constant mintBatchSize = 30; bool public isMintActive; string public externalLink = "https://punkpixels.xyz"; bool public contractSealed; PunkDataInterface public immutable punkDataContract; address private punkPixelCountsPart1; address private punkPixelCountsPart2; mapping(string => uint8) private colorRarities; bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; modifier unsealed() { require(!contractSealed, "Contract sealed."); _; } function sealContract() external onlyOwner unsealed { contractSealed = true; } function flipMintState() external onlyOwner { isMintActive = !isMintActive; } constructor(address punkDataContractAddress) ERC721A("Punk Pixels", "PUNKPIX") { punkDataContract = PunkDataInterface(punkDataContractAddress); } function setPunkPixelCounts(bytes[] calldata pixelCounts) external onlyOwner unsealed { punkPixelCountsPart1 = SSTORE2.write(pixelCounts[0]); punkPixelCountsPart2 = SSTORE2.write(pixelCounts[1]); } function setColorRarityScores(string[] calldata colors, uint8[] calldata scores) external onlyOwner unsealed { for (uint i; i < colors.length; i++) { colorRarities[colors[i]] = scores[i]; } } function getColorRarityScore(string memory color) private view returns (string memory) { uint8 intScore = colorRarities[color]; if (intScore == 0) { return "Common"; } else if (intScore == 1) { return "Uncommon"; } else if (intScore == 2) { return "Rare"; } else if (intScore == 3) { return "Epic"; } else if (intScore == 4) { return "Legendary"; } else { return "Priceless"; } } function uintByteArrayValueAtIndex(bytes memory fakeArray, uint index) private pure returns (uint) { uint big = uint24(uint8(fakeArray[index * 3]) * 2 ** 16); uint med = uint24(uint8(fakeArray[index * 3 + 1]) * 2 ** 8); uint small = uint8(fakeArray[index * 3 + 2]); return big + med + small; } function findPunkForPixel(uint pixelId) private view returns (uint punkId, uint pixelIndexWithinPunk) { bytes memory allCounts = DynamicBuffer.allocate(30 * 1024); allCounts.appendSafe(SSTORE2.read(punkPixelCountsPart1)); allCounts.appendSafe(SSTORE2.read(punkPixelCountsPart2)); punkId = smallestElementInUintByteArrayLargerThanNeedle(allCounts, pixelId); uint highestPixelOfPreviousPunk = punkId == 0 ? 0 : uintByteArrayValueAtIndex(allCounts, punkId - 1); pixelIndexWithinPunk = pixelId - highestPixelOfPreviousPunk; return (punkId, pixelIndexWithinPunk); } function smallestElementInUintByteArrayLargerThanNeedle(bytes memory haystack, uint needle) private pure returns (uint) { uint left = 0; uint right = haystack.length / 3; while (left < right) { uint mid = left + (right - left) / 2; if (uintByteArrayValueAtIndex(haystack, mid) <= needle) { left = mid + 1; } else { right = mid; } } return left; } function mintPunkPixel(address toAddress, uint numTokens) public payable { require(isMintActive, "Mint is not active"); require(numTokens > 0, "Mint at least one"); require(msg.value == totalMintCost(numTokens, msg.sender), "Need exact payment"); uint batchCount = numTokens / mintBatchSize; uint remainder = numTokens % mintBatchSize; for (uint i; i < batchCount; i++) { _safeMint(toAddress, mintBatchSize); } if (remainder > 0) { _safeMint(toAddress, remainder); } } function tokenIdToPixelIndex(uint tokenId) private pure returns (uint) { uint offsetIndex = 777737; return ((tokenId + offsetIndex) * lovelyPrimeNumber) % maxSupply; } function tokenURI(uint256 id) public view override returns (string memory) { require(_exists(id), "Token does not exist"); return constructTokenURI(id); } function tokenName(uint tokenId) private pure returns (bytes memory) { return abi.encodePacked("Punk Pixel #", tokenId.toString()); } function tokenDescription(uint punkId, uint xCoord, uint yCoord) private pure returns (bytes memory) { return abi.encodePacked( "The pixel at coordinates (", xCoord.toString(), ", ", yCoord.toString(), ") on CryptoPunk #", punkId.toString(), "." ); } function constructTokenURI(uint tokenId) private view returns (string memory) { uint pixelIndex = tokenIdToPixelIndex(tokenId); (uint punkId, ) = findPunkForPixel(pixelIndex); (string memory svg, string memory color, uint xCoord, uint yCoord) = getPixelImageWithColor(tokenId); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{', '"name":"', tokenName(tokenId), '",' '"description":"', tokenDescription(punkId, xCoord, yCoord), '",' '"image_data":"data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '",' '"external_url":"', externalLink, '",' '"attributes": [', '{', '"trait_type": "color",', '"value": "#', color, '"', '},' '{', '"trait_type": "color_rarity",', '"value": "', getColorRarityScore(color), '"', '},' '{', '"trait_type": "pixel_number",', '"display_type": "number",', '"value": ', (pixelIndex + 1).toString(), ',', '"max_value": ', maxSupply.toString(), '', '},' '{', '"trait_type": "punk_id",', '"value": "', punkId.toString(), '"', '},' '{', '"trait_type": "x_coordinate",', '"value": "', xCoord.toString(), '"', '},' '{', '"trait_type": "y_coordinate",', '"value": "', yCoord.toString(), '"', '}' ']' '}' ) ) ) ) ); } function getPixelColor(uint tokenId) public view returns (string memory color) { (, color,,) = getPixelImageWithColor(tokenId); } function getPixelImage(uint tokenId) public view returns (string memory svg) { (svg, ,,) = getPixelImageWithColor(tokenId); } function getPixelImageWithColor(uint tokenId) public view returns ( string memory svg, string memory returnedColor, uint xCoord, uint yCoord ) { require(_exists(tokenId), "Token does not exist"); uint nonBlankCount; uint thisTokenPixelIndex = tokenIdToPixelIndex(tokenId); (uint punkId, uint pixelIndexWithinPunk) = findPunkForPixel(thisTokenPixelIndex); bytes memory pixels = punkDataContract.punkImage(uint16(punkId)); bytes memory svgBytes = DynamicBuffer.allocate(64 * 1024); svgBytes.appendSafe('<svg shape-rendering="crispEdges" xmlns="http://www.w3.org/2000/svg" version="1.2" viewBox="0 0 24 24"><style>rect{width:1px;height:1px}</style><rect x="0" y="0" style="width:100%;height:100%" fill="#638596" />'); bytes memory buffer = new bytes(8); for (uint256 y = 0; y < 24; y++) { for (uint256 x = 0; x < 24; x++) { uint256 p = (y * 24 + x) * 4; if (uint8(pixels[p + 3]) > 0) { for (uint256 i = 0; i < 4; i++) { uint8 value = uint8(pixels[p + i]); buffer[i * 2 + 1] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; buffer[i * 2] = _HEX_SYMBOLS[value & 0xf]; } if (nonBlankCount == pixelIndexWithinPunk) { returnedColor = string(abi.encodePacked(buffer)); xCoord = x + 1; yCoord = y + 1; } svgBytes.appendSafe( abi.encodePacked( '<rect x="', x.toString(), '" y="', y.toString(), '" fill="#', string(buffer), '"/>' ) ); if (nonBlankCount != pixelIndexWithinPunk) { svgBytes.appendSafe( abi.encodePacked( '<rect x="', x.toString(), '" y="', y.toString(), '" fill="#638596d8', '"/>' ) ); } nonBlankCount++; } } } svgBytes.appendSafe('</svg>'); svg = string(abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="crispEdges" version="1.2" viewBox="0 0 3072 3072"><image x="0" y="0" width="100%" height="100%" image-rendering="pixelated" href="data:image/svg+xml;base64,', Base64.encode(svgBytes), '" /></svg>' )); } function withdraw() external onlyOwner { Address.sendValue(payable(msg.sender), address(this).balance); } function totalMintCost(uint numTokens, address minter) public view returns (uint) { if (minter == owner()) { return 0; } return numTokens * costPerToken; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _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 _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary 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 { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, 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. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @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. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is 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 { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @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 {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./utils/Bytecode.sol"; /** @title A key-value storage with auto-generated keys for storing chunks of data with a lower write & read cost. @author Agustin Aguilar <[email protected]> Readme: https://github.com/0xsequence/sstore2#readme */ library SSTORE2 { error WriteError(); /** @notice Stores `_data` and returns `pointer` as key for later retrieval @dev The pointer is a contract address with `_data` as code @param _data to be written @return pointer Pointer to the written `_data` */ function write(bytes memory _data) internal returns (address pointer) { // Append 00 to _data so contract can't be called // Build init code bytes memory code = Bytecode.creationCodeFor( abi.encodePacked( hex'00', _data ) ); // Deploy contract using create assembly { pointer := create(0, add(code, 32), mload(code)) } // Address MUST be non-zero if (pointer == address(0)) revert WriteError(); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @return data read from `_pointer` contract */ function read(address _pointer) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, type(uint256).max); } /** @notice Reads the contents of the `_pointer` code as data, skips the first byte @dev The function is intended for reading pointers generated by `write` @param _pointer to be read @param _start number of bytes to skip @param _end index before which to end extraction @return data read from `_pointer` contract */ function read(address _pointer, uint256 _start, uint256 _end) internal view returns (bytes memory) { return Bytecode.codeAt(_pointer, _start + 1, _end + 1); } }
// SPDX-License-Identifier: MIT // Copyright (c) 2021 the ethier authors (github.com/divergencetech/ethier) pragma solidity >=0.8.0; /// @title DynamicBuffer /// @author David Huber (@cxkoda) and Simon Fremaux (@dievardump). See also /// https://raw.githubusercontent.com/dievardump/solidity-dynamic-buffer /// @notice This library is used to allocate a big amount of container memory // which will be subsequently filled without needing to reallocate /// memory. /// @dev First, allocate memory. /// Then use `buffer.appendUnchecked(theBytes)` or `appendSafe()` if /// bounds checking is required. library DynamicBuffer { /// @notice Allocates container space for the DynamicBuffer /// @param capacity The intended max amount of bytes in the buffer /// @return buffer The memory location of the buffer /// @dev Allocates `capacity + 0x60` bytes of space /// The buffer array starts at the first container data position, /// (i.e. `buffer = container + 0x20`) function allocate(uint256 capacity) internal pure returns (bytes memory buffer) { assembly { // Get next-free memory address let container := mload(0x40) // Allocate memory by setting a new next-free address { // Add 2 x 32 bytes in size for the two length fields // Add 32 bytes safety space for 32B chunked copy let size := add(capacity, 0x60) let newNextFree := add(container, size) mstore(0x40, newNextFree) } // Set the correct container length { let length := add(capacity, 0x40) mstore(container, length) } // The buffer starts at idx 1 in the container (0 is length) buffer := add(container, 0x20) // Init content with length 0 mstore(buffer, 0) } return buffer; } /// @notice Appends data to buffer, and update buffer length /// @param buffer the buffer to append the data to /// @param data the data to append /// @dev Does not perform out-of-bound checks (container capacity) /// for efficiency. function appendUnchecked(bytes memory buffer, bytes memory data) internal pure { assembly { let length := mload(data) for { data := add(data, 0x20) let dataEnd := add(data, length) let copyTo := add(buffer, add(mload(buffer), 0x20)) } lt(data, dataEnd) { data := add(data, 0x20) copyTo := add(copyTo, 0x20) } { // Copy 32B chunks from data to buffer. // This may read over data array boundaries and copy invalid // bytes, which doesn't matter in the end since we will // later set the correct buffer length, and have allocated an // additional word to avoid buffer overflow. mstore(copyTo, mload(data)) } // Update buffer length mstore(buffer, add(mload(buffer), length)) } } /// @notice Appends data to buffer, and update buffer length /// @param buffer the buffer to append the data to /// @param data the data to append /// @dev Performs out-of-bound checks and calls `appendUnchecked`. function appendSafe(bytes memory buffer, bytes memory data) internal pure { uint256 capacity; uint256 length; assembly { capacity := sub(mload(sub(buffer, 0x20)), 0x40) length := mload(buffer) } require( length + data.length <= capacity, "DynamicBuffer: Appending out of bounds." ); appendUnchecked(buffer, data); } }
// 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 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// 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 pragma solidity ^0.8.0; library Bytecode { error InvalidCodeAtRange(uint256 _size, uint256 _start, uint256 _end); /** @notice Generate a creation code that results on a contract with `_code` as bytecode @param _code The returning value of the resulting `creationCode` @return creationCode (constructor) for new contract */ function creationCodeFor(bytes memory _code) internal pure returns (bytes memory) { /* 0x00 0x63 0x63XXXXXX PUSH4 _code.length size 0x01 0x80 0x80 DUP1 size size 0x02 0x60 0x600e PUSH1 14 14 size size 0x03 0x60 0x6000 PUSH1 00 0 14 size size 0x04 0x39 0x39 CODECOPY size 0x05 0x60 0x6000 PUSH1 00 0 size 0x06 0xf3 0xf3 RETURN <CODE> */ return abi.encodePacked( hex"63", uint32(_code.length), hex"80_60_0E_60_00_39_60_00_F3", _code ); } /** @notice Returns the size of the code on a given address @param _addr Address that may or may not contain code @return size of the code on the given `_addr` */ function codeSize(address _addr) internal view returns (uint256 size) { assembly { size := extcodesize(_addr) } } /** @notice Returns the code of a given address @dev It will fail if `_end < _start` @param _addr Address that may or may not contain code @param _start number of bytes of code to skip on read @param _end index before which to end extraction @return oCode read from `_addr` deployed bytecode Forked from: https://gist.github.com/KardanovIR/fe98661df9338c842b4a30306d507fbd */ function codeAt(address _addr, uint256 _start, uint256 _end) internal view returns (bytes memory oCode) { uint256 csize = codeSize(_addr); if (csize == 0) return bytes(""); if (_start > csize) return bytes(""); if (_end < _start) revert InvalidCodeAtRange(csize, _start, _end); unchecked { uint256 reqSize = _end - _start; uint256 maxSize = csize - _start; uint256 size = maxSize < reqSize ? maxSize : reqSize; assembly { // allocate output byte array - this could also be done without assembly // by using o_code = new bytes(size) oCode := mload(0x40) // new "memory end" including padding mstore(0x40, add(oCode, and(add(add(size, 0x20), 0x1f), not(0x1f)))) // store length in memory mstore(oCode, size) // actually retrieve the code, this needs assembly extcodecopy(_addr, add(oCode, 0x20), _start, size) } } } }
{ "optimizer": { "enabled": true, "runs": 200, "details": { "yul": false } }, "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":"address","name":"punkDataContractAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"_size","type":"uint256"},{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"InvalidCodeAtRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"WriteError","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractSealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"costPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"externalLink","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipMintState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPixelColor","outputs":[{"internalType":"string","name":"color","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPixelImage","outputs":[{"internalType":"string","name":"svg","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPixelImageWithColor","outputs":[{"internalType":"string","name":"svg","type":"string"},{"internalType":"string","name":"returnedColor","type":"string"},{"internalType":"uint256","name":"xCoord","type":"uint256"},{"internalType":"uint256","name":"yCoord","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lovelyPrimeNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"mintPunkPixel","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkDataContract","outputs":[{"internalType":"contract PunkDataInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sealContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"colors","type":"string[]"},{"internalType":"uint8[]","name":"scores","type":"uint8[]"}],"name":"setColorRarityScores","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"pixelCounts","type":"bytes[]"}],"name":"setPunkPixelCounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numTokens","type":"uint256"},{"internalType":"address","name":"minter","type":"address"}],"name":"totalMintCost","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052601660a08190527f68747470733a2f2f70756e6b706978656c732e78797a0000000000000000000060c09081526200004091600a919062000168565b503480156200004e57600080fd5b5060405162003b5f38038062003b5f833981016040819052620000719162000248565b6040518060400160405280600b81526020016a50756e6b20506978656c7360a81b815250604051806040016040528060078152602001660a0aa9c96a092b60cb1b815250620000cf620000c96200011460201b60201c565b62000118565b8151620000e490600390602085019062000168565b508051620000fa90600490602084019062000168565b50600060015550506001600160a01b0316608052620002bc565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000176906200028b565b90600052602060002090601f0160209004810192826200019a5760008555620001e5565b82601f10620001b557805160ff1916838001178555620001e5565b82800160010185558215620001e5579182015b82811115620001e5578251825591602001919060010190620001c8565b50620001f3929150620001f7565b5090565b5b80821115620001f35760008155600101620001f8565b60006001600160a01b0382165b92915050565b6200022c816200020e565b81146200023857600080fd5b50565b80516200021b8162000221565b6000602082840312156200025f576200025f600080fd5b60006200026d84846200023b565b949350505050565b634e487b7160e01b600052602260045260246000fd5b600281046001821680620002a057607f821691505b60208210811415620002b657620002b662000275565b50919050565b608051613880620002df600039600081816102e401526108b701526138806000f3fe6080604052600436106102045760003560e01c80635f7234da11610118578063a22cb465116100a0578063c87b56dd1161006f578063c87b56dd146105d8578063d5abeb01146105f8578063e985e9c51461060f578063f2fde38b14610658578063f4eb1fc11461067857600080fd5b8063a22cb4651461055e578063a87f30ef1461057e578063b65016371461059e578063b88d4fde146105b857600080fd5b806370a08231116100e757806370a08231146104d6578063715018a6146104f65780637b68a8f01461050b5780638da5cb5b1461052b57806395d89b411461054957600080fd5b80635f7234da1461044f5780635fa33a541461046f5780636352211e146104a157806368bd580e146104c157600080fd5b806323b872dd1161019b57806342842e0e1161016a57806342842e0e146103cb57806352bbd7dc146103eb57806359c74f291461040b5780635b92ac0d146104205780635b9db8981461043a57600080fd5b806323b872dd1461034c578063324b772f1461036c5780633ba523c71461039c5780633ccfd60b146103b657600080fd5b8063095ea7b3116101d7578063095ea7b3146102b05780630f5a9f89146102d257806318160ddd146103135780631afe76831461032c57600080fd5b806301ffc9a71461020957806304b6d7ce1461023f57806306fdde0314610261578063081812fc14610283575b600080fd5b34801561021557600080fd5b5061022961022436600461237a565b61068b565b60405161023691906123a5565b60405180910390f35b34801561024b57600080fd5b50610254601e81565b60405161023691906123b9565b34801561026d57600080fd5b506102766106dd565b6040516102369190612425565b34801561028f57600080fd5b506102a361029e366004612447565b61076f565b6040516102369190612482565b3480156102bc57600080fd5b506102d06102cb3660046124a4565b6107b3565b005b3480156102de57600080fd5b506103067f000000000000000000000000000000000000000000000000000000000000000081565b6040516102369190612500565b34801561031f57600080fd5b5060025460015403610254565b34801561033857600080fd5b50610276610347366004612447565b610841565b34801561035857600080fd5b506102d061036736600461250e565b610856565b34801561037857600080fd5b5061038c610387366004612447565b610861565b604051610236949392919061255e565b3480156103a857600080fd5b5061025465e35fa931a00081565b3480156103c257600080fd5b506102d0610c70565b3480156103d757600080fd5b506102d06103e636600461250e565b610ca6565b3480156103f757600080fd5b506102d06104063660046125f9565b610cc1565b34801561041757600080fd5b506102d0610db0565b34801561042c57600080fd5b506009546102299060ff1681565b34801561044657600080fd5b50610276610dee565b34801561045b57600080fd5b506102d061046a366004612670565b610e7c565b34801561047b57600080fd5b506102547d013d42089c87bf129e8ac70345568d4c69426b3b52945b00fbfcb3c0fb0f81565b3480156104ad57600080fd5b506102a36104bc366004612447565b610f8b565b3480156104cd57600080fd5b506102d0610f9d565b3480156104e257600080fd5b506102546104f13660046126b7565b610ff9565b34801561050257600080fd5b506102d0611047565b34801561051757600080fd5b50610276610526366004612447565b61107b565b34801561053757600080fd5b506000546001600160a01b03166102a3565b34801561055557600080fd5b50610276611090565b34801561056a57600080fd5b506102d06105793660046126eb565b61109f565b34801561058a57600080fd5b5061025461059936600461271e565b611138565b3480156105aa57600080fd5b50600b546102299060ff1681565b3480156105c457600080fd5b506102d06105d3366004612842565b61116e565b3480156105e457600080fd5b506102766105f3366004612447565b6111bf565b34801561060457600080fd5b50610254621fe85681565b34801561061b57600080fd5b5061022961062a3660046128c0565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561066457600080fd5b506102d06106733660046126b7565b6111ef565b6102d06106863660046124a4565b61124b565b60006001600160e01b031982166380ac58cd60e01b14806106bc57506001600160e01b03198216635b5e139f60e01b145b806106d757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600380546106ec906128f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610718906128f8565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b600061077a8261130c565b610797576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b60006107be82610f8b565b9050806001600160a01b0316836001600160a01b031614156107f35760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906108135750610811813361062a565b155b15610831576040516367d9dca160e11b815260040160405180910390fd5b61083c838383611338565b505050565b606061084c82610861565b5091949350505050565b61083c838383611394565b6060806000806108708561130c565b6108955760405162461bcd60e51b815260040161088c9061294d565b60405180910390fd5b6000806108a18761157f565b90506000806108af836115c6565b9150915060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633e5e0a96846040518263ffffffff1660e01b81526004016109019190612967565b600060405180830381865afa15801561091e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261094691908101906129cd565b60408051620100608101909152620100408152600060209091018181529192505061098b60405180610100016040528060d2815260200161377960d291398290611669565b60408051600880825281830190925260009160208201818036833701905050905060005b6018811015610c0f5760005b6018811015610bfc576000816109d2846018612a1d565b6109dc9190612a3c565b6109e7906004612a1d565b90506000866109f7836003612a3c565b81518110610a0757610a07612a54565b016020015160f81c1115610be95760005b6004811015610b2857600087610a2e8385612a3c565b81518110610a3e57610a3e612a54565b016020015160f81c90506f181899199a1a9b1b9c1cb0b131b232b360811b600f821660108110610a7057610a70612a54565b1a60f81b86610a80846002612a1d565b610a8b906001612a3c565b81518110610a9b57610a9b612a54565b60200101906001600160f81b031916908160001a90535060041c600f166f181899199a1a9b1b9c1cb0b131b232b360811b8160108110610add57610add612a54565b1a60f81b86610aed846002612a1d565b81518110610afd57610afd612a54565b60200101906001600160f81b031916908160001a905350508080610b2090612a6a565b915050610a18565b50868a1415610b6f5783604051602001610b429190612aa7565b60408051601f198184030181529190529c50610b5f826001612a3c565b9b50610b6c836001612a3c565b9a505b610bae610b7b836116ae565b610b84856116ae565b86604051602001610b9793929190612af5565b60408051601f198184030181529190528690611669565b868a14610bdb57610bdb610bc1836116ae565b610bca856116ae565b604051602001610b97929190612b69565b89610be581612a6a565b9a50505b5080610bf481612a6a565b9150506109bb565b5080610c0781612a6a565b9150506109af565b506040805180820190915260068152651e17b9bb339f60d11b6020820152610c38908390611669565b610c41826117b3565b604051602001610c519190612bca565b6040516020818303038152906040529a50505050505050509193509193565b6000546001600160a01b03163314610c9a5760405162461bcd60e51b815260040161088c90612d15565b610ca43347611918565b565b61083c8383836040518060200160405280600081525061116e565b6000546001600160a01b03163314610ceb5760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610d0e5760405162461bcd60e51b815260040161088c90612d4c565b60005b83811015610da957828282818110610d2b57610d2b612a54565b9050602002016020810190610d409190612d70565b600d868684818110610d5457610d54612a54565b9050602002810190610d669190612d91565b604051610d74929190612e02565b908152604051908190036020019020805460ff9290921660ff1990921691909117905580610da181612a6a565b915050610d11565b5050505050565b6000546001600160a01b03163314610dda5760405162461bcd60e51b815260040161088c90612d15565b6009805460ff19811660ff90911615179055565b600a8054610dfb906128f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e27906128f8565b8015610e745780601f10610e4957610100808354040283529160200191610e74565b820191906000526020600020905b815481529060010190602001808311610e5757829003601f168201915b505050505081565b6000546001600160a01b03163314610ea65760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610ec95760405162461bcd60e51b815260040161088c90612d4c565b610f2b82826000818110610edf57610edf612a54565b9050602002810190610ef19190612d91565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506119b492505050565b600b60016101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f6782826001818110610edf57610edf612a54565b600c80546001600160a01b0319166001600160a01b03929092169190911790555050565b6000610f9682611a19565b5192915050565b6000546001600160a01b03163314610fc75760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610fea5760405162461bcd60e51b815260040161088c90612d4c565b600b805460ff19166001179055565b60006001600160a01b038216611022576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b031633146110715760405162461bcd60e51b815260040161088c90612d15565b610ca46000611b33565b606061108682610861565b5090949350505050565b6060600480546106ec906128f8565b6001600160a01b0382163314156110c95760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061112c9085906123a5565b60405180910390a35050565b600080546001600160a01b0383811691161415611157575060006106d7565b61116765e35fa931a00084612a1d565b9392505050565b611179848484611394565b6001600160a01b0383163b1515801561119b575061119984848484611b83565b155b156111b9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606111ca8261130c565b6111e65760405162461bcd60e51b815260040161088c9061294d565b6106d782611c6b565b6000546001600160a01b031633146112195760405162461bcd60e51b815260040161088c90612d15565b6001600160a01b03811661123f5760405162461bcd60e51b815260040161088c90612e55565b61124881611b33565b50565b60095460ff1661126d5760405162461bcd60e51b815260040161088c90612e8e565b6000811161128d5760405162461bcd60e51b815260040161088c90612ec6565b6112978133611138565b34146112b55760405162461bcd60e51b815260040161088c90612eff565b60006112c2601e83612f25565b905060006112d1601e84612f39565b905060005b828110156112fb576112e985601e611d5f565b806112f381612a6a565b9150506112d6565b5080156111b9576111b98482611d5f565b6000600154821080156106d7575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061139f82611a19565b9050836001600160a01b031681600001516001600160a01b0316146113d65760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806113f457506113f4853361062a565b8061140f5750336114048461076f565b6001600160a01b0316145b90508061142f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661145657604051633a954ecd60e21b815260040160405180910390fd5b61146260008487611338565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661153657600154821461153657805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610da9565b6000620bde09621fe8567d013d42089c87bf129e8ac70345568d4c69426b3b52945b00fbfcb3c0fb0f6115b28386612a3c565b6115bc9190612a1d565b6111679190612f39565b604080516178608101909152617840815260006020909101818152819061160b611604600b60019054906101000a90046001600160a01b0316611d7d565b8290611669565b600c5461162490611604906001600160a01b0316611d7d565b61162e8185611d8d565b9250600083156116515761164c82611647600187612f4d565b611e07565b611654565b60005b90506116608186612f4d565b92505050915091565b601f1982015182518251603f199092019182906116869083612a3c565b11156116a45760405162461bcd60e51b815260040161088c90612fa8565b6111b98484611ed7565b6060816116d25750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116fc57806116e681612a6a565b91506116f59050600a83612f25565b91506116d6565b6000816001600160401b0381111561171657611716612751565b6040519080825280601f01601f191660200182016040528015611740576020820181803683370190505b5090505b84156117ab57611755600183612f4d565b9150611762600a86612f39565b61176d906030612a3c565b60f81b81838151811061178257611782612a54565b60200101906001600160f81b031916908160001a9053506117a4600a86612f25565b9450611744565b949350505050565b60608151600014156117d357505060408051602081019091526000815290565b600060405180606001604052806040815260200161373960409139905060006003845160026118029190612a3c565b61180c9190612f25565b611817906004612a1d565b90506000611826826020612a3c565b6001600160401b0381111561183d5761183d612751565b6040519080825280601f01601f191660200182016040528015611867576020820181803683370190505b509050818152600183018586518101602084015b818310156118d3576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161187b565b6003895106600181146118ed57600281146118fe5761190a565b613d3d60f01b60011983015261190a565b603d60f81b6000198301525b509398975050505050505050565b804710156119385760405162461bcd60e51b815260040161088c90612fec565b6000826001600160a01b03168260405161195190612ffc565b60006040518083038185875af1925050503d806000811461198e576040519150601f19603f3d011682016040523d82523d6000602084013e611993565b606091505b505090508061083c5760405162461bcd60e51b815260040161088c9061305e565b6000806119df836040516020016119cb9190613078565b604051602081830303815290604052611f0d565b90508051602082016000f091506001600160a01b038216611a135760405163046a55db60e11b815260040160405180910390fd5b50919050565b604080516060810182526000808252602082018190529181019190915281600154811015611b1a57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611b185780516001600160a01b031615611aaf579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611b13579392505050565b611aaf565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611bb890339089908890889060040161308f565b6020604051808303816000875af1925050508015611bf3575060408051601f3d908101601f19168201909252611bf0918101906130d4565b60015b611c4e573d808015611c21576040519150601f19603f3d011682016040523d82523d6000602084013e611c26565b606091505b508051611c46576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606000611c788361157f565b90506000611c85826115c6565b509050600080600080611c9788610861565b9350935093509350611d33611cab89611f39565b611cb6878585611f54565b611cbf876117b3565b600a87611ccb89611f9b565b611cde611cd98e6001612a3c565b6116ae565b611cea621fe8566116ae565b611cf38e6116ae565b611cfc8c6116ae565b611d058c6116ae565b604051602001611d1f9b9a999897969594939291906132c1565b6040516020818303038152906040526117b3565b604051602001611d43919061358d565b6040516020818303038152906040529650505050505050919050565b611d798282604051806020016040528060008152506120d5565b5050565b60606106d78260016000196120e2565b60008060009050600060038551611da49190612f25565b90505b80821015611dff5760006002611dbd8484612f4d565b611dc79190612f25565b611dd19084612a3c565b905084611dde8783611e07565b11611df557611dee816001612a3c565b9250611df9565b8091505b50611da7565b509392505050565b60008083611e16846003612a1d565b81518110611e2657611e26612a54565b0160200151611e3b9060f81c62010000613598565b62ffffff169050600084611e50856003612a1d565b611e5b906001612a3c565b81518110611e6b57611e6b612a54565b0160200151611e7f9060f81c6101006135c3565b61ffff169050600085611e93866003612a1d565b611e9e906002612a3c565b81518110611eae57611eae612a54565b016020015160f81c905080611ec38385612a3c565b611ecd9190612a3c565b9695505050505050565b8051602082019150808201602084510184015b81841015611f02578351815260209384019301611eea565b505082510190915250565b6060815182604051602001611f2392919061362a565b6040516020818303038152906040529050919050565b6060611f44826116ae565b604051602001611f23919061365c565b6060611f5f836116ae565b611f68836116ae565b611f71866116ae565b604051602001611f83939291906136a5565b60405160208183030381529060405290509392505050565b60606000600d83604051611faf9190612aa7565b9081526040519081900360200190205460ff16905080611fed57505060408051808201909152600681526521b7b6b6b7b760d11b6020820152919050565b8060ff166001141561201f5750506040805180820190915260088152672ab731b7b6b6b7b760c11b6020820152919050565b8060ff166002141561204d5750506040805180820190915260048152635261726560e01b6020820152919050565b8060ff166003141561207b5750506040805180820190915260048152634570696360e01b6020820152919050565b8060ff16600414156120ae5750506040805180820190915260098152684c6567656e6461727960b81b6020820152919050565b505060408051808201909152600981526850726963656c65737360b81b6020820152919050565b61083c8383836001612188565b6060833b80612101575050604080516020810190915260008152611167565b8084111561211f575050604080516020810190915260008152611167565b838310156121465780848460405163162544fd60e11b815260040161088c93929190613710565b838303848203600082821061215b578261215d565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b6001546001600160a01b0385166121b157604051622e076360e81b815260040160405180910390fd5b836121cf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561228057506001600160a01b0387163b15155b15612309575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46122d16000888480600101955088611b83565b6122ee576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561228657826001541461230457600080fd5b61234f565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082141561230a575b50600155610da9565b6001600160e01b031981165b811461124857600080fd5b80356106d781612358565b60006020828403121561238f5761238f600080fd5b60006117ab848461236f565b8015155b82525050565b602081016106d7828461239b565b8061239f565b602081016106d782846123b3565b60005b838110156123e25781810151838201526020016123ca565b838111156111b95750506000910152565b60006123fd825190565b8084526020840193506124148185602086016123c7565b601f01601f19169290920192915050565b6020808252810161116781846123f3565b80612364565b80356106d781612436565b60006020828403121561245c5761245c600080fd5b60006117ab848461243c565b60006001600160a01b0382166106d7565b61239f81612468565b602081016106d78284612479565b61236481612468565b80356106d781612490565b600080604083850312156124ba576124ba600080fd5b60006124c68585612499565b92505060206124d78582860161243c565b9150509250929050565b60006106d782612468565b60006106d7826124e1565b61239f816124ec565b602081016106d782846124f7565b60008060006060848603121561252657612526600080fd5b60006125328686612499565b935050602061254386828701612499565b92505060406125548682870161243c565b9150509250925092565b6080808252810161256f81876123f3565b9050818103602083015261258381866123f3565b905061259260408301856123b3565b61259f60608301846123b3565b95945050505050565b60008083601f8401126125bd576125bd600080fd5b5081356001600160401b038111156125d7576125d7600080fd5b6020830191508360208202830111156125f2576125f2600080fd5b9250929050565b6000806000806040858703121561261257612612600080fd5b84356001600160401b0381111561262b5761262b600080fd5b612637878288016125a8565b945094505060208501356001600160401b0381111561265857612658600080fd5b612664878288016125a8565b95989497509550505050565b6000806020838503121561268657612686600080fd5b82356001600160401b0381111561269f5761269f600080fd5b6126ab858286016125a8565b92509250509250929050565b6000602082840312156126cc576126cc600080fd5b60006117ab8484612499565b801515612364565b80356106d7816126d8565b6000806040838503121561270157612701600080fd5b600061270d8585612499565b92505060206124d7858286016126e0565b6000806040838503121561273457612734600080fd5b6000612740858561243c565b92505060206124d785828601612499565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b038211171561278c5761278c612751565b6040525050565b600061279e60405190565b90506127aa8282612767565b919050565b60006001600160401b038211156127c8576127c8612751565b601f19601f83011660200192915050565b82818337506000910152565b60006127f86127f3846127af565b612793565b90508281526020810184848401111561281357612813600080fd5b611dff8482856127d9565b600082601f83011261283257612832600080fd5b81356117ab8482602086016127e5565b6000806000806080858703121561285b5761285b600080fd5b60006128678787612499565b945050602061287887828801612499565b93505060406128898782880161243c565b92505060608501356001600160401b038111156128a8576128a8600080fd5b6128b48782880161281e565b91505092959194509250565b600080604083850312156128d6576128d6600080fd5b60006127408585612499565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061290c57607f821691505b60208210811415611a1357611a136128e2565b6014815260006020820173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815291505b5060200190565b602080825281016106d78161291f565b61ffff811661239f565b602081016106d7828461295d565b60006129836127f3846127af565b90508281526020810184848401111561299e5761299e600080fd5b611dff8482856123c7565b600082601f8301126129bd576129bd600080fd5b81516117ab848260208601612975565b6000602082840312156129e2576129e2600080fd5b81516001600160401b038111156129fb576129fb600080fd5b6117ab848285016129a9565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a3757612a37612a07565b500290565b60008219821115612a4f57612a4f612a07565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612a7e57612a7e612a07565b5060010190565b6000612a8f825190565b612a9d8185602086016123c7565b9290920192915050565b60006111678284612a85565b681e3932b1ba103c1e9160b91b815260005b5060090190565b68222066696c6c3d222360b81b81526000612ac5565b6211179f60e91b815260005b5060030190565b6000612b0082612ab3565b9150612b0c8286612a85565b6411103c9e9160d91b81526005019150612b268285612a85565b9150612b3182612acc565b9150612b3d8284612a85565b915061259f82612ae2565b7004440ccd2d8d87a44466c66706a726cc87607b1b815260005b5060110190565b6000612b7482612ab3565b9150612b808285612a85565b6411103c9e9160d91b81526005019150612b9a8284612a85565b9150612ba582612b48565b91506117ab82612ae2565b691110179f1e17b9bb339f60b11b815260005b50600a0190565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222073686170652d72656e646572696e673d226372697370456460208201527f676573222076657273696f6e3d22312e32222076696577426f783d223020302060408201527f333037322033303732223e3c696d61676520783d22302220793d22302220776960608201527f6474683d223130302522206865696768743d22313030252220696d6167652d7260808201527f656e646572696e673d22706978656c617465642220687265663d22646174613a60a0820152741a5b5859d94bdcdd99cade1b5b0ed8985cd94d8d0b605a1b60c082015260d5016000612cd88284612a85565b915061116782612bb0565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000612946565b602080825281016106d781612ce3565b601081526000602082016f21b7b73a3930b1ba1039b2b0b632b21760811b81529150612946565b602080825281016106d781612d25565b60ff8116612364565b80356106d781612d5c565b600060208284031215612d8557612d85600080fd5b60006117ab8484612d65565b6000808335601e1936859003018112612dac57612dac600080fd5b8084019250823591506001600160401b03821115612dcc57612dcc600080fd5b602083019250600182023603831315612de757612de7600080fd5b509250929050565b6000612dfc8385846127d9565b50500190565b60006117ab828486612def565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b602080825281016106d781612e0f565b60128152600060208201714d696e74206973206e6f742061637469766560701b81529150612946565b602080825281016106d781612e65565b60118152600060208201704d696e74206174206c65617374206f6e6560781b81529150612946565b602080825281016106d781612e9e565b60128152600060208201711399595908195e1858dd081c185e5b595b9d60721b81529150612946565b602080825281016106d781612ed6565b634e487b7160e01b600052601260045260246000fd5b600082612f3457612f34612f0f565b500490565b600082612f4857612f48612f0f565b500690565b600082821015612f5f57612f5f612a07565b500390565b602781526000602082017f44796e616d69634275666665723a20417070656e64696e67206f7574206f66208152663137bab732399760c91b60208201529150612e4e565b602080825281016106d781612f64565b601d81526000602082017f416464726573733a20696e73756666696369656e742062616c616e636500000081529150612946565b602080825281016106d781612fb8565b6000816106d7565b603a81526000602082017f416464726573733a20756e61626c6520746f2073656e642076616c75652c207281527f6563697069656e74206d6179206861766520726576657274656400000000000060208201529150612e4e565b602080825281016106d781613004565b6000808252612a7e565b60006130838261306e565b91506111678284612a85565b6080810161309d8287612479565b6130aa6020830186612479565b6130b760408301856123b3565b8181036060830152611ecd81846123f3565b80516106d781612358565b6000602082840312156130e9576130e9600080fd5b60006117ab84846130c9565b607b60f81b81526000612a7e565b701116113232b9b1b934b83a34b7b7111d1160791b81526000612b62565b6000815461312e816128f8565b600182168015613145576001811461315657613186565b60ff19831686528186019350613186565b60008581526020902060005b8381101561317e57815488820152600190910190602001613162565b838801955050505b50505092915050565b70222c2261747472696275746573223a205b60781b81526000612b62565b601160f91b81526000612a7e565b627d2c7b60e81b81526000612aee565b7f2274726169745f74797065223a2022636f6c6f725f726172697479222c000000815260005b50601d0190565b69113b30b63ab2911d101160b11b81526000612bc3565b7f2274726169745f74797065223a2022706978656c5f6e756d626572222c000000815260006131f1565b680113b30b63ab2911d160bd1b81526000612ac5565b600b60fa1b81526000612a7e565b7f2274726169745f74797065223a2022785f636f6f7264696e617465222c000000815260006131f1565b7f2274726169745f74797065223a2022795f636f6f7264696e617465222c000000815260006131f1565b627d5d7d60e81b81526000612aee565b60006132cc826130f5565b67113730b6b2911d1160c11b815260080191506132e9828e612a85565b91506132f482613103565b9150613300828d612a85565b7f222c22696d6167655f64617461223a22646174613a696d6167652f7376672b788152691b5b0ed8985cd94d8d0b60b21b6020820152602a019150613345828c612a85565b7111161132bc3a32b93730b62fbab936111d1160711b8152601201915061336c828b613121565b91506133778261318f565b9150613382826130f5565b75089d1c985a5d17dd1e5c19488e880898dbdb1bdc888b60521b81526a2276616c7565223a20222360a81b601682015260210191506133c1828a612a85565b91506133cc826131ad565b91506133d7826131bb565b91506133e2826131cb565b91506133ed826131f8565b91506133f98289612a85565b9150613404826131ad565b915061340f826131bb565b915061341a8261320f565b7f22646973706c61795f74797065223a20226e756d626572222c000000000000008152601901915061344b82613239565b91506134578288612a85565b91506134628261324f565b6c01136b0bc2fbb30b63ab2911d1609d1b8152600d0191506134848287612a85565b915061348f826131bb565b7f2274726169745f74797065223a202270756e6b5f6964222c0000000000000000815260180191506134c0826131f8565b91506134cc8286612a85565b91506134d7826131ad565b91506134e2826131bb565b91506134ed8261325d565b91506134f8826131f8565b91506135048285612a85565b915061350f826131ad565b915061351a826131bb565b915061352582613287565b9150613530826131f8565b915061353c8284612a85565b9150613547826131ad565b9150613552826132b1565b9d9c50505050505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260006131f1565b600061308382613563565b600062ffffff8216915062ffffff831692508162ffffff0483118215151615612a3757612a37612a07565b600061ffff8216915061ffff831692508161ffff0483118215151615612a3757612a37612a07565b606360f81b81526000612a7e565b60006106d78260e01b90565b61239f63ffffffff82166135f9565b6880600e6000396000f360b81b81526000612ac5565b6000613635826135eb565b91506136418285613605565b60048201915061365082613614565b91506117ab8284612a85565b6b50756e6b20506978656c202360a01b81526000600c8201613083565b7029206f6e2043727970746f50756e6b202360781b81526000612b62565b601760f91b81526000612a7e565b7f54686520706978656c20617420636f6f7264696e6174657320280000000000008152601a0160006136d78286612a85565b61016160f51b815260020191506136ee8285612a85565b91506136f982613679565b91506137058284612a85565b915061259f82613697565b6060810161371e82866123b3565b61372b60208301856123b3565b6117ab60408301846123b356fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672073686170652d72656e646572696e673d22637269737045646765732220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076657273696f6e3d22312e32222076696577426f783d22302030203234203234223e3c7374796c653e726563747b77696474683a3170783b6865696768743a3170787d3c2f7374796c653e3c7265637420783d22302220793d223022207374796c653d2277696474683a313030253b6865696768743a31303025222066696c6c3d222336333835393622202f3ea2646970667358221220271a0caf818b9e290e62069f371cad233197f5ddff922e5a9f4890ec406485b764736f6c634300080c003300000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2
Deployed Bytecode
0x6080604052600436106102045760003560e01c80635f7234da11610118578063a22cb465116100a0578063c87b56dd1161006f578063c87b56dd146105d8578063d5abeb01146105f8578063e985e9c51461060f578063f2fde38b14610658578063f4eb1fc11461067857600080fd5b8063a22cb4651461055e578063a87f30ef1461057e578063b65016371461059e578063b88d4fde146105b857600080fd5b806370a08231116100e757806370a08231146104d6578063715018a6146104f65780637b68a8f01461050b5780638da5cb5b1461052b57806395d89b411461054957600080fd5b80635f7234da1461044f5780635fa33a541461046f5780636352211e146104a157806368bd580e146104c157600080fd5b806323b872dd1161019b57806342842e0e1161016a57806342842e0e146103cb57806352bbd7dc146103eb57806359c74f291461040b5780635b92ac0d146104205780635b9db8981461043a57600080fd5b806323b872dd1461034c578063324b772f1461036c5780633ba523c71461039c5780633ccfd60b146103b657600080fd5b8063095ea7b3116101d7578063095ea7b3146102b05780630f5a9f89146102d257806318160ddd146103135780631afe76831461032c57600080fd5b806301ffc9a71461020957806304b6d7ce1461023f57806306fdde0314610261578063081812fc14610283575b600080fd5b34801561021557600080fd5b5061022961022436600461237a565b61068b565b60405161023691906123a5565b60405180910390f35b34801561024b57600080fd5b50610254601e81565b60405161023691906123b9565b34801561026d57600080fd5b506102766106dd565b6040516102369190612425565b34801561028f57600080fd5b506102a361029e366004612447565b61076f565b6040516102369190612482565b3480156102bc57600080fd5b506102d06102cb3660046124a4565b6107b3565b005b3480156102de57600080fd5b506103067f00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b281565b6040516102369190612500565b34801561031f57600080fd5b5060025460015403610254565b34801561033857600080fd5b50610276610347366004612447565b610841565b34801561035857600080fd5b506102d061036736600461250e565b610856565b34801561037857600080fd5b5061038c610387366004612447565b610861565b604051610236949392919061255e565b3480156103a857600080fd5b5061025465e35fa931a00081565b3480156103c257600080fd5b506102d0610c70565b3480156103d757600080fd5b506102d06103e636600461250e565b610ca6565b3480156103f757600080fd5b506102d06104063660046125f9565b610cc1565b34801561041757600080fd5b506102d0610db0565b34801561042c57600080fd5b506009546102299060ff1681565b34801561044657600080fd5b50610276610dee565b34801561045b57600080fd5b506102d061046a366004612670565b610e7c565b34801561047b57600080fd5b506102547d013d42089c87bf129e8ac70345568d4c69426b3b52945b00fbfcb3c0fb0f81565b3480156104ad57600080fd5b506102a36104bc366004612447565b610f8b565b3480156104cd57600080fd5b506102d0610f9d565b3480156104e257600080fd5b506102546104f13660046126b7565b610ff9565b34801561050257600080fd5b506102d0611047565b34801561051757600080fd5b50610276610526366004612447565b61107b565b34801561053757600080fd5b506000546001600160a01b03166102a3565b34801561055557600080fd5b50610276611090565b34801561056a57600080fd5b506102d06105793660046126eb565b61109f565b34801561058a57600080fd5b5061025461059936600461271e565b611138565b3480156105aa57600080fd5b50600b546102299060ff1681565b3480156105c457600080fd5b506102d06105d3366004612842565b61116e565b3480156105e457600080fd5b506102766105f3366004612447565b6111bf565b34801561060457600080fd5b50610254621fe85681565b34801561061b57600080fd5b5061022961062a3660046128c0565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561066457600080fd5b506102d06106733660046126b7565b6111ef565b6102d06106863660046124a4565b61124b565b60006001600160e01b031982166380ac58cd60e01b14806106bc57506001600160e01b03198216635b5e139f60e01b145b806106d757506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600380546106ec906128f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610718906128f8565b80156107655780601f1061073a57610100808354040283529160200191610765565b820191906000526020600020905b81548152906001019060200180831161074857829003601f168201915b5050505050905090565b600061077a8261130c565b610797576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b60006107be82610f8b565b9050806001600160a01b0316836001600160a01b031614156107f35760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906108135750610811813361062a565b155b15610831576040516367d9dca160e11b815260040160405180910390fd5b61083c838383611338565b505050565b606061084c82610861565b5091949350505050565b61083c838383611394565b6060806000806108708561130c565b6108955760405162461bcd60e51b815260040161088c9061294d565b60405180910390fd5b6000806108a18761157f565b90506000806108af836115c6565b9150915060007f00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b26001600160a01b0316633e5e0a96846040518263ffffffff1660e01b81526004016109019190612967565b600060405180830381865afa15801561091e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261094691908101906129cd565b60408051620100608101909152620100408152600060209091018181529192505061098b60405180610100016040528060d2815260200161377960d291398290611669565b60408051600880825281830190925260009160208201818036833701905050905060005b6018811015610c0f5760005b6018811015610bfc576000816109d2846018612a1d565b6109dc9190612a3c565b6109e7906004612a1d565b90506000866109f7836003612a3c565b81518110610a0757610a07612a54565b016020015160f81c1115610be95760005b6004811015610b2857600087610a2e8385612a3c565b81518110610a3e57610a3e612a54565b016020015160f81c90506f181899199a1a9b1b9c1cb0b131b232b360811b600f821660108110610a7057610a70612a54565b1a60f81b86610a80846002612a1d565b610a8b906001612a3c565b81518110610a9b57610a9b612a54565b60200101906001600160f81b031916908160001a90535060041c600f166f181899199a1a9b1b9c1cb0b131b232b360811b8160108110610add57610add612a54565b1a60f81b86610aed846002612a1d565b81518110610afd57610afd612a54565b60200101906001600160f81b031916908160001a905350508080610b2090612a6a565b915050610a18565b50868a1415610b6f5783604051602001610b429190612aa7565b60408051601f198184030181529190529c50610b5f826001612a3c565b9b50610b6c836001612a3c565b9a505b610bae610b7b836116ae565b610b84856116ae565b86604051602001610b9793929190612af5565b60408051601f198184030181529190528690611669565b868a14610bdb57610bdb610bc1836116ae565b610bca856116ae565b604051602001610b97929190612b69565b89610be581612a6a565b9a50505b5080610bf481612a6a565b9150506109bb565b5080610c0781612a6a565b9150506109af565b506040805180820190915260068152651e17b9bb339f60d11b6020820152610c38908390611669565b610c41826117b3565b604051602001610c519190612bca565b6040516020818303038152906040529a50505050505050509193509193565b6000546001600160a01b03163314610c9a5760405162461bcd60e51b815260040161088c90612d15565b610ca43347611918565b565b61083c8383836040518060200160405280600081525061116e565b6000546001600160a01b03163314610ceb5760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610d0e5760405162461bcd60e51b815260040161088c90612d4c565b60005b83811015610da957828282818110610d2b57610d2b612a54565b9050602002016020810190610d409190612d70565b600d868684818110610d5457610d54612a54565b9050602002810190610d669190612d91565b604051610d74929190612e02565b908152604051908190036020019020805460ff9290921660ff1990921691909117905580610da181612a6a565b915050610d11565b5050505050565b6000546001600160a01b03163314610dda5760405162461bcd60e51b815260040161088c90612d15565b6009805460ff19811660ff90911615179055565b600a8054610dfb906128f8565b80601f0160208091040260200160405190810160405280929190818152602001828054610e27906128f8565b8015610e745780601f10610e4957610100808354040283529160200191610e74565b820191906000526020600020905b815481529060010190602001808311610e5757829003601f168201915b505050505081565b6000546001600160a01b03163314610ea65760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610ec95760405162461bcd60e51b815260040161088c90612d4c565b610f2b82826000818110610edf57610edf612a54565b9050602002810190610ef19190612d91565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506119b492505050565b600b60016101000a8154816001600160a01b0302191690836001600160a01b03160217905550610f6782826001818110610edf57610edf612a54565b600c80546001600160a01b0319166001600160a01b03929092169190911790555050565b6000610f9682611a19565b5192915050565b6000546001600160a01b03163314610fc75760405162461bcd60e51b815260040161088c90612d15565b600b5460ff1615610fea5760405162461bcd60e51b815260040161088c90612d4c565b600b805460ff19166001179055565b60006001600160a01b038216611022576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b031633146110715760405162461bcd60e51b815260040161088c90612d15565b610ca46000611b33565b606061108682610861565b5090949350505050565b6060600480546106ec906128f8565b6001600160a01b0382163314156110c95760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b038716808552925291829020805460ff191685151517905590519091907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061112c9085906123a5565b60405180910390a35050565b600080546001600160a01b0383811691161415611157575060006106d7565b61116765e35fa931a00084612a1d565b9392505050565b611179848484611394565b6001600160a01b0383163b1515801561119b575061119984848484611b83565b155b156111b9576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606111ca8261130c565b6111e65760405162461bcd60e51b815260040161088c9061294d565b6106d782611c6b565b6000546001600160a01b031633146112195760405162461bcd60e51b815260040161088c90612d15565b6001600160a01b03811661123f5760405162461bcd60e51b815260040161088c90612e55565b61124881611b33565b50565b60095460ff1661126d5760405162461bcd60e51b815260040161088c90612e8e565b6000811161128d5760405162461bcd60e51b815260040161088c90612ec6565b6112978133611138565b34146112b55760405162461bcd60e51b815260040161088c90612eff565b60006112c2601e83612f25565b905060006112d1601e84612f39565b905060005b828110156112fb576112e985601e611d5f565b806112f381612a6a565b9150506112d6565b5080156111b9576111b98482611d5f565b6000600154821080156106d7575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061139f82611a19565b9050836001600160a01b031681600001516001600160a01b0316146113d65760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806113f457506113f4853361062a565b8061140f5750336114048461076f565b6001600160a01b0316145b90508061142f57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661145657604051633a954ecd60e21b815260040160405180910390fd5b61146260008487611338565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661153657600154821461153657805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610da9565b6000620bde09621fe8567d013d42089c87bf129e8ac70345568d4c69426b3b52945b00fbfcb3c0fb0f6115b28386612a3c565b6115bc9190612a1d565b6111679190612f39565b604080516178608101909152617840815260006020909101818152819061160b611604600b60019054906101000a90046001600160a01b0316611d7d565b8290611669565b600c5461162490611604906001600160a01b0316611d7d565b61162e8185611d8d565b9250600083156116515761164c82611647600187612f4d565b611e07565b611654565b60005b90506116608186612f4d565b92505050915091565b601f1982015182518251603f199092019182906116869083612a3c565b11156116a45760405162461bcd60e51b815260040161088c90612fa8565b6111b98484611ed7565b6060816116d25750506040805180820190915260018152600360fc1b602082015290565b8160005b81156116fc57806116e681612a6a565b91506116f59050600a83612f25565b91506116d6565b6000816001600160401b0381111561171657611716612751565b6040519080825280601f01601f191660200182016040528015611740576020820181803683370190505b5090505b84156117ab57611755600183612f4d565b9150611762600a86612f39565b61176d906030612a3c565b60f81b81838151811061178257611782612a54565b60200101906001600160f81b031916908160001a9053506117a4600a86612f25565b9450611744565b949350505050565b60608151600014156117d357505060408051602081019091526000815290565b600060405180606001604052806040815260200161373960409139905060006003845160026118029190612a3c565b61180c9190612f25565b611817906004612a1d565b90506000611826826020612a3c565b6001600160401b0381111561183d5761183d612751565b6040519080825280601f01601f191660200182016040528015611867576020820181803683370190505b509050818152600183018586518101602084015b818310156118d3576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161187b565b6003895106600181146118ed57600281146118fe5761190a565b613d3d60f01b60011983015261190a565b603d60f81b6000198301525b509398975050505050505050565b804710156119385760405162461bcd60e51b815260040161088c90612fec565b6000826001600160a01b03168260405161195190612ffc565b60006040518083038185875af1925050503d806000811461198e576040519150601f19603f3d011682016040523d82523d6000602084013e611993565b606091505b505090508061083c5760405162461bcd60e51b815260040161088c9061305e565b6000806119df836040516020016119cb9190613078565b604051602081830303815290604052611f0d565b90508051602082016000f091506001600160a01b038216611a135760405163046a55db60e11b815260040160405180910390fd5b50919050565b604080516060810182526000808252602082018190529181019190915281600154811015611b1a57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611b185780516001600160a01b031615611aaf579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611b13579392505050565b611aaf565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611bb890339089908890889060040161308f565b6020604051808303816000875af1925050508015611bf3575060408051601f3d908101601f19168201909252611bf0918101906130d4565b60015b611c4e573d808015611c21576040519150601f19603f3d011682016040523d82523d6000602084013e611c26565b606091505b508051611c46576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60606000611c788361157f565b90506000611c85826115c6565b509050600080600080611c9788610861565b9350935093509350611d33611cab89611f39565b611cb6878585611f54565b611cbf876117b3565b600a87611ccb89611f9b565b611cde611cd98e6001612a3c565b6116ae565b611cea621fe8566116ae565b611cf38e6116ae565b611cfc8c6116ae565b611d058c6116ae565b604051602001611d1f9b9a999897969594939291906132c1565b6040516020818303038152906040526117b3565b604051602001611d43919061358d565b6040516020818303038152906040529650505050505050919050565b611d798282604051806020016040528060008152506120d5565b5050565b60606106d78260016000196120e2565b60008060009050600060038551611da49190612f25565b90505b80821015611dff5760006002611dbd8484612f4d565b611dc79190612f25565b611dd19084612a3c565b905084611dde8783611e07565b11611df557611dee816001612a3c565b9250611df9565b8091505b50611da7565b509392505050565b60008083611e16846003612a1d565b81518110611e2657611e26612a54565b0160200151611e3b9060f81c62010000613598565b62ffffff169050600084611e50856003612a1d565b611e5b906001612a3c565b81518110611e6b57611e6b612a54565b0160200151611e7f9060f81c6101006135c3565b61ffff169050600085611e93866003612a1d565b611e9e906002612a3c565b81518110611eae57611eae612a54565b016020015160f81c905080611ec38385612a3c565b611ecd9190612a3c565b9695505050505050565b8051602082019150808201602084510184015b81841015611f02578351815260209384019301611eea565b505082510190915250565b6060815182604051602001611f2392919061362a565b6040516020818303038152906040529050919050565b6060611f44826116ae565b604051602001611f23919061365c565b6060611f5f836116ae565b611f68836116ae565b611f71866116ae565b604051602001611f83939291906136a5565b60405160208183030381529060405290509392505050565b60606000600d83604051611faf9190612aa7565b9081526040519081900360200190205460ff16905080611fed57505060408051808201909152600681526521b7b6b6b7b760d11b6020820152919050565b8060ff166001141561201f5750506040805180820190915260088152672ab731b7b6b6b7b760c11b6020820152919050565b8060ff166002141561204d5750506040805180820190915260048152635261726560e01b6020820152919050565b8060ff166003141561207b5750506040805180820190915260048152634570696360e01b6020820152919050565b8060ff16600414156120ae5750506040805180820190915260098152684c6567656e6461727960b81b6020820152919050565b505060408051808201909152600981526850726963656c65737360b81b6020820152919050565b61083c8383836001612188565b6060833b80612101575050604080516020810190915260008152611167565b8084111561211f575050604080516020810190915260008152611167565b838310156121465780848460405163162544fd60e11b815260040161088c93929190613710565b838303848203600082821061215b578261215d565b815b60408051603f8301601f19168101909152818152955090508087602087018a3c505050509392505050565b6001546001600160a01b0385166121b157604051622e076360e81b815260040160405180910390fd5b836121cf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561228057506001600160a01b0387163b15155b15612309575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46122d16000888480600101955088611b83565b6122ee576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561228657826001541461230457600080fd5b61234f565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082141561230a575b50600155610da9565b6001600160e01b031981165b811461124857600080fd5b80356106d781612358565b60006020828403121561238f5761238f600080fd5b60006117ab848461236f565b8015155b82525050565b602081016106d7828461239b565b8061239f565b602081016106d782846123b3565b60005b838110156123e25781810151838201526020016123ca565b838111156111b95750506000910152565b60006123fd825190565b8084526020840193506124148185602086016123c7565b601f01601f19169290920192915050565b6020808252810161116781846123f3565b80612364565b80356106d781612436565b60006020828403121561245c5761245c600080fd5b60006117ab848461243c565b60006001600160a01b0382166106d7565b61239f81612468565b602081016106d78284612479565b61236481612468565b80356106d781612490565b600080604083850312156124ba576124ba600080fd5b60006124c68585612499565b92505060206124d78582860161243c565b9150509250929050565b60006106d782612468565b60006106d7826124e1565b61239f816124ec565b602081016106d782846124f7565b60008060006060848603121561252657612526600080fd5b60006125328686612499565b935050602061254386828701612499565b92505060406125548682870161243c565b9150509250925092565b6080808252810161256f81876123f3565b9050818103602083015261258381866123f3565b905061259260408301856123b3565b61259f60608301846123b3565b95945050505050565b60008083601f8401126125bd576125bd600080fd5b5081356001600160401b038111156125d7576125d7600080fd5b6020830191508360208202830111156125f2576125f2600080fd5b9250929050565b6000806000806040858703121561261257612612600080fd5b84356001600160401b0381111561262b5761262b600080fd5b612637878288016125a8565b945094505060208501356001600160401b0381111561265857612658600080fd5b612664878288016125a8565b95989497509550505050565b6000806020838503121561268657612686600080fd5b82356001600160401b0381111561269f5761269f600080fd5b6126ab858286016125a8565b92509250509250929050565b6000602082840312156126cc576126cc600080fd5b60006117ab8484612499565b801515612364565b80356106d7816126d8565b6000806040838503121561270157612701600080fd5b600061270d8585612499565b92505060206124d7858286016126e0565b6000806040838503121561273457612734600080fd5b6000612740858561243c565b92505060206124d785828601612499565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b038211171561278c5761278c612751565b6040525050565b600061279e60405190565b90506127aa8282612767565b919050565b60006001600160401b038211156127c8576127c8612751565b601f19601f83011660200192915050565b82818337506000910152565b60006127f86127f3846127af565b612793565b90508281526020810184848401111561281357612813600080fd5b611dff8482856127d9565b600082601f83011261283257612832600080fd5b81356117ab8482602086016127e5565b6000806000806080858703121561285b5761285b600080fd5b60006128678787612499565b945050602061287887828801612499565b93505060406128898782880161243c565b92505060608501356001600160401b038111156128a8576128a8600080fd5b6128b48782880161281e565b91505092959194509250565b600080604083850312156128d6576128d6600080fd5b60006127408585612499565b634e487b7160e01b600052602260045260246000fd5b60028104600182168061290c57607f821691505b60208210811415611a1357611a136128e2565b6014815260006020820173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815291505b5060200190565b602080825281016106d78161291f565b61ffff811661239f565b602081016106d7828461295d565b60006129836127f3846127af565b90508281526020810184848401111561299e5761299e600080fd5b611dff8482856123c7565b600082601f8301126129bd576129bd600080fd5b81516117ab848260208601612975565b6000602082840312156129e2576129e2600080fd5b81516001600160401b038111156129fb576129fb600080fd5b6117ab848285016129a9565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612a3757612a37612a07565b500290565b60008219821115612a4f57612a4f612a07565b500190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612a7e57612a7e612a07565b5060010190565b6000612a8f825190565b612a9d8185602086016123c7565b9290920192915050565b60006111678284612a85565b681e3932b1ba103c1e9160b91b815260005b5060090190565b68222066696c6c3d222360b81b81526000612ac5565b6211179f60e91b815260005b5060030190565b6000612b0082612ab3565b9150612b0c8286612a85565b6411103c9e9160d91b81526005019150612b268285612a85565b9150612b3182612acc565b9150612b3d8284612a85565b915061259f82612ae2565b7004440ccd2d8d87a44466c66706a726cc87607b1b815260005b5060110190565b6000612b7482612ab3565b9150612b808285612a85565b6411103c9e9160d91b81526005019150612b9a8284612a85565b9150612ba582612b48565b91506117ab82612ae2565b691110179f1e17b9bb339f60b11b815260005b50600a0190565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222073686170652d72656e646572696e673d226372697370456460208201527f676573222076657273696f6e3d22312e32222076696577426f783d223020302060408201527f333037322033303732223e3c696d61676520783d22302220793d22302220776960608201527f6474683d223130302522206865696768743d22313030252220696d6167652d7260808201527f656e646572696e673d22706978656c617465642220687265663d22646174613a60a0820152741a5b5859d94bdcdd99cade1b5b0ed8985cd94d8d0b605a1b60c082015260d5016000612cd88284612a85565b915061116782612bb0565b60208082527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657291019081526000612946565b602080825281016106d781612ce3565b601081526000602082016f21b7b73a3930b1ba1039b2b0b632b21760811b81529150612946565b602080825281016106d781612d25565b60ff8116612364565b80356106d781612d5c565b600060208284031215612d8557612d85600080fd5b60006117ab8484612d65565b6000808335601e1936859003018112612dac57612dac600080fd5b8084019250823591506001600160401b03821115612dcc57612dcc600080fd5b602083019250600182023603831315612de757612de7600080fd5b509250929050565b6000612dfc8385846127d9565b50500190565b60006117ab828486612def565b602681526000602082017f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206181526564647265737360d01b602082015291505b5060400190565b602080825281016106d781612e0f565b60128152600060208201714d696e74206973206e6f742061637469766560701b81529150612946565b602080825281016106d781612e65565b60118152600060208201704d696e74206174206c65617374206f6e6560781b81529150612946565b602080825281016106d781612e9e565b60128152600060208201711399595908195e1858dd081c185e5b595b9d60721b81529150612946565b602080825281016106d781612ed6565b634e487b7160e01b600052601260045260246000fd5b600082612f3457612f34612f0f565b500490565b600082612f4857612f48612f0f565b500690565b600082821015612f5f57612f5f612a07565b500390565b602781526000602082017f44796e616d69634275666665723a20417070656e64696e67206f7574206f66208152663137bab732399760c91b60208201529150612e4e565b602080825281016106d781612f64565b601d81526000602082017f416464726573733a20696e73756666696369656e742062616c616e636500000081529150612946565b602080825281016106d781612fb8565b6000816106d7565b603a81526000602082017f416464726573733a20756e61626c6520746f2073656e642076616c75652c207281527f6563697069656e74206d6179206861766520726576657274656400000000000060208201529150612e4e565b602080825281016106d781613004565b6000808252612a7e565b60006130838261306e565b91506111678284612a85565b6080810161309d8287612479565b6130aa6020830186612479565b6130b760408301856123b3565b8181036060830152611ecd81846123f3565b80516106d781612358565b6000602082840312156130e9576130e9600080fd5b60006117ab84846130c9565b607b60f81b81526000612a7e565b701116113232b9b1b934b83a34b7b7111d1160791b81526000612b62565b6000815461312e816128f8565b600182168015613145576001811461315657613186565b60ff19831686528186019350613186565b60008581526020902060005b8381101561317e57815488820152600190910190602001613162565b838801955050505b50505092915050565b70222c2261747472696275746573223a205b60781b81526000612b62565b601160f91b81526000612a7e565b627d2c7b60e81b81526000612aee565b7f2274726169745f74797065223a2022636f6c6f725f726172697479222c000000815260005b50601d0190565b69113b30b63ab2911d101160b11b81526000612bc3565b7f2274726169745f74797065223a2022706978656c5f6e756d626572222c000000815260006131f1565b680113b30b63ab2911d160bd1b81526000612ac5565b600b60fa1b81526000612a7e565b7f2274726169745f74797065223a2022785f636f6f7264696e617465222c000000815260006131f1565b7f2274726169745f74797065223a2022795f636f6f7264696e617465222c000000815260006131f1565b627d5d7d60e81b81526000612aee565b60006132cc826130f5565b67113730b6b2911d1160c11b815260080191506132e9828e612a85565b91506132f482613103565b9150613300828d612a85565b7f222c22696d6167655f64617461223a22646174613a696d6167652f7376672b788152691b5b0ed8985cd94d8d0b60b21b6020820152602a019150613345828c612a85565b7111161132bc3a32b93730b62fbab936111d1160711b8152601201915061336c828b613121565b91506133778261318f565b9150613382826130f5565b75089d1c985a5d17dd1e5c19488e880898dbdb1bdc888b60521b81526a2276616c7565223a20222360a81b601682015260210191506133c1828a612a85565b91506133cc826131ad565b91506133d7826131bb565b91506133e2826131cb565b91506133ed826131f8565b91506133f98289612a85565b9150613404826131ad565b915061340f826131bb565b915061341a8261320f565b7f22646973706c61795f74797065223a20226e756d626572222c000000000000008152601901915061344b82613239565b91506134578288612a85565b91506134628261324f565b6c01136b0bc2fbb30b63ab2911d1609d1b8152600d0191506134848287612a85565b915061348f826131bb565b7f2274726169745f74797065223a202270756e6b5f6964222c0000000000000000815260180191506134c0826131f8565b91506134cc8286612a85565b91506134d7826131ad565b91506134e2826131bb565b91506134ed8261325d565b91506134f8826131f8565b91506135048285612a85565b915061350f826131ad565b915061351a826131bb565b915061352582613287565b9150613530826131f8565b915061353c8284612a85565b9150613547826131ad565b9150613552826132b1565b9d9c50505050505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260006131f1565b600061308382613563565b600062ffffff8216915062ffffff831692508162ffffff0483118215151615612a3757612a37612a07565b600061ffff8216915061ffff831692508161ffff0483118215151615612a3757612a37612a07565b606360f81b81526000612a7e565b60006106d78260e01b90565b61239f63ffffffff82166135f9565b6880600e6000396000f360b81b81526000612ac5565b6000613635826135eb565b91506136418285613605565b60048201915061365082613614565b91506117ab8284612a85565b6b50756e6b20506978656c202360a01b81526000600c8201613083565b7029206f6e2043727970746f50756e6b202360781b81526000612b62565b601760f91b81526000612a7e565b7f54686520706978656c20617420636f6f7264696e6174657320280000000000008152601a0160006136d78286612a85565b61016160f51b815260020191506136ee8285612a85565b91506136f982613679565b91506137058284612a85565b915061259f82613697565b6060810161371e82866123b3565b61372b60208301856123b3565b6117ab60408301846123b356fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672073686170652d72656e646572696e673d22637269737045646765732220786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076657273696f6e3d22312e32222076696577426f783d22302030203234203234223e3c7374796c653e726563747b77696474683a3170783b6865696768743a3170787d3c2f7374796c653e3c7265637420783d22302220793d223022207374796c653d2277696474683a313030253b6865696768743a31303025222066696c6c3d222336333835393622202f3ea2646970667358221220271a0caf818b9e290e62069f371cad233197f5ddff922e5a9f4890ec406485b764736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2
-----Decoded View---------------
Arg [0] : punkDataContractAddress (address): 0x16F5A35647D6F03D5D3da7b35409D65ba03aF3B2
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000016f5a35647d6f03d5d3da7b35409d65ba03af3b2
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.