ETH Price: $3,347.83 (-1.21%)

Contract

0x2D4609f9d1A211b4a01e8D845d7Bf72F39DbEe1a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...170372192023-04-13 7:32:23626 days ago1681371143IN
0x2D4609f9...F39DbEe1a
0 ETH0.000637126.35386024
Set Approval For...170282922023-04-12 0:10:35627 days ago1681258235IN
0x2D4609f9...F39DbEe1a
0 ETH0.0005968424.68847154
Transfer From169595362023-04-02 6:07:35637 days ago1680415655IN
0x2D4609f9...F39DbEe1a
0 ETH0.0012620618.9
Transfer From169595322023-04-02 6:06:47637 days ago1680415607IN
0x2D4609f9...F39DbEe1a
0 ETH0.0009292519.95
Transfer From169595282023-04-02 6:05:59637 days ago1680415559IN
0x2D4609f9...F39DbEe1a
0 ETH0.0011760217.85
Transfer From169595212023-04-02 6:04:35637 days ago1680415475IN
0x2D4609f9...F39DbEe1a
0 ETH0.0014298621
Transfer From169595152023-04-02 6:03:11637 days ago1680415391IN
0x2D4609f9...F39DbEe1a
0 ETH0.0009781521
Transfer From169589472023-04-02 4:08:23637 days ago1680408503IN
0x2D4609f9...F39DbEe1a
0 ETH0.0017102718.9
Transfer From169569262023-04-01 21:20:11637 days ago1680384011IN
0x2D4609f9...F39DbEe1a
0 ETH0.0017256623.1
Transfer From169569222023-04-01 21:19:23637 days ago1680383963IN
0x2D4609f9...F39DbEe1a
0 ETH0.0008803418.9
Transfer From169567672023-04-01 20:47:59637 days ago1680382079IN
0x2D4609f9...F39DbEe1a
0 ETH0.0020392221
Transfer From169567612023-04-01 20:46:47637 days ago1680382007IN
0x2D4609f9...F39DbEe1a
0 ETH0.0015450619
Transfer From169463462023-03-31 9:38:23639 days ago1680255503IN
0x2D4609f9...F39DbEe1a
0 ETH0.002543330.45
Transfer From167823412023-03-08 8:25:59662 days ago1678263959IN
0x2D4609f9...F39DbEe1a
0 ETH0.0012176121.48030872
Set Approval For...166317162023-02-15 4:19:47683 days ago1676434787IN
0x2D4609f9...F39DbEe1a
0 ETH0.001480632.0762123
Set Approval For...166316962023-02-15 4:15:47683 days ago1676434547IN
0x2D4609f9...F39DbEe1a
0 ETH0.0014874732.22507174
Set Approval For...165706142023-02-06 15:22:59692 days ago1675696979IN
0x2D4609f9...F39DbEe1a
0 ETH0.0015142132.85566979
Withdraw163764652023-01-10 12:39:59719 days ago1673354399IN
0x2D4609f9...F39DbEe1a
0 ETH0.0005386715.02129601
Set Approval For...163737062023-01-10 3:26:11719 days ago1673321171IN
0x2D4609f9...F39DbEe1a
0 ETH0.0009119119.75091289
Set Approval For...163350562023-01-04 17:56:23724 days ago1672854983IN
0x2D4609f9...F39DbEe1a
0 ETH0.0010706523.23112765
Set Approval For...162909372022-12-29 14:13:11731 days ago1672323191IN
0x2D4609f9...F39DbEe1a
0 ETH0.0007759516.83677779
Set Approval For...162271862022-12-20 16:45:11740 days ago1671554711IN
0x2D4609f9...F39DbEe1a
0 ETH0.0008341618.09979423
Set Approval For...162258862022-12-20 12:24:11740 days ago1671539051IN
0x2D4609f9...F39DbEe1a
0 ETH0.0009859521.39334527
Toggle Status162089062022-12-18 3:31:23742 days ago1671334283IN
0x2D4609f9...F39DbEe1a
0 ETH0.0004670917.62966444
Mint162035442022-12-17 9:32:59743 days ago1671269579IN
0x2D4609f9...F39DbEe1a
0 ETH0.0013498513.92062278
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ShitCup

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 14 : ShitCup.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";

error ErrorNotStarted();
error ErrorRevealSeedAlreadySet();
error ErrorNotRevealedYet();
error ErrorTokenAlreadyRedeemed();

contract ShitCup is ERC721AQueryable, ERC2981, Ownable {
    uint8 public constant TEAM_COUNT = 32;
    address public immutable SHIT_COIN;
    uint256 public immutable SHIT_PRICE;

    bool public _started;
    uint256 public _revealSeed;

    // prettier-ignore
    string[32] private _teamNames = [
        "Qatar", "Ecuador", "Senegal", "The Netherlands",
        "England", "IR Iran", "USA", "Wales",
        "Argentina", "Saudi Arabia", "Mexico", "Poland",
        "France", "Australia", "Denmark", "Tunisia",
        "Spain", "Costa Rica", "Germany", "Japan",
        "Belgium", "Canada", "Morocco", "Croatia",
        "Brazil", "Serbia", "Switzerland", "Cameroon",
        "Portugal", "Ghana", "Uruguay", "Korea Republic"
    ];
    uint256 public _teamNameRemapping;

    constructor(address shitCoin, uint256 shitPrice) ERC721A("Shit Cup", "sc") {
        SHIT_COIN = shitCoin;
        SHIT_PRICE = shitPrice;

        setFee(msg.sender, 750);
    }

    function mint(uint256 amount) external {
        if (!_started) revert ErrorNotStarted();

        IERC20(SHIT_COIN).transferFrom(msg.sender, address(this), SHIT_PRICE * amount);

        uint256 startTokenId = totalSupply();
        _mint(msg.sender, amount);
        uint24 individualSeed = uint24(uint256(keccak256(abi.encode(block.number, msg.sender))));
        _setExtraDataAt(startTokenId, individualSeed);
    }

    function _extraData(address, address, uint24 prev) internal pure override returns (uint24) {
        return prev;
    }

    function _actualTeamId(uint256 tokenId) public view returns (uint8) {
        if (_revealSeed == 0x0) revert ErrorNotRevealedYet();

        return uint8(_teamNameRemapping >> (_teamId(tokenId) * 8));
    }

    function _teamId(uint256 tokenId) public view returns (uint8) {
        return uint8(uint256(keccak256(abi.encode(_ownershipOf(tokenId).extraData, tokenId)))) % TEAM_COUNT;
    }

    function _teamId(uint24 invidualSeed, uint256 tokenId) internal pure returns (uint8) {
        return uint8(uint256(keccak256(abi.encode(invidualSeed, tokenId)))) % TEAM_COUNT;
    }

    function toggleStatus() external onlyOwner {
        _started = !_started;
    }

    function setRevealSeed() external onlyOwner {
        if (_revealSeed != 0) revert ErrorRevealSeedAlreadySet();

        uint256 seed = uint256(keccak256(abi.encode(blockhash(block.number - 1), block.timestamp)));
        _revealSeed = seed;

        unchecked {
            uint8[32] memory teamIdRemappingKeys;
            for (uint256 i = 0; i < TEAM_COUNT; i++) teamIdRemappingKeys[i] = uint8(i);

            for (uint256 i = 0; i < TEAM_COUNT; i++) {
                uint256 j = (seed >> (i * 8)) % TEAM_COUNT;
                if (i != j) {
                    uint8 tmp = teamIdRemappingKeys[i];
                    teamIdRemappingKeys[i] = teamIdRemappingKeys[j];
                    teamIdRemappingKeys[j] = tmp;
                }
            }

            uint256 teamNameRemapping = 0;
            for (uint256 i = 0; i < TEAM_COUNT; i++) {
                teamNameRemapping = (teamNameRemapping << 8) | uint8(teamIdRemappingKeys[i]);
            }

            _teamNameRemapping = teamNameRemapping;
        }
    }

    function withdraw(address to) external onlyOwner {
        IERC20(SHIT_COIN).transfer(to, IERC20(SHIT_COIN).balanceOf(address(this)));
    }

    function tokenURI(uint256 tokenId) public view virtual override(ERC721A) returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        bytes memory dataURI;
        if (_revealSeed != 0x0) {
            uint8 teamId = _actualTeamId(tokenId);
            string memory teamName = _teamNames[teamId];

            // prettier-ignore
            dataURI = abi.encodePacked('{',
                '"name": "', 'Shit Cup 2022: ', teamName, '", ',
                '"image": "ipfs://bafybeibyzzjkisq3muwyidp3nibc75g56cm5hrjhne2zsl2d6raq4pagxm/', _toString(teamId), '.png", ',
                '"attributes": [{"trait_type": "Team", "value": "', teamName, '"}]',
                '}');
        } else {
            uint8 teamId = _teamId(tokenId) + 1;

            // prettier-ignore
            dataURI = abi.encodePacked('{',
                '"name": "', 'Shit Cup 2022: Team ', _toString(teamId), '", ',
                '"image": "ipfs://bafybeidmbiqefkmh3ktlzk7pe62kchj4gnhir6wcx6idapkidee6r663zm", ',
                '"attributes": [{"trait_type": "Team (Unrevealed)", "value": "Team ', _toString(teamId), '"}]',
                '}');
        }

        return string(abi.encodePacked("data:application/json;base64,", Base64.encode(dataURI)));
    }

    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC2981, ERC721A) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || ERC721A.supportsInterface(interfaceId);
    }

    function setFee(address feeRecipient, uint96 feeNumerator) public onlyOwner {
        _setDefaultRoyalty(feeRecipient, feeNumerator);
    }

    function countByTeam() external view returns (uint256[TEAM_COUNT] memory) {
        uint256 totalCount = totalSupply();
        uint256[TEAM_COUNT] memory teamCount;

        unchecked {
            for (uint256 i = 0; i < totalCount; i++) teamCount[_actualTeamId(i)]++;
        }

        return teamCount;
    }
}

File 2 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 14 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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)
        external
        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:
     *
     * - `tokenId` must be already minted.
     * - `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];
    }
}

File 4 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 14 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 6 of 14 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721A Queryable
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *   - `extraData` = `0`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *   - `extraData` = `<Extra data when token was burned>`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     *   - `extraData` = `<Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 7 of 14 : Context.sol
// 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;
    }
}

File 8 of 14 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./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 payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 9 of 14 : ERC165.sol
// 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;
    }
}

File 10 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 11 of 14 : IERC165.sol
// 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);
}

File 12 of 14 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721AQueryable compliant contract.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *   - `addr` = `address(0)`
     *   - `startTimestamp` = `0`
     *   - `burned` = `false`
     *
     * If the `tokenId` is burned:
     *   - `addr` = `<Address of owner before token was burned>`
     *   - `startTimestamp` = `<Timestamp when token was burned>`
     *   - `burned = `true`
     *
     * Otherwise:
     *   - `addr` = `<Address of owner>`
     *   - `startTimestamp` = `<Timestamp of start of ownership>`
     *   - `burned = `false`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start` < `stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(totalSupply) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K pfp collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 13 of 14 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev ERC721 token receiver interface.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard,
 * including the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at `_startTokenId()`
 * (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // 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 tokenId of the next token 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 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * @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 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 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 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 returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    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: 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.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view 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 {
        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;
    }

    /**
     * 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 ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * 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);
    }

    /**
     * Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @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 See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _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 '';
    }

    /**
     * @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))
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _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 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 {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` 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 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

            _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 {
        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 Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    /**
     * @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`.
     */
    function _isOwnerOrApproved(
        address approvedAddress,
        address from,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
            from := and(from, BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, BITMASK_ADDRESS)
            // `msgSender == from || msgSender == approvedAddress`.
            result := or(eq(msgSender, from), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isOwnerOrApproved(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 `_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) = _getApprovedAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isOwnerOrApproved(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++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try 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))
                }
            }
        }
    }

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        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 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;
    }

    /**
     * @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 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 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 returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

            // Cache the end of the memory to calculate the length later.
            let end := ptr

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for {
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp {
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } {
                // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }

            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

File 14 of 14 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * 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();

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set through `_extraData`.
        uint24 extraData;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

    // ==============================
    //            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);

    // ==============================
    //            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`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev 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 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"shitCoin","type":"address"},{"internalType":"uint256","name":"shitPrice","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"ErrorNotRevealedYet","type":"error"},{"inputs":[],"name":"ErrorNotStarted","type":"error"},{"inputs":[],"name":"ErrorRevealSeedAlreadySet","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"SHIT_COIN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHIT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_COUNT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"_actualTeamId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_revealSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"_teamId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_teamNameRemapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"countByTeam","outputs":[{"internalType":"uint256[32]","name":"","type":"uint256[32]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setRevealSeed","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":[],"name":"toggleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60056104c08181526428b0ba30b960d91b6104e05260c090815260076105008181526622b1bab0b237b960c91b6105205260e0526105408181526614d95b9959d85b60ca1b6105605261010052600f6105809081526e546865204e65746865726c616e647360881b6105a052610120526105c081815266115b99db185b9960ca1b6105e052610140526106008181526624a91024b930b760c91b610620526101605260036106409081526255534160e81b61066052610180526106808381526457616c657360d81b6106a0526101a05260096106c081815268417267656e74696e6160b81b6106e0526101c052600c6107008181526b53617564692041726162696160a01b610720526101e0526006610740818152654d657869636f60d01b610760526102005261078081815265141bdb185b9960d21b6107a052610220526107c0818152654672616e636560d01b6107e05261024052610800928352684175737472616c696160b81b61082052610260929092526108408381526644656e6d61726b60c81b61086052610280526108808381526654756e6973696160c81b6108a0526102a0526108c08581526429b830b4b760d91b6108e0526102c052600a61090090815269436f737461205269636160b01b610920526102e052610940838152664765726d616e7960c81b6109605261030052610980858152642530b830b760d91b6109a052610320526109c08381526642656c6769756d60c81b6109e05261034052610a008281526543616e61646160d01b610a205261036052610a40838152664d6f726f63636f60c81b610a605261038052610a808381526643726f6174696160c81b610aa0526103a052610ac082815265109c985e9a5b60d21b610ae0526103c052610b009182526553657262696160d01b610b20526103e091909152600b610b409081526a14ddda5d1e995c9b185b9960aa1b610b6052610400526008610b808181526721b0b6b2b937b7b760c11b610ba05261042052610bc090815267141bdc9d1d59d85b60c21b610be05261044052610c00938452644768616e6160d81b610c205261046093909352610c40908152665572756775617960c81b610c605261048052610cc0604052600e610c809081526d4b6f7265612052657075626c696360901b610ca0526104a0526200035f91906020620005f7565b503480156200036d57600080fd5b50604051620039bd380380620039bd833981016040819052620003909162000753565b60405180604001604052806008815260200167053686974204375760c41b81525060405180604001604052806002815260200161736360f01b8152508160029080519060200190620003e49291906200064e565b508051620003fa9060039060208401906200064e565b505060008055506200040c3362000434565b6001600160a01b03821660805260a08190526200042c336102ee62000486565b5050620007cc565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a546001600160a01b03163314620004e65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b620004f28282620004f6565b5050565b6127106001600160601b0382161115620005665760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620004dd565b6001600160a01b038216620005be5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620004dd565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b82602081019282156200063c579160200282015b828111156200063c57825180516200062b9184916020909101906200064e565b50916020019190600101906200060b565b506200064a929150620006d9565b5090565b8280546200065c906200078f565b90600052602060002090601f016020900481019282620006805760008555620006cb565b82601f106200069b57805160ff1916838001178555620006cb565b82800160010185558215620006cb579182015b82811115620006cb578251825591602001919060010190620006ae565b506200064a929150620006fa565b808211156200064a576000620006f0828262000711565b50600101620006d9565b5b808211156200064a5760008155600101620006fb565b5080546200071f906200078f565b6000825580601f1062000730575050565b601f016020900490600052602060002090810190620007509190620006fa565b50565b600080604083850312156200076757600080fd5b82516001600160a01b03811681146200077f57600080fd5b6020939093015192949293505050565b600181811c90821680620007a457607f821691505b60208210811415620007c657634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516131b662000807600039600081816103ba015261156c01526000818161030b01528181610ce2015261153f01526131b66000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806367858b1811610145578063a22cb465116100bd578063c87b56dd1161008c578063e338a62811610071578063e338a6281461054f578063e985e9c514610562578063f2fde38b1461059e57600080fd5b8063c87b56dd14610533578063da308abf1461054657600080fd5b8063a22cb465146104e5578063b88d4fde146104f8578063c02857bd1461050b578063c23dc68f1461051357600080fd5b80638462151c1161011457806395d89b41116100f957806395d89b41146104b757806399a2557a146104bf578063a0712d68146104d257600080fd5b80638462151c146104865780638da5cb5b146104a657600080fd5b806367858b181461045057806369393a771461046357806370a082311461046b578063715018a61461047e57600080fd5b8063263df1d1116101d85780634df22a54116101a757806356170ad51161018c57806356170ad5146104145780635bbb21771461041d5780636352211e1461043d57600080fd5b80634df22a54146103dc57806351cff8d91461040157600080fd5b8063263df1d1146103565780632a55205a1461037057806342842e0e146103a257806348f81328146103b557600080fd5b80630948de591161022f5780630b5d5a44116102145780630b5d5a441461030657806318160ddd1461032d57806323b872dd1461034357600080fd5b80630948de59146102de578063095ea7b3146102f357600080fd5b806301ffc9a71461026157806305c676341461028957806306fdde031461029e578063081812fc146102b3575b600080fd5b61027461026f366004612584565b6105b1565b60405190151581526020015b60405180910390f35b61029161060d565b60405161028091906125a1565b6102a6610671565b604051610280919061262f565b6102c66102c1366004612642565b610703565b6040516001600160a01b039091168152602001610280565b6102f16102ec366004612677565b610760565b005b6102f16103013660046126bf565b6107e7565b6102c67f000000000000000000000000000000000000000000000000000000000000000081565b600154600054035b604051908152602001610280565b6102f16103513660046126e9565b6108d5565b61035e602081565b60405160ff9091168152602001610280565b61038361037e366004612725565b610b43565b604080516001600160a01b039093168352602083019190915201610280565b6102f16103b03660046126e9565b610c20565b6103357f000000000000000000000000000000000000000000000000000000000000000081565b600a546102749074010000000000000000000000000000000000000000900460ff1681565b6102f161040f366004612747565b610c40565b610335600b5481565b61043061042b3660046127c2565b610de6565b6040516102809190612868565b6102c661044b366004612642565b610ed2565b61035e61045e366004612642565b610edd565b6102f1610f3f565b610335610479366004612747565b61114b565b6102f16111b3565b610499610494366004612747565b611233565b60405161028091906128e5565b600a546001600160a01b03166102c6565b6102a661133b565b6104996104cd36600461291d565b61134a565b6102f16104e0366004612642565b6114e1565b6102f16104f336600461295e565b61166f565b6102f161050636600461298a565b61173c565b6102f161179f565b610526610521366004612642565b611860565b6040516102809190612a4a565b6102a6610541366004612642565b6118d8565b610335602c5481565b61035e61055d366004612642565b611a92565b610274610570366004612a8f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102f16105ac366004612747565b611ade565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610607575061060782611bf4565b92915050565b610615612537565b60006106246001546000540390565b905061062e612537565b60005b8281101561066a578161064382610edd565b60ff166020811061065657610656612ac2565b602002018051600190810190915201610631565b5092915050565b60606002805461068090612af1565b80601f01602080910402602001604051908101604052809291908181526020018280546106ac90612af1565b80156106f95780601f106106ce576101008083540402835291602001916106f9565b820191906000526020600020905b8154815290600101906020018083116106dc57829003601f168201915b5050505050905090565b600061070e82611cd5565b610744576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600a546001600160a01b031633146107d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107e38282611d15565b5050565b60006107f282610ed2565b9050336001600160a01b03821614610861576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610861576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006108e082611e74565b9050836001600160a01b0316816001600160a01b03161461092d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176109b0576001600160a01b038616600090815260076020908152604080832033845290915290205460ff166109b0576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166109f0576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156109fb57600082555b6001600160a01b0386811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b7fffffff0000000000000000000000000000000000000000000000000000000000851617177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260409020557c02000000000000000000000000000000000000000000000000000000008316610afa5760018401600081815260046020526040902054610af8576000548114610af85760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610be45750604080518082019091526008546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c08906bffffffffffffffffffffffff1687612b74565b610c129190612be0565b915196919550909350505050565b610c3b8383836040518060200160405280600081525061173c565b505050565b600a546001600160a01b03163314610cb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f9190612bf4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dc2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e39190612c0d565b805160609060008167ffffffffffffffff811115610e0657610e06612762565b604051908082528060200260200182016040528015610e7657816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610e245790505b50905060005b828114610eca57610ea5858281518110610e9857610e98612ac2565b6020026020010151611860565b828281518110610eb757610eb7612ac2565b6020908102919091010152600101610e7c565b509392505050565b600061060782611e74565b6000600b5460001415610f1c576040517f8a96beb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f2582611a92565b610f30906008612c2a565b60ff16602c54901c9050919050565b600a546001600160a01b03163314610fb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b600b5415610fed576040517fc198dfdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610ffa600143612c53565b6040805191406020830152429082015260600160408051601f198184030181529190528051602090910120600b8190559050611034612537565b60005b6020811015611068578082826020811061105357611053612ac2565b60ff9092166020929092020152600101611037565b5060005b602081101561110657601f6008820284901c168082146110fd57600083836020811061109a5761109a612ac2565b602002015190508382602081106110b3576110b3612ac2565b60200201518484602081106110ca576110ca612ac2565b602002019060ff16908160ff1681525050808483602081106110ee576110ee612ac2565b60ff9092166020929092020152505b5060010161106c565b506000805b60208110156111435782816020811061112657611126612ac2565b602002015160ff16600883901b179150808060010191505061110b565b50602c555050565b60006001600160a01b03821661118d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b600a546001600160a01b03163314611227576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6112316000611f25565b565b606060008060006112438561114b565b905060008167ffffffffffffffff81111561126057611260612762565b604051908082528060200260200182016040528015611289578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b83861461132f576112c181611f8f565b91508160400151156112d257611327565b81516001600160a01b0316156112e757815194505b876001600160a01b0316856001600160a01b03161415611327578083878060010198508151811061131a5761131a612ac2565b6020026020010181815250505b6001016112b1565b50909695505050505050565b60606003805461068090612af1565b6060818310611385576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061139160005490565b90508084111561139f578093505b60006113aa8761114b565b9050848610156113c957858503818110156113c3578091505b506113cd565b5060005b60008167ffffffffffffffff8111156113e8576113e8612762565b604051908082528060200260200182016040528015611411578160200160208202803683370190505b509050816114245793506114da92505050565b600061142f88611860565b905060008160400151611440575080515b885b8881141580156114525750848714155b156114ce5761146081611f8f565b9250826040015115611471576114c6565b82516001600160a01b03161561148657825191505b8a6001600160a01b0316826001600160a01b031614156114c657808488806001019950815181106114b9576114b9612ac2565b6020026020010181815250505b600101611442565b50505092835250909150505b9392505050565b600a5474010000000000000000000000000000000000000000900460ff16611535576040517f483300ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166323b872dd3330611590857f0000000000000000000000000000000000000000000000000000000000000000612b74565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156115fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116209190612c0d565b5060006116306001546000540390565b905061163c3383612027565b6040805143602080830191909152338284015282518083038401815260609092019092528051910120610c3b8282612137565b6001600160a01b0382163314156116b2576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6117478484846108d5565b6001600160a01b0383163b1561179957611763848484846121b8565b611799576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b600a546001600160a01b03163314611813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116740100000000000000000000000000000000000000009182900460ff1615909102179055565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905290915060005483106118b45792915050565b6118bd83611f8f565b90508060400151156118cf5792915050565b6114da83612303565b60606118e382611cd5565b611919576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600b54600014611a0e57600061193084610edd565b90506000600c8260ff166020811061194a5761194a612ac2565b01805461195690612af1565b80601f016020809104026020016040519081016040528092919081815260200182805461198290612af1565b80156119cf5780601f106119a4576101008083540402835291602001916119cf565b820191906000526020600020905b8154815290600101906020018083116119b257829003601f168201915b50505050509050806119e38360ff16612394565b826040516020016119f693929190612c86565b60405160208183030381529060405292505050611a62565b6000611a1984611a92565b611a24906001612e9f565b9050611a328160ff16612394565b611a3e8260ff16612394565b604051602001611a4f929190612ec4565b6040516020818303038152906040529150505b611a6b816123e3565b604051602001611a7b9190613072565b604051602081830303815290604052915050919050565b60006020611a9f83612303565b6060908101516040805162ffffff90921660208301528101859052016040516020818303038152906040528051906020012060001c61060791906130b7565b600a546001600160a01b03163314611b52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6001600160a01b038116611be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107d0565b611bf181611f25565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480611c8757507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106075750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008054821080156106075750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b6127106bffffffffffffffffffffffff82161115611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084016107d0565b6001600160a01b038216611e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107d0565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600855565b600081600054811015611ef3576000818152600460205260409020547c01000000000000000000000000000000000000000000000000000000008116611ef1575b806114da57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020526040902054611eb5565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461060790604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6000546001600160a01b03831661206a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816120a1576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106120eb5760005550505050565b6000828152600460205260409020548061217c576040517ed5815300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600460205260409092207cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9290921660e89190911b179055565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a02906122069033908990889088906004016130d9565b6020604051808303816000875af1925050508015612241575060408051601f3d908101601f1916820190925261223e9181019061310b565b60015b6122b5573d80801561226f576040519150601f19603f3d011682016040523d82523d6000602084013e612274565b606091505b5080516122ad576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261060761233383611e74565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b604080516080810191829052607f0190826030600a8206018353600a90045b80156123d157600183039250600a81066030018353600a90046123b3565b50819003601f19909101908152919050565b606081516000141561240357505060408051602081019091526000815290565b600060405180606001604052806040815260200161314160409139905060006003845160026124329190613128565b61243c9190612be0565b612447906004612b74565b67ffffffffffffffff81111561245f5761245f612762565b6040519080825280601f01601f191660200182016040528015612489576020820181803683370190505b509050600182016020820185865187015b808210156124f5576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061249a565b505060038651066001811461251157600281146125245761252c565b603d6001830353603d600283035361252c565b603d60018303535b509195945050505050565b6040518061040001604052806020906020820280368337509192915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611bf157600080fd5b60006020828403121561259657600080fd5b81356114da81612556565b6104008101818360005b60208082106125ba57506125ce565b8251845292830192909101906001016125ab565b50505092915050565b60005b838110156125f25781810151838201526020016125da565b838111156117995750506000910152565b6000815180845261261b8160208601602086016125d7565b601f01601f19169290920160200192915050565b6020815260006114da6020830184612603565b60006020828403121561265457600080fd5b5035919050565b80356001600160a01b038116811461267257600080fd5b919050565b6000806040838503121561268a57600080fd5b6126938361265b565b915060208301356bffffffffffffffffffffffff811681146126b457600080fd5b809150509250929050565b600080604083850312156126d257600080fd5b6126db8361265b565b946020939093013593505050565b6000806000606084860312156126fe57600080fd5b6127078461265b565b92506127156020850161265b565b9150604084013590509250925092565b6000806040838503121561273857600080fd5b50508035926020909101359150565b60006020828403121561275957600080fd5b6114da8261265b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156127ba576127ba612762565b604052919050565b600060208083850312156127d557600080fd5b823567ffffffffffffffff808211156127ed57600080fd5b818501915085601f83011261280157600080fd5b81358181111561281357612813612762565b8060051b9150612824848301612791565b818152918301840191848101908884111561283e57600080fd5b938501935b8385101561285c57843582529385019390850190612843565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561132f576128d28385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612884565b6020808252825182820181905260009190848201906040850190845b8181101561132f57835183529284019291840191600101612901565b60008060006060848603121561293257600080fd5b61293b8461265b565b95602085013595506040909401359392505050565b8015158114611bf157600080fd5b6000806040838503121561297157600080fd5b61297a8361265b565b915060208301356126b481612950565b600080600080608085870312156129a057600080fd5b6129a98561265b565b935060206129b881870161265b565b935060408601359250606086013567ffffffffffffffff808211156129dc57600080fd5b818801915088601f8301126129f057600080fd5b813581811115612a0257612a02612762565b612a1484601f19601f84011601612791565b91508082528984828501011115612a2a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610607565b60008060408385031215612aa257600080fd5b612aab8361265b565b9150612ab96020840161265b565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680612b0557607f821691505b60208210811415612b3f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bac57612bac612b45565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612bef57612bef612bb1565b500490565b600060208284031215612c0657600080fd5b5051919050565b600060208284031215612c1f57600080fd5b81516114da81612950565b600060ff821660ff84168160ff0481118215151615612c4b57612c4b612b45565b029392505050565b600082821015612c6557612c65612b45565b500390565b60008151612c7c8185602086016125d7565b9290920192915050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2022000000000000000000000000000000000000000000000060018201527f536869742043757020323032323a200000000000000000000000000000000000600a82015260008451612d0a8160198501602089016125d7565b7f222c2000000000000000000000000000000000000000000000000000000000006019918401918201527f22696d616765223a2022697066733a2f2f6261667962656962797a7a6a6b6973601c8201527f71336d757779696470336e6962633735673536636d3568726a686e65327a736c603c8201527f32643672617134706167786d2f00000000000000000000000000000000000000605c8201528451612db98160698401602089016125d7565b7f2e706e67222c2000000000000000000000000000000000000000000000000000910160698101919091527f2261747472696275746573223a205b7b2274726169745f74797065223a20225460708201527f65616d222c202276616c7565223a2022000000000000000000000000000000006090820152612e95612e6c612e4360a0840187612c6a565b7f227d5d0000000000000000000000000000000000000000000000000000000000815260030190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9695505050505050565b600060ff821660ff84168060ff03821115612ebc57612ebc612b45565b019392505050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2022000000000000000000000000000000000000000000000060018201527f536869742043757020323032323a205465616d20000000000000000000000000600a82015260008351612f4881601e8501602088016125d7565b7f222c200000000000000000000000000000000000000000000000000000000000601e918401918201527f22696d616765223a2022697066733a2f2f62616679626569646d62697165666b60218201527f6d68336b746c7a6b37706536326b63686a34676e68697236776378366964617060418201527f6b6964656536723636337a6d222c20000000000000000000000000000000000060618201527f2261747472696275746573223a205b7b2274726169745f74797065223a20225460708201527f65616d2028556e72657665616c656429222c202276616c7565223a202254656160908201527f6d2000000000000000000000000000000000000000000000000000000000000060b0820152613069612e6c612e4360b2840187612c6a565b95945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516130aa81601d8501602087016125d7565b91909101601d0192915050565b600060ff8316806130ca576130ca612bb1565b8060ff84160691505092915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612e956080830184612603565b60006020828403121561311d57600080fd5b81516114da81612556565b6000821982111561313b5761313b612b45565b50019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212209e22b07c3f6918764018e4067300889fe74812cb60109c6685636ac325effb8c64736f6c634300080b00330000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061025c5760003560e01c806367858b1811610145578063a22cb465116100bd578063c87b56dd1161008c578063e338a62811610071578063e338a6281461054f578063e985e9c514610562578063f2fde38b1461059e57600080fd5b8063c87b56dd14610533578063da308abf1461054657600080fd5b8063a22cb465146104e5578063b88d4fde146104f8578063c02857bd1461050b578063c23dc68f1461051357600080fd5b80638462151c1161011457806395d89b41116100f957806395d89b41146104b757806399a2557a146104bf578063a0712d68146104d257600080fd5b80638462151c146104865780638da5cb5b146104a657600080fd5b806367858b181461045057806369393a771461046357806370a082311461046b578063715018a61461047e57600080fd5b8063263df1d1116101d85780634df22a54116101a757806356170ad51161018c57806356170ad5146104145780635bbb21771461041d5780636352211e1461043d57600080fd5b80634df22a54146103dc57806351cff8d91461040157600080fd5b8063263df1d1146103565780632a55205a1461037057806342842e0e146103a257806348f81328146103b557600080fd5b80630948de591161022f5780630b5d5a44116102145780630b5d5a441461030657806318160ddd1461032d57806323b872dd1461034357600080fd5b80630948de59146102de578063095ea7b3146102f357600080fd5b806301ffc9a71461026157806305c676341461028957806306fdde031461029e578063081812fc146102b3575b600080fd5b61027461026f366004612584565b6105b1565b60405190151581526020015b60405180910390f35b61029161060d565b60405161028091906125a1565b6102a6610671565b604051610280919061262f565b6102c66102c1366004612642565b610703565b6040516001600160a01b039091168152602001610280565b6102f16102ec366004612677565b610760565b005b6102f16103013660046126bf565b6107e7565b6102c67f0000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f81565b600154600054035b604051908152602001610280565b6102f16103513660046126e9565b6108d5565b61035e602081565b60405160ff9091168152602001610280565b61038361037e366004612725565b610b43565b604080516001600160a01b039093168352602083019190915201610280565b6102f16103b03660046126e9565b610c20565b6103357f0000000000000000000000000000000000000000033b2e3c9fd0803ce800000081565b600a546102749074010000000000000000000000000000000000000000900460ff1681565b6102f161040f366004612747565b610c40565b610335600b5481565b61043061042b3660046127c2565b610de6565b6040516102809190612868565b6102c661044b366004612642565b610ed2565b61035e61045e366004612642565b610edd565b6102f1610f3f565b610335610479366004612747565b61114b565b6102f16111b3565b610499610494366004612747565b611233565b60405161028091906128e5565b600a546001600160a01b03166102c6565b6102a661133b565b6104996104cd36600461291d565b61134a565b6102f16104e0366004612642565b6114e1565b6102f16104f336600461295e565b61166f565b6102f161050636600461298a565b61173c565b6102f161179f565b610526610521366004612642565b611860565b6040516102809190612a4a565b6102a6610541366004612642565b6118d8565b610335602c5481565b61035e61055d366004612642565b611a92565b610274610570366004612a8f565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6102f16105ac366004612747565b611ade565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610607575061060782611bf4565b92915050565b610615612537565b60006106246001546000540390565b905061062e612537565b60005b8281101561066a578161064382610edd565b60ff166020811061065657610656612ac2565b602002018051600190810190915201610631565b5092915050565b60606002805461068090612af1565b80601f01602080910402602001604051908101604052809291908181526020018280546106ac90612af1565b80156106f95780601f106106ce576101008083540402835291602001916106f9565b820191906000526020600020905b8154815290600101906020018083116106dc57829003601f168201915b5050505050905090565b600061070e82611cd5565b610744576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600a546001600160a01b031633146107d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107e38282611d15565b5050565b60006107f282610ed2565b9050336001600160a01b03821614610861576001600160a01b038116600090815260076020908152604080832033845290915290205460ff16610861576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006108e082611e74565b9050836001600160a01b0316816001600160a01b03161461092d576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176109b0576001600160a01b038616600090815260076020908152604080832033845290915290205460ff166109b0576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166109f0576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156109fb57600082555b6001600160a01b0386811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b7fffffff0000000000000000000000000000000000000000000000000000000000851617177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260409020557c02000000000000000000000000000000000000000000000000000000008316610afa5760018401600081815260046020526040902054610af8576000548114610af85760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b60008281526009602090815260408083208151808301909252546001600160a01b038116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16928201929092528291610be45750604080518082019091526008546001600160a01b03811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b602081015160009061271090610c08906bffffffffffffffffffffffff1687612b74565b610c129190612be0565b915196919550909350505050565b610c3b8383836040518060200160405280600081525061173c565b505050565b600a546001600160a01b03163314610cb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f6001600160a01b03169063a9059cbb90839083906370a0823190602401602060405180830381865afa158015610d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5f9190612bf4565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610dc2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e39190612c0d565b805160609060008167ffffffffffffffff811115610e0657610e06612762565b604051908082528060200260200182016040528015610e7657816020015b6040805160808101825260008082526020808301829052928201819052606082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610e245790505b50905060005b828114610eca57610ea5858281518110610e9857610e98612ac2565b6020026020010151611860565b828281518110610eb757610eb7612ac2565b6020908102919091010152600101610e7c565b509392505050565b600061060782611e74565b6000600b5460001415610f1c576040517f8a96beb400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f2582611a92565b610f30906008612c2a565b60ff16602c54901c9050919050565b600a546001600160a01b03163314610fb3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b600b5415610fed576040517fc198dfdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610ffa600143612c53565b6040805191406020830152429082015260600160408051601f198184030181529190528051602090910120600b8190559050611034612537565b60005b6020811015611068578082826020811061105357611053612ac2565b60ff9092166020929092020152600101611037565b5060005b602081101561110657601f6008820284901c168082146110fd57600083836020811061109a5761109a612ac2565b602002015190508382602081106110b3576110b3612ac2565b60200201518484602081106110ca576110ca612ac2565b602002019060ff16908160ff1681525050808483602081106110ee576110ee612ac2565b60ff9092166020929092020152505b5060010161106c565b506000805b60208110156111435782816020811061112657611126612ac2565b602002015160ff16600883901b179150808060010191505061110b565b50602c555050565b60006001600160a01b03821661118d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b600a546001600160a01b03163314611227576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6112316000611f25565b565b606060008060006112438561114b565b905060008167ffffffffffffffff81111561126057611260612762565b604051908082528060200260200182016040528015611289578160200160208202803683370190505b5060408051608081018252600080825260208201819052918101829052606081018290529192505b83861461132f576112c181611f8f565b91508160400151156112d257611327565b81516001600160a01b0316156112e757815194505b876001600160a01b0316856001600160a01b03161415611327578083878060010198508151811061131a5761131a612ac2565b6020026020010181815250505b6001016112b1565b50909695505050505050565b60606003805461068090612af1565b6060818310611385576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061139160005490565b90508084111561139f578093505b60006113aa8761114b565b9050848610156113c957858503818110156113c3578091505b506113cd565b5060005b60008167ffffffffffffffff8111156113e8576113e8612762565b604051908082528060200260200182016040528015611411578160200160208202803683370190505b509050816114245793506114da92505050565b600061142f88611860565b905060008160400151611440575080515b885b8881141580156114525750848714155b156114ce5761146081611f8f565b9250826040015115611471576114c6565b82516001600160a01b03161561148657825191505b8a6001600160a01b0316826001600160a01b031614156114c657808488806001019950815181106114b9576114b9612ac2565b6020026020010181815250505b600101611442565b50505092835250909150505b9392505050565b600a5474010000000000000000000000000000000000000000900460ff16611535576040517f483300ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f0000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f166323b872dd3330611590857f0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000612b74565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03938416600482015292909116602483015260448201526064016020604051808303816000875af11580156115fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116209190612c0d565b5060006116306001546000540390565b905061163c3383612027565b6040805143602080830191909152338284015282518083038401815260609092019092528051910120610c3b8282612137565b6001600160a01b0382163314156116b2576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6117478484846108d5565b6001600160a01b0383163b1561179957611763848484846121b8565b611799576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b600a546001600160a01b03163314611813576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b600a80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116740100000000000000000000000000000000000000009182900460ff1615909102179055565b60408051608080820183526000808352602080840182905283850182905260608085018390528551938401865282845290830182905293820181905292810183905290915060005483106118b45792915050565b6118bd83611f8f565b90508060400151156118cf5792915050565b6114da83612303565b60606118e382611cd5565b611919576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060600b54600014611a0e57600061193084610edd565b90506000600c8260ff166020811061194a5761194a612ac2565b01805461195690612af1565b80601f016020809104026020016040519081016040528092919081815260200182805461198290612af1565b80156119cf5780601f106119a4576101008083540402835291602001916119cf565b820191906000526020600020905b8154815290600101906020018083116119b257829003601f168201915b50505050509050806119e38360ff16612394565b826040516020016119f693929190612c86565b60405160208183030381529060405292505050611a62565b6000611a1984611a92565b611a24906001612e9f565b9050611a328160ff16612394565b611a3e8260ff16612394565b604051602001611a4f929190612ec4565b6040516020818303038152906040529150505b611a6b816123e3565b604051602001611a7b9190613072565b604051602081830303815290604052915050919050565b60006020611a9f83612303565b6060908101516040805162ffffff90921660208301528101859052016040516020818303038152906040528051906020012060001c61060791906130b7565b600a546001600160a01b03163314611b52576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107d0565b6001600160a01b038116611be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107d0565b611bf181611f25565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff0000000000000000000000000000000000000000000000000000000083161480611c8757507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806106075750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60008054821080156106075750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b6127106bffffffffffffffffffffffff82161115611db5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c6550726963650000000000000000000000000000000000000000000060648201526084016107d0565b6001600160a01b038216611e25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c69642072656365697665720000000000000060448201526064016107d0565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff90911660209092018290527401000000000000000000000000000000000000000090910217600855565b600081600054811015611ef3576000818152600460205260409020547c01000000000000000000000000000000000000000000000000000000008116611ef1575b806114da57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020526040902054611eb5565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a80546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461060790604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b6000546001600160a01b03831661206a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816120a1576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260056020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260046020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106120eb5760005550505050565b6000828152600460205260409020548061217c576040517ed5815300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600460205260409092207cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9290921660e89190911b179055565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a02906122069033908990889088906004016130d9565b6020604051808303816000875af1925050508015612241575060408051601f3d908101601f1916820190925261223e9181019061310b565b60015b6122b5573d80801561226f576040519150601f19603f3d011682016040523d82523d6000602084013e612274565b606091505b5080516122ad576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261060761233383611e74565b604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b604080516080810191829052607f0190826030600a8206018353600a90045b80156123d157600183039250600a81066030018353600a90046123b3565b50819003601f19909101908152919050565b606081516000141561240357505060408051602081019091526000815290565b600060405180606001604052806040815260200161314160409139905060006003845160026124329190613128565b61243c9190612be0565b612447906004612b74565b67ffffffffffffffff81111561245f5761245f612762565b6040519080825280601f01601f191660200182016040528015612489576020820181803683370190505b509050600182016020820185865187015b808210156124f5576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f811685015184535060018301925061249a565b505060038651066001811461251157600281146125245761252c565b603d6001830353603d600283035361252c565b603d60018303535b509195945050505050565b6040518061040001604052806020906020820280368337509192915050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611bf157600080fd5b60006020828403121561259657600080fd5b81356114da81612556565b6104008101818360005b60208082106125ba57506125ce565b8251845292830192909101906001016125ab565b50505092915050565b60005b838110156125f25781810151838201526020016125da565b838111156117995750506000910152565b6000815180845261261b8160208601602086016125d7565b601f01601f19169290920160200192915050565b6020815260006114da6020830184612603565b60006020828403121561265457600080fd5b5035919050565b80356001600160a01b038116811461267257600080fd5b919050565b6000806040838503121561268a57600080fd5b6126938361265b565b915060208301356bffffffffffffffffffffffff811681146126b457600080fd5b809150509250929050565b600080604083850312156126d257600080fd5b6126db8361265b565b946020939093013593505050565b6000806000606084860312156126fe57600080fd5b6127078461265b565b92506127156020850161265b565b9150604084013590509250925092565b6000806040838503121561273857600080fd5b50508035926020909101359150565b60006020828403121561275957600080fd5b6114da8261265b565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156127ba576127ba612762565b604052919050565b600060208083850312156127d557600080fd5b823567ffffffffffffffff808211156127ed57600080fd5b818501915085601f83011261280157600080fd5b81358181111561281357612813612762565b8060051b9150612824848301612791565b818152918301840191848101908884111561283e57600080fd5b938501935b8385101561285c57843582529385019390850190612843565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561132f576128d28385516001600160a01b03815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b9284019260809290920191600101612884565b6020808252825182820181905260009190848201906040850190845b8181101561132f57835183529284019291840191600101612901565b60008060006060848603121561293257600080fd5b61293b8461265b565b95602085013595506040909401359392505050565b8015158114611bf157600080fd5b6000806040838503121561297157600080fd5b61297a8361265b565b915060208301356126b481612950565b600080600080608085870312156129a057600080fd5b6129a98561265b565b935060206129b881870161265b565b935060408601359250606086013567ffffffffffffffff808211156129dc57600080fd5b818801915088601f8301126129f057600080fd5b813581811115612a0257612a02612762565b612a1484601f19601f84011601612791565b91508082528984828501011115612a2a57600080fd5b808484018584013760008482840101525080935050505092959194509250565b81516001600160a01b0316815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610607565b60008060408385031215612aa257600080fd5b612aab8361265b565b9150612ab96020840161265b565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600181811c90821680612b0557607f821691505b60208210811415612b3f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612bac57612bac612b45565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612bef57612bef612bb1565b500490565b600060208284031215612c0657600080fd5b5051919050565b600060208284031215612c1f57600080fd5b81516114da81612950565b600060ff821660ff84168160ff0481118215151615612c4b57612c4b612b45565b029392505050565b600082821015612c6557612c65612b45565b500390565b60008151612c7c8185602086016125d7565b9290920192915050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2022000000000000000000000000000000000000000000000060018201527f536869742043757020323032323a200000000000000000000000000000000000600a82015260008451612d0a8160198501602089016125d7565b7f222c2000000000000000000000000000000000000000000000000000000000006019918401918201527f22696d616765223a2022697066733a2f2f6261667962656962797a7a6a6b6973601c8201527f71336d757779696470336e6962633735673536636d3568726a686e65327a736c603c8201527f32643672617134706167786d2f00000000000000000000000000000000000000605c8201528451612db98160698401602089016125d7565b7f2e706e67222c2000000000000000000000000000000000000000000000000000910160698101919091527f2261747472696275746573223a205b7b2274726169745f74797065223a20225460708201527f65616d222c202276616c7565223a2022000000000000000000000000000000006090820152612e95612e6c612e4360a0840187612c6a565b7f227d5d0000000000000000000000000000000000000000000000000000000000815260030190565b7f7d00000000000000000000000000000000000000000000000000000000000000815260010190565b9695505050505050565b600060ff821660ff84168060ff03821115612ebc57612ebc612b45565b019392505050565b7f7b0000000000000000000000000000000000000000000000000000000000000081527f226e616d65223a2022000000000000000000000000000000000000000000000060018201527f536869742043757020323032323a205465616d20000000000000000000000000600a82015260008351612f4881601e8501602088016125d7565b7f222c200000000000000000000000000000000000000000000000000000000000601e918401918201527f22696d616765223a2022697066733a2f2f62616679626569646d62697165666b60218201527f6d68336b746c7a6b37706536326b63686a34676e68697236776378366964617060418201527f6b6964656536723636337a6d222c20000000000000000000000000000000000060618201527f2261747472696275746573223a205b7b2274726169745f74797065223a20225460708201527f65616d2028556e72657665616c656429222c202276616c7565223a202254656160908201527f6d2000000000000000000000000000000000000000000000000000000000000060b0820152613069612e6c612e4360b2840187612c6a565b95945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516130aa81601d8501602087016125d7565b91909101601d0192915050565b600060ff8316806130ca576130ca612bb1565b8060ff84160691505092915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612e956080830184612603565b60006020828403121561311d57600080fd5b81516114da81612556565b6000821982111561313b5761313b612b45565b50019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212209e22b07c3f6918764018e4067300889fe74812cb60109c6685636ac325effb8c64736f6c634300080b0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000

-----Decoded View---------------
Arg [0] : shitCoin (address): 0x4e4a47cAC6A28A62dcC20990ed2cdA9BC659469F
Arg [1] : shitPrice (uint256): 1000000000000000000000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000004e4a47cac6a28a62dcc20990ed2cda9bc659469f
Arg [1] : 0000000000000000000000000000000000000000033b2e3c9fd0803ce8000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.