Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
5,000 OGX̅
Holders
1,975
Market
Volume (24H)
0.7043 ETH
Min Price (24H)
$473.42 @ 0.162100 ETH
Max Price (24H)
$584.11 @ 0.200000 ETH
Other Info
Token Contract
Balance
0 OGX̅Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
OGX
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1999900 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; contract OGX is Ownable, UpdatableOperatorFilterer, ERC2981, ERC721A, ReentrancyGuard { struct Season { uint256 sellType; //0 public, 1 whitelist , 2 team uint256 price; uint256 quantity; uint256 startTime; uint256 endTime; } struct Whitelist { uint256 season; bytes32 merkleRoot; } using Strings for uint256; uint256 public constant MAX_SUPPLY = 10000; bool public allowBuy = true; bool public allowFixURI = true; uint256 public buyLimit = 2; uint256[] public seasonList; string private _hiddenMetadataURI; mapping(uint256 => string) public seasonUriMap; //seasonNum => uri mapping(uint256 => Whitelist) public seasonWhitelist; // seasonNum => Whitelist mapping(address => uint256) private _walletMints; //record wallet mint number mapping(uint256 => uint256) private _tokenSeasonMap; // tokenId => seasonNum mapping(uint256 => Season) private _ogxSeasons; // seasonNum => Season mapping(uint256 => bool) private _lockTokens; //token => isLocked event TokenBorn( address indexed owner, uint256 startTokenId, uint256 quantity, uint256 season ); event SeasonAdded( uint256 indexed season, uint256 indexed sellType, uint256 quantity, uint256 startTime, uint256 endTime ); event SeasonUpdated(uint256 indexed season, uint256 endTime); event WhitelistDeleted(uint256 indexed season); event WhitelistAdded(uint256 indexed season, bytes32 merkleRoot); event SeasonsDeleted(uint256 indexed season); event TokenLocked(uint256 indexed tokenId); event TokenUnlocked(uint256 indexed tokenId); event SeasonOpened(uint256 indexed season, string baseURI); event HiddenMetadataURISet(string baseURI); event AllowBuySet(bool allowBuy); event BuyLimitSet(uint256 buyLimit); event RoyaltyInfoSet(address receiver, uint96 feeBasisPoints); event FixURIDisabled(); error IsNoOwner(); error CallFailed(); error TokenIsLocked(uint256 tokenId); error TokenIsUnlocked(uint256 tokenId); error LockQueryForNonexistentToken(); constructor( string memory hiddenMetadataURI, string memory name, string memory symbol, address filterRegistry, address subscribeRegistry ) ERC721A(name, symbol) UpdatableOperatorFilterer(address(0), address(0), false) { _hiddenMetadataURI = hiddenMetadataURI; _setDefaultRoyalty(msg.sender, 500); operatorFilterRegistry = IOperatorFilterRegistry(filterRegistry); if (address(0) != filterRegistry) { operatorFilterRegistry.register(address(this)); if (address(0) != subscribeRegistry) { operatorFilterRegistry.subscribe( address(this), subscribeRegistry ); } } } function addSeason( uint256 season, uint256 sellType, uint256 price, uint256 quantity, uint256 startTime, uint256 endTime ) external onlyOwner { require(season > 0, "season invalid"); require(sellType < 3, "sellType invalid"); require(startTime > block.timestamp, "startTime invalid"); require((endTime > startTime), "endTime invalid"); require(quantity > 0, "quantity invalid"); Season storage ogxSeason = _ogxSeasons[season]; require(ogxSeason.startTime == 0, "season already exists"); ogxSeason.price = price; ogxSeason.quantity = quantity; ogxSeason.startTime = startTime; ogxSeason.endTime = endTime; ogxSeason.sellType = sellType; seasonList.push(season); emit SeasonAdded(season, sellType, quantity, startTime, endTime); } function updateSeason(uint256 season, uint256 endTime) external onlyOwner { Season storage ogxSeason = _ogxSeasons[season]; require(ogxSeason.startTime > 0, "season not exist"); require( (endTime > ogxSeason.startTime) && (endTime > block.timestamp), "endTime must be later than startTime and current time" ); ogxSeason.endTime = endTime; emit SeasonUpdated(season, endTime); } function deleteSeason(uint256 season) external onlyOwner { Season storage ogxSeason = _ogxSeasons[season]; require(ogxSeason.startTime > 0, "season not exist"); delete (_ogxSeasons[season]); delete (seasonWhitelist[season]); for (uint i = 0; i < seasonList.length; i++) { if (season == seasonList[i]) { uint256 last = seasonList[seasonList.length - 1]; seasonList.pop(); if (season != last) { seasonList[i] = last; } break; } } emit SeasonsDeleted(season); } // Function to set the merkle root function addWhitelist( uint256 season, bytes32 newMerkleRoot ) external onlyOwner { seasonWhitelist[season].season = season; seasonWhitelist[season].merkleRoot = newMerkleRoot; emit WhitelistAdded(season, newMerkleRoot); } function deleteWhitelist(uint256 season) external onlyOwner { delete (seasonWhitelist[season]); emit WhitelistDeleted(season); } function buyBox( uint256 season, uint256 quantity, bytes32[] calldata merkleProof ) external payable { require(allowBuy, "buy disabled"); require(quantity > 0, "quantity invalid"); require(totalSupply() + quantity <= MAX_SUPPLY, "over max supply"); Season storage ogxSeason = _ogxSeasons[season]; require(ogxSeason.startTime > 0, "season not exist"); require( ogxSeason.sellType < 2, "the season is not allowed to mint by this function" ); require( (ogxSeason.startTime <= block.timestamp) && (ogxSeason.endTime >= block.timestamp), "not in the sale period" ); require(ogxSeason.quantity > 0, "sold out"); require(ogxSeason.quantity >= quantity, "not enough stock"); require(ogxSeason.price * quantity == msg.value, "eth value invalid"); address sender = _msgSender(); if (ogxSeason.sellType == 1) { Whitelist storage _whitelistSeason = seasonWhitelist[season]; require( _whitelistSeason.season == season, "whitelist season not exist" ); bytes32 leaf = keccak256(abi.encodePacked(sender)); require( MerkleProof.verify( merkleProof, _whitelistSeason.merkleRoot, leaf ), "not in the whitelist." ); } // Check max box per user uint256 totalBoxes = _walletMints[sender] + quantity; require(buyLimit >= totalBoxes, "reach the limit"); _walletMints[sender] = totalBoxes; uint256 startTokenId = _nextTokenId(); _mint(sender, quantity); ogxSeason.quantity = ogxSeason.quantity - quantity; _bornOGX(startTokenId, season); emit TokenBorn(sender, startTokenId, quantity, season); } function treasuryWithdraw( address payable address_, uint256 value_ ) external onlyOwner nonReentrant { require(address(this).balance >= value_, "withdraw too much"); (bool success, ) = address_.call{value: value_}(""); if (!success) { revert CallFailed(); } } function mintNFTToTeamMember( uint256 season, uint256 quantity, address to ) external onlyOwner { require(allowBuy, "buy disabled"); require(quantity > 0, "quantity invalid"); require(totalSupply() + quantity <= MAX_SUPPLY, "over max supply"); Season storage ogxSeason = _ogxSeasons[season]; require(ogxSeason.startTime > 0, "season not exist"); require( ogxSeason.sellType == 2, "the season is not allowed to mint by this function" ); require( (ogxSeason.startTime <= block.timestamp) && (ogxSeason.endTime >= block.timestamp), "not in the sale period" ); require(ogxSeason.quantity > 0, "sold out"); require(ogxSeason.quantity >= quantity, "not enough stock"); uint256 startTokenId = _nextTokenId(); _mint(to, quantity); ogxSeason.quantity = ogxSeason.quantity - quantity; _bornOGX(startTokenId, season); emit TokenBorn(to, startTokenId, quantity, season); } function lock(uint256[] calldata tokenIds) external { for (uint256 index = 0; index < tokenIds.length; index++) { uint256 tokenId = tokenIds[index]; _checkTokenOwner(tokenId); if (_lockTokens[tokenId]) { revert TokenIsLocked(tokenId); } _lockTokens[tokenId] = true; emit TokenLocked(tokenId); } } function unlock(uint256[] calldata tokenIds) external { for (uint256 index = 0; index < tokenIds.length; index++) { uint256 tokenId = tokenIds[index]; _checkTokenOwner(tokenId); if (!_lockTokens[tokenId]) { revert TokenIsUnlocked(tokenId); } delete _lockTokens[tokenId]; emit TokenUnlocked(tokenId); } } function getLocked(uint256 tokenId) public view virtual returns (bool) { if (!_exists(tokenId)) { revert LockQueryForNonexistentToken(); } return _lockTokens[tokenId]; } function tokenURI( uint256 tokenId ) public view override returns (string memory) { if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return string(abi.encodePacked(_hiddenMetadataURI, "0.json")); } else { string memory uri = _findBaseURI(tokenId); if (bytes(uri).length == 0) { return string(abi.encodePacked(_hiddenMetadataURI, "0.json")); } else { return string(abi.encodePacked(uri, tokenId.toString(), ".json")); } } } function openSeason( uint256 seasonNum, string calldata baseUri ) external onlyOwner { require(bytes(baseUri).length > 0, "baseUri is empty"); require( bytes(seasonUriMap[seasonNum]).length == 0 || allowFixURI, "not allow to fix URI" ); seasonUriMap[seasonNum] = baseUri; emit SeasonOpened(seasonNum, baseUri); } function setBaseURI(string calldata baseUri) external onlyOwner { require(bytes(baseUri).length > 0, "baseUri is empty"); require(allowFixURI, "not allow to fix URI"); for (uint i = 0; i < seasonList.length; i++) { uint256 seasonNum = seasonList[i]; seasonUriMap[seasonNum] = baseUri; emit SeasonOpened(seasonNum, baseUri); } } function setHiddenMetadataURI( string memory hiddenMetadataURI ) external onlyOwner { _hiddenMetadataURI = hiddenMetadataURI; emit HiddenMetadataURISet(hiddenMetadataURI); } function setAllowBuy(bool allowBuy_) external onlyOwner { allowBuy = allowBuy_; emit AllowBuySet(allowBuy_); } function setBuyLimit(uint256 buyLimit_) external onlyOwner { buyLimit = buyLimit_; emit BuyLimitSet(buyLimit_); } function disableFixURI() external onlyOwner { allowFixURI = false; emit FixURIDisabled(); } function getSeason( uint256 season ) external view returns (uint256, uint256, uint256, uint256, bool) { Season storage ogxSeason = _ogxSeasons[season]; bool soldOut = (ogxSeason.quantity == 0); return ( ogxSeason.sellType, ogxSeason.price, ogxSeason.startTime, ogxSeason.endTime, soldOut ); } function setRoyaltyInfo( address receiver, uint96 feeBasisPoints ) external onlyOwner { _setDefaultRoyalty(receiver, feeBasisPoints); emit RoyaltyInfoSet(receiver, feeBasisPoints); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } // ========= OPERATOR FILTERER OVERRIDES ========= function setApprovalForAll( address operator, bool approved ) public override(ERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function batchTransferFrom( address from, address to, uint256[] calldata tokens ) public payable onlyAllowedOperator(from) { for (uint256 index = 0; index < tokens.length; index++) { super.safeTransferFrom(from, to, tokens[index]); } } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function owner() public view virtual override(Ownable, UpdatableOperatorFilterer) returns (address) { return Ownable.owner(); } function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _bornOGX(uint256 startTokenId, uint256 season) private { _tokenSeasonMap[startTokenId] = season; } function _findBaseURI( uint256 tokenId ) internal view returns (string memory) { string memory foundUri; if (tokenId < _nextTokenId()) { uint256 startTokenId = _startTokenId(); for (; tokenId >= startTokenId; tokenId--) { uint256 seasonNum = _tokenSeasonMap[tokenId]; if (seasonNum > 0) { foundUri = seasonUriMap[seasonNum]; return foundUri; } } } return foundUri; } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override { // if it is a Transfer or Burn, we always deal with one token, that is startTokenId if (from != address(0)) { if (_lockTokens[startTokenId]) { revert TokenIsLocked(startTokenId); } } super._beforeTokenTransfers(from, to, startTokenId, quantity); } function _checkTokenOwner(uint256 tokenId) internal view { address tokenOwner = ownerOf(tokenId); if (msg.sender != tokenOwner) { revert IsNoOwner(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // 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 pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title UpdatableOperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. This contract allows the Owner to update the * OperatorFilterRegistry address via updateOperatorFilterRegistryAddress, including to the zero address, * which will bypass registry checks. * Note that OpenSea will still disable creator earnings enforcement if filtered operators begin fulfilling orders * on-chain, eg, if the registry is revoked or bypassed. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract UpdatableOperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); /// @dev Emitted when someone other than the owner is trying to call an only owner function. error OnlyOwner(); event OperatorFilterRegistryAddressUpdated(address newRegistry); IOperatorFilterRegistry public operatorFilterRegistry; /// @dev The constructor that is called when the contract is being deployed. constructor(address _registry, address subscriptionOrRegistrantToCopy, bool subscribe) { IOperatorFilterRegistry registry = IOperatorFilterRegistry(_registry); operatorFilterRegistry = registry; // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(registry).code.length > 0) { if (subscribe) { registry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { registry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { registry.register(address(this)); } } } } /** * @dev A helper function to check if the operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if the operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @notice Update the address that the contract will make OperatorFilter checks against. When set to the zero * address, checks will be bypassed. OnlyOwner. */ function updateOperatorFilterRegistryAddress(address newRegistry) public virtual { if (msg.sender != owner()) { revert OnlyOwner(); } operatorFilterRegistry = IOperatorFilterRegistry(newRegistry); emit OperatorFilterRegistryAddressUpdated(newRegistry); } /** * @dev Assume the contract has an owner, but leave specific Ownable implementation up to inheriting contract. */ function owner() public view virtual returns (address); /** * @dev A helper function to check if the operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { IOperatorFilterRegistry registry = operatorFilterRegistry; // Check registry code length to facilitate testing in environments without a deployed registry. if (address(registry) != address(0) && address(registry).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!registry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "erc721a/=node_modules/erc721a/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "hardhat/=node_modules/hardhat/", "operator-filter-registry/=node_modules/operator-filter-registry/" ], "optimizer": { "enabled": true, "runs": 1999900 }, "metadata": { "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"hiddenMetadataURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"filterRegistry","type":"address"},{"internalType":"address","name":"subscribeRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallFailed","type":"error"},{"inputs":[],"name":"IsNoOwner","type":"error"},{"inputs":[],"name":"LockQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenIsLocked","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenIsUnlocked","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":false,"internalType":"bool","name":"allowBuy","type":"bool"}],"name":"AllowBuySet","type":"event"},{"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":false,"internalType":"uint256","name":"buyLimit","type":"uint256"}],"name":"BuyLimitSet","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":[],"name":"FixURIDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"HiddenMetadataURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRegistry","type":"address"}],"name":"OperatorFilterRegistryAddressUpdated","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":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"RoyaltyInfoSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"sellType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"SeasonAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"SeasonOpened","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"SeasonUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"}],"name":"SeasonsDeleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"season","type":"uint256"}],"name":"TokenBorn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenUnlocked","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"WhitelistAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"season","type":"uint256"}],"name":"WhitelistDeleted","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"uint256","name":"sellType","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"addSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"addWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowBuy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowFixURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokens","type":"uint256[]"}],"name":"batchTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"buyBox","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"}],"name":"deleteSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"}],"name":"deleteWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableFixURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"}],"name":"getSeason","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"mintNFTToTeamMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seasonNum","type":"uint256"},{"internalType":"string","name":"baseUri","type":"string"}],"name":"openSeason","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operatorFilterRegistry","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonUriMap","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seasonWhitelist","outputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"allowBuy_","type":"bool"}],"name":"setAllowBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"buyLimit_","type":"uint256"}],"name":"setBuyLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"hiddenMetadataURI","type":"string"}],"name":"setHiddenMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setRoyaltyInfo","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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"address_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"treasuryWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRegistry","type":"address"}],"name":"updateOperatorFilterRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"season","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"updateSeason","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600d805461ffff19166101011790556002600e553480156200002557600080fd5b506040516200515a3803806200515a83398101604081905262000048916200051d565b8383600080806200005933620002e6565b600180546001600160a01b0319166001600160a01b03851690811790915583903b1562000192578115620000f157604051633e9f1edf60e11b81523060048201526001600160a01b038481166024830152821690637d3e3dbe906044015b600060405180830381600087803b158015620000d257600080fd5b505af1158015620000e7573d6000803e3d6000fd5b5050505062000192565b6001600160a01b03831615620001365760405163a0af290360e01b81523060048201526001600160a01b03848116602483015282169063a0af290390604401620000b7565b604051632210724360e11b81523060048201526001600160a01b03821690634420e48690602401600060405180830381600087803b1580156200017857600080fd5b505af11580156200018d573d6000803e3d6000fd5b505050505b505050508160069081620001a7919062000663565b506007620001b6828262000663565b50600160045550506001600c556010620001d1868262000663565b50620001e0336101f462000336565b600180546001600160a01b0319166001600160a01b03841690811790915515620002db57600154604051632210724360e11b81523060048201526001600160a01b0390911690634420e48690602401600060405180830381600087803b1580156200024a57600080fd5b505af11580156200025f573d6000803e3d6000fd5b505050506001600160a01b03811615620002db57600154604051632cc5350560e21b81523060048201526001600160a01b0383811660248301529091169063b314d41490604401600060405180830381600087803b158015620002c157600080fd5b505af1158015620002d6573d6000803e3d6000fd5b505050505b50505050506200072f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6127106001600160601b0382161115620003aa5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620004025760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620003a1565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600255565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200046357600080fd5b81516001600160401b03808211156200048057620004806200043b565b604051601f8301601f19908116603f01168101908282118183101715620004ab57620004ab6200043b565b81604052838152602092508683858801011115620004c857600080fd5b600091505b83821015620004ec5785820183015181830184015290820190620004cd565b600093810190920192909252949350505050565b80516001600160a01b03811681146200051857600080fd5b919050565b600080600080600060a086880312156200053657600080fd5b85516001600160401b03808211156200054e57600080fd5b6200055c89838a0162000451565b965060208801519150808211156200057357600080fd5b6200058189838a0162000451565b955060408801519150808211156200059857600080fd5b50620005a78882890162000451565b935050620005b86060870162000500565b9150620005c86080870162000500565b90509295509295909350565b600181811c90821680620005e957607f821691505b6020821081036200060a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200065e57600081815260208120601f850160051c81016020861015620006395750805b601f850160051c820191505b818110156200065a5782815560010162000645565b5050505b505050565b81516001600160401b038111156200067f576200067f6200043b565b6200069781620006908454620005d4565b8462000610565b602080601f831160018114620006cf5760008415620006b65750858301515b600019600386901b1c1916600185901b1785556200065a565b600085815260208120601f198616915b828110156200070057888601518255948401946001909101908401620006df565b50858210156200071f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b614a1b806200073f6000396000f3fe6080604052600436106103085760003560e01c806370a082311161019a578063b88d4fde116100e1578063d8612ed01161008a578063f2fde38b11610064578063f2fde38b1461096a578063f3993d111461098a578063f4adc0b91461099d57600080fd5b8063d8612ed0146108d4578063dd31ee2d146108f4578063e985e9c51461091457600080fd5b8063c49bfdca116100bb578063c49bfdca14610874578063c87b56dd14610894578063d6046836146108b457600080fd5b8063b88d4fde14610821578063b8d1e53214610834578063bad715461461085457600080fd5b806395d89b4111610143578063a5a5cb5e1161011d578063a5a5cb5e146107ba578063ab7cb211146107da578063b0ccc31e146107f457600080fd5b806395d89b4114610712578063a22cb46514610727578063a43d86541461074757600080fd5b8063859610c611610174578063859610c6146106a75780638da5cb5b146106c757806390528851146106f257600080fd5b806370a082311461065d578063715018a61461067d57806376ef684f1461069257600080fd5b80632a55205a1161025e578063512507c6116102075780635d36598f116101e15780635d36598f146105fd5780636352211e1461061d578063660fe55d1461063d57600080fd5b8063512507c6146105a757806355f804b3146105c7578063589210d9146105e757600080fd5b806341e96db81161023857806341e96db81461052b57806342842e0e1461057457806343da72281461058757600080fd5b80632a55205a146104a957806332cb6b0c146104f55780633b035df61461050b57600080fd5b8063095ea7b3116102c057806318160ddd1161029a57806318160ddd1461043e57806323b872dd14610483578063290eae5e1461049657600080fd5b8063095ea7b3146103eb5780630d4eefdc146103fe5780630f9292a31461041e57600080fd5b806306ee883f116102f157806306ee883f1461036457806306fdde0314610384578063081812fc146103a657600080fd5b806301ffc9a71461030d57806302fa7c4714610342575b600080fd5b34801561031957600080fd5b5061032d610328366004613d83565b6109bc565b60405190151581526020015b60405180910390f35b34801561034e57600080fd5b5061036261035d366004613dc2565b6109eb565b005b34801561037057600080fd5b5061036261037f366004613e0c565b610a5d565b34801561039057600080fd5b50610399610bc3565b6040516103399190613e9c565b3480156103b257600080fd5b506103c66103c1366004613eaf565b610c55565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610339565b6103626103f9366004613ec8565b610cbf565b34801561040a57600080fd5b50610362610419366004613e0c565b610cd8565b34801561042a57600080fd5b50610399610439366004613eaf565b610d37565b34801561044a57600080fd5b50600554600454037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604051908152602001610339565b610362610491366004613ef4565b610dd1565b6103626104a4366004613f7a565b610e09565b3480156104b557600080fd5b506104c96104c4366004613e0c565b611533565b6040805173ffffffffffffffffffffffffffffffffffffffff9093168352602083019190915201610339565b34801561050157600080fd5b5061047561271081565b34801561051757600080fd5b5061032d610526366004613eaf565b61162c565b34801561053757600080fd5b5061055f610546366004613eaf565b6012602052600090815260409020805460019091015482565b60408051928352602083019190915201610339565b610362610582366004613ef4565b611683565b34801561059357600080fd5b506103626105a2366004613eaf565b6116b5565b3480156105b357600080fd5b506103626105c2366004614090565b6116fe565b3480156105d357600080fd5b506103626105e236600461411b565b61174d565b3480156105f357600080fd5b50610475600e5481565b34801561060957600080fd5b5061036261061836600461415d565b6118c6565b34801561062957600080fd5b506103c6610638366004613eaf565b6119b0565b34801561064957600080fd5b50610362610658366004614193565b6119bb565b34801561066957600080fd5b506104756106783660046141cc565b611e3b565b34801561068957600080fd5b50610362611ebd565b34801561069e57600080fd5b50610362611ed1565b3480156106b357600080fd5b506103626106c236600461415d565b611f2c565b3480156106d357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166103c6565b3480156106fe57600080fd5b5061036261070d3660046141e9565b61201a565b34801561071e57600080fd5b50610399612169565b34801561073357600080fd5b50610362610742366004614243565b612178565b34801561075357600080fd5b50610790610762366004613eaf565b6000908152601560205260409020600281015481546001830154600384015460049094015491949093921590565b6040805195865260208601949094529284019190915260608301521515608082015260a001610339565b3480156107c657600080fd5b506104756107d5366004613eaf565b61218c565b3480156107e657600080fd5b50600d5461032d9060ff1681565b34801561080057600080fd5b506001546103c69073ffffffffffffffffffffffffffffffffffffffff1681565b61036261082f366004614271565b6121ad565b34801561084057600080fd5b5061036261084f3660046141cc565b6121e7565b34801561086057600080fd5b5061036261086f366004613eaf565b6122ab565b34801561088057600080fd5b5061036261088f366004613ec8565b612463565b3480156108a057600080fd5b506103996108af366004613eaf565b612586565b3480156108c057600080fd5b506103626108cf3660046142f1565b612626565b3480156108e057600080fd5b506103626108ef36600461430e565b61268d565b34801561090057600080fd5b5061036261090f366004613eaf565b6129be565b34801561092057600080fd5b5061032d61092f366004614351565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561097657600080fd5b506103626109853660046141cc565b6129fb565b61036261099836600461437f565b612ab2565b3480156109a957600080fd5b50600d5461032d90610100900460ff1681565b60006109c782612b21565b806109d657506109d682612c02565b806109e557506109e582612b21565b92915050565b6109f3612c99565b6109fd8282612d1a565b6040805173ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201527ff773a484ab95747569678715234c0fec506930c6d9279bc6e015c16b5ba6be2c910160405180910390a15050565b610a65612c99565b60008281526015602052604090206003810154610ae3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f742065786973740000000000000000000000000000000060448201526064015b60405180910390fd5b806003015482118015610af557504282115b610b81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f656e6454696d65206d757374206265206c61746572207468616e20737461727460448201527f54696d6520616e642063757272656e742074696d6500000000000000000000006064820152608401610ada565b6004810182905560405182815283907fca1e07db615a632008f04c893554fbdc7638282098d723da7fd8d13a5fa72b2c906020015b60405180910390a2505050565b606060068054610bd2906143cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfe906143cc565b8015610c4b5780601f10610c2057610100808354040283529160200191610c4b565b820191906000526020600020905b815481529060010190602001808311610c2e57829003601f168201915b5050505050905090565b6000610c6082612e93565b610c96576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600a602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b81610cc981612ee1565b610cd38383613009565b505050565b610ce0612c99565b600082815260126020526040908190208381556001018290555182907f32ea858638198fa3de6b73258d9e6fdafd92f15a6fac9a79ab2ed1b5bb45766690610d2b9084815260200190565b60405180910390a25050565b60116020526000908152604090208054610d50906143cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7c906143cc565b8015610dc95780601f10610d9e57610100808354040283529160200191610dc9565b820191906000526020600020905b815481529060010190602001808311610dac57829003601f168201915b505050505081565b8273ffffffffffffffffffffffffffffffffffffffff81163314610df857610df833612ee1565b610e0384848461311e565b50505050565b600d5460ff16610e75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6275792064697361626c656400000000000000000000000000000000000000006044820152606401610ada565b60008311610edf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600554600454612710918591037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610f189190614448565b1115610f80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f766572206d617820737570706c7900000000000000000000000000000000006044820152606401610ada565b60008481526015602052604090206003810154610ff9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b805460021161108a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f74686520736561736f6e206973206e6f7420616c6c6f77656420746f206d696e60448201527f7420627920746869732066756e6374696f6e00000000000000000000000000006064820152608401610ada565b428160030154111580156110a2575042816004015410155b611108576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6e6f7420696e207468652073616c6520706572696f64000000000000000000006044820152606401610ada565b6000816002015411611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f736f6c64206f75740000000000000000000000000000000000000000000000006044820152606401610ada565b83816002015410156111e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f7567682073746f636b000000000000000000000000000000006044820152606401610ada565b348482600101546111f5919061445b565b1461125c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6574682076616c756520696e76616c69640000000000000000000000000000006044820152606401610ada565b805433906001036113d6576000868152601260205260409020805487146112df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77686974656c69737420736561736f6e206e6f742065786973740000000000006044820152606401610ada565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b16602082015260009060340160405160208183030381529060405280519060200120905061136d8686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050506001840154836133e1565b6113d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6f7420696e207468652077686974656c6973742e00000000000000000000006044820152606401610ada565b50505b73ffffffffffffffffffffffffffffffffffffffff8116600090815260136020526040812054611407908790614448565b905080600e541015611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f726561636820746865206c696d697400000000000000000000000000000000006044820152606401610ada565b73ffffffffffffffffffffffffffffffffffffffff821660009081526013602052604090208190556004546114aa83886133f7565b8684600201546114ba9190614472565b60028501556000818152601460205260409020889055604080518281526020810189905290810189905273ffffffffffffffffffffffffffffffffffffffff8416907f1403b44d4d4ef3cd19c074cd3d12a67f60df5c2448b2e1bc8fec268143122db89060600160405180910390a25050505050505050565b600082815260036020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916115ee57506040805180820190915260025473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090611612906bffffffffffffffffffffffff168761445b565b61161c9190614485565b91519350909150505b9250929050565b600061163782612e93565b61166d576040517f54924a8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526016602052604090205460ff1690565b8273ffffffffffffffffffffffffffffffffffffffff811633146116aa576116aa33612ee1565b610e03848484613542565b6116bd612c99565b6000818152601260205260408082208281556001018290555182917ff70df1f7fa97f4eb369051c9ca69dc352bbc402b1412a31c692d7d8d7ed0983d91a250565b611706612c99565b60106117128282614506565b507f2141256218a539dd0c624771a2387839b1b85f4a614311b400f80968c070f24c816040516117429190613e9c565b60405180910390a150565b611755612c99565b806117bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261736555726920697320656d707479000000000000000000000000000000006044820152606401610ada565b600d54610100900460ff1661182d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f7420616c6c6f7720746f20666978205552490000000000000000000000006044820152606401610ada565b60005b600f54811015610cd3576000600f828154811061184f5761184f614620565b60009182526020808320909101548083526011909152604090912090915061187884868361464f565b50807f59c63763a9cf2abccdc77b43ea6d322fc1e0d179371b7db510dcf8dd2ad883df85856040516118ab929190614769565b60405180910390a250806118be816147b6565b915050611830565b60005b81811015610cd35760008383838181106118e5576118e5614620565b9050602002013590506118f78161355d565b60008181526016602052604090205460ff16611942576040517f1d874e6a00000000000000000000000000000000000000000000000000000000815260048101829052602401610ada565b60008181526016602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555182917f7ff05c79c2a3d239576a86d8af5c623d17e7a676e424313ca21481b15047783f91a250806119a8816147b6565b9150506118c9565b60006109e5826135b9565b6119c3612c99565b600d5460ff16611a2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6275792064697361626c656400000000000000000000000000000000000000006044820152606401610ada565b60008211611a99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600554600454612710918491037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611ad29190614448565b1115611b3a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f766572206d617820737570706c7900000000000000000000000000000000006044820152606401610ada565b60008381526015602052604090206003810154611bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b8054600214611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f74686520736561736f6e206973206e6f7420616c6c6f77656420746f206d696e60448201527f7420627920746869732066756e6374696f6e00000000000000000000000000006064820152608401610ada565b42816003015411158015611c5c575042816004015410155b611cc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6e6f7420696e207468652073616c6520706572696f64000000000000000000006044820152606401610ada565b6000816002015411611d30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f736f6c64206f75740000000000000000000000000000000000000000000000006044820152606401610ada565b8281600201541015611d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f7567682073746f636b000000000000000000000000000000006044820152606401610ada565b6000611da960045490565b9050611db583856133f7565b838260020154611dc59190614472565b60028301556000818152601460205260409020859055604080518281526020810186905290810186905273ffffffffffffffffffffffffffffffffffffffff8416907f1403b44d4d4ef3cd19c074cd3d12a67f60df5c2448b2e1bc8fec268143122db89060600160405180910390a25050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216611e8a576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205467ffffffffffffffff1690565b611ec5612c99565b611ecf600061367f565b565b611ed9612c99565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690556040517f8df68e3b4ab150923d6e01683b629baa29cd4ea31122d6365718a10533089d8990600090a1565b60005b81811015610cd3576000838383818110611f4b57611f4b614620565b905060200201359050611f5d8161355d565b60008181526016602052604090205460ff1615611fa9576040517fdc8fb34100000000000000000000000000000000000000000000000000000000815260048101829052602401610ada565b60008181526016602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555182917f886574b2eee64153fbfb4ca8878ae1db0724a35326423f17ded4dd325a27a0c091a25080612012816147b6565b915050611f2f565b612022612c99565b80612089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261736555726920697320656d707479000000000000000000000000000000006044820152606401610ada565b600083815260116020526040902080546120a2906143cc565b159050806120b75750600d54610100900460ff165b61211d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f7420616c6c6f7720746f20666978205552490000000000000000000000006044820152606401610ada565b600083815260116020526040902061213682848361464f565b50827f59c63763a9cf2abccdc77b43ea6d322fc1e0d179371b7db510dcf8dd2ad883df8383604051610bb6929190614769565b606060078054610bd2906143cc565b8161218281612ee1565b610cd383836136f4565b600f818154811061219c57600080fd5b600091825260209091200154905081565b8373ffffffffffffffffffffffffffffffffffffffff811633146121d4576121d433612ee1565b6121e08585858561378b565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612238576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de47690602001611742565b6122b3612c99565b6000818152601560205260409020600381015461232c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b600082815260156020908152604080832083815560018082018590556002820185905560038201859055600490910184905560129092528220828155018190555b600f5481101561243357600f818154811061238a5761238a614620565b9060005260206000200154830361242157600f8054600091906123af90600190614472565b815481106123bf576123bf614620565b90600052602060002001549050600f8054806123dd576123dd6147ee565b6001900381819060005260206000200160009055905580841461241b5780600f838154811061240e5761240e614620565b6000918252602090912001555b50612433565b8061242b816147b6565b91505061236d565b5060405182907ffea395bff81083090582948d3a24cabf2c009cb69ffe4a20454ab93701ccce7090600090a25050565b61246b612c99565b6124736137f5565b804710156124dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f776974686472617720746f6f206d7563680000000000000000000000000000006044820152606401610ada565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612537576040519150601f19603f3d011682016040523d82523d6000602084013e61253c565b606091505b5050905080612577576040517f3204506f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506125826001600c55565b5050565b6060600182108061259957506004548210155b156125c65760106040516020016125b0919061481d565b6040516020818303038152906040529050919050565b60006125d183613868565b905080516000036126055760106040516020016125ee919061481d565b604051602081830303815290604052915050919050565b8061260f84613955565b6040516020016125ee9291906148d6565b50919050565b61262e612c99565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f79b91f601b72e7cc1d21e599cb657111cb87e4e5040be0561dd4b021e603cbc990602001611742565b612695612c99565b600086116126ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736561736f6e20696e76616c69640000000000000000000000000000000000006044820152606401610ada565b60038510612769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f73656c6c5479706520696e76616c6964000000000000000000000000000000006044820152606401610ada565b4282116127d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f737461727454696d6520696e76616c69640000000000000000000000000000006044820152606401610ada565b81811161283b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e76616c696400000000000000000000000000000000006044820152606401610ada565b600083116128a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600086815260156020526040902060038101541561291f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f736561736f6e20616c72656164792065786973747300000000000000000000006044820152606401610ada565b6001818101869055600282018590556003820184905560048201839055868255600f805491820181556000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018790556040805185815260208101859052908101839052869088907f6d935a787ace88345f9846f42ad8176f8d51b296554374aaa6361a520af481299060600160405180910390a350505050505050565b6129c6612c99565b600e8190556040518181527fe4e098f4df4cfec357f059a911974ecbde05871192974aa65eb3a67081e97d2c90602001611742565b612a03612c99565b73ffffffffffffffffffffffffffffffffffffffff8116612aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ada565b612aaf8161367f565b50565b8373ffffffffffffffffffffffffffffffffffffffff81163314612ad957612ad933612ee1565b60005b82811015612b1957612b078686868685818110612afb57612afb614620565b90506020020135613542565b80612b11816147b6565b915050612adc565b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480612bb457507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806109e55750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806109e557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109e5565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ecf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b6127106bffffffffffffffffffffffff82161115612dba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610ada565b73ffffffffffffffffffffffffffffffffffffffff8216612e37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610ada565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600255565b600081600111158015612ea7575060045482105b80156109e55750506000908152600860205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60015473ffffffffffffffffffffffffffffffffffffffff168015801590612f20575060008173ffffffffffffffffffffffffffffffffffffffff163b115b15612582576040517fc617113400000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015282169063c617113490604401602060405180830381865afa158015612f97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fbb919061492d565b612582576040517fede71dcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610ada565b6000613014826119b0565b90503373ffffffffffffffffffffffffffffffffffffffff82161461309d5773ffffffffffffffffffffffffffffffffffffffff81166000908152600b6020908152604080832033845290915290205460ff1661309d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613129826135b9565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613190576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a6020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761322d5773ffffffffffffffffffffffffffffffffffffffff86166000908152600b6020908152604080832033845290915290205460ff1661322d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661327a576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132878686866001613a13565b801561329257600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600860205260408120919091557c0200000000000000000000000000000000000000000000000000000000841690036133815760018401600081815260086020526040812054900361337f57600454811461337f5760008181526008602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b19565b6000826133ee8584613a80565b14949350505050565b6004546000829003613435576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134426000848385613a13565b73ffffffffffffffffffffffffffffffffffffffff831660008181526009602090815260408083208054680100000000000000018802019055848352600890915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146134fe57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016134c6565b5081600003613539576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045550505050565b610cd3838383604051806020016040528060008152506121ad565b6000613568826119b0565b90503373ffffffffffffffffffffffffffffffffffffffff821614612582576040517fe9af00d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818060011161364d5760045481101561364d57600081815260086020526040812054907c01000000000000000000000000000000000000000000000000000000008216900361364b575b8060000361364457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260086020526040902054613605565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b336000818152600b6020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613796848484610dd1565b73ffffffffffffffffffffffffffffffffffffffff83163b15610e03576137bf84848484613acd565b610e03576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600c5403613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ada565b6002600c55565b60608061387460045490565b8310156109e55760015b80841061394e57600084815260146020526040902054801561393b57600081815260116020526040902080546138b3906143cc565b80601f01602080910402602001604051908101604052809291908181526020018280546138df906143cc565b801561392c5780601f106139015761010080835404028352916020019161392c565b820191906000526020600020905b81548152906001019060200180831161390f57829003601f168201915b50939998505050505050505050565b50836139468161494a565b94505061387e565b5092915050565b6060600061396283613c47565b600101905060008167ffffffffffffffff81111561398257613982613fcd565b6040519080825280601f01601f1916602001820160405280156139ac576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846139b657509392505050565b73ffffffffffffffffffffffffffffffffffffffff841615613a7b5760008281526016602052604090205460ff1615613a7b576040517fdc8fb34100000000000000000000000000000000000000000000000000000000815260048101839052602401610ada565b610e03565b600081815b8451811015613ac557613ab182868381518110613aa457613aa4614620565b6020026020010151613d29565b915080613abd816147b6565b915050613a85565b509392505050565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613b2890339089908890889060040161497f565b6020604051808303816000875af1925050508015613b81575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613b7e918101906149c8565b60015b613bf8573d808015613baf576040519150601f19603f3d011682016040523d82523d6000602084013e613bb4565b606091505b508051600003613bf0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613c90577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613cbc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613cda57662386f26fc10000830492506010015b6305f5e1008310613cf2576305f5e100830492506008015b6127108310613d0657612710830492506004015b60648310613d18576064830492506002015b600a83106109e55760010192915050565b6000818310613d45576000828152602084905260409020613644565b5060009182526020526040902090565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612aaf57600080fd5b600060208284031215613d9557600080fd5b813561364481613d55565b73ffffffffffffffffffffffffffffffffffffffff81168114612aaf57600080fd5b60008060408385031215613dd557600080fd5b8235613de081613da0565b915060208301356bffffffffffffffffffffffff81168114613e0157600080fd5b809150509250929050565b60008060408385031215613e1f57600080fd5b50508035926020909101359150565b60005b83811015613e49578181015183820152602001613e31565b50506000910152565b60008151808452613e6a816020860160208601613e2e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136446020830184613e52565b600060208284031215613ec157600080fd5b5035919050565b60008060408385031215613edb57600080fd5b8235613ee681613da0565b946020939093013593505050565b600080600060608486031215613f0957600080fd5b8335613f1481613da0565b92506020840135613f2481613da0565b929592945050506040919091013590565b60008083601f840112613f4757600080fd5b50813567ffffffffffffffff811115613f5f57600080fd5b6020830191508360208260051b850101111561162557600080fd5b60008060008060608587031215613f9057600080fd5b8435935060208501359250604085013567ffffffffffffffff811115613fb557600080fd5b613fc187828801613f35565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561401757614017613fcd565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561405d5761405d613fcd565b8160405280935085815286868601111561407657600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156140a257600080fd5b813567ffffffffffffffff8111156140b957600080fd5b8201601f810184136140ca57600080fd5b613c3f84823560208401613ffc565b60008083601f8401126140eb57600080fd5b50813567ffffffffffffffff81111561410357600080fd5b60208301915083602082850101111561162557600080fd5b6000806020838503121561412e57600080fd5b823567ffffffffffffffff81111561414557600080fd5b614151858286016140d9565b90969095509350505050565b6000806020838503121561417057600080fd5b823567ffffffffffffffff81111561418757600080fd5b61415185828601613f35565b6000806000606084860312156141a857600080fd5b833592506020840135915060408401356141c181613da0565b809150509250925092565b6000602082840312156141de57600080fd5b813561364481613da0565b6000806000604084860312156141fe57600080fd5b83359250602084013567ffffffffffffffff81111561421c57600080fd5b614228868287016140d9565b9497909650939450505050565b8015158114612aaf57600080fd5b6000806040838503121561425657600080fd5b823561426181613da0565b91506020830135613e0181614235565b6000806000806080858703121561428757600080fd5b843561429281613da0565b935060208501356142a281613da0565b925060408501359150606085013567ffffffffffffffff8111156142c557600080fd5b8501601f810187136142d657600080fd5b6142e587823560208401613ffc565b91505092959194509250565b60006020828403121561430357600080fd5b813561364481614235565b60008060008060008060c0878903121561432757600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000806040838503121561436457600080fd5b823561436f81613da0565b91506020830135613e0181613da0565b6000806000806060858703121561439557600080fd5b84356143a081613da0565b935060208501356143b081613da0565b9250604085013567ffffffffffffffff811115613fb557600080fd5b600181811c908216806143e057607f821691505b602082108103612620577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156109e5576109e5614419565b80820281158282048414176109e5576109e5614419565b818103818111156109e5576109e5614419565b6000826144bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f821115610cd357600081815260208120601f850160051c810160208610156144e75750805b601f850160051c820191505b81811015612b19578281556001016144f3565b815167ffffffffffffffff81111561452057614520613fcd565b6145348161452e84546143cc565b846144c0565b602080601f83116001811461458757600084156145515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612b19565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156145d4578886015182559484019460019091019084016145b5565b508582101561461057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff83111561466757614667613fcd565b61467b8361467583546143cc565b836144c0565b6000601f8411600181146146cd57600085156146975750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556121e0565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561471c57868501358255602094850194600190920191016146fc565b5086821015614757577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147e7576147e7614419565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600080835461482b816143cc565b600182811680156148435760018114614876576148a5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506148a5565b8760005260208060002060005b8581101561489c5781548a820152908401908201614883565b50505082870194505b50507f302e6a736f6e0000000000000000000000000000000000000000000000000000835250506006019392505050565b600083516148e8818460208801613e2e565b8351908301906148fc818360208801613e2e565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561493f57600080fd5b815161364481614235565b60008161495957614959614419565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526149be6080830184613e52565b9695505050505050565b6000602082840312156149da57600080fd5b815161364481613d5556fea26469706673582212200a9ef7d5c552b51e35b5770a3ba08327f319f398968ba98c46f323018ac85a8564736f6c6343000813003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000aaeb6d7670e522a718067333cd4e0000000000000000000000003cc6cdda760b79bafa08df41ecfa224f810dceb60000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656961376c77356d366b6f68647669656c6d666c643237643636643761636e3233657068366f72667336616370616f6567337a6832752f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001350617274792049636f6e73202d204f4758cc850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054f4758cc85000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103085760003560e01c806370a082311161019a578063b88d4fde116100e1578063d8612ed01161008a578063f2fde38b11610064578063f2fde38b1461096a578063f3993d111461098a578063f4adc0b91461099d57600080fd5b8063d8612ed0146108d4578063dd31ee2d146108f4578063e985e9c51461091457600080fd5b8063c49bfdca116100bb578063c49bfdca14610874578063c87b56dd14610894578063d6046836146108b457600080fd5b8063b88d4fde14610821578063b8d1e53214610834578063bad715461461085457600080fd5b806395d89b4111610143578063a5a5cb5e1161011d578063a5a5cb5e146107ba578063ab7cb211146107da578063b0ccc31e146107f457600080fd5b806395d89b4114610712578063a22cb46514610727578063a43d86541461074757600080fd5b8063859610c611610174578063859610c6146106a75780638da5cb5b146106c757806390528851146106f257600080fd5b806370a082311461065d578063715018a61461067d57806376ef684f1461069257600080fd5b80632a55205a1161025e578063512507c6116102075780635d36598f116101e15780635d36598f146105fd5780636352211e1461061d578063660fe55d1461063d57600080fd5b8063512507c6146105a757806355f804b3146105c7578063589210d9146105e757600080fd5b806341e96db81161023857806341e96db81461052b57806342842e0e1461057457806343da72281461058757600080fd5b80632a55205a146104a957806332cb6b0c146104f55780633b035df61461050b57600080fd5b8063095ea7b3116102c057806318160ddd1161029a57806318160ddd1461043e57806323b872dd14610483578063290eae5e1461049657600080fd5b8063095ea7b3146103eb5780630d4eefdc146103fe5780630f9292a31461041e57600080fd5b806306ee883f116102f157806306ee883f1461036457806306fdde0314610384578063081812fc146103a657600080fd5b806301ffc9a71461030d57806302fa7c4714610342575b600080fd5b34801561031957600080fd5b5061032d610328366004613d83565b6109bc565b60405190151581526020015b60405180910390f35b34801561034e57600080fd5b5061036261035d366004613dc2565b6109eb565b005b34801561037057600080fd5b5061036261037f366004613e0c565b610a5d565b34801561039057600080fd5b50610399610bc3565b6040516103399190613e9c565b3480156103b257600080fd5b506103c66103c1366004613eaf565b610c55565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610339565b6103626103f9366004613ec8565b610cbf565b34801561040a57600080fd5b50610362610419366004613e0c565b610cd8565b34801561042a57600080fd5b50610399610439366004613eaf565b610d37565b34801561044a57600080fd5b50600554600454037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b604051908152602001610339565b610362610491366004613ef4565b610dd1565b6103626104a4366004613f7a565b610e09565b3480156104b557600080fd5b506104c96104c4366004613e0c565b611533565b6040805173ffffffffffffffffffffffffffffffffffffffff9093168352602083019190915201610339565b34801561050157600080fd5b5061047561271081565b34801561051757600080fd5b5061032d610526366004613eaf565b61162c565b34801561053757600080fd5b5061055f610546366004613eaf565b6012602052600090815260409020805460019091015482565b60408051928352602083019190915201610339565b610362610582366004613ef4565b611683565b34801561059357600080fd5b506103626105a2366004613eaf565b6116b5565b3480156105b357600080fd5b506103626105c2366004614090565b6116fe565b3480156105d357600080fd5b506103626105e236600461411b565b61174d565b3480156105f357600080fd5b50610475600e5481565b34801561060957600080fd5b5061036261061836600461415d565b6118c6565b34801561062957600080fd5b506103c6610638366004613eaf565b6119b0565b34801561064957600080fd5b50610362610658366004614193565b6119bb565b34801561066957600080fd5b506104756106783660046141cc565b611e3b565b34801561068957600080fd5b50610362611ebd565b34801561069e57600080fd5b50610362611ed1565b3480156106b357600080fd5b506103626106c236600461415d565b611f2c565b3480156106d357600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166103c6565b3480156106fe57600080fd5b5061036261070d3660046141e9565b61201a565b34801561071e57600080fd5b50610399612169565b34801561073357600080fd5b50610362610742366004614243565b612178565b34801561075357600080fd5b50610790610762366004613eaf565b6000908152601560205260409020600281015481546001830154600384015460049094015491949093921590565b6040805195865260208601949094529284019190915260608301521515608082015260a001610339565b3480156107c657600080fd5b506104756107d5366004613eaf565b61218c565b3480156107e657600080fd5b50600d5461032d9060ff1681565b34801561080057600080fd5b506001546103c69073ffffffffffffffffffffffffffffffffffffffff1681565b61036261082f366004614271565b6121ad565b34801561084057600080fd5b5061036261084f3660046141cc565b6121e7565b34801561086057600080fd5b5061036261086f366004613eaf565b6122ab565b34801561088057600080fd5b5061036261088f366004613ec8565b612463565b3480156108a057600080fd5b506103996108af366004613eaf565b612586565b3480156108c057600080fd5b506103626108cf3660046142f1565b612626565b3480156108e057600080fd5b506103626108ef36600461430e565b61268d565b34801561090057600080fd5b5061036261090f366004613eaf565b6129be565b34801561092057600080fd5b5061032d61092f366004614351565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152600b6020908152604080832093909416825291909152205460ff1690565b34801561097657600080fd5b506103626109853660046141cc565b6129fb565b61036261099836600461437f565b612ab2565b3480156109a957600080fd5b50600d5461032d90610100900460ff1681565b60006109c782612b21565b806109d657506109d682612c02565b806109e557506109e582612b21565b92915050565b6109f3612c99565b6109fd8282612d1a565b6040805173ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff831660208201527ff773a484ab95747569678715234c0fec506930c6d9279bc6e015c16b5ba6be2c910160405180910390a15050565b610a65612c99565b60008281526015602052604090206003810154610ae3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f742065786973740000000000000000000000000000000060448201526064015b60405180910390fd5b806003015482118015610af557504282115b610b81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f656e6454696d65206d757374206265206c61746572207468616e20737461727460448201527f54696d6520616e642063757272656e742074696d6500000000000000000000006064820152608401610ada565b6004810182905560405182815283907fca1e07db615a632008f04c893554fbdc7638282098d723da7fd8d13a5fa72b2c906020015b60405180910390a2505050565b606060068054610bd2906143cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfe906143cc565b8015610c4b5780601f10610c2057610100808354040283529160200191610c4b565b820191906000526020600020905b815481529060010190602001808311610c2e57829003601f168201915b5050505050905090565b6000610c6082612e93565b610c96576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600a602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b81610cc981612ee1565b610cd38383613009565b505050565b610ce0612c99565b600082815260126020526040908190208381556001018290555182907f32ea858638198fa3de6b73258d9e6fdafd92f15a6fac9a79ab2ed1b5bb45766690610d2b9084815260200190565b60405180910390a25050565b60116020526000908152604090208054610d50906143cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7c906143cc565b8015610dc95780601f10610d9e57610100808354040283529160200191610dc9565b820191906000526020600020905b815481529060010190602001808311610dac57829003601f168201915b505050505081565b8273ffffffffffffffffffffffffffffffffffffffff81163314610df857610df833612ee1565b610e0384848461311e565b50505050565b600d5460ff16610e75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6275792064697361626c656400000000000000000000000000000000000000006044820152606401610ada565b60008311610edf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600554600454612710918591037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01610f189190614448565b1115610f80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f766572206d617820737570706c7900000000000000000000000000000000006044820152606401610ada565b60008481526015602052604090206003810154610ff9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b805460021161108a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f74686520736561736f6e206973206e6f7420616c6c6f77656420746f206d696e60448201527f7420627920746869732066756e6374696f6e00000000000000000000000000006064820152608401610ada565b428160030154111580156110a2575042816004015410155b611108576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6e6f7420696e207468652073616c6520706572696f64000000000000000000006044820152606401610ada565b6000816002015411611176576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f736f6c64206f75740000000000000000000000000000000000000000000000006044820152606401610ada565b83816002015410156111e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f7567682073746f636b000000000000000000000000000000006044820152606401610ada565b348482600101546111f5919061445b565b1461125c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f6574682076616c756520696e76616c69640000000000000000000000000000006044820152606401610ada565b805433906001036113d6576000868152601260205260409020805487146112df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f77686974656c69737420736561736f6e206e6f742065786973740000000000006044820152606401610ada565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606084901b16602082015260009060340160405160208183030381529060405280519060200120905061136d8686808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050506001840154836133e1565b6113d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f6e6f7420696e207468652077686974656c6973742e00000000000000000000006044820152606401610ada565b50505b73ffffffffffffffffffffffffffffffffffffffff8116600090815260136020526040812054611407908790614448565b905080600e541015611475576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f726561636820746865206c696d697400000000000000000000000000000000006044820152606401610ada565b73ffffffffffffffffffffffffffffffffffffffff821660009081526013602052604090208190556004546114aa83886133f7565b8684600201546114ba9190614472565b60028501556000818152601460205260409020889055604080518281526020810189905290810189905273ffffffffffffffffffffffffffffffffffffffff8416907f1403b44d4d4ef3cd19c074cd3d12a67f60df5c2448b2e1bc8fec268143122db89060600160405180910390a25050505050505050565b600082815260036020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916115ee57506040805180820190915260025473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090611612906bffffffffffffffffffffffff168761445b565b61161c9190614485565b91519350909150505b9250929050565b600061163782612e93565b61166d576040517f54924a8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5060009081526016602052604090205460ff1690565b8273ffffffffffffffffffffffffffffffffffffffff811633146116aa576116aa33612ee1565b610e03848484613542565b6116bd612c99565b6000818152601260205260408082208281556001018290555182917ff70df1f7fa97f4eb369051c9ca69dc352bbc402b1412a31c692d7d8d7ed0983d91a250565b611706612c99565b60106117128282614506565b507f2141256218a539dd0c624771a2387839b1b85f4a614311b400f80968c070f24c816040516117429190613e9c565b60405180910390a150565b611755612c99565b806117bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261736555726920697320656d707479000000000000000000000000000000006044820152606401610ada565b600d54610100900460ff1661182d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f7420616c6c6f7720746f20666978205552490000000000000000000000006044820152606401610ada565b60005b600f54811015610cd3576000600f828154811061184f5761184f614620565b60009182526020808320909101548083526011909152604090912090915061187884868361464f565b50807f59c63763a9cf2abccdc77b43ea6d322fc1e0d179371b7db510dcf8dd2ad883df85856040516118ab929190614769565b60405180910390a250806118be816147b6565b915050611830565b60005b81811015610cd35760008383838181106118e5576118e5614620565b9050602002013590506118f78161355d565b60008181526016602052604090205460ff16611942576040517f1d874e6a00000000000000000000000000000000000000000000000000000000815260048101829052602401610ada565b60008181526016602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555182917f7ff05c79c2a3d239576a86d8af5c623d17e7a676e424313ca21481b15047783f91a250806119a8816147b6565b9150506118c9565b60006109e5826135b9565b6119c3612c99565b600d5460ff16611a2f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f6275792064697361626c656400000000000000000000000000000000000000006044820152606401610ada565b60008211611a99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600554600454612710918491037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611ad29190614448565b1115611b3a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6f766572206d617820737570706c7900000000000000000000000000000000006044820152606401610ada565b60008381526015602052604090206003810154611bb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b8054600214611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f74686520736561736f6e206973206e6f7420616c6c6f77656420746f206d696e60448201527f7420627920746869732066756e6374696f6e00000000000000000000000000006064820152608401610ada565b42816003015411158015611c5c575042816004015410155b611cc2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6e6f7420696e207468652073616c6520706572696f64000000000000000000006044820152606401610ada565b6000816002015411611d30576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f736f6c64206f75740000000000000000000000000000000000000000000000006044820152606401610ada565b8281600201541015611d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6e6f7420656e6f7567682073746f636b000000000000000000000000000000006044820152606401610ada565b6000611da960045490565b9050611db583856133f7565b838260020154611dc59190614472565b60028301556000818152601460205260409020859055604080518281526020810186905290810186905273ffffffffffffffffffffffffffffffffffffffff8416907f1403b44d4d4ef3cd19c074cd3d12a67f60df5c2448b2e1bc8fec268143122db89060600160405180910390a25050505050565b600073ffffffffffffffffffffffffffffffffffffffff8216611e8a576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5073ffffffffffffffffffffffffffffffffffffffff1660009081526009602052604090205467ffffffffffffffff1690565b611ec5612c99565b611ecf600061367f565b565b611ed9612c99565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690556040517f8df68e3b4ab150923d6e01683b629baa29cd4ea31122d6365718a10533089d8990600090a1565b60005b81811015610cd3576000838383818110611f4b57611f4b614620565b905060200201359050611f5d8161355d565b60008181526016602052604090205460ff1615611fa9576040517fdc8fb34100000000000000000000000000000000000000000000000000000000815260048101829052602401610ada565b60008181526016602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555182917f886574b2eee64153fbfb4ca8878ae1db0724a35326423f17ded4dd325a27a0c091a25080612012816147b6565b915050611f2f565b612022612c99565b80612089576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f6261736555726920697320656d707479000000000000000000000000000000006044820152606401610ada565b600083815260116020526040902080546120a2906143cc565b159050806120b75750600d54610100900460ff165b61211d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6e6f7420616c6c6f7720746f20666978205552490000000000000000000000006044820152606401610ada565b600083815260116020526040902061213682848361464f565b50827f59c63763a9cf2abccdc77b43ea6d322fc1e0d179371b7db510dcf8dd2ad883df8383604051610bb6929190614769565b606060078054610bd2906143cc565b8161218281612ee1565b610cd383836136f4565b600f818154811061219c57600080fd5b600091825260209091200154905081565b8373ffffffffffffffffffffffffffffffffffffffff811633146121d4576121d433612ee1565b6121e08585858561378b565b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314612238576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f9f513fe86dc42fdbac355fa4d9b1d5be7b5e6cd2df67e30db8003766568de47690602001611742565b6122b3612c99565b6000818152601560205260409020600381015461232c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f736561736f6e206e6f74206578697374000000000000000000000000000000006044820152606401610ada565b600082815260156020908152604080832083815560018082018590556002820185905560038201859055600490910184905560129092528220828155018190555b600f5481101561243357600f818154811061238a5761238a614620565b9060005260206000200154830361242157600f8054600091906123af90600190614472565b815481106123bf576123bf614620565b90600052602060002001549050600f8054806123dd576123dd6147ee565b6001900381819060005260206000200160009055905580841461241b5780600f838154811061240e5761240e614620565b6000918252602090912001555b50612433565b8061242b816147b6565b91505061236d565b5060405182907ffea395bff81083090582948d3a24cabf2c009cb69ffe4a20454ab93701ccce7090600090a25050565b61246b612c99565b6124736137f5565b804710156124dd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f776974686472617720746f6f206d7563680000000000000000000000000000006044820152606401610ada565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612537576040519150601f19603f3d011682016040523d82523d6000602084013e61253c565b606091505b5050905080612577576040517f3204506f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506125826001600c55565b5050565b6060600182108061259957506004548210155b156125c65760106040516020016125b0919061481d565b6040516020818303038152906040529050919050565b60006125d183613868565b905080516000036126055760106040516020016125ee919061481d565b604051602081830303815290604052915050919050565b8061260f84613955565b6040516020016125ee9291906148d6565b50919050565b61262e612c99565b600d80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f79b91f601b72e7cc1d21e599cb657111cb87e4e5040be0561dd4b021e603cbc990602001611742565b612695612c99565b600086116126ff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f736561736f6e20696e76616c69640000000000000000000000000000000000006044820152606401610ada565b60038510612769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f73656c6c5479706520696e76616c6964000000000000000000000000000000006044820152606401610ada565b4282116127d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f737461727454696d6520696e76616c69640000000000000000000000000000006044820152606401610ada565b81811161283b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f656e6454696d6520696e76616c696400000000000000000000000000000000006044820152606401610ada565b600083116128a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f7175616e7469747920696e76616c6964000000000000000000000000000000006044820152606401610ada565b600086815260156020526040902060038101541561291f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f736561736f6e20616c72656164792065786973747300000000000000000000006044820152606401610ada565b6001818101869055600282018590556003820184905560048201839055868255600f805491820181556000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018790556040805185815260208101859052908101839052869088907f6d935a787ace88345f9846f42ad8176f8d51b296554374aaa6361a520af481299060600160405180910390a350505050505050565b6129c6612c99565b600e8190556040518181527fe4e098f4df4cfec357f059a911974ecbde05871192974aa65eb3a67081e97d2c90602001611742565b612a03612c99565b73ffffffffffffffffffffffffffffffffffffffff8116612aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ada565b612aaf8161367f565b50565b8373ffffffffffffffffffffffffffffffffffffffff81163314612ad957612ad933612ee1565b60005b82811015612b1957612b078686868685818110612afb57612afb614620565b90506020020135613542565b80612b11816147b6565b915050612adc565b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480612bb457507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806109e55750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a0000000000000000000000000000000000000000000000000000000014806109e557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146109e5565b60005473ffffffffffffffffffffffffffffffffffffffff163314611ecf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b6127106bffffffffffffffffffffffff82161115612dba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610ada565b73ffffffffffffffffffffffffffffffffffffffff8216612e37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610ada565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600255565b600081600111158015612ea7575060045482105b80156109e55750506000908152600860205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b60015473ffffffffffffffffffffffffffffffffffffffff168015801590612f20575060008173ffffffffffffffffffffffffffffffffffffffff163b115b15612582576040517fc617113400000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015282169063c617113490604401602060405180830381865afa158015612f97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fbb919061492d565b612582576040517fede71dcc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152602401610ada565b6000613014826119b0565b90503373ffffffffffffffffffffffffffffffffffffffff82161461309d5773ffffffffffffffffffffffffffffffffffffffff81166000908152600b6020908152604080832033845290915290205460ff1661309d576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000613129826135b9565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613190576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a6020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff88169091141761322d5773ffffffffffffffffffffffffffffffffffffffff86166000908152600b6020908152604080832033845290915290205460ff1661322d576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661327a576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132878686866001613a13565b801561329257600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526009602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600860205260408120919091557c0200000000000000000000000000000000000000000000000000000000841690036133815760018401600081815260086020526040812054900361337f57600454811461337f5760008181526008602052604090208490555b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b19565b6000826133ee8584613a80565b14949350505050565b6004546000829003613435576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134426000848385613a13565b73ffffffffffffffffffffffffffffffffffffffff831660008181526009602090815260408083208054680100000000000000018802019055848352600890915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146134fe57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016134c6565b5081600003613539576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045550505050565b610cd3838383604051806020016040528060008152506121ad565b6000613568826119b0565b90503373ffffffffffffffffffffffffffffffffffffffff821614612582576040517fe9af00d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818060011161364d5760045481101561364d57600081815260086020526040812054907c01000000000000000000000000000000000000000000000000000000008216900361364b575b8060000361364457507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260086020526040902054613605565b9392505050565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b336000818152600b6020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b613796848484610dd1565b73ffffffffffffffffffffffffffffffffffffffff83163b15610e03576137bf84848484613acd565b610e03576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600c5403613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610ada565b6002600c55565b60608061387460045490565b8310156109e55760015b80841061394e57600084815260146020526040902054801561393b57600081815260116020526040902080546138b3906143cc565b80601f01602080910402602001604051908101604052809291908181526020018280546138df906143cc565b801561392c5780601f106139015761010080835404028352916020019161392c565b820191906000526020600020905b81548152906001019060200180831161390f57829003601f168201915b50939998505050505050505050565b50836139468161494a565b94505061387e565b5092915050565b6060600061396283613c47565b600101905060008167ffffffffffffffff81111561398257613982613fcd565b6040519080825280601f01601f1916602001820160405280156139ac576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846139b657509392505050565b73ffffffffffffffffffffffffffffffffffffffff841615613a7b5760008281526016602052604090205460ff1615613a7b576040517fdc8fb34100000000000000000000000000000000000000000000000000000000815260048101839052602401610ada565b610e03565b600081815b8451811015613ac557613ab182868381518110613aa457613aa4614620565b6020026020010151613d29565b915080613abd816147b6565b915050613a85565b509392505050565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613b2890339089908890889060040161497f565b6020604051808303816000875af1925050508015613b81575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613b7e918101906149c8565b60015b613bf8573d808015613baf576040519150601f19603f3d011682016040523d82523d6000602084013e613bb4565b606091505b508051600003613bf0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613c90577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613cbc576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613cda57662386f26fc10000830492506010015b6305f5e1008310613cf2576305f5e100830492506008015b6127108310613d0657612710830492506004015b60648310613d18576064830492506002015b600a83106109e55760010192915050565b6000818310613d45576000828152602084905260409020613644565b5060009182526020526040902090565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612aaf57600080fd5b600060208284031215613d9557600080fd5b813561364481613d55565b73ffffffffffffffffffffffffffffffffffffffff81168114612aaf57600080fd5b60008060408385031215613dd557600080fd5b8235613de081613da0565b915060208301356bffffffffffffffffffffffff81168114613e0157600080fd5b809150509250929050565b60008060408385031215613e1f57600080fd5b50508035926020909101359150565b60005b83811015613e49578181015183820152602001613e31565b50506000910152565b60008151808452613e6a816020860160208601613e2e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006136446020830184613e52565b600060208284031215613ec157600080fd5b5035919050565b60008060408385031215613edb57600080fd5b8235613ee681613da0565b946020939093013593505050565b600080600060608486031215613f0957600080fd5b8335613f1481613da0565b92506020840135613f2481613da0565b929592945050506040919091013590565b60008083601f840112613f4757600080fd5b50813567ffffffffffffffff811115613f5f57600080fd5b6020830191508360208260051b850101111561162557600080fd5b60008060008060608587031215613f9057600080fd5b8435935060208501359250604085013567ffffffffffffffff811115613fb557600080fd5b613fc187828801613f35565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561401757614017613fcd565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561405d5761405d613fcd565b8160405280935085815286868601111561407657600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156140a257600080fd5b813567ffffffffffffffff8111156140b957600080fd5b8201601f810184136140ca57600080fd5b613c3f84823560208401613ffc565b60008083601f8401126140eb57600080fd5b50813567ffffffffffffffff81111561410357600080fd5b60208301915083602082850101111561162557600080fd5b6000806020838503121561412e57600080fd5b823567ffffffffffffffff81111561414557600080fd5b614151858286016140d9565b90969095509350505050565b6000806020838503121561417057600080fd5b823567ffffffffffffffff81111561418757600080fd5b61415185828601613f35565b6000806000606084860312156141a857600080fd5b833592506020840135915060408401356141c181613da0565b809150509250925092565b6000602082840312156141de57600080fd5b813561364481613da0565b6000806000604084860312156141fe57600080fd5b83359250602084013567ffffffffffffffff81111561421c57600080fd5b614228868287016140d9565b9497909650939450505050565b8015158114612aaf57600080fd5b6000806040838503121561425657600080fd5b823561426181613da0565b91506020830135613e0181614235565b6000806000806080858703121561428757600080fd5b843561429281613da0565b935060208501356142a281613da0565b925060408501359150606085013567ffffffffffffffff8111156142c557600080fd5b8501601f810187136142d657600080fd5b6142e587823560208401613ffc565b91505092959194509250565b60006020828403121561430357600080fd5b813561364481614235565b60008060008060008060c0878903121561432757600080fd5b505084359660208601359650604086013595606081013595506080810135945060a0013592509050565b6000806040838503121561436457600080fd5b823561436f81613da0565b91506020830135613e0181613da0565b6000806000806060858703121561439557600080fd5b84356143a081613da0565b935060208501356143b081613da0565b9250604085013567ffffffffffffffff811115613fb557600080fd5b600181811c908216806143e057607f821691505b602082108103612620577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156109e5576109e5614419565b80820281158282048414176109e5576109e5614419565b818103818111156109e5576109e5614419565b6000826144bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b601f821115610cd357600081815260208120601f850160051c810160208610156144e75750805b601f850160051c820191505b81811015612b19578281556001016144f3565b815167ffffffffffffffff81111561452057614520613fcd565b6145348161452e84546143cc565b846144c0565b602080601f83116001811461458757600084156145515750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612b19565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156145d4578886015182559484019460019091019084016145b5565b508582101561461057878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff83111561466757614667613fcd565b61467b8361467583546143cc565b836144c0565b6000601f8411600181146146cd57600085156146975750838201355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b1c1916600186901b1783556121e0565b6000838152602090207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0861690835b8281101561471c57868501358255602094850194600190920191016146fc565b5086821015614757577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88860031b161c19848701351681555b505060018560011b0183555050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147e7576147e7614419565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b600080835461482b816143cc565b600182811680156148435760018114614876576148a5565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841687528215158302870194506148a5565b8760005260208060002060005b8581101561489c5781548a820152908401908201614883565b50505082870194505b50507f302e6a736f6e0000000000000000000000000000000000000000000000000000835250506006019392505050565b600083516148e8818460208801613e2e565b8351908301906148fc818360208801613e2e565b7f2e6a736f6e0000000000000000000000000000000000000000000000000000009101908152600501949350505050565b60006020828403121561493f57600080fd5b815161364481614235565b60008161495957614959614419565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526149be6080830184613e52565b9695505050505050565b6000602082840312156149da57600080fd5b815161364481613d5556fea26469706673582212200a9ef7d5c552b51e35b5770a3ba08327f319f398968ba98c46f323018ac85a8564736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000aaeb6d7670e522a718067333cd4e0000000000000000000000003cc6cdda760b79bafa08df41ecfa224f810dceb60000000000000000000000000000000000000000000000000000000000000043697066733a2f2f6261667962656961376c77356d366b6f68647669656c6d666c643237643636643761636e3233657068366f72667336616370616f6567337a6832752f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001350617274792049636f6e73202d204f4758cc850000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054f4758cc85000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : hiddenMetadataURI (string): ipfs://bafybeia7lw5m6kohdvielmfld27d66d7acn23eph6orfs6acpaoeg3zh2u/
Arg [1] : name (string): Party Icons - OGX̅
Arg [2] : symbol (string): OGX̅
Arg [3] : filterRegistry (address): 0x000000000000AAeB6D7670E522A718067333cd4E
Arg [4] : subscribeRegistry (address): 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6
-----Encoded View---------------
13 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [3] : 000000000000000000000000000000000000aaeb6d7670e522a718067333cd4e
Arg [4] : 0000000000000000000000003cc6cdda760b79bafa08df41ecfa224f810dceb6
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [6] : 697066733a2f2f6261667962656961376c77356d366b6f68647669656c6d666c
Arg [7] : 643237643636643761636e3233657068366f72667336616370616f6567337a68
Arg [8] : 32752f0000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [10] : 50617274792049636f6e73202d204f4758cc8500000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [12] : 4f4758cc85000000000000000000000000000000000000000000000000000000
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.