Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,000 OCP
Holders
198
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 OCPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
onChainPotatoes
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /* * * ████████████ * ░░▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ██████▒▒▒▒▒▒▒▒░░░░░░░░░░░░██ * ▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒▒▓▓ * ▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▓▓ * ██▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ██▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ▓▓▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ░░▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ▓▓▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ * ▓▓▒▒▒▒▒▒▒▒░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ▓▓▒▒▒▒▒▒▒▒░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ * ▓▓▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██ * ▓▓▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓ * ▓▓▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████ * ▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓ * ▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████ * ▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓ * ▓▓▓▓▓▓▓▓▓▓▓▓▓▓ * * * Website: onchainpotatoes.xyz * X : @onChainPotatoes * A 0-0 onchain initiative */ pragma solidity 0.8.20; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "erc721a/contracts/extensions/IERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; contract onChainPotatoes is ERC721A, ERC721AQueryable, Ownable { uint256 public price = 0.01 ether; uint256 public MAX_SUPPLY = 1000; uint256 public maxPerTransaction = 10; uint256 public maxPerWallet = 11; uint256 public mintNum = 1; uint256 public freemint = 1; bool public plantActive; mapping(uint256 => address) public _minters; constructor () ERC721A("onChainPotatoes", "OCP") { } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function startPlanting() external onlyOwner { require(plantActive == false); plantActive = true; } function stopPlanting() external onlyOwner { require(plantActive == true); plantActive = false; } function mint(uint256 amount) public payable { require(plantActive, "Minting is not active"); require(amount <= maxPerTransaction, "Exceeds max per transaction"); require(_numberMinted(msg.sender) + amount <= maxPerWallet, "Exceeds max per wallet"); if (_numberMinted(msg.sender) < mintNum && amount == freemint) { require(msg.value == 0, "Free mint must be zero value"); } else { require(msg.value >= price * amount, "Insufficient funds"); } require(totalSupply() + amount <= MAX_SUPPLY, "Exceeds max supply"); for (uint256 i = 1; i <= amount; i++) { _minters[totalSupply() + i] = msg.sender; } _safeMint(msg.sender, amount); } function tokenURI(uint256 tokenId) public view virtual override (ERC721A, IERC721A) returns (string memory) { require(_exists(tokenId), "token does not exist"); string[20] memory colorNames = [ "Red", "Grey", "Silver", "Gold", "White", "Orange", "Pink", "Brown", "Teal", "Cyan", "Lime", "Magenta", "Indigo", "Violet", "Green", "Olive", "Navy", "Aqua", "Blue", "Purple" ]; uint256 colorIndex = (tokenId * 2 + uint160(_minters[tokenId])) % colorNames.length; uint256 colorIndex1 = ((tokenId + 3) * 2 + uint160(_minters[tokenId])) % colorNames.length; (string memory colorInfo, string memory colorInfo1) = (colorNames[colorIndex], colorNames[colorIndex1]); string memory baseSvg = string(abi.encodePacked( '<svg width="1200px" height="1200px" viewBox="0 0 1540 1540" class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg">' '<rect width="100%" height="100%" fill="black"/>' '<filter id="blur" x="-10" y="-10" width="100" height="200">' '<feOffset in="SourceGraphic" dx="60" dy="60"/>' '<feGaussianBlur in="SourceGraphic" result="pOtato">' '<animate attributeName="stdDeviation" values="10;200;10" dur="1s" repeatCount="indefinite"/></feGaussianBlur>' '<feMerge>' '<feMergeNode in="pOtato"/>' '<feMergeNode in="SourceGraphic"/>' '</feMerge>' '</filter>' '<pattern id="pores" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse">' '<rect width="20" height="20" fill="', colorInfo, '"/>' '<circle cx="2" cy="5" r="2" fill="black"/>' '<circle cx="10" cy="10" r="2" fill="black"/>' '<circle cx="15" cy="15" r="2" fill="black"/>' '</pattern>' '<path d="M422.4 917.333333c-14.933333 0-29.866667 0-44.8-2.133333-98.133333-10.666667-179.2-57.6-224-132.266667-108.8-177.066667 2.133333-277.333333 108.8-371.2 27.733333-25.6 57.6-51.2 83.2-78.933333 8.533333-8.533333 17.066667-19.2 25.6-27.733333 115.2-128 243.2-273.066667 422.4-149.333334 72.533333 51.2 115.2 128 125.866667 224 12.8 132.266667-42.666667 283.733333-142.933334 388.266667-98.133333 93.866667-228.266667 149.333333-354.133333 149.333333z" fill="', (tokenId % 4 == 0) ? "url(#pores)" : colorInfo, '" filter="url(#blur)" stroke="#000" stroke-width="10" stroke-dasharray="10 5 34" transform="scale(1.5)"/>' '<path d="M725.333333 277.333333c12.8 0 21.333333 8.533333 21.333334 21.333334s-8.533333 21.333333-21.333334 21.333333-21.333333-8.533333-21.333333-21.333333 8.533333-21.333333 21.333333-21.333334z m0 234.666667c0 12.8 8.533333 21.333333 21.333334 21.333333s21.333333-8.533333 21.333333-21.333333-8.533333-21.333333-21.333333-21.333333-21.333333 8.533333-21.333334 21.333333z m-170.666666-149.333333c0 12.8 8.533333 21.333333 21.333333 21.333333s21.333333-8.533333 21.333333-21.333333-8.533333-21.333333-21.333333-21.333334-21.333333 8.533333-21.333333 21.333334zM298.666667 682.666667c0 12.8 8.533333 21.333333 21.333333 21.333333s21.333333-8.533333 21.333333-21.333333-8.533333-21.333333-21.333333-21.333334-21.333333 8.533333-21.333333 21.333334z m128-74.666667c0 17.066667 14.933333 32 32 32s32-14.933333 32-32-14.933333-32-32-32-32 14.933333-32 32z" fill="', colorInfo1, '" transform="scale(1.5)"/>' '<g transform="translate(1490, 1490) scale(2)" fill="white">' '<path fill-rule="evenodd" clip-rule="evenodd" d="m15 16c.6-.7.9-1.7.9-3.1v-1.8c-.1-1.4-.4-2.4-.9-3.1-.6-.7-1.4-1.1-2.5-1.1-1.1 0-1.9.4-2.5 1.1-.6.7-.9 1.8-.9 3.2v1.8c0 1.3.3 2.3.9 3.1.6.7 1.4 1 2.5 1 1.1 0 1.9-.3 2.5-1.1zm-1.5-6.9c.3.4.4 1 .4 1.8v2.3c0 .8-.1 1.4-.4 1.8-.2.4-.5.5-1 .5-.5 0-.8-.2-1.1-.5-.2-.4-.3-1-.3-1.9v-2.4c0-.7.1-1.3.4-1.7.2-.3.5-.5 1-.5.5 0 .8.2 1 .6z"/>' '<path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H22V22H2V2ZM4 4H20V20H4V4Z"/>' '</g>' '</svg>' )); string memory hotPotatoAttribute = compareStrings(colorInfo, colorInfo1) ? '{"trait_type":"Hot Potato", "value":"Yes"}' : '{"trait_type":"Hot Potato", "value":"No"}'; string memory poresAttribute = (tokenId % 4 == 0) ? '{"trait_type":"Fine Pores", "value":"Yes"}' : '{"trait_type":"Fine Pores", "value":"No"}'; string memory json = Base64.encode(bytes(string( abi.encodePacked( '{"name": "onChainPotato #', uint2str(tokenId), '", "description": "OnChainAnimatedExclusive999Supply. HoldersUpdatedWith$", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(baseSvg)), '", "attributes":[' '{"trait_type":"Potato Color", "value":"', colorInfo, '"},' '{"trait_type":"Pore Color", "value":"', colorInfo1, '"},', hotPotatoAttribute, ',', poresAttribute, ']}' ) ))); return string(abi.encodePacked('data:application/json;base64,', json)); } function compareStrings(string memory a, string memory b) internal pure returns (bool) { return keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)); } function changemintNum(uint256 _mintNum) public onlyOwner { mintNum = _mintNum; } function changefreemint(uint256 _freemint) public onlyOwner { freemint = _freemint; } function changePrice(uint256 newPrice) public onlyOwner { price = newPrice; } function setmaxPerTransaction(uint256 _maxPerTransaction) external onlyOwner { maxPerTransaction = _maxPerTransaction; } function setmaxPerWallet(uint256 _maxPerWallet) external onlyOwner { maxPerWallet = _maxPerWallet; } function changeSupply(uint256 _MAX_SUPPLY) external onlyOwner { require(_MAX_SUPPLY <= MAX_SUPPLY); MAX_SUPPLY = _MAX_SUPPLY; } function withdraw() public onlyOwner { payable(msg.sender).transfer(address(this).balance); } function numberMinted(address owner) public view returns (uint256) { return _numberMinted(owner); } function devPlant(uint256 amount) external onlyOwner { require(totalSupply() + amount <= MAX_SUPPLY); for (uint256 i = 1; i <= amount ; i++) { _minters[totalSupply() + i] = msg.sender; } _safeMint(msg.sender, amount); } function uint2str(uint _i) internal pure returns (string memory str) { if (_i == 0) { return "0"; } uint j = _i; uint length; while (j != 0) { length++; j /= 10; } bytes memory bstr = new bytes(length); uint k = length; while (_i != 0) { bstr[--k] = bytes1(uint8(48 + _i % 10)); _i /= 10; } return string(bstr); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_minters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"changePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MAX_SUPPLY","type":"uint256"}],"name":"changeSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_freemint","type":"uint256"}],"name":"changefreemint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintNum","type":"uint256"}],"name":"changemintNum","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"devPlant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freemint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"plantActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerTransaction","type":"uint256"}],"name":"setmaxPerTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setmaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPlanting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopPlanting","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052662386f26fc100006009556103e8600a55600a600b55600b600c556001600d556001600e5534801562000035575f80fd5b506040518060400160405280600f81526020016e6f6e436861696e506f7461746f657360881b8152506040518060400160405280600381526020016204f43560ec1b81525081600290816200008b9190620001a3565b5060036200009a8282620001a3565b505060015f5550620000ac33620000b2565b6200026b565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200012c57607f821691505b6020821081036200014b57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200019e575f81815260208120601f850160051c81016020861015620001795750805b601f850160051c820191505b818110156200019a5782815560010162000185565b5050505b505050565b81516001600160401b03811115620001bf57620001bf62000103565b620001d781620001d0845462000117565b8462000151565b602080601f8311600181146200020d575f8415620001f55750858301515b5f19600386901b1c1916600185901b1785556200019a565b5f85815260208120601f198616915b828110156200023d578886015182559484019460019091019084016200021c565b50858210156200025b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6135f780620002795f395ff3fe60806040526004361061023e575f3560e01c806370a0823111610134578063a2b40d19116100b3578063debf675711610078578063debf675714610657578063e5d083171461066b578063e985e9c514610680578063f2fde38b146106c7578063f31f3419146106e6578063f9cb63ac14610705575f80fd5b8063a2b40d19146105bb578063b88d4fde146105da578063c23dc68f146105ed578063c87b56dd14610619578063dc33e68114610638575f80fd5b806395d89b41116100f957806395d89b411461054157806399a2557a14610555578063a035b1fe14610574578063a0712d6814610589578063a22cb4651461059c575f80fd5b806370a08231146104b1578063715018a6146104d05780637b9a1feb146104e45780638462151c146104f85780638da5cb5b14610524575f80fd5b80633ccfd60b116101c057806347c5c3c01161018557806347c5c3c0146104135780634b980d67146104325780635bbb21771461044757806360d3e1ae146104735780636352211e14610492575f80fd5b80633ccfd60b1461039f5780633f2f111e146103b357806342842e0e146103cc578063453c2310146103df5780634594a6e3146103f4575f80fd5b806318160ddd1161020657806318160ddd1461030257806323b872dd146103245780632a29ad141461033757806332cb6b0c1461036b57806339a7919f14610380575f80fd5b806301ffc9a71461024257806306fdde0314610276578063081812fc14610297578063095ea7b3146102ce578063108bfbfa146102e3575b5f80fd5b34801561024d575f80fd5b5061026161025c36600461200c565b61071a565b60405190151581526020015b60405180910390f35b348015610281575f80fd5b5061028a61076b565b60405161026d9190612074565b3480156102a2575f80fd5b506102b66102b1366004612086565b6107fb565b6040516001600160a01b03909116815260200161026d565b6102e16102dc3660046120b8565b61083d565b005b3480156102ee575f80fd5b506102e16102fd366004612086565b6108db565b34801561030d575f80fd5b506103166108e8565b60405190815260200161026d565b6102e16103323660046120e0565b6108f4565b348015610342575f80fd5b506102b6610351366004612086565b60106020525f90815260409020546001600160a01b031681565b348015610376575f80fd5b50610316600a5481565b34801561038b575f80fd5b506102e161039a366004612086565b610a83565b3480156103aa575f80fd5b506102e1610a9e565b3480156103be575f80fd5b50600f546102619060ff1681565b6102e16103da3660046120e0565b610ad2565b3480156103ea575f80fd5b50610316600c5481565b3480156103ff575f80fd5b506102e161040e366004612086565b610af1565b34801561041e575f80fd5b506102e161042d366004612086565b610b84565b34801561043d575f80fd5b50610316600b5481565b348015610452575f80fd5b50610466610461366004612119565b610b91565b60405161026d91906121c5565b34801561047e575f80fd5b506102e161048d366004612086565b610c59565b34801561049d575f80fd5b506102b66104ac366004612086565b610c66565b3480156104bc575f80fd5b506103166104cb366004612206565b610c70565b3480156104db575f80fd5b506102e1610cbd565b3480156104ef575f80fd5b506102e1610cd0565b348015610503575f80fd5b50610517610512366004612206565b610cf7565b60405161026d919061221f565b34801561052f575f80fd5b506008546001600160a01b03166102b6565b34801561054c575f80fd5b5061028a610dfc565b348015610560575f80fd5b5061051761056f366004612256565b610e0b565b34801561057f575f80fd5b5061031660095481565b6102e1610597366004612086565b610f8b565b3480156105a7575f80fd5b506102e16105b6366004612286565b611207565b3480156105c6575f80fd5b506102e16105d5366004612086565b611272565b6102e16105e83660046122d3565b61127f565b3480156105f8575f80fd5b5061060c610607366004612086565b6112c9565b60405161026d91906123a8565b348015610624575f80fd5b5061028a610633366004612086565b61134e565b348015610643575f80fd5b50610316610652366004612206565b611818565b348015610662575f80fd5b506102e1611822565b348015610676575f80fd5b50610316600d5481565b34801561068b575f80fd5b5061026161069a3660046123b6565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b3480156106d2575f80fd5b506102e16106e1366004612206565b611848565b3480156106f1575f80fd5b506102e1610700366004612086565b6118be565b348015610710575f80fd5b50610316600e5481565b5f6301ffc9a760e01b6001600160e01b03198316148061074a57506380ac58cd60e01b6001600160e01b03198316145b806107655750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461077a906123e7565b80601f01602080910402602001604051908101604052809291908181526020018280546107a6906123e7565b80156107f15780601f106107c8576101008083540402835291602001916107f1565b820191905f5260205f20905b8154815290600101906020018083116107d457829003601f168201915b5050505050905090565b5f610805826118cb565b610822576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f61084782610c66565b9050336001600160a01b0382161461088057610863813361069a565b610880576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6108e36118fd565b600b55565b6001545f54035f190190565b5f6108fe82611957565b9050836001600160a01b0316816001600160a01b0316146109315760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054338082146001600160a01b0388169091141761097d57610960863361069a565b61097d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109a457604051633a954ecd60e21b815260040160405180910390fd5b80156109ae575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610a3a57600184015f818152600460205260408120549003610a38575f548114610a38575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610a8b6118fd565b600a54811115610a99575f80fd5b600a55565b610aa66118fd565b60405133904780156108fc02915f818181858888f19350505050158015610acf573d5f803e3d5ffd5b50565b610aec83838360405180602001604052805f81525061127f565b505050565b610af96118fd565b600a5481610b056108e8565b610b0f9190612433565b1115610b19575f80fd5b60015b818111610b79573360105f83610b306108e8565b610b3a9190612433565b815260208101919091526040015f2080546001600160a01b0319166001600160a01b039290921691909117905580610b7181612446565b915050610b1c565b50610acf33826119c0565b610b8c6118fd565b600e55565b6060815f8167ffffffffffffffff811115610bae57610bae6122bf565b604051908082528060200260200182016040528015610bfe57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f19909201910181610bcc5790505b5090505f5b828114610c5057610c2b868683818110610c1f57610c1f61245e565b905060200201356112c9565b828281518110610c3d57610c3d61245e565b6020908102919091010152600101610c03565b50949350505050565b610c616118fd565b600c55565b5f61076582611957565b5f6001600160a01b038216610c98576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f9081526005602052604090205467ffffffffffffffff1690565b610cc56118fd565b610cce5f6119dd565b565b610cd86118fd565b600f5460ff161515600114610ceb575f80fd5b600f805460ff19169055565b60605f805f610d0585610c70565b90505f8167ffffffffffffffff811115610d2157610d216122bf565b604051908082528060200260200182016040528015610d4a578160200160208202803683370190505b509050610d76604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b838614610df057610d8981611a2e565b91508160400151610de85781516001600160a01b031615610da957815194505b876001600160a01b0316856001600160a01b031603610de85780838780600101985081518110610ddb57610ddb61245e565b6020026020010181815250505b600101610d79565b50909695505050505050565b60606003805461077a906123e7565b6060818310610e2d57604051631960ccad60e11b815260040160405180910390fd5b5f80610e375f5490565b90506001851015610e4757600194505b80841115610e53578093505b5f610e5d87610c70565b905084861015610e7c5785850381811015610e76578091505b50610e7f565b505f5b5f8167ffffffffffffffff811115610e9957610e996122bf565b604051908082528060200260200182016040528015610ec2578160200160208202803683370190505b509050815f03610ed7579350610f8492505050565b5f610ee1886112c9565b90505f8160400151610ef1575080515b885b888114158015610f035750848714155b15610f7857610f1181611a2e565b92508260400151610f705782516001600160a01b031615610f3157825191505b8a6001600160a01b0316826001600160a01b031603610f705780848880600101995081518110610f6357610f6361245e565b6020026020010181815250505b600101610ef3565b50505092835250909150505b9392505050565b600f5460ff16610fda5760405162461bcd60e51b81526020600482015260156024820152744d696e74696e67206973206e6f742061637469766560581b60448201526064015b60405180910390fd5b600b5481111561102c5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610fd1565b600c548161103933611a68565b6110439190612433565b111561108a5760405162461bcd60e51b8152602060048201526016602482015275115e18d959591cc81b585e081c195c881dd85b1b195d60521b6044820152606401610fd1565b600d5461109633611a68565b1080156110a45750600e5481145b156110fc5734156110f75760405162461bcd60e51b815260206004820152601c60248201527f46726565206d696e74206d757374206265207a65726f2076616c7565000000006044820152606401610fd1565b61114e565b8060095461110a9190612472565b34101561114e5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610fd1565b600a548161115a6108e8565b6111649190612433565b11156111a75760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610fd1565b60015b818111610b79573360105f836111be6108e8565b6111c89190612433565b815260208101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055806111ff81612446565b9150506111aa565b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61127a6118fd565b600955565b61128a8484846108f4565b6001600160a01b0383163b156112c3576112a684848484611a90565b6112c3576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f808252602082018190529181018290526060810191909152600183108061131f57505f548310155b1561132a5792915050565b61133383611a2e565b90508060400151156113455792915050565b610f8483611b77565b6060611359826118cb565b61139c5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610fd1565b604080516102c081018252600361028082019081526214995960ea1b6102a08301528152815180830183526004808252634772657960e01b602083810191909152808401929092528351808501855260068082526529b4b63b32b960d11b8285015284860191909152845180860186528281526311dbdb1960e21b81850152606085015284518086018652600580825264576869746560d81b82860152608086019190915285518087018752828152654f72616e676560d01b8186015260a0860152855180870187528381526350696e6b60e01b8186015260c08601528551808701875281815264213937bbb760d91b8186015260e086015285518087018752838152631519585b60e21b81860152610100860152855180870187528381526321bcb0b760e11b8186015261012086015285518087018752838152634c696d6560e01b818601526101408601528551808701875260078152664d6167656e746160c81b818601526101608601528551808701875282815265496e6469676f60d01b818601526101808601528551808701875282815265159a5bdb195d60d21b818601526101a0860152855180870187528181526423b932b2b760d91b818601526101c086015285518087018752908152644f6c69766560d81b818501526101e085015284518086018652828152634e61767960e01b8185015261020085015284518086018652828152634171756160e01b818501526102208501528451808601865291825263426c756560e01b828401526102408401919091528351808501855290815265507572706c6560d01b818301526102608301525f8581526010909152918220549091906014906001600160a01b031661161b866002612472565b6116259190612433565b61162f919061249d565b5f85815260106020526040812054919250906014906001600160a01b0316611658876003612433565b611663906002612472565b61166d9190612433565b611677919061249d565b90505f8084846014811061168d5761168d61245e565b60200201518584601481106116a4576116a461245e565b602002015190925090505f826116bb60048a61249d565b156116c657836116eb565b6040518060400160405280600b81526020016a75726c2823706f7265732960a81b8152505b836040516020016116fe939291906124cb565b60405160208183030381529060405290505f61171a8484611bab565b61173c5760405180606001604052806029815260200161352f60299139611756565b6040518060600160405280602a8152602001613558602a91395b90505f61176460048b61249d565b1561178757604051806060016040528060298152602001613506602991396117a1565b6040518060600160405280602a81526020016134dc602a91395b90505f6117e66117b08c611c03565b6117b986611cff565b888887876040516020016117d29695949392919061322e565b604051602081830303815290604052611cff565b9050806040516020016117f991906133fd565b6040516020818303038152906040529950505050505050505050919050565b5f61076582611a68565b61182a6118fd565b600f5460ff1615611839575f80fd5b600f805460ff19166001179055565b6118506118fd565b6001600160a01b0381166118b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fd1565b610acf816119dd565b6118c66118fd565b600d55565b5f816001111580156118dd57505f5482105b80156107655750505f90815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610cce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fd1565b5f81806001116119a7575f548110156119a7575f8181526004602052604081205490600160e01b821690036119a5575b805f03610f8457505f19015f81815260046020526040902054611987565b505b604051636f96cda160e11b815260040160405180910390fd5b6119d9828260405180602001604052805f815250611e4e565b5050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f8281526004602052604090205461076590611eb7565b6001600160a01b03165f908152600560205260409081902054901c67ffffffffffffffff1690565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290611ac4903390899088908890600401613441565b6020604051808303815f875af1925050508015611afe575060408051601f3d908101601f19168201909252611afb9181019061347d565b60015b611b5a573d808015611b2b576040519150601f19603f3d011682016040523d82523d5f602084013e611b30565b606091505b5080515f03611b52576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152610765611ba683611957565b611eb7565b5f81604051602001611bbd9190613498565b6040516020818303038152906040528051906020012083604051602001611be49190613498565b6040516020818303038152906040528051906020012014905092915050565b6060815f03611c295750506040805180820190915260018152600360fc1b602082015290565b815f5b8115611c525780611c3c81612446565b9150611c4b9050600a836134b3565b9150611c2c565b5f8167ffffffffffffffff811115611c6c57611c6c6122bf565b6040519080825280601f01601f191660200182016040528015611c96576020820181803683370190505b509050815b8515610c5057611cac600a8761249d565b611cb7906030612433565b60f81b82611cc4836134c6565b92508281518110611cd757611cd761245e565b60200101906001600160f81b03191690815f1a905350611cf8600a876134b3565b9550611c9b565b606081515f03611d1c57505060408051602081019091525f815290565b5f6040518060600160405280604081526020016135826040913990505f600384516002611d499190612433565b611d5391906134b3565b611d5e906004612472565b67ffffffffffffffff811115611d7657611d766122bf565b6040519080825280601f01601f191660200182016040528015611da0576020820181803683370190505b509050600182016020820185865187015b80821015611e0c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611db1565b5050600386510660018114611e285760028114611e3b57611e43565b603d6001830353603d6002830353611e43565b603d60018303535b509195945050505050565b611e588383611eff565b6001600160a01b0383163b15610aec575f548281035b611e805f868380600101945086611a90565b611e9d576040516368d2bf6b60e11b815260040160405180910390fd5b818110611e6e57815f5414611eb0575f80fd5b5050505050565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b5f805490829003611f235760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611fcf5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101611f99565b50815f03611fef57604051622e076360e81b815260040160405180910390fd5b5f5550505050565b6001600160e01b031981168114610acf575f80fd5b5f6020828403121561201c575f80fd5b8135610f8481611ff7565b5f5b83811015612041578181015183820152602001612029565b50505f910152565b5f8151808452612060816020860160208601612027565b601f01601f19169290920160200192915050565b602081525f610f846020830184612049565b5f60208284031215612096575f80fd5b5035919050565b80356001600160a01b03811681146120b3575f80fd5b919050565b5f80604083850312156120c9575f80fd5b6120d28361209d565b946020939093013593505050565b5f805f606084860312156120f2575f80fd5b6120fb8461209d565b92506121096020850161209d565b9150604084013590509250925092565b5f806020838503121561212a575f80fd5b823567ffffffffffffffff80821115612141575f80fd5b818501915085601f830112612154575f80fd5b813581811115612162575f80fd5b8660208260051b8501011115612176575f80fd5b60209290920196919550909350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b81811015610df0576121f3838551612188565b92840192608092909201916001016121e0565b5f60208284031215612216575f80fd5b610f848261209d565b602080825282518282018190525f9190848201906040850190845b81811015610df05783518352928401929184019160010161223a565b5f805f60608486031215612268575f80fd5b6122718461209d565b95602085013595506040909401359392505050565b5f8060408385031215612297575f80fd5b6122a08361209d565b9150602083013580151581146122b4575f80fd5b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f805f80608085870312156122e6575f80fd5b6122ef8561209d565b93506122fd6020860161209d565b925060408501359150606085013567ffffffffffffffff80821115612320575f80fd5b818701915087601f830112612333575f80fd5b813581811115612345576123456122bf565b604051601f8201601f19908116603f0116810190838211818310171561236d5761236d6122bf565b816040528281528a6020848701011115612385575f80fd5b826020860160208301375f60208483010152809550505050505092959194509250565b608081016107658284612188565b5f80604083850312156123c7575f80fd5b6123d08361209d565b91506123de6020840161209d565b90509250929050565b600181811c908216806123fb57607f821691505b60208210810361241957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156107655761076561241f565b5f600182016124575761245761241f565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b80820281158282048414176107655761076561241f565b634e487b7160e01b5f52601260045260245ffd5b5f826124ab576124ab612489565b500690565b5f81516124c1818560208601612027565b9290920192915050565b7f3c7376672077696474683d2231323030707822206865696768743d223132303081527f7078222076696577426f783d22302030203135343020313534302220636c617360208201527f733d2269636f6e222076657273696f6e3d22312e312220786d6c6e733d22687460408201527f74703a2f2f7777772e77332e6f72672f323030302f737667223e3c726563742060608201527f77696474683d223130302522206865696768743d2231303025222066696c6c3d60808201527f22626c61636b222f3e3c66696c7465722069643d22626c75722220783d222d3160a08201527f302220793d222d3130222077696474683d2231303022206865696768743d223260c08201527f3030223e3c66654f666673657420696e3d22536f75726365477261706869632260e08201527f2064783d223630222064793d223630222f3e3c6665476175737369616e426c756101008201527f7220696e3d22536f75726365477261706869632220726573756c743d22704f746101208201527f61746f223e3c616e696d617465206174747269627574654e616d653d227374646101408201527f446576696174696f6e222076616c7565733d2231303b3230303b3130222064756101608201527f723d2231732220726570656174436f756e743d22696e646566696e697465222f6101808201527f3e3c2f6665476175737369616e426c75723e3c66654d657267653e3c66654d656101a08201527f7267654e6f646520696e3d22704f7461746f222f3e3c66654d657267654e6f646101c08201527f6520696e3d22536f7572636547726170686963222f3e3c2f66654d657267653e6101e08201527f3c2f66696c7465723e3c7061747465726e2069643d22706f7265732220783d226102008201527f302220793d2230222077696474683d22323022206865696768743d22323022206102208201527f7061747465726e556e6974733d227573657253706163654f6e557365223e3c726102408201527f6563742077696474683d22323022206865696768743d223230222066696c6c3d610260820152601160f91b6102808201525f613225612f80612f7a612adc612ad66127f561028188018b6124b0565b7f222f3e3c636972636c652063783d2232222063793d22352220723d223222206681527f696c6c3d22626c61636b222f3e3c636972636c652063783d223130222063793d60208201527f2231302220723d2232222066696c6c3d22626c61636b222f3e3c636972636c6560408201527f2063783d223135222063793d2231352220723d2232222066696c6c3d22626c6160608201527f636b222f3e3c2f7061747465726e3e3c7061746820643d224d3432322e34203960808201527f31372e333333333333632d31342e39333333333320302d32392e38363636363760a08201527f20302d34342e382d322e3133333333332d39382e3133333333332d31302e363660c08201527f363636372d3137392e322d35372e362d3232342d3133322e3236363636372d3160e08201527f30382e382d3137372e30363636363720322e3133333333332d3237372e3333336101008201527f333333203130382e382d3337312e322032372e3733333333332d32352e3620356101208201527f372e362d35312e322038332e322d37382e39333333333320382e3533333333336101408201527f2d382e3533333333332031372e3036363636372d31392e322032352e362d32376101608201527f2e373333333333203131352e322d313238203234332e322d3237332e303636366101808201527f3637203432322e342d3134392e3333333333342037322e3533333333332035316101a08201527f2e32203131352e3220313238203132352e383636363637203232342031322e386101c08201527f203133322e3236363636372d34322e363636363637203238332e3733333333336101e08201527f2d3134322e393333333334203338382e3236363636372d39382e3133333333336102008201527f2039332e3836363636372d3232382e323636363637203134392e3333333333336102208201527f2d3335342e313333333333203134392e3333333333337a222066696c6c3d220061024082015261025f0190565b886124b0565b7f222066696c7465723d2275726c2823626c7572292220207374726f6b653d222381527f30303022207374726f6b652d77696474683d22313022207374726f6b652d646160208201527f736861727261793d223130203520333422207472616e73666f726d3d2273636160408201527f6c6528312e3529222f3e3c7061746820643d224d3732352e333333333333203260608201527f37372e3333333333336331322e3820302032312e33333333333320382e35333360808201527f3333332032312e3333333333342032312e333333333334732d382e353333333360a08201527f332032312e3333333333332d32312e3333333333342032312e3333333333332d60c08201527f32312e3333333333332d382e3533333333332d32312e3333333333332d32312e60e08201527f33333333333320382e3533333333332d32312e3333333333332032312e3333336101008201527f3333332d32312e3333333333347a206d30203233342e363636363637633020316101208201527f322e3820382e3533333333332032312e3333333333332032312e3333333333346101408201527f2032312e3333333333337332312e3333333333332d382e3533333333332032316101608201527f2e3333333333332d32312e3333333333332d382e3533333333332d32312e33336101808201527f333333332d32312e3333333333332d32312e3333333333332d32312e333333336101a08201527f333320382e3533333333332d32312e3333333333342032312e3333333333337a6101c08201527f206d2d3137302e3636363636362d3134392e33333333333363302031322e38206101e08201527f382e3533333333332032312e3333333333332032312e3333333333332032312e6102008201527f3333333333337332312e3333333333332d382e3533333333332032312e3333336102208201527f3333332d32312e3333333333332d382e3533333333332d32312e3333333333336102408201527f2d32312e3333333333332d32312e3333333333342d32312e33333333333320386102608201527f2e3533333333332d32312e3333333333332032312e3333333333347a4d3239386102808201527f2e363636363637203638322e36363636363763302031322e3820382e353333336102a08201527f33332032312e3333333333332032312e3333333333332032312e3333333333336102c08201527f7332312e3333333333332d382e3533333333332032312e3333333333332d32316102e08201527f2e3333333333332d382e3533333333332d32312e3333333333332d32312e33336103008201527f333333332d32312e3333333333342d32312e33333333333320382e35333333336103208201527f332d32312e3333333333332032312e3333333333347a206d3132382d37342e366103408201527f363636363763302031372e3036363636372031342e39333333333320333220336103608201527f322033327333322d31342e3933333333332033322d33322d31342e39333333336103808201527f332d33322d33322d33322d33322031342e3933333333332d33322033327a22206103a0820152653334b6361e9160d11b6103c08201526103c60190565b856124b0565b7f22207472616e73666f726d3d227363616c6528312e3529222f3e3c672074726181527f6e73666f726d3d227472616e736c61746528313439302c20313439302920736360208201527f616c65283229222066696c6c3d227768697465223e3c706174682066696c6c2d60408201527f72756c653d226576656e6f64642220636c69702d72756c653d226576656e6f6460608201527f642220643d226d3135203136632e362d2e372e392d312e372e392d332e31762d60808201527f312e38632d2e312d312e342d2e342d322e342d2e392d332e312d2e362d2e372d60a08201527f312e342d312e312d322e352d312e312d312e3120302d312e392e342d322e352060c08201527f312e312d2e362e372d2e3920312e382d2e3920332e3276312e38633020312e3360e08201527f2e3320322e332e3920332e312e362e3720312e34203120322e35203120312e316101008201527f203020312e392d2e3320322e352d312e317a6d2d312e352d362e39632e332e346101208201527f2e342031202e3420312e3876322e336330202e382d2e3120312e342d2e3420316101408201527f2e382d2e322e342d2e352e352d31202e352d2e3520302d2e382d2e322d312e316101608201527f2d2e352d2e322d2e342d2e332d312d2e332d312e39762d322e3463302d2e372e6101808201527f312d312e332e342d312e372e322d2e332e352d2e3520312d2e352e352030202e6101a08201527f382e322031202e367a222f3e3c706174682066696c6c2d72756c653d226576656101c08201527f6e6f64642220636c69702d72756c653d226576656e6f64642220643d224d32206101e08201527f32483232563232483256325a4d342034483230563230483456345a222f3e3c2f61020082015267339f1e17b9bb339f60c11b6102208201526102280190565b95945050505050565b7f7b226e616d65223a20226f6e436861696e506f7461746f20230000000000000081525f8751613265816019850160208c01612027565b7f222c20226465736372697074696f6e223a20224f6e436861696e416e696d61746019918401918201527f65644578636c7573697665393939537570706c792e20486f6c6465727355706460398201527f617465645769746824222c2022696d616765223a2022646174613a696d61676560598201526f0bdcdd99cade1b5b0ed8985cd94d8d0b60821b60798201528751613307816089840160208c01612027565b7f222c202261747472696275746573223a5b7b2274726169745f74797065223a22608992909101918201527f506f7461746f20436f6c6f72222c202276616c7565223a22000000000000000060a98201526133f06133e26133dc6133cf6133c96133ba6133b461337a60c189018f6124b0565b7f227d2c7b2274726169745f74797065223a22506f726520436f6c6f72222c20228152673b30b63ab2911d1160c11b602082015260280190565b8c6124b0565b62089f4b60ea1b815260030190565b896124b0565b600b60fa1b815260010190565b866124b0565b615d7d60f01b815260020190565b9998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525f825161343481601d850160208701612027565b91909101601d0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061347390830184612049565b9695505050505050565b5f6020828403121561348d575f80fd5b8151610f8481611ff7565b5f82516134a9818460208701612027565b9190910192915050565b5f826134c1576134c1612489565b500490565b5f816134d4576134d461241f565b505f19019056fe7b2274726169745f74797065223a2246696e6520506f726573222c202276616c7565223a22596573227d7b2274726169745f74797065223a2246696e6520506f726573222c202276616c7565223a224e6f227d7b2274726169745f74797065223a22486f7420506f7461746f222c202276616c7565223a224e6f227d7b2274726169745f74797065223a22486f7420506f7461746f222c202276616c7565223a22596573227d4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220143a43d79788093b1044371753590c5ff9368a7b6fd360a569c37e9316f8371364736f6c63430008140033
Deployed Bytecode
0x60806040526004361061023e575f3560e01c806370a0823111610134578063a2b40d19116100b3578063debf675711610078578063debf675714610657578063e5d083171461066b578063e985e9c514610680578063f2fde38b146106c7578063f31f3419146106e6578063f9cb63ac14610705575f80fd5b8063a2b40d19146105bb578063b88d4fde146105da578063c23dc68f146105ed578063c87b56dd14610619578063dc33e68114610638575f80fd5b806395d89b41116100f957806395d89b411461054157806399a2557a14610555578063a035b1fe14610574578063a0712d6814610589578063a22cb4651461059c575f80fd5b806370a08231146104b1578063715018a6146104d05780637b9a1feb146104e45780638462151c146104f85780638da5cb5b14610524575f80fd5b80633ccfd60b116101c057806347c5c3c01161018557806347c5c3c0146104135780634b980d67146104325780635bbb21771461044757806360d3e1ae146104735780636352211e14610492575f80fd5b80633ccfd60b1461039f5780633f2f111e146103b357806342842e0e146103cc578063453c2310146103df5780634594a6e3146103f4575f80fd5b806318160ddd1161020657806318160ddd1461030257806323b872dd146103245780632a29ad141461033757806332cb6b0c1461036b57806339a7919f14610380575f80fd5b806301ffc9a71461024257806306fdde0314610276578063081812fc14610297578063095ea7b3146102ce578063108bfbfa146102e3575b5f80fd5b34801561024d575f80fd5b5061026161025c36600461200c565b61071a565b60405190151581526020015b60405180910390f35b348015610281575f80fd5b5061028a61076b565b60405161026d9190612074565b3480156102a2575f80fd5b506102b66102b1366004612086565b6107fb565b6040516001600160a01b03909116815260200161026d565b6102e16102dc3660046120b8565b61083d565b005b3480156102ee575f80fd5b506102e16102fd366004612086565b6108db565b34801561030d575f80fd5b506103166108e8565b60405190815260200161026d565b6102e16103323660046120e0565b6108f4565b348015610342575f80fd5b506102b6610351366004612086565b60106020525f90815260409020546001600160a01b031681565b348015610376575f80fd5b50610316600a5481565b34801561038b575f80fd5b506102e161039a366004612086565b610a83565b3480156103aa575f80fd5b506102e1610a9e565b3480156103be575f80fd5b50600f546102619060ff1681565b6102e16103da3660046120e0565b610ad2565b3480156103ea575f80fd5b50610316600c5481565b3480156103ff575f80fd5b506102e161040e366004612086565b610af1565b34801561041e575f80fd5b506102e161042d366004612086565b610b84565b34801561043d575f80fd5b50610316600b5481565b348015610452575f80fd5b50610466610461366004612119565b610b91565b60405161026d91906121c5565b34801561047e575f80fd5b506102e161048d366004612086565b610c59565b34801561049d575f80fd5b506102b66104ac366004612086565b610c66565b3480156104bc575f80fd5b506103166104cb366004612206565b610c70565b3480156104db575f80fd5b506102e1610cbd565b3480156104ef575f80fd5b506102e1610cd0565b348015610503575f80fd5b50610517610512366004612206565b610cf7565b60405161026d919061221f565b34801561052f575f80fd5b506008546001600160a01b03166102b6565b34801561054c575f80fd5b5061028a610dfc565b348015610560575f80fd5b5061051761056f366004612256565b610e0b565b34801561057f575f80fd5b5061031660095481565b6102e1610597366004612086565b610f8b565b3480156105a7575f80fd5b506102e16105b6366004612286565b611207565b3480156105c6575f80fd5b506102e16105d5366004612086565b611272565b6102e16105e83660046122d3565b61127f565b3480156105f8575f80fd5b5061060c610607366004612086565b6112c9565b60405161026d91906123a8565b348015610624575f80fd5b5061028a610633366004612086565b61134e565b348015610643575f80fd5b50610316610652366004612206565b611818565b348015610662575f80fd5b506102e1611822565b348015610676575f80fd5b50610316600d5481565b34801561068b575f80fd5b5061026161069a3660046123b6565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b3480156106d2575f80fd5b506102e16106e1366004612206565b611848565b3480156106f1575f80fd5b506102e1610700366004612086565b6118be565b348015610710575f80fd5b50610316600e5481565b5f6301ffc9a760e01b6001600160e01b03198316148061074a57506380ac58cd60e01b6001600160e01b03198316145b806107655750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461077a906123e7565b80601f01602080910402602001604051908101604052809291908181526020018280546107a6906123e7565b80156107f15780601f106107c8576101008083540402835291602001916107f1565b820191905f5260205f20905b8154815290600101906020018083116107d457829003601f168201915b5050505050905090565b5f610805826118cb565b610822576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f61084782610c66565b9050336001600160a01b0382161461088057610863813361069a565b610880576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6108e36118fd565b600b55565b6001545f54035f190190565b5f6108fe82611957565b9050836001600160a01b0316816001600160a01b0316146109315760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054338082146001600160a01b0388169091141761097d57610960863361069a565b61097d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166109a457604051633a954ecd60e21b815260040160405180910390fd5b80156109ae575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610a3a57600184015f818152600460205260408120549003610a38575f548114610a38575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b610a8b6118fd565b600a54811115610a99575f80fd5b600a55565b610aa66118fd565b60405133904780156108fc02915f818181858888f19350505050158015610acf573d5f803e3d5ffd5b50565b610aec83838360405180602001604052805f81525061127f565b505050565b610af96118fd565b600a5481610b056108e8565b610b0f9190612433565b1115610b19575f80fd5b60015b818111610b79573360105f83610b306108e8565b610b3a9190612433565b815260208101919091526040015f2080546001600160a01b0319166001600160a01b039290921691909117905580610b7181612446565b915050610b1c565b50610acf33826119c0565b610b8c6118fd565b600e55565b6060815f8167ffffffffffffffff811115610bae57610bae6122bf565b604051908082528060200260200182016040528015610bfe57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f19909201910181610bcc5790505b5090505f5b828114610c5057610c2b868683818110610c1f57610c1f61245e565b905060200201356112c9565b828281518110610c3d57610c3d61245e565b6020908102919091010152600101610c03565b50949350505050565b610c616118fd565b600c55565b5f61076582611957565b5f6001600160a01b038216610c98576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f9081526005602052604090205467ffffffffffffffff1690565b610cc56118fd565b610cce5f6119dd565b565b610cd86118fd565b600f5460ff161515600114610ceb575f80fd5b600f805460ff19169055565b60605f805f610d0585610c70565b90505f8167ffffffffffffffff811115610d2157610d216122bf565b604051908082528060200260200182016040528015610d4a578160200160208202803683370190505b509050610d76604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b838614610df057610d8981611a2e565b91508160400151610de85781516001600160a01b031615610da957815194505b876001600160a01b0316856001600160a01b031603610de85780838780600101985081518110610ddb57610ddb61245e565b6020026020010181815250505b600101610d79565b50909695505050505050565b60606003805461077a906123e7565b6060818310610e2d57604051631960ccad60e11b815260040160405180910390fd5b5f80610e375f5490565b90506001851015610e4757600194505b80841115610e53578093505b5f610e5d87610c70565b905084861015610e7c5785850381811015610e76578091505b50610e7f565b505f5b5f8167ffffffffffffffff811115610e9957610e996122bf565b604051908082528060200260200182016040528015610ec2578160200160208202803683370190505b509050815f03610ed7579350610f8492505050565b5f610ee1886112c9565b90505f8160400151610ef1575080515b885b888114158015610f035750848714155b15610f7857610f1181611a2e565b92508260400151610f705782516001600160a01b031615610f3157825191505b8a6001600160a01b0316826001600160a01b031603610f705780848880600101995081518110610f6357610f6361245e565b6020026020010181815250505b600101610ef3565b50505092835250909150505b9392505050565b600f5460ff16610fda5760405162461bcd60e51b81526020600482015260156024820152744d696e74696e67206973206e6f742061637469766560581b60448201526064015b60405180910390fd5b600b5481111561102c5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d617820706572207472616e73616374696f6e00000000006044820152606401610fd1565b600c548161103933611a68565b6110439190612433565b111561108a5760405162461bcd60e51b8152602060048201526016602482015275115e18d959591cc81b585e081c195c881dd85b1b195d60521b6044820152606401610fd1565b600d5461109633611a68565b1080156110a45750600e5481145b156110fc5734156110f75760405162461bcd60e51b815260206004820152601c60248201527f46726565206d696e74206d757374206265207a65726f2076616c7565000000006044820152606401610fd1565b61114e565b8060095461110a9190612472565b34101561114e5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610fd1565b600a548161115a6108e8565b6111649190612433565b11156111a75760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610fd1565b60015b818111610b79573360105f836111be6108e8565b6111c89190612433565b815260208101919091526040015f2080546001600160a01b0319166001600160a01b0392909216919091179055806111ff81612446565b9150506111aa565b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61127a6118fd565b600955565b61128a8484846108f4565b6001600160a01b0383163b156112c3576112a684848484611a90565b6112c3576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f808252602082018190529181018290526060810191909152600183108061131f57505f548310155b1561132a5792915050565b61133383611a2e565b90508060400151156113455792915050565b610f8483611b77565b6060611359826118cb565b61139c5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610fd1565b604080516102c081018252600361028082019081526214995960ea1b6102a08301528152815180830183526004808252634772657960e01b602083810191909152808401929092528351808501855260068082526529b4b63b32b960d11b8285015284860191909152845180860186528281526311dbdb1960e21b81850152606085015284518086018652600580825264576869746560d81b82860152608086019190915285518087018752828152654f72616e676560d01b8186015260a0860152855180870187528381526350696e6b60e01b8186015260c08601528551808701875281815264213937bbb760d91b8186015260e086015285518087018752838152631519585b60e21b81860152610100860152855180870187528381526321bcb0b760e11b8186015261012086015285518087018752838152634c696d6560e01b818601526101408601528551808701875260078152664d6167656e746160c81b818601526101608601528551808701875282815265496e6469676f60d01b818601526101808601528551808701875282815265159a5bdb195d60d21b818601526101a0860152855180870187528181526423b932b2b760d91b818601526101c086015285518087018752908152644f6c69766560d81b818501526101e085015284518086018652828152634e61767960e01b8185015261020085015284518086018652828152634171756160e01b818501526102208501528451808601865291825263426c756560e01b828401526102408401919091528351808501855290815265507572706c6560d01b818301526102608301525f8581526010909152918220549091906014906001600160a01b031661161b866002612472565b6116259190612433565b61162f919061249d565b5f85815260106020526040812054919250906014906001600160a01b0316611658876003612433565b611663906002612472565b61166d9190612433565b611677919061249d565b90505f8084846014811061168d5761168d61245e565b60200201518584601481106116a4576116a461245e565b602002015190925090505f826116bb60048a61249d565b156116c657836116eb565b6040518060400160405280600b81526020016a75726c2823706f7265732960a81b8152505b836040516020016116fe939291906124cb565b60405160208183030381529060405290505f61171a8484611bab565b61173c5760405180606001604052806029815260200161352f60299139611756565b6040518060600160405280602a8152602001613558602a91395b90505f61176460048b61249d565b1561178757604051806060016040528060298152602001613506602991396117a1565b6040518060600160405280602a81526020016134dc602a91395b90505f6117e66117b08c611c03565b6117b986611cff565b888887876040516020016117d29695949392919061322e565b604051602081830303815290604052611cff565b9050806040516020016117f991906133fd565b6040516020818303038152906040529950505050505050505050919050565b5f61076582611a68565b61182a6118fd565b600f5460ff1615611839575f80fd5b600f805460ff19166001179055565b6118506118fd565b6001600160a01b0381166118b55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610fd1565b610acf816119dd565b6118c66118fd565b600d55565b5f816001111580156118dd57505f5482105b80156107655750505f90815260046020526040902054600160e01b161590565b6008546001600160a01b03163314610cce5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610fd1565b5f81806001116119a7575f548110156119a7575f8181526004602052604081205490600160e01b821690036119a5575b805f03610f8457505f19015f81815260046020526040902054611987565b505b604051636f96cda160e11b815260040160405180910390fd5b6119d9828260405180602001604052805f815250611e4e565b5050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f8281526004602052604090205461076590611eb7565b6001600160a01b03165f908152600560205260409081902054901c67ffffffffffffffff1690565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290611ac4903390899088908890600401613441565b6020604051808303815f875af1925050508015611afe575060408051601f3d908101601f19168201909252611afb9181019061347d565b60015b611b5a573d808015611b2b576040519150601f19603f3d011682016040523d82523d5f602084013e611b30565b606091505b5080515f03611b52576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182525f808252602082018190529181018290526060810191909152610765611ba683611957565b611eb7565b5f81604051602001611bbd9190613498565b6040516020818303038152906040528051906020012083604051602001611be49190613498565b6040516020818303038152906040528051906020012014905092915050565b6060815f03611c295750506040805180820190915260018152600360fc1b602082015290565b815f5b8115611c525780611c3c81612446565b9150611c4b9050600a836134b3565b9150611c2c565b5f8167ffffffffffffffff811115611c6c57611c6c6122bf565b6040519080825280601f01601f191660200182016040528015611c96576020820181803683370190505b509050815b8515610c5057611cac600a8761249d565b611cb7906030612433565b60f81b82611cc4836134c6565b92508281518110611cd757611cd761245e565b60200101906001600160f81b03191690815f1a905350611cf8600a876134b3565b9550611c9b565b606081515f03611d1c57505060408051602081019091525f815290565b5f6040518060600160405280604081526020016135826040913990505f600384516002611d499190612433565b611d5391906134b3565b611d5e906004612472565b67ffffffffffffffff811115611d7657611d766122bf565b6040519080825280601f01601f191660200182016040528015611da0576020820181803683370190505b509050600182016020820185865187015b80821015611e0c576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250611db1565b5050600386510660018114611e285760028114611e3b57611e43565b603d6001830353603d6002830353611e43565b603d60018303535b509195945050505050565b611e588383611eff565b6001600160a01b0383163b15610aec575f548281035b611e805f868380600101945086611a90565b611e9d576040516368d2bf6b60e11b815260040160405180910390fd5b818110611e6e57815f5414611eb0575f80fd5b5050505050565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b5f805490829003611f235760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114611fcf5780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101611f99565b50815f03611fef57604051622e076360e81b815260040160405180910390fd5b5f5550505050565b6001600160e01b031981168114610acf575f80fd5b5f6020828403121561201c575f80fd5b8135610f8481611ff7565b5f5b83811015612041578181015183820152602001612029565b50505f910152565b5f8151808452612060816020860160208601612027565b601f01601f19169290920160200192915050565b602081525f610f846020830184612049565b5f60208284031215612096575f80fd5b5035919050565b80356001600160a01b03811681146120b3575f80fd5b919050565b5f80604083850312156120c9575f80fd5b6120d28361209d565b946020939093013593505050565b5f805f606084860312156120f2575f80fd5b6120fb8461209d565b92506121096020850161209d565b9150604084013590509250925092565b5f806020838503121561212a575f80fd5b823567ffffffffffffffff80821115612141575f80fd5b818501915085601f830112612154575f80fd5b813581811115612162575f80fd5b8660208260051b8501011115612176575f80fd5b60209290920196919550909350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b81811015610df0576121f3838551612188565b92840192608092909201916001016121e0565b5f60208284031215612216575f80fd5b610f848261209d565b602080825282518282018190525f9190848201906040850190845b81811015610df05783518352928401929184019160010161223a565b5f805f60608486031215612268575f80fd5b6122718461209d565b95602085013595506040909401359392505050565b5f8060408385031215612297575f80fd5b6122a08361209d565b9150602083013580151581146122b4575f80fd5b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b5f805f80608085870312156122e6575f80fd5b6122ef8561209d565b93506122fd6020860161209d565b925060408501359150606085013567ffffffffffffffff80821115612320575f80fd5b818701915087601f830112612333575f80fd5b813581811115612345576123456122bf565b604051601f8201601f19908116603f0116810190838211818310171561236d5761236d6122bf565b816040528281528a6020848701011115612385575f80fd5b826020860160208301375f60208483010152809550505050505092959194509250565b608081016107658284612188565b5f80604083850312156123c7575f80fd5b6123d08361209d565b91506123de6020840161209d565b90509250929050565b600181811c908216806123fb57607f821691505b60208210810361241957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808201808211156107655761076561241f565b5f600182016124575761245761241f565b5060010190565b634e487b7160e01b5f52603260045260245ffd5b80820281158282048414176107655761076561241f565b634e487b7160e01b5f52601260045260245ffd5b5f826124ab576124ab612489565b500690565b5f81516124c1818560208601612027565b9290920192915050565b7f3c7376672077696474683d2231323030707822206865696768743d223132303081527f7078222076696577426f783d22302030203135343020313534302220636c617360208201527f733d2269636f6e222076657273696f6e3d22312e312220786d6c6e733d22687460408201527f74703a2f2f7777772e77332e6f72672f323030302f737667223e3c726563742060608201527f77696474683d223130302522206865696768743d2231303025222066696c6c3d60808201527f22626c61636b222f3e3c66696c7465722069643d22626c75722220783d222d3160a08201527f302220793d222d3130222077696474683d2231303022206865696768743d223260c08201527f3030223e3c66654f666673657420696e3d22536f75726365477261706869632260e08201527f2064783d223630222064793d223630222f3e3c6665476175737369616e426c756101008201527f7220696e3d22536f75726365477261706869632220726573756c743d22704f746101208201527f61746f223e3c616e696d617465206174747269627574654e616d653d227374646101408201527f446576696174696f6e222076616c7565733d2231303b3230303b3130222064756101608201527f723d2231732220726570656174436f756e743d22696e646566696e697465222f6101808201527f3e3c2f6665476175737369616e426c75723e3c66654d657267653e3c66654d656101a08201527f7267654e6f646520696e3d22704f7461746f222f3e3c66654d657267654e6f646101c08201527f6520696e3d22536f7572636547726170686963222f3e3c2f66654d657267653e6101e08201527f3c2f66696c7465723e3c7061747465726e2069643d22706f7265732220783d226102008201527f302220793d2230222077696474683d22323022206865696768743d22323022206102208201527f7061747465726e556e6974733d227573657253706163654f6e557365223e3c726102408201527f6563742077696474683d22323022206865696768743d223230222066696c6c3d610260820152601160f91b6102808201525f613225612f80612f7a612adc612ad66127f561028188018b6124b0565b7f222f3e3c636972636c652063783d2232222063793d22352220723d223222206681527f696c6c3d22626c61636b222f3e3c636972636c652063783d223130222063793d60208201527f2231302220723d2232222066696c6c3d22626c61636b222f3e3c636972636c6560408201527f2063783d223135222063793d2231352220723d2232222066696c6c3d22626c6160608201527f636b222f3e3c2f7061747465726e3e3c7061746820643d224d3432322e34203960808201527f31372e333333333333632d31342e39333333333320302d32392e38363636363760a08201527f20302d34342e382d322e3133333333332d39382e3133333333332d31302e363660c08201527f363636372d3137392e322d35372e362d3232342d3133322e3236363636372d3160e08201527f30382e382d3137372e30363636363720322e3133333333332d3237372e3333336101008201527f333333203130382e382d3337312e322032372e3733333333332d32352e3620356101208201527f372e362d35312e322038332e322d37382e39333333333320382e3533333333336101408201527f2d382e3533333333332031372e3036363636372d31392e322032352e362d32376101608201527f2e373333333333203131352e322d313238203234332e322d3237332e303636366101808201527f3637203432322e342d3134392e3333333333342037322e3533333333332035316101a08201527f2e32203131352e3220313238203132352e383636363637203232342031322e386101c08201527f203133322e3236363636372d34322e363636363637203238332e3733333333336101e08201527f2d3134322e393333333334203338382e3236363636372d39382e3133333333336102008201527f2039332e3836363636372d3232382e323636363637203134392e3333333333336102208201527f2d3335342e313333333333203134392e3333333333337a222066696c6c3d220061024082015261025f0190565b886124b0565b7f222066696c7465723d2275726c2823626c7572292220207374726f6b653d222381527f30303022207374726f6b652d77696474683d22313022207374726f6b652d646160208201527f736861727261793d223130203520333422207472616e73666f726d3d2273636160408201527f6c6528312e3529222f3e3c7061746820643d224d3732352e333333333333203260608201527f37372e3333333333336331322e3820302032312e33333333333320382e35333360808201527f3333332032312e3333333333342032312e333333333334732d382e353333333360a08201527f332032312e3333333333332d32312e3333333333342032312e3333333333332d60c08201527f32312e3333333333332d382e3533333333332d32312e3333333333332d32312e60e08201527f33333333333320382e3533333333332d32312e3333333333332032312e3333336101008201527f3333332d32312e3333333333347a206d30203233342e363636363637633020316101208201527f322e3820382e3533333333332032312e3333333333332032312e3333333333346101408201527f2032312e3333333333337332312e3333333333332d382e3533333333332032316101608201527f2e3333333333332d32312e3333333333332d382e3533333333332d32312e33336101808201527f333333332d32312e3333333333332d32312e3333333333332d32312e333333336101a08201527f333320382e3533333333332d32312e3333333333342032312e3333333333337a6101c08201527f206d2d3137302e3636363636362d3134392e33333333333363302031322e38206101e08201527f382e3533333333332032312e3333333333332032312e3333333333332032312e6102008201527f3333333333337332312e3333333333332d382e3533333333332032312e3333336102208201527f3333332d32312e3333333333332d382e3533333333332d32312e3333333333336102408201527f2d32312e3333333333332d32312e3333333333342d32312e33333333333320386102608201527f2e3533333333332d32312e3333333333332032312e3333333333347a4d3239386102808201527f2e363636363637203638322e36363636363763302031322e3820382e353333336102a08201527f33332032312e3333333333332032312e3333333333332032312e3333333333336102c08201527f7332312e3333333333332d382e3533333333332032312e3333333333332d32316102e08201527f2e3333333333332d382e3533333333332d32312e3333333333332d32312e33336103008201527f333333332d32312e3333333333342d32312e33333333333320382e35333333336103208201527f332d32312e3333333333332032312e3333333333347a206d3132382d37342e366103408201527f363636363763302031372e3036363636372031342e39333333333320333220336103608201527f322033327333322d31342e3933333333332033322d33322d31342e39333333336103808201527f332d33322d33322d33322d33322031342e3933333333332d33322033327a22206103a0820152653334b6361e9160d11b6103c08201526103c60190565b856124b0565b7f22207472616e73666f726d3d227363616c6528312e3529222f3e3c672074726181527f6e73666f726d3d227472616e736c61746528313439302c20313439302920736360208201527f616c65283229222066696c6c3d227768697465223e3c706174682066696c6c2d60408201527f72756c653d226576656e6f64642220636c69702d72756c653d226576656e6f6460608201527f642220643d226d3135203136632e362d2e372e392d312e372e392d332e31762d60808201527f312e38632d2e312d312e342d2e342d322e342d2e392d332e312d2e362d2e372d60a08201527f312e342d312e312d322e352d312e312d312e3120302d312e392e342d322e352060c08201527f312e312d2e362e372d2e3920312e382d2e3920332e3276312e38633020312e3360e08201527f2e3320322e332e3920332e312e362e3720312e34203120322e35203120312e316101008201527f203020312e392d2e3320322e352d312e317a6d2d312e352d362e39632e332e346101208201527f2e342031202e3420312e3876322e336330202e382d2e3120312e342d2e3420316101408201527f2e382d2e322e342d2e352e352d31202e352d2e3520302d2e382d2e322d312e316101608201527f2d2e352d2e322d2e342d2e332d312d2e332d312e39762d322e3463302d2e372e6101808201527f312d312e332e342d312e372e322d2e332e352d2e3520312d2e352e352030202e6101a08201527f382e322031202e367a222f3e3c706174682066696c6c2d72756c653d226576656101c08201527f6e6f64642220636c69702d72756c653d226576656e6f64642220643d224d32206101e08201527f32483232563232483256325a4d342034483230563230483456345a222f3e3c2f61020082015267339f1e17b9bb339f60c11b6102208201526102280190565b95945050505050565b7f7b226e616d65223a20226f6e436861696e506f7461746f20230000000000000081525f8751613265816019850160208c01612027565b7f222c20226465736372697074696f6e223a20224f6e436861696e416e696d61746019918401918201527f65644578636c7573697665393939537570706c792e20486f6c6465727355706460398201527f617465645769746824222c2022696d616765223a2022646174613a696d61676560598201526f0bdcdd99cade1b5b0ed8985cd94d8d0b60821b60798201528751613307816089840160208c01612027565b7f222c202261747472696275746573223a5b7b2274726169745f74797065223a22608992909101918201527f506f7461746f20436f6c6f72222c202276616c7565223a22000000000000000060a98201526133f06133e26133dc6133cf6133c96133ba6133b461337a60c189018f6124b0565b7f227d2c7b2274726169745f74797065223a22506f726520436f6c6f72222c20228152673b30b63ab2911d1160c11b602082015260280190565b8c6124b0565b62089f4b60ea1b815260030190565b896124b0565b600b60fa1b815260010190565b866124b0565b615d7d60f01b815260020190565b9998505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525f825161343481601d850160208701612027565b91909101601d0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061347390830184612049565b9695505050505050565b5f6020828403121561348d575f80fd5b8151610f8481611ff7565b5f82516134a9818460208701612027565b9190910192915050565b5f826134c1576134c1612489565b500490565b5f816134d4576134d461241f565b505f19019056fe7b2274726169745f74797065223a2246696e6520506f726573222c202276616c7565223a22596573227d7b2274726169745f74797065223a2246696e6520506f726573222c202276616c7565223a224e6f227d7b2274726169745f74797065223a22486f7420506f7461746f222c202276616c7565223a224e6f227d7b2274726169745f74797065223a22486f7420506f7461746f222c202276616c7565223a22596573227d4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220143a43d79788093b1044371753590c5ff9368a7b6fd360a569c37e9316f8371364736f6c63430008140033
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.