ETH Price: $3,308.04 (-9.05%)

Contract

0x740cd6B489d1b559b055827f08aAf5A97E480b92
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BASKETBALLNFT

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : BASKETBALLNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract BASKETBALLNFT is ERC721AUpgradeable, OwnableUpgradeable {
    enum SetIndex {
        ModelChangeSeries,
        StarCard
    }

    enum RarityIndex {
        Legendary,
        Epic,
        Rare,
        Common
    }

    enum SeriesIndex {
        Basketball_frame_A,
        Basketball_frame_B,
        Bitcoin,
        Mini_Uniform,
        Anime_characters,
        Card_Box,
        Science_fiction,
        Dollars,
        Virtual_Sneakers,
        Figure_box,
        Monkeys,
        Switching_Card,
        Science_Card,
        Gold_Card,
        Card_Circles,
        Card_Red,
        Card_White
    }

    struct Attributes {
        uint8 set;
        uint8 rarity;
        uint32 player;
        uint8 series;
    }

    struct AirdropUser {
        Attributes[] attributes;
        uint256 amount;
        uint256[] tokenIDs;
        address receiver;
    }

    struct AirdropKOL {
        Attributes[] attributes;
        uint256 amount;
        address receiver;
    }

    uint256 public maxSupply;
    // vault
    address public vault;
    address public vaultForDrop;
    // airdrop
    mapping(uint256 => bool) public claimed;

    // reveal
    string public blindBoxBaseURI;
    uint256[] public stageIDs;
    mapping(uint256 => string) public revealedBaseURI;

    string[] public Set;
    string[] public Rarity;
    string[] public Series;
    uint32[] public Player;

    uint32[] public playerList;

    mapping(uint256 => Attributes) public attribute;
    // player => rarity => set => series => number
    mapping(uint32 => mapping(uint8 => mapping(uint8 => mapping(uint8 => uint32))))
        public cardNumber;

    // sell nft
    uint64 public saleStartTime;
    uint64 public saleEndTime;
    uint64 public timeoutLimit;
    uint64 public price; // 1 = 0.001 ether, 1000 = 1 ether
    mapping(uint256 => bool) public usedSalt;

    // swap switch
    uint128 public swapStartTime;
    uint128 public swapEndTime;
    // swap limit
    mapping(uint32 => uint32) public swapLimit;
    uint32 public constant SWAP_SERVING = 2124;
    uint32 public constant SWAP_TRANSFERRED = 2128;

    function initialize(
        string memory name,
        string memory symbol,
        address _vault,
        address _vaultForDrop
    ) public initializerERC721A initializer {
        __ERC721A_init(name, symbol);
        __Ownable_init();

        maxSupply = 10000;
        Set = ["Model Change", "Star Card"];
        Rarity = ["Legendary", "Epic", "Rare", "Common"];
        Series = [
            "Basketball_frame_A",
            "Basketball_frame_B",
            "Bitcoin",
            "Mini_Uniform",
            "Anime_characters",
            "Card_Box",
            "Science_fiction",
            "Dollars",
            "Virtual_Sneakers",
            "Figure_box",
            "Monkeys",
            "Switching_Card",
            "Science_Card",
            "Gold_Card",
            "Card_Circles",
            "Card_Red",
            "Card_White"
        ];
        // 210, 212, 213, 214, 215, 217, 2123, 2124 active players
        // 211, 218, 2110, 2128 transfer player (Can only be used for airdrops)
        Player = [
            210,
            212,
            213,
            214,
            215,
            217,
            2123,
            2124,
            211,
            218,
            2110,
            2128
        ];
        // 214 does not belong to this exchange reserve collection
        playerList = [210, 212, 213, 215, 217, 2123, 2124];

        vault = _vault;
        vaultForDrop = _vaultForDrop;

        for (uint256 i = 0; i < playerList.length; i++) {
            cardNumber[playerList[i]][uint8(RarityIndex.Rare)][
                uint8(SetIndex.StarCard)
            ][uint8(SeriesIndex.Gold_Card)] = 133;
        }
    }

    event BlindBoxOpen(uint256 tokenId, string baseURI);
    event ChangeBaseURI(uint256 tokenId, string baseURI);
    event Exchange(uint256 newTokenID, uint256 player, address sender);
    event MintBatch(uint256 firstTokenID, uint256 amount, address sender);
    event Claimed(uint256 airdropID, uint256[] tokenIDs);
    event Bought(
        address indexed user,
        uint256 indexed tokenId,
        uint256 indexed salt
    );

    /* --------------- swap --------------- */

    /// @notice The user uses any 3 Star Card Set and common NFTs and 1 transfer player NFT to replace any Rare NFT.
    /// @dev A player will be randomly selected from the Player as the NFT player attribute.
    /// @dev If a player's NFT is exhausted, the player will be skipped.
    /// @dev Approve is not required because there is no external call, msg.sender is owner of NFT.
    /// @param payTokenIDs 3 common NFTs's tokenIDs
    /// @param payDropTokenID transfer player NFT's tokenID
    function exchange(
        uint256[] calldata payTokenIDs,
        uint256 payDropTokenID
    ) public {
        require(
            block.timestamp >= swapStartTime && block.timestamp <= swapEndTime,
            "time error"
        );
        require(
            swapLimit[SWAP_SERVING] != 0 || swapLimit[SWAP_TRANSFERRED] != 0,
            "swap card used out"
        );
        uint256 length = payTokenIDs.length;
        require(length == 3, "param length error");
        // Transfer Player NFT Verification
        uint32 player = attribute[payDropTokenID].player;
        require(
            (player == 211 ||
                player == 218 ||
                player == 2110 ||
                player == 2128) &&
                attribute[payDropTokenID].set == uint8(SetIndex.StarCard) &&
                attribute[payDropTokenID].rarity == uint8(RarityIndex.Common),
            "drop error"
        );
        for (uint256 i = 0; i < length; i++) {
            // must be common and StarCard NFT
            require(
                attribute[payTokenIDs[i]].set == uint8(SetIndex.StarCard) &&
                    attribute[payTokenIDs[i]].rarity ==
                    uint8(RarityIndex.Common),
                "pay token error"
            );
            transferFrom(msg.sender, vault, payTokenIDs[i]);
        }
        transferFrom(msg.sender, vaultForDrop, payDropTokenID);

        // Pick a player at random
        uint256 randomNumber = uint256(
            keccak256(
                abi.encodePacked(
                    block.timestamp,
                    blockhash(block.number - 1),
                    payDropTokenID,
                    msg.sender
                )
            )
        );

        // transferred NFT -> 2128 | active NFT -> 2124(only for swap)
        uint256 index = randomNumber % 2;
        uint32 plyer;
        if (index == 0) {
            // serving nft
            if (swapLimit[SWAP_SERVING] != 0) {
                plyer = SWAP_SERVING;
                swapLimit[SWAP_SERVING]--;
            } else {
                plyer = SWAP_TRANSFERRED;
                swapLimit[SWAP_TRANSFERRED]--;
            }
        } else {
            // transferred nft
            if (swapLimit[SWAP_TRANSFERRED] != 0) {
                plyer = SWAP_TRANSFERRED;
                swapLimit[SWAP_TRANSFERRED]--;
            } else {
                plyer = SWAP_SERVING;
                swapLimit[SWAP_SERVING]--;
            }
        }

        uint256 tokenID = totalSupply();
        attribute[tokenID] = Attributes({
            set: uint8(SetIndex.StarCard),
            rarity: uint8(RarityIndex.Rare),
            player: plyer,
            series: uint8(SeriesIndex.Gold_Card)
        });

        // mint
        _safeMint(msg.sender, 1);
        emit Exchange(tokenID, plyer, msg.sender);
    }

    function setSwapTime(uint128 startTime, uint128 endTime) public onlyOwner {
        swapStartTime = startTime;
        swapEndTime = endTime;
    }

    function setSwapLimit(uint32 transferred, uint32 serving) public onlyOwner {
        swapLimit[SWAP_TRANSFERRED] = transferred;
        swapLimit[SWAP_SERVING] = serving;
    }

    function setVaults(
        address _vaultForActivity,
        address _vaultForDrop
    ) public onlyOwner {
        vault = _vaultForActivity;
        vaultForDrop = _vaultForDrop;
    }

    /* --------------- airdrop --------------- */

    /// @notice According to the NFT data held by the users, the project party subjectively distributes the airdrop to user. Users must hold NFTs that have not been airdropped.
    /// @dev The smaller index in attributes, the smaller the minted NFT's tokenID corresponding to the element.
    /// @param dropData Airdrop data.
    function airdropToUser(
        uint256 airdropID,
        AirdropUser[] calldata dropData
    ) public onlyOwner {
        require(dropData.length <= 50, "to much drop");
        uint256 leng;
        for (uint256 i; i < dropData.length; i++) {
            leng += dropData[i].tokenIDs.length;
        }
        uint256[] memory claimedTokenIDs = new uint256[](leng);
        uint256 len;

        for (uint256 i; i < dropData.length; i++) {
            AirdropUser memory data = dropData[i];
            require(data.attributes.length == data.amount, "param error");
            require(data.tokenIDs.length != 0, "tokenIDs error");
            for (uint256 j; j < data.tokenIDs.length; j++) {
                require(
                    ownerOf(data.tokenIDs[j]) == data.receiver,
                    "receiver is not owner of the tokenID"
                );
                claimedTokenIDs[len] = data.tokenIDs[j];
                len++;
            }
            uint256 totalSupply_ = totalSupply();
            for (uint256 j; j < data.amount; j++) {
                attribute[totalSupply_ + j] = data.attributes[j];
            }
            _safeMint(data.receiver, data.amount);
        }
        emit Claimed(airdropID, claimedTokenIDs);
    }

    /// @notice The project party subjectively distributes the airdrop to KOL.
    /// @dev The average number of airdrops per KOL does not exceed 5 because of the block gas limit.
    /// @param dropData Airdrop data.
    function airdropToKOL(AirdropKOL[] calldata dropData) public onlyOwner {
        require(dropData.length <= 50, "to much drop");
        for (uint256 i; i < dropData.length; i++) {
            AirdropKOL memory data = dropData[i];
            require(data.attributes.length == data.amount, "param error");

            uint256 totalSupply_ = totalSupply();
            for (uint256 j; j < data.amount; j++) {
                attribute[totalSupply_ + j] = data.attributes[j];
            }
            _safeMint(data.receiver, data.amount);
        }
    }

    /* --------------- binance --------------- */

    /// @notice The project party mint batch NFTs to binance.
    /// @param amount The number of NFTs minted.
    /// @param receiver Binance's address for receiving NFTs.
    function mintBatch(uint256 amount, address receiver) public onlyOwner {
        uint256 firstTokenID = totalSupply();
        _safeMint(receiver, amount);
        emit MintBatch(firstTokenID, amount, receiver);
    }

    /* --------------- nft card parameters --------------- */

    /// @notice The owner reset playerList for new exchange rule.
    /// @param playerList_ New playerList value.
    function setPlayerList(uint32[] calldata playerList_) public onlyOwner {
        playerList = playerList_;
    }

    /* --------------- mint --------------- */
    /// @notice This method can buy nft
    /// @dev nft can only be purchased if block.timestamp is between saleStartTime and saleEndTime
    /// @param _salt Used to bind tokenId, need to confirm metadata information through _salt
    /// @dev _salt : uint256(bytes16(time) + bytes16(random))
    function buy(uint256 _salt, Attributes calldata attr) external payable {
        address sender_ = _msgSender();
        require(block.timestamp >= saleStartTime, "Not Started");
        require(block.timestamp <= saleEndTime, "End of sale");
        uint256 timestamp_ = uint256(uint128(bytes16(bytes32(_salt))));
        uint256 minimum;
        unchecked {
            minimum = block.timestamp - timeoutLimit;
        }
        // Time out
        require(minimum <= timestamp_, "Time out");
        require(
            timestamp_ <= block.timestamp + 60,
            "Timestamp exceeds block.timestamp"
        );
        require(msg.value == uint256(price) * 1e15, "Invalid amount");
        require(tx.origin == sender_, "Invalid sender");
        require(!usedSalt[_salt], "Salt has been used");

        uint256 tokenID = totalSupply();
        _safeMint(sender_, 1);
        usedSalt[_salt] = true;
        attribute[tokenID] = attr;
        emit Bought(sender_, tokenID, _salt);
    }

    function setMintParams(
        uint64 saleStartTime_,
        uint64 saleEndTime_,
        uint64 timeoutLimit_,
        uint64 price_
    ) public onlyOwner {
        saleStartTime = saleStartTime_;
        saleEndTime = saleEndTime_;
        timeoutLimit = timeoutLimit_;
        price = price_;
    }

    /* --------------- owner config --------------- */
    function setSet(uint256 index, string memory value) public onlyOwner {
        Set[index] = value;
    }

    function setRarity(uint256 index, string memory value) public onlyOwner {
        Rarity[index] = value;
    }

    function setSeries(uint256 index, string memory value) public onlyOwner {
        Series[index] = value;
    }

    function setPlayer(uint256 index, uint32 value) public onlyOwner {
        Player[index] = value;
    }

    /* --------------- reveal --------------- */

    /// @notice When opening the blind box, the owner sets the properties of the NFT.
    /// @dev The length of the two parameters must be the same and cannot exceed 200.
    /// @param tokenIDs The TokenID of the NFT to be set.
    /// @param attributes The attributes of the NFT to be set.
    function setAttributes(
        uint256[] calldata tokenIDs,
        Attributes[] calldata attributes
    ) public onlyOwner {
        require(tokenIDs.length <= 200, "too much params");
        require(tokenIDs.length == attributes.length, "params length error");
        for (uint256 i = 0; i < tokenIDs.length; i++) {
            attribute[tokenIDs[i]] = attributes[i];
        }
    }

    /// @notice Get the properties of the NFT and display it in a human readable form.
    /// @param tokenID The tokenID of the NFT to be queried.
    function getTokenAttributes(
        uint256 tokenID
    )
        public
        view
        returns (string memory set, string memory rarity, string memory series)
    {
        Attributes memory attr = attribute[tokenID];
        return (Set[attr.set], Rarity[attr.rarity], Series[attr.series]);
    }

    /// @notice The owner set blindbox baseURI.
    function setBlindBoxURI(string memory _blindBoxBaseURI) public onlyOwner {
        blindBoxBaseURI = _blindBoxBaseURI;
    }

    /// @notice Open blind boxes in batches. Each time it is called, (${id last call}, id] baseURI is set.
    /// @param id The maximum tokenID currently opened.
    /// @param baseURI_ The baseURI of the latest set interval.
    function setBaseURI(uint256 id, string memory baseURI_) public onlyOwner {
        uint256 len = stageIDs.length;
        if (len == 0) {
            stageIDs.push(id);
        } else if (id > stageIDs[len - 1]) {
            stageIDs.push(id);
        } else {
            uint256 i; // index for new id
            for (i = len - 1; i >= 0; i--) {
                require(id != stageIDs[i], "same stageID error");
                if ((i != 0 && id > stageIDs[i - 1]) || i == 0) break;
            }
            // push lastest element
            stageIDs.push(stageIDs[len - 1]);
            // move other element
            for (uint256 j = len - 1; j > i; j--) {
                stageIDs[j] = stageIDs[j - 1];
            }
            // insert new element
            stageIDs[i] = id;
        }
        revealedBaseURI[id] = baseURI_;
        emit BlindBoxOpen(id, baseURI_);
    }

    /// @notice Used to modify the wrong parameters passed in by setBaseURI.
    function changeURI(uint256 id, string memory baseURI_) public onlyOwner {
        require(
            bytes(revealedBaseURI[id]).length != 0,
            "URI corresponding to id should not be empty"
        );
        revealedBaseURI[id] = baseURI_;
        emit ChangeBaseURI(id, baseURI_);
    }

    /// @notice Query the URI of NFT metadata, which conforms to the ERC721 protocol.
    /// @dev Because the baseURI of each interval where the tokenID is located is different, the binary search method is used here to improve the query efficiency.
    /// @dev Except for 0, tokenIDs are divided in the way of opening and closing before, eg: (x,y].
    /// @param tokenId The tokenID of the NFT to be queried.
    /// @return The URI of the NFT to be queried.
    function tokenURI(
        uint256 tokenId
    ) public view override returns (string memory) {
        require(_exists(tokenId), "token id is not exist.");
        string memory baseURI_;
        uint256 len = stageIDs.length;
        // binary search
        if (len == 0) {
            baseURI_ = blindBoxBaseURI;
        } else {
            uint256 left;
            uint256 right = len - 1;

            // (x,y]
            for (; left <= right; ) {
                uint256 midIndex = (left + right) / 2;
                if (midIndex == 0) {
                    if (tokenId <= stageIDs[0]) {
                        baseURI_ = revealedBaseURI[stageIDs[0]];
                        break;
                    } else if (len == 1) {
                        baseURI_ = blindBoxBaseURI;
                        break;
                    } else {
                        if (tokenId <= stageIDs[1]) {
                            baseURI_ = revealedBaseURI[stageIDs[1]];
                            break;
                        } else {
                            baseURI_ = blindBoxBaseURI;
                            break;
                        }
                    }
                }

                if (tokenId <= stageIDs[midIndex]) {
                    if (tokenId > stageIDs[midIndex - 1]) {
                        baseURI_ = revealedBaseURI[stageIDs[midIndex]];
                        break;
                    }
                    right = midIndex - 1;
                } else {
                    left = midIndex;
                    if (midIndex == right - 1) {
                        if (tokenId > stageIDs[right]) {
                            baseURI_ = blindBoxBaseURI;
                            break;
                        }
                        left = right;
                    }
                }
            }
        }

        return
            bytes(baseURI_).length > 0
                ? string(abi.encodePacked(baseURI_, _toString(tokenId)))
                : string(abi.encodePacked(blindBoxBaseURI, _toString(tokenId)));
    }

    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal override {
        if (from == address(0)) {
            require(
                totalSupply() + quantity <= maxSupply,
                "exceeded maximum supply"
            );
        }
    }

    function setMaxSupply(uint256 maxSupply_) public onlyOwner {
        maxSupply = maxSupply_;
    }
    /* --------------- modifiers --------------- */
}

File 2 of 10 : ERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AUpgradeable.sol';
import {ERC721AStorage} from './ERC721AStorage.sol';
import './ERC721A__Initializable.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable {
    using ERC721AStorage for ERC721AStorage.Layout;
    // Reference type for token approval.
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        __ERC721A_init_unchained(name_, symbol_);
    }

    function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A {
        ERC721AStorage.layout()._name = name_;
        ERC721AStorage.layout()._symbol = symbol_;
        ERC721AStorage.layout()._currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return ERC721AStorage.layout()._currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return ERC721AStorage.layout()._burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return
            (ERC721AStorage.layout()._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
            (ERC721AStorage.layout()._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(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = ERC721AStorage.layout()._packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        ERC721AStorage.layout()._packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return ERC721AStorage.layout()._symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

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

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

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < ERC721AStorage.layout()._currentIndex) {
                    uint256 packed = ERC721AStorage.layout()._packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = ERC721AStorage.layout()._packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

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

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

        ERC721AStorage.layout()._tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return ERC721AStorage.layout()._tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return ERC721AStorage.layout()._operatorApprovals[owner][operator];
    }

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

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

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

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

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

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`.
            ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try
            ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data)
        returns (bytes4 retval) {
            return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = ERC721AStorage.layout()._currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            ERC721AStorage.layout()._currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            ERC721AStorage.layout()._currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = ERC721AStorage.layout()._currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (ERC721AStorage.layout()._currentIndex != end) revert();
            }
        }
    }

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

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

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

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            ERC721AStorage.layout()._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`.
            ERC721AStorage.layout()._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 (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != ERC721AStorage.layout()._currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        ERC721AStorage.layout()._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 {
            ERC721AStorage.layout()._burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = ERC721AStorage.layout()._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);
        ERC721AStorage.layout()._packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory 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.
                // The ASCII index of the '0' character is 48.
                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 3 of 10 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 10 : IERC721AUpgradeable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721AUpgradeable {
    /**
     * 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();

    // =============================================================
    //                            STRUCTS
    // =============================================================

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

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables
     * (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

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

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

    /**
     * @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](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

File 5 of 10 : ERC721AStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {ERC721AUpgradeable} from './ERC721AUpgradeable.sol';

library ERC721AStorage {
    struct Layout {
        // =============================================================
        //                            STORAGE
        // =============================================================

        // The next token ID to be minted.
        uint256 _currentIndex;
        // The number of tokens burned.
        uint256 _burnCounter;
        // Token name
        string _name;
        // Token symbol
        string _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) _packedOwnerships;
        // Mapping owner address to address data.
        //
        // Bits Layout:
        // - [0..63]    `balance`
        // - [64..127]  `numberMinted`
        // - [128..191] `numberBurned`
        // - [192..255] `aux`
        mapping(address => uint256) _packedAddressData;
        // Mapping from token ID to approved address.
        mapping(uint256 => ERC721AUpgradeable.TokenApprovalRef) _tokenApprovals;
        // Mapping from owner to operator approvals
        mapping(address => mapping(address => bool)) _operatorApprovals;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 6 of 10 : ERC721A__Initializable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */

import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol';

abstract contract ERC721A__Initializable {
    using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializerERC721A() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(
            ERC721A__InitializableStorage.layout()._initializing
                ? _isConstructor()
                : !ERC721A__InitializableStorage.layout()._initialized,
            'ERC721A__Initializable: contract is already initialized'
        );

        bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing;
        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = true;
            ERC721A__InitializableStorage.layout()._initialized = true;
        }

        _;

        if (isTopLevelCall) {
            ERC721A__InitializableStorage.layout()._initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializingERC721A() {
        require(
            ERC721A__InitializableStorage.layout()._initializing,
            'ERC721A__Initializable: contract is not initializing'
        );
        _;
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        // extcodesize checks the size of the code stored in an address, and
        // address returns the current address. Since the code is still not
        // deployed when running a constructor, any checks on its code size will
        // yield zero, making it an effective way to detect if a contract is
        // under construction or not.
        address self = address(this);
        uint256 cs;
        assembly {
            cs := extcodesize(self)
        }
        return cs == 0;
    }
}

File 7 of 10 : ERC721A__InitializableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev This is a base storage for the  initialization function for upgradeable diamond facet contracts
 **/

library ERC721A__InitializableStorage {
    struct Layout {
        /*
         * Indicates that the contract has been initialized.
         */
        bool _initialized;
        /*
         * Indicates that the contract is in the process of being initialized.
         */
        bool _initializing;
    }

    bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }
}

File 8 of 10 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 9 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 10 of 10 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","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":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BlindBoxOpen","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"ChangeBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"airdropID","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"}],"name":"Claimed","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":false,"internalType":"uint256","name":"newTokenID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"player","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Exchange","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"firstTokenID","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"MintBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Player","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Rarity","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_SERVING","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWAP_TRANSFERRED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Series","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"Set","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"uint8","name":"set","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint32","name":"player","type":"uint32"},{"internalType":"uint8","name":"series","type":"uint8"}],"internalType":"struct BASKETBALLNFT.Attributes[]","name":"attributes","type":"tuple[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"internalType":"struct BASKETBALLNFT.AirdropKOL[]","name":"dropData","type":"tuple[]"}],"name":"airdropToKOL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"airdropID","type":"uint256"},{"components":[{"components":[{"internalType":"uint8","name":"set","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint32","name":"player","type":"uint32"},{"internalType":"uint8","name":"series","type":"uint8"}],"internalType":"struct BASKETBALLNFT.Attributes[]","name":"attributes","type":"tuple[]"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"},{"internalType":"address","name":"receiver","type":"address"}],"internalType":"struct BASKETBALLNFT.AirdropUser[]","name":"dropData","type":"tuple[]"}],"name":"airdropToUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"attribute","outputs":[{"internalType":"uint8","name":"set","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint32","name":"player","type":"uint32"},{"internalType":"uint8","name":"series","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blindBoxBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_salt","type":"uint256"},{"components":[{"internalType":"uint8","name":"set","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint32","name":"player","type":"uint32"},{"internalType":"uint8","name":"series","type":"uint8"}],"internalType":"struct BASKETBALLNFT.Attributes","name":"attr","type":"tuple"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"cardNumber","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"baseURI_","type":"string"}],"name":"changeURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"payTokenIDs","type":"uint256[]"},{"internalType":"uint256","name":"payDropTokenID","type":"uint256"}],"name":"exchange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"getTokenAttributes","outputs":[{"internalType":"string","name":"set","type":"string"},{"internalType":"string","name":"rarity","type":"string"},{"internalType":"string","name":"series","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_vaultForDrop","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"playerList","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"revealedBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"saleEndTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStartTime","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIDs","type":"uint256[]"},{"components":[{"internalType":"uint8","name":"set","type":"uint8"},{"internalType":"uint8","name":"rarity","type":"uint8"},{"internalType":"uint32","name":"player","type":"uint32"},{"internalType":"uint8","name":"series","type":"uint8"}],"internalType":"struct BASKETBALLNFT.Attributes[]","name":"attributes","type":"tuple[]"}],"name":"setAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_blindBoxBaseURI","type":"string"}],"name":"setBlindBoxURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply_","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"saleStartTime_","type":"uint64"},{"internalType":"uint64","name":"saleEndTime_","type":"uint64"},{"internalType":"uint64","name":"timeoutLimit_","type":"uint64"},{"internalType":"uint64","name":"price_","type":"uint64"}],"name":"setMintParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint32","name":"value","type":"uint32"}],"name":"setPlayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"playerList_","type":"uint32[]"}],"name":"setPlayerList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"value","type":"string"}],"name":"setRarity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"value","type":"string"}],"name":"setSeries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"string","name":"value","type":"string"}],"name":"setSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"transferred","type":"uint32"},{"internalType":"uint32","name":"serving","type":"uint32"}],"name":"setSwapLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"startTime","type":"uint128"},{"internalType":"uint128","name":"endTime","type":"uint128"}],"name":"setSwapTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vaultForActivity","type":"address"},{"internalType":"address","name":"_vaultForDrop","type":"address"}],"name":"setVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stageIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapEndTime","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"swapLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapStartTime","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeoutLimit","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedSalt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultForDrop","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50615201806100206000396000f3fe6080604052600436106103ad5760003560e01c8063715018a6116101e7578063b5c82bd11161010d578063dbe7e3bd116100a0578063ed338ff11161006f578063ed338ff114610bfd578063efebc72014610c24578063f2fde38b14610c4b578063fbfa77cf14610c6b57600080fd5b8063dbe7e3bd14610b5d578063df65301f14610b8d578063df7a95ae14610bbd578063e985e9c514610bdd57600080fd5b8063c87b56dd116100dc578063c87b56dd14610ae7578063d5abeb0114610b07578063d5dbbf7814610b1d578063da6af97114610b3d57600080fd5b8063b5c82bd114610a4f578063b88d4fde14610a6f578063bacf251b14610a8f578063bc4f1a7e14610ac757600080fd5b80638f15b41411610185578063a22cb46511610154578063a22cb465146109cf578063a6849b24146109ef578063ae6d907314610a0f578063b023b31514610a2f57600080fd5b80638f15b4141461095357806392175a1d1461097357806395d89b4114610993578063a035b1fe146109a857600080fd5b80638189e57b116101c15780638189e57b146108d557806386a5df97146108f55780638b023075146109155780638da5cb5b1461093557600080fd5b8063715018a61461081d578063717bd9e714610832578063775fd822146108b557600080fd5b806333de0ef1116102d7578063583ce4171161026a5780636a28d9e7116102395780636a28d9e71461079d5780636f8b44b0146107bd57806370a08231146107dd57806370d2dab8146107fd57600080fd5b8063583ce417146107275780635f1bcffc146107475780635fdcc76e146107675780636352211e1461077d57600080fd5b806342842e0e116102a657806342842e0e146106aa578063432a3897146106ca5780634a307a84146106e05780634c451a6a1461070757600080fd5b806333de0ef11461060857806333fb5b2b146106285780633c4418cf146106755780633f3840061461068a57600080fd5b80631533bf281161034f57806323b872dd1161031e57806323b872dd146105885780632ba7930c146105a85780633049255e146105c857806333cfcb9f146105e857600080fd5b80631533bf28146104eb57806318160ddd146104fe5780631cbaee2d146105215780631f4f5a231461055957600080fd5b8063072bb1781161038b578063072bb1781461042b578063081812fc1461044b578063084d8e5014610483578063095ea7b3146104cb57600080fd5b8063011ab641146103b257806301ffc9a7146103d457806306fdde0314610409575b600080fd5b3480156103be57600080fd5b506103d26103cd3660046146cb565b610c8b565b005b3480156103e057600080fd5b506103f46103ef366004614714565b611297565b60405190151581526020015b60405180910390f35b34801561041557600080fd5b5061041e6112e9565b6040516104009190614b8f565b34801561043757600080fd5b506103d26104463660046148ab565b611384565b34801561045757600080fd5b5061046b610466366004614828565b6113d0565b6040516001600160a01b039091168152602001610400565b34801561048f57600080fd5b506104b661049e366004614949565b60766020526000908152604090205463ffffffff1681565b60405163ffffffff9091168152602001610400565b3480156104d757600080fd5b506103d26104e63660046145d0565b61141d565b6103d26104f93660046148ef565b6114cb565b34801561050a57600080fd5b506105136117ab565b604051908152602001610400565b34801561052d57600080fd5b50607354610541906001600160401b031681565b6040516001600160401b039091168152602001610400565b34801561056557600080fd5b50610579610574366004614828565b6117ca565b60405161040093929190614ba2565b34801561059457600080fd5b506103d26105a33660046144e3565b611a6b565b3480156105b457600080fd5b506103d26105c3366004614638565b611c67565b3480156105d457600080fd5b506103d26105e33660046148ab565b611d89565b3480156105f457600080fd5b506103d26106033660046148ab565b611db3565b34801561061457600080fd5b506103d2610623366004614965565b6120c3565b34801561063457600080fd5b506104b6610643366004614992565b607260209081526000948552604080862082529385528385208152918452828420909152825290205463ffffffff1681565b34801561068157600080fd5b5061041e612118565b34801561069657600080fd5b506103d26106a53660046145f9565b6121a6565b3480156106b657600080fd5b506103d26106c53660046144e3565b6121ba565b3480156106d657600080fd5b506104b661084c81565b3480156106ec57600080fd5b5060735461054190600160801b90046001600160401b031681565b34801561071357600080fd5b506103d26107223660046144b1565b6121d5565b34801561073357600080fd5b5061041e610742366004614828565b61220b565b34801561075357600080fd5b506103d2610762366004614925565b612224565b34801561077357600080fd5b506104b661085081565b34801561078957600080fd5b5061046b610798366004614828565b612285565b3480156107a957600080fd5b506103d26107b83660046147ff565b612290565b3480156107c957600080fd5b506103d26107d8366004614828565b6122b1565b3480156107e957600080fd5b506105136107f8366004614497565b6122be565b34801561080957600080fd5b506104b6610818366004614828565b612326565b34801561082957600080fd5b506103d2612360565b34801561083e57600080fd5b5061088261084d366004614828565b60716020526000908152604090205460ff80821691610100810482169163ffffffff6201000083041691600160301b90041684565b6040805160ff9586168152938516602085015263ffffffff90921691830191909152919091166060820152608001610400565b3480156108c157600080fd5b5061041e6108d0366004614828565b612374565b3480156108e157600080fd5b506103d26108f03660046149ed565b61239f565b34801561090157600080fd5b506103d2610910366004614862565b612410565b34801561092157600080fd5b5061041e610930366004614828565b61285c565b34801561094157600080fd5b506033546001600160a01b031661046b565b34801561095f57600080fd5b506103d261096e36600461477e565b61286c565b34801561097f57600080fd5b506103d261098e3660046145f9565b612fd8565b34801561099f57600080fd5b5061041e6131b2565b3480156109b457600080fd5b5060735461054190600160c01b90046001600160401b031681565b3480156109db57600080fd5b506103d26109ea366004614596565b6131ca565b3480156109fb57600080fd5b50610513610a0a366004614828565b613271565b348015610a1b57600080fd5b506104b6610a2a366004614828565b613292565b348015610a3b57600080fd5b506103d2610a4a36600461474c565b6132a2565b348015610a5b57600080fd5b506103d2610a6a3660046148ab565b6132c1565b348015610a7b57600080fd5b506103d2610a8a36600461451e565b6132eb565b348015610a9b57600080fd5b50607554610aaf906001600160801b031681565b6040516001600160801b039091168152602001610400565b348015610ad357600080fd5b506103d2610ae2366004614840565b613335565b348015610af357600080fd5b5061041e610b02366004614828565b61339c565b348015610b1357600080fd5b5061051360655481565b348015610b2957600080fd5b5060675461046b906001600160a01b031681565b348015610b4957600080fd5b506103d2610b583660046148ab565b6137b3565b348015610b6957600080fd5b506103f4610b78366004614828565b60686020526000908152604090205460ff1681565b348015610b9957600080fd5b506103f4610ba8366004614828565b60746020526000908152604090205460ff1681565b348015610bc957600080fd5b5061041e610bd8366004614828565b613895565b348015610be957600080fd5b506103f4610bf83660046144b1565b6138a5565b348015610c0957600080fd5b5060735461054190600160401b90046001600160401b031681565b348015610c3057600080fd5b50607554610aaf90600160801b90046001600160801b031681565b348015610c5757600080fd5b506103d2610c66366004614497565b6138e2565b348015610c7757600080fd5b5060665461046b906001600160a01b031681565b6075546001600160801b03164210801590610cb85750607554600160801b90046001600160801b03164211155b610cf65760405162461bcd60e51b815260206004820152600a6024820152693a34b6b29032b93937b960b11b60448201526064015b60405180910390fd5b61084c600052607660205260008051602061516c8339815191525463ffffffff16151580610d435750610850600052607660205260008051602061518c8339815191525463ffffffff1615155b610d845760405162461bcd60e51b81526020600482015260126024820152711cddd85c0818d85c99081d5cd959081bdd5d60721b6044820152606401610ced565b8160038114610dca5760405162461bcd60e51b81526020600482015260126024820152713830b930b6903632b733ba341032b93937b960711b6044820152606401610ced565b60008281526071602052604090205462010000900463ffffffff1660d3811480610dfa57508063ffffffff1660da145b80610e0c57508063ffffffff1661083e145b80610e1e57508063ffffffff16610850145b8015610e3b575060008381526071602052604090205460ff166001145b8015610e5e575060008381526071602052604090205460ff610100909104166003145b610e975760405162461bcd60e51b815260206004820152600a602482015269323937b81032b93937b960b11b6044820152606401610ced565b60005b82811015610fc557600160716000888885818110610ec857634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000205460ff16148015610f375750600360716000888885818110610f1357634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081019190915260400160002054610100900460ff16145b610f755760405162461bcd60e51b815260206004820152600f60248201526e3830bc903a37b5b2b71032b93937b960891b6044820152606401610ced565b606654610fb39033906001600160a01b0316888885818110610fa757634e487b7160e01b600052603260045260246000fd5b90506020020135611a6b565b80610fbd8161501e565b915050610e9a565b50606754610fde9033906001600160a01b031685611a6b565b600042610fec600143614e14565b604080516020810193909352904090820152606080820186905233901b6bffffffffffffffffffffffff1916608082015260940160408051601f19818403018152919052805160209091012090506000611047600283615039565b90506000816110f85761084c600052607660205260008051602061516c8339815191525463ffffffff16156110c9575061084c6000818152607660205260008051602061516c833981519152805463ffffffff16916110a583614fc3565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061119c565b506108506000818152607660205260008051602061518c833981519152805463ffffffff16916110a583614fc3565b610850600052607660205260008051602061518c8339815191525463ffffffff161561114d57506108506000818152607660205260008051602061518c833981519152805463ffffffff16916110a583614fc3565b5061084c6000818152607660205260008051602061516c833981519152805463ffffffff169161117c83614fc3565b91906101000a81548163ffffffff021916908363ffffffff160217905550505b60006111a66117ab565b6040805160808101825260018082526002602080840191825263ffffffff888116858701908152600d6060870190815260008981526071909452969092209451855493519251965160ff908116600160301b0260ff60301b199890931662010000029790971666ffffffffff0000199388166101000261ffff19909516979091169690961792909217169390931792909217905590915061124890339061395b565b6040805182815263ffffffff84166020820152338183015290517f26eb868424199138ca3409015dad875ffd7cccb3e0ff9544450906f918c5c4789181900360600190a1505050505050505050565b60006301ffc9a760e01b6001600160e01b0319831614806112c857506380ac58cd60e01b6001600160e01b03198316145b806112e35750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606112f3613975565b600201805461130190614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461132d90614fe3565b801561137a5780601f1061134f5761010080835404028352916020019161137a565b820191906000526020600020905b81548152906001019060200180831161135d57829003601f168201915b5050505050905090565b61138c613999565b80606c83815481106113ae57634e487b7160e01b600052603260045260246000fd5b9060005260206000200190805190602001906113cb929190613fc6565b505050565b60006113db826139f3565b6113f8576040516333d1c03960e21b815260040160405180910390fd5b611400613975565b60009283526006016020525060409020546001600160a01b031690565b600061142882612285565b9050336001600160a01b038216146114615761144481336138a5565b611461576040516367d9dca160e11b815260040160405180910390fd5b8261146a613975565b6000848152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b60735433906001600160401b03164210156115165760405162461bcd60e51b815260206004820152600b60248201526a139bdd0814dd185c9d195960aa1b6044820152606401610ced565b607354600160401b90046001600160401b03164211156115665760405162461bcd60e51b815260206004820152600b60248201526a456e64206f662073616c6560a81b6044820152606401610ced565b607354608084901c90600160801b90046001600160401b03164203818111156115bc5760405162461bcd60e51b8152602060048201526008602482015267151a5b59481bdd5d60c21b6044820152606401610ced565b6115c742603c614dc9565b8211156116205760405162461bcd60e51b815260206004820152602160248201527f54696d657374616d70206578636565647320626c6f636b2e74696d657374616d6044820152600760fc1b6064820152608401610ced565b60735461164490600160c01b90046001600160401b031666038d7ea4c68000614df5565b34146116835760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610ced565b326001600160a01b038416146116cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610ced565b60008581526074602052604090205460ff16156117205760405162461bcd60e51b815260206004820152601260248201527114d85b1d081a185cc81899595b881d5cd95960721b6044820152606401610ced565b600061172a6117ab565b905061173784600161395b565b6000868152607460209081526040808320805460ff19166001179055838352607190915290208590611769828261508f565b5050604051869082906001600160a01b038716907fa9a40dec7a304e5915d11358b968c1e8d365992abf20f82285d1df1b30c8e24c90600090a4505050505050565b6000806117b6613975565b600101546117c2613975565b540303919050565b6000818152607160209081526040918290208251608081018452905460ff808216808452610100830482169484019490945263ffffffff6201000083041694830194909452600160301b9004909216606083810191909152606c8054919384938493919291811061184b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001606d826020015160ff168154811061187d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001606e836060015160ff16815481106118af57634e487b7160e01b600052603260045260246000fd5b906000526020600020018280546118c590614fe3565b80601f01602080910402602001604051908101604052809291908181526020018280546118f190614fe3565b801561193e5780601f106119135761010080835404028352916020019161193e565b820191906000526020600020905b81548152906001019060200180831161192157829003601f168201915b5050505050925081805461195190614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461197d90614fe3565b80156119ca5780601f1061199f576101008083540402835291602001916119ca565b820191906000526020600020905b8154815290600101906020018083116119ad57829003601f168201915b505050505091508080546119dd90614fe3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0990614fe3565b8015611a565780601f10611a2b57610100808354040283529160200191611a56565b820191906000526020600020905b815481529060010190602001808311611a3957829003601f168201915b50505050509050935093509350509193909250565b6000611a7682613a2f565b9050836001600160a01b0316816001600160a01b031614611aa95760405162a1148160e81b815260040160405180910390fd5b600080611ab584613abd565b91509150611ada8187611ac53390565b6001600160a01b039081169116811491141790565b611b0557611ae886336138a5565b611b0557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611b2c57604051633a954ecd60e21b815260040160405180910390fd5b611b398686866001613ae5565b8015611b4457600082555b611b4c613975565b6001600160a01b0387166000908152600591909101602052604090208054600019019055611b78613975565b6001600160a01b03861660008181526005929092016020526040909120805460010190554260a01b17600160e11b17611baf613975565b60008681526004919091016020526040902055600160e11b8316611c1e5760018401611bd9613975565b60008281526004919091016020526040902054611c1c57611bf8613975565b548114611c1c5783611c08613975565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b611c6f613999565b60c8831115611cb25760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d75636820706172616d7360881b6044820152606401610ced565b828114611cf75760405162461bcd60e51b81526020600482015260136024820152723830b930b6b9903632b733ba341032b93937b960691b6044820152606401610ced565b60005b83811015611d8257828282818110611d2257634e487b7160e01b600052603260045260246000fd5b90506080020160716000878785818110611d4c57634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000208181611d6d919061508f565b50819050611d7a8161501e565b915050611cfa565b5050505050565b611d91613999565b80606e83815481106113ae57634e487b7160e01b600052603260045260246000fd5b611dbb613999565b606a5480611dfd57606a80546001810182556000919091527f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5101839055612065565b606a611e0a600183614e14565b81548110611e2857634e487b7160e01b600052603260045260246000fd5b9060005260206000200154831115611e7457606a80546001810182556000919091527f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5101839055612065565b6000611e81600183614e14565b90505b606a8181548110611ea557634e487b7160e01b600052603260045260246000fd5b9060005260206000200154841415611ef45760405162461bcd60e51b815260206004820152601260248201527139b0b6b29039ba30b3b2a4a21032b93937b960711b6044820152606401610ced565b8015801590611f375750606a611f0b600183614e14565b81548110611f2957634e487b7160e01b600052603260045260246000fd5b906000526020600020015484115b80611f40575080155b15611f4a57611f5c565b80611f5481614fac565b915050611e84565b606a80611f6a600185614e14565b81548110611f8857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101548354600181810186559484529183209091015590611fb49084614e14565b90505b8181111561203457606a611fcc600183614e14565b81548110611fea57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154606a828154811061201657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001558061202c81614fac565b915050611fb7565b5083606a828154811061205757634e487b7160e01b600052603260045260246000fd5b600091825260209091200155505b6000838152606b60209081526040909120835161208492850190613fc6565b507f309bc4820e81ca2b0ab9dadfeb9e26295d4662fe71b8ba832223d23e44204a2d83836040516120b6929190614cba565b60405180910390a1505050565b6120cb613999565b607660205260008051602061518c833981519152805463ffffffff93841663ffffffff199182161790915561084c60005260008051602061516c8339815191528054929093169116179055565b6069805461212590614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461215190614fe3565b801561219e5780601f106121735761010080835404028352916020019161219e565b820191906000526020600020905b81548152906001019060200180831161218157829003601f168201915b505050505081565b6121ae613999565b6113cb6070838361404a565b6113cb838383604051806020016040528060008152506132eb565b6121dd613999565b606680546001600160a01b039384166001600160a01b03199182161790915560678054929093169116179055565b606b602052600090815260409020805461212590614fe3565b61222c613999565b80606f838154811061224e57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055505050565b60006112e382613a2f565b612298613999565b6001600160801b03908116600160801b02911617607555565b6122b9613999565b606555565b60006001600160a01b0382166122e7576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b036122f7613975565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b606f818154811061233657600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b612368613999565b6123726000613b57565b565b606e818154811061238457600080fd5b90600052602060002001600091509050805461212590614fe3565b6123a7613999565b607380546001600160401b039586166fffffffffffffffffffffffffffffffff1990911617600160401b94861694909402939093176001600160801b0316600160801b928516929092026001600160c01b031691909117600160c01b9190931602919091179055565b612418613999565b60328111156124585760405162461bcd60e51b815260206004820152600c60248201526b0746f206d7563682064726f760a41b6044820152606401610ced565b6000805b828110156124c35783838281811061248457634e487b7160e01b600052603260045260246000fd5b90506020028101906124969190614d39565b6124a4906040810190614cd3565b6124af915083614dc9565b9150806124bb8161501e565b91505061245c565b506000816001600160401b038111156124ec57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612515578160200160208202803683370190505b5090506000805b8481101561281a57600086868381811061254657634e487b7160e01b600052603260045260246000fd5b90506020028101906125589190614d39565b61256190614ea4565b6020810151815151919250146125a75760405162461bcd60e51b815260206004820152600b60248201526a3830b930b69032b93937b960a91b6044820152606401610ced565b6040810151516125ea5760405162461bcd60e51b815260206004820152600e60248201526d3a37b5b2b724a2399032b93937b960911b6044820152606401610ced565b60005b8160400151518110156127155781606001516001600160a01b031661263c8360400151838151811061262f57634e487b7160e01b600052603260045260246000fd5b6020026020010151612285565b6001600160a01b03161461269e5760405162461bcd60e51b8152602060048201526024808201527f7265636569766572206973206e6f74206f776e6572206f662074686520746f6b604482015263195b925160e21b6064820152608401610ced565b816040015181815181106126c257634e487b7160e01b600052603260045260246000fd5b60200260200101518585815181106126ea57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152836126ff8161501e565b945050808061270d9061501e565b9150506125ed565b5060006127206117ab565b905060005b82602001518110156127f257825180518290811061275357634e487b7160e01b600052603260045260246000fd5b602002602001015160716000838561276b9190614dc9565b8152602080820192909252604090810160002083518154938501519285015160609095015160ff908116600160301b0260ff60301b1963ffffffff90971662010000029690961666ffffffffff0000199482166101000261ffff199096169190921617939093179190911691909117919091179055806127ea8161501e565b915050612725565b506128058260600151836020015161395b565b505080806128129061501e565b91505061251c565b507f224234ef0816b9f8f4769927465e1f03b82588d2329ece9ea7e3731bcc98e8b5868360405161284c929190614c7a565b60405180910390a1505050505050565b606d818154811061238457600080fd5b6000805160206151ac83398151915254610100900460ff166128a1576000805160206151ac8339815191525460ff16156128a5565b303b155b6129175760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610ced565b6000805160206151ac83398151915254610100900460ff16158015612953576000805160206151ac833981519152805461ffff19166101011790555b600054610100900460ff16158080156129735750600054600160ff909116105b8061298d5750303b15801561298d575060005460ff166001145b6129f05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610ced565b6000805460ff191660011790558015612a13576000805461ff0019166101001790555b612a1d8686613ba9565b612a25613be7565b61271060655560408051608081018252600c8183019081526b4d6f64656c204368616e676560a01b606083015281528151808301909252600982526814dd185c8810d85c9960ba1b602083810191909152810191909152612a8a90606c9060026140fa565b506040518060800160405280604051806040016040528060098152602001684c6567656e6461727960b81b8152508152602001604051806040016040528060048152602001634570696360e01b8152508152602001604051806040016040528060048152602001635261726560e01b81525081526020016040518060400160405280600681526020016521b7b6b6b7b760d11b815250815250606d906004612b33929190614153565b50604080516102608101825260126102208201818152714261736b657462616c6c5f6672616d655f4160701b610240840152825282518084018452908152712130b9b5b2ba3130b6362fb33930b6b2afa160711b60208281019190915280830191909152825180840184526007808252662134ba31b7b4b760c91b828401528385019190915283518085018552600c8082526b4d696e695f556e69666f726d60a01b8285015260608501919091528451808601865260108082526f416e696d655f6368617261637465727360801b82860152608086019190915285518087018752600880825267086c2e4c8be84def60c31b8287015260a087019190915286518088018852600f81526e29b1b4b2b731b2afb334b1ba34b7b760891b8187015260c08701528651808801885284815266446f6c6c61727360c81b8187015260e0870152865180880188529182526f5669727475616c5f536e65616b65727360801b8286015261010086019190915285518087018752600a8082526908cd2ceeae4cabec4def60b31b8287015261012087019190915286518088018852938452664d6f6e6b65797360c81b8486015261014086019390935285518087018752600e81526d14ddda5d18da1a5b99d7d0d85c9960921b81860152610160860152855180870187528281526b14d8da595b98d957d0d85c9960a21b8186015261018086015285518087018752600981526811dbdb1917d0d85c9960ba1b818601526101a0860152855180870187529182526b436172645f436972636c657360a01b828501526101c0850191909152845180860186529081526710d85c9917d4995960c21b818401526101e08401528351808501909452835269436172645f576869746560b01b90830152610200810191909152612dd190606e9060116141a0565b50604080516101808101825260d2815260d4602082015260d59181019190915260d6606082015260d7608082015260d960a082015261084b60c082015261084c60e082015260d361010082015260da61012082015261083e610140820152610850610160820152612e4690606f90600c6141ed565b506040805160e08101825260d2815260d4602082015260d59181019190915260d7606082015260d9608082015261084b60a082015261084c60c0820152612e919060709060076141ed565b50606680546001600160a01b038087166001600160a01b031992831617909255606780549286169290911691909117905560005b607054811015612f6b5760856072600060708481548110612ef657634e487b7160e01b600052603260045260246000fd5b6000918252602080832060088304015460079092166004026101000a90910463ffffffff90811684528382019490945260409283018220600283528152828220600183528152828220600d8352905220805463ffffffff19169290911691909117905580612f638161501e565b915050612ec5565b508015612fb2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015611d825750506000805160206151ac833981519152805461ff0019169055505050565b612fe0613999565b60328111156130205760405162461bcd60e51b815260206004820152600c60248201526b0746f206d7563682064726f760a41b6044820152606401610ced565b60005b818110156113cb57600083838381811061304d57634e487b7160e01b600052603260045260246000fd5b905060200281019061305f9190614d1a565b61306890614e2b565b6020810151815151919250146130ae5760405162461bcd60e51b815260206004820152600b60248201526a3830b930b69032b93937b960a91b6044820152606401610ced565b60006130b86117ab565b905060005b826020015181101561318a5782518051829081106130eb57634e487b7160e01b600052603260045260246000fd5b60200260200101516071600083856131039190614dc9565b8152602080820192909252604090810160002083518154938501519285015160609095015160ff908116600160301b0260ff60301b1963ffffffff90971662010000029690961666ffffffffff0000199482166101000261ffff199096169190921617939093179190911691909117919091179055806131828161501e565b9150506130bd565b5061319d8260400151836020015161395b565b505080806131aa9061501e565b915050613023565b60606131bc613975565b600301805461130190614fe3565b6001600160a01b0382163314156131f45760405163b06307db60e01b815260040160405180910390fd5b806131fd613975565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b606a818154811061328157600080fd5b600091825260209091200154905081565b6070818154811061233657600080fd5b6132aa613999565b80516132bd906069906020840190613fc6565b5050565b6132c9613999565b80606d83815481106113ae57634e487b7160e01b600052603260045260246000fd5b6132f6848484611a6b565b6001600160a01b0383163b1561332f5761331284848484613c16565b61332f576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b61333d613999565b60006133476117ab565b9050613353828461395b565b60408051828152602081018590526001600160a01b038416918101919091527f70b05cddccca9a386d19ef2bf01d0e4c8cb3d4d6e7e9a226a23d21e06fbbe289906060016120b6565b60606133a7826139f3565b6133ec5760405162461bcd60e51b81526020600482015260166024820152753a37b5b2b71034b21034b9903737ba1032bc34b9ba1760511b6044820152606401610ced565b606a5460609080613489576069805461340490614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461343090614fe3565b801561347d5780601f106134525761010080835404028352916020019161347d565b820191906000526020600020905b81548152906001019060200180831161346057829003601f168201915b50505050509150613747565b600080613497600184614e14565b90505b80821161374457600060026134af8385614dc9565b6134b99190614de1565b90508061363f57606a6000815481106134e257634e487b7160e01b600052603260045260246000fd5b906000526020600020015487116135c357606b6000606a60008154811061351957634e487b7160e01b600052603260045260246000fd5b90600052602060002001548152602001908152602001600020805461353d90614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461356990614fe3565b80156135b65780601f1061358b576101008083540402835291602001916135b6565b820191906000526020600020905b81548152906001019060200180831161359957829003601f168201915b5050505050945050613744565b83600114156135d9576069805461353d90614fe3565b606a6001815481106135fb57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154871161363257606b6000606a60018154811061351957634e487b7160e01b600052603260045260246000fd5b6069805461353d90614fe3565b606a818154811061366057634e487b7160e01b600052603260045260246000fd5b906000526020600020015487116136e557606a61367e600183614e14565b8154811061369c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001548711156136d357606b6000606a838154811061351957634e487b7160e01b600052603260045260246000fd5b6136de600182614e14565b915061373e565b9150816136f3600183614e14565b81141561373e57606a828154811061371b57634e487b7160e01b600052603260045260246000fd5b906000526020600020015487111561373a576069805461353d90614fe3565b8192505b5061349a565b50505b600082511161378057606961375b85613d0d565b60405160200161376c929190614aac565b6040516020818303038152906040526137ab565b8161378a85613d0d565b60405160200161379b929190614a7d565b6040516020818303038152906040525b949350505050565b6137bb613999565b6000828152606b6020526040902080546137d490614fe3565b151590506138385760405162461bcd60e51b815260206004820152602b60248201527f55524920636f72726573706f6e64696e6720746f2069642073686f756c64206e60448201526a6f7420626520656d70747960a81b6064820152608401610ced565b6000828152606b60209081526040909120825161385792840190613fc6565b507f90632ebfccb36543d40f93c24990353a77ef3e61855f649bdf07a9f20ac84e9c8282604051613889929190614cba565b60405180910390a15050565b606c818154811061238457600080fd5b60006138af613975565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b6138ea613999565b6001600160a01b03811661394f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ced565b61395881613b57565b50565b6132bd828260405180602001604052806000815250613d5c565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6033546001600160a01b031633146123725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ced565b60006139fd613975565b54821080156112e35750600160e01b613a14613975565b60008481526004919091016020526040902054161592915050565b600081613a3a613975565b54811015613aa4576000613a4c613975565b600083815260049190910160205260409020549050600160e01b8116613aa2575b80613a9b57613a7a613975565b60001990920160008181526004939093016020526040909220549050613a6d565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806000613aca613975565b60009485526006016020525050604090912080549092909150565b6001600160a01b03841661332f5760655481613aff6117ab565b613b099190614dc9565b111561332f5760405162461bcd60e51b815260206004820152601760248201527f6578636565646564206d6178696d756d20737570706c790000000000000000006044820152606401610ced565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805160206151ac83398151915254610100900460ff16613bdd5760405162461bcd60e51b8152600401610ced90614bdb565b6132bd8282613dd2565b600054610100900460ff16613c0e5760405162461bcd60e51b8152600401610ced90614c2f565b612372613e55565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613c4b903390899088908890600401614b52565b602060405180830381600087803b158015613c6557600080fd5b505af1925050508015613c95575060408051601f3d908101601f19168201909252613c9291810190614730565b60015b613cf0573d808015613cc3576040519150601f19603f3d011682016040523d82523d6000602084013e613cc8565b606091505b508051613ce8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810191829052607f0190826030600a8206018353600a90045b8015613d4a57600183039250600a81066030018353600a9004613d2c565b50819003601f19909101908152919050565b613d668383613e85565b6001600160a01b0383163b156113cb576000613d80613975565b5490508281035b613d9a6000868380600101945086613c16565b613db7576040516368d2bf6b60e11b815260040160405180910390fd5b818110613d875781613dc7613975565b5414611d8257600080fd5b6000805160206151ac83398151915254610100900460ff16613e065760405162461bcd60e51b8152600401610ced90614bdb565b81613e0f613975565b6002019080519060200190613e25929190613fc6565b5080613e2f613975565b6003019080519060200190613e45929190613fc6565b506000613e50613975565b555050565b600054610100900460ff16613e7c5760405162461bcd60e51b8152600401610ced90614c2f565b61237233613b57565b6000613e8f613975565b54905081613eb05760405163b562e8dd60e01b815260040160405180910390fd5b613ebd6000848385613ae5565b680100000000000000018202613ed1613975565b6001600160a01b038516600081815260059290920160205260409091208054929092019091554260a01b6001841460e11b1717613f0c613975565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114613f9657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613f5e565b5081613fb457604051622e076360e81b815260040160405180910390fd5b80613fbd613975565b55506113cb9050565b828054613fd290614fe3565b90600052602060002090601f016020900481019282613ff4576000855561403a565b82601f1061400d57805160ff191683800117855561403a565b8280016001018555821561403a579182015b8281111561403a57825182559160200191906001019061401f565b50614046929150614258565b5090565b8280548282559060005260206000209060070160089004810192821561403a5791602002820160005b838211156140bd57833563ffffffff1683826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302614073565b80156140ed5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026140bd565b5050614046929150614258565b828054828255906000526020600020908101928215614147579160200282015b828111156141475782518051614137918491602090910190613fc6565b509160200191906001019061411a565b5061404692915061426d565b828054828255906000526020600020908101928215614147579160200282015b828111156141475782518051614190918491602090910190613fc6565b5091602001919060010190614173565b828054828255906000526020600020908101928215614147579160200282015b8281111561414757825180516141dd918491602090910190613fc6565b50916020019190600101906141c0565b8280548282559060005260206000209060070160089004810192821561403a5791602002820160005b838211156140bd57835183826101000a81548163ffffffff021916908361ffff1602179055509260200192600401602081600301049283019260010302614216565b5b808211156140465760008155600101614259565b80821115614046576000614281828261428a565b5060010161426d565b50805461429690614fe3565b6000825580601f106142a6575050565b601f0160209004906000526020600020908101906139589190614258565b60006001600160401b038311156142dd576142dd615079565b6142f0601f8401601f1916602001614d76565b905082815283838301111561430457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461433257600080fd5b919050565b60008083601f840112614348578182fd5b5081356001600160401b0381111561435e578182fd5b6020830191508360208260051b850101111561437957600080fd5b9250929050565b600082601f830112614390578081fd5b813560206143a56143a083614da6565b614d76565b80838252828201915082860187848660071b89010111156143c4578586fd5b855b8581101561443d57608080838b0312156143de578788fd5b6143e6614d4e565b83356143f18161515c565b8152838701356144008161515c565b818801526040848101356144138161514a565b908201526060848101356144268161515c565b9082015285529385019391909101906001016143c6565b5090979650505050505050565b600082601f83011261445a578081fd5b613a9b838335602085016142c4565b80356001600160801b038116811461433257600080fd5b80356001600160401b038116811461433257600080fd5b6000602082840312156144a8578081fd5b613a9b8261431b565b600080604083850312156144c3578081fd5b6144cc8361431b565b91506144da6020840161431b565b90509250929050565b6000806000606084860312156144f7578081fd5b6145008461431b565b925061450e6020850161431b565b9150604084013590509250925092565b60008060008060808587031215614533578182fd5b61453c8561431b565b935061454a6020860161431b565b92506040850135915060608501356001600160401b0381111561456b578182fd5b8501601f8101871361457b578182fd5b61458a878235602084016142c4565b91505092959194509250565b600080604083850312156145a8578182fd5b6145b18361431b565b9150602083013580151581146145c5578182fd5b809150509250929050565b600080604083850312156145e2578182fd5b6145eb8361431b565b946020939093013593505050565b6000806020838503121561460b578182fd5b82356001600160401b03811115614620578283fd5b61462c85828601614337565b90969095509350505050565b6000806000806040858703121561464d578182fd5b84356001600160401b0380821115614663578384fd5b61466f88838901614337565b90965094506020870135915080821115614687578384fd5b818701915087601f83011261469a578384fd5b8135818111156146a8578485fd5b8860208260071b85010111156146bc578485fd5b95989497505060200194505050565b6000806000604084860312156146df578081fd5b83356001600160401b038111156146f4578182fd5b61470086828701614337565b909790965060209590950135949350505050565b600060208284031215614725578081fd5b8135613a9b81615134565b600060208284031215614741578081fd5b8151613a9b81615134565b60006020828403121561475d578081fd5b81356001600160401b03811115614772578182fd5b6137ab8482850161444a565b60008060008060808587031215614793578182fd5b84356001600160401b03808211156147a9578384fd5b6147b58883890161444a565b955060208701359150808211156147ca578384fd5b506147d78782880161444a565b9350506147e66040860161431b565b91506147f46060860161431b565b905092959194509250565b60008060408385031215614811578182fd5b61481a83614469565b91506144da60208401614469565b600060208284031215614839578081fd5b5035919050565b60008060408385031215614852578182fd5b823591506144da6020840161431b565b600080600060408486031215614876578081fd5b8335925060208401356001600160401b03811115614892578182fd5b61489e86828701614337565b9497909650939450505050565b600080604083850312156148bd578182fd5b8235915060208301356001600160401b038111156148d9578182fd5b6148e58582860161444a565b9150509250929050565b60008082840360a0811215614902578283fd5b833592506080601f1982011215614917578182fd5b506020830190509250929050565b60008060408385031215614937578182fd5b8235915060208301356145c58161514a565b60006020828403121561495a578081fd5b8135613a9b8161514a565b60008060408385031215614977578182fd5b82356149828161514a565b915060208301356145c58161514a565b600080600080608085870312156149a7578182fd5b84356149b28161514a565b935060208501356149c28161515c565b925060408501356149d28161515c565b915060608501356149e28161515c565b939692955090935050565b60008060008060808587031215614a02578182fd5b614a0b85614480565b9350614a1960208601614480565b9250614a2760408601614480565b91506147f460608601614480565b60008151808452614a4d816020860160208601614f80565b601f01601f19169290920160200192915050565b60008151614a73818560208601614f80565b9290920192915050565b60008351614a8f818460208801614f80565b835190830190614aa3818360208801614f80565b01949350505050565b600080845482600182811c915080831680614ac857607f831692505b6020808410821415614ae857634e487b7160e01b87526022600452602487fd5b818015614afc5760018114614b0d57614b39565b60ff19861689528489019650614b39565b60008b815260209020885b86811015614b315781548b820152908501908301614b18565b505084890196505b505050505050614b498185614a61565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614b8590830184614a35565b9695505050505050565b602081526000613a9b6020830184614a35565b606081526000614bb56060830186614a35565b8281036020840152614bc78186614a35565b90508281036040840152614b858185614a35565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006040820184835260206040818501528185518084526060860191508287019350845b8181101561443d57845183529383019391830191600101614c9e565b8281526040602082015260006137ab6040830184614a35565b6000808335601e19843603018112614ce9578283fd5b8301803591506001600160401b03821115614d02578283fd5b6020019150600581901b360382131561437957600080fd5b60008235605e19833603018112614d2f578182fd5b9190910192915050565b60008235607e19833603018112614d2f578182fd5b604051608081016001600160401b0381118282101715614d7057614d70615079565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614d9e57614d9e615079565b604052919050565b60006001600160401b03821115614dbf57614dbf615079565b5060051b60200190565b60008219821115614ddc57614ddc61504d565b500190565b600082614df057614df0615063565b500490565b6000816000190483118215151615614e0f57614e0f61504d565b500290565b600082821015614e2657614e2661504d565b500390565b600060608236031215614e3c578081fd5b604051606081016001600160401b038282108183111715614e5f57614e5f615079565b816040528435915080821115614e73578384fd5b50614e8036828601614380565b82525060208301356020820152614e996040840161431b565b604082015292915050565b600060808236031215614eb5578081fd5b614ebd614d4e565b82356001600160401b0380821115614ed3578384fd5b614edf36838701614380565b8352602091508185013582840152604085013581811115614efe578485fd5b8501905036601f820112614f10578384fd5b8035614f1e6143a082614da6565b8181528381019083850136600585901b860187011115614f3c578788fd5b8794505b83851015614f5e578035835260019490940193918501918501614f40565b50604086015250614f75925050506060840161431b565b606082015292915050565b60005b83811015614f9b578181015183820152602001614f83565b8381111561332f5750506000910152565b600081614fbb57614fbb61504d565b506000190190565b600063ffffffff821680614fd957614fd961504d565b6000190192915050565b600181811c90821680614ff757607f821691505b6020821081141561501857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156150325761503261504d565b5060010190565b60008261504857615048615063565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b813561509a8161515c565b60ff8116905081548160ff19821617835560208401356150b98161515c565b61ff008160081b169050808361ffff1984161717845560408501356150dd8161514a565b65ffffffff00008160101b1690508365ffffffffffff19841617935080848317178555606086013592506151108361515c565b60ff60301b1993909316179190911760309190911b66ff0000000000001617905550565b6001600160e01b03198116811461395857600080fd5b63ffffffff8116811461395857600080fd5b60ff8116811461395857600080fdfe19154197e630bee14ee00a08f584df45719fc09be853375551a2437e2061493fa4152dc3c9abdc34db68d3273948665907e439faa190ac9b74721c1531eea798ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa264697066735822122086801f92292405e60bb2da6388256c76ce6051d7d05855d70f4bf2db5e3eb9de64736f6c63430008040033

Deployed Bytecode

0x6080604052600436106103ad5760003560e01c8063715018a6116101e7578063b5c82bd11161010d578063dbe7e3bd116100a0578063ed338ff11161006f578063ed338ff114610bfd578063efebc72014610c24578063f2fde38b14610c4b578063fbfa77cf14610c6b57600080fd5b8063dbe7e3bd14610b5d578063df65301f14610b8d578063df7a95ae14610bbd578063e985e9c514610bdd57600080fd5b8063c87b56dd116100dc578063c87b56dd14610ae7578063d5abeb0114610b07578063d5dbbf7814610b1d578063da6af97114610b3d57600080fd5b8063b5c82bd114610a4f578063b88d4fde14610a6f578063bacf251b14610a8f578063bc4f1a7e14610ac757600080fd5b80638f15b41411610185578063a22cb46511610154578063a22cb465146109cf578063a6849b24146109ef578063ae6d907314610a0f578063b023b31514610a2f57600080fd5b80638f15b4141461095357806392175a1d1461097357806395d89b4114610993578063a035b1fe146109a857600080fd5b80638189e57b116101c15780638189e57b146108d557806386a5df97146108f55780638b023075146109155780638da5cb5b1461093557600080fd5b8063715018a61461081d578063717bd9e714610832578063775fd822146108b557600080fd5b806333de0ef1116102d7578063583ce4171161026a5780636a28d9e7116102395780636a28d9e71461079d5780636f8b44b0146107bd57806370a08231146107dd57806370d2dab8146107fd57600080fd5b8063583ce417146107275780635f1bcffc146107475780635fdcc76e146107675780636352211e1461077d57600080fd5b806342842e0e116102a657806342842e0e146106aa578063432a3897146106ca5780634a307a84146106e05780634c451a6a1461070757600080fd5b806333de0ef11461060857806333fb5b2b146106285780633c4418cf146106755780633f3840061461068a57600080fd5b80631533bf281161034f57806323b872dd1161031e57806323b872dd146105885780632ba7930c146105a85780633049255e146105c857806333cfcb9f146105e857600080fd5b80631533bf28146104eb57806318160ddd146104fe5780631cbaee2d146105215780631f4f5a231461055957600080fd5b8063072bb1781161038b578063072bb1781461042b578063081812fc1461044b578063084d8e5014610483578063095ea7b3146104cb57600080fd5b8063011ab641146103b257806301ffc9a7146103d457806306fdde0314610409575b600080fd5b3480156103be57600080fd5b506103d26103cd3660046146cb565b610c8b565b005b3480156103e057600080fd5b506103f46103ef366004614714565b611297565b60405190151581526020015b60405180910390f35b34801561041557600080fd5b5061041e6112e9565b6040516104009190614b8f565b34801561043757600080fd5b506103d26104463660046148ab565b611384565b34801561045757600080fd5b5061046b610466366004614828565b6113d0565b6040516001600160a01b039091168152602001610400565b34801561048f57600080fd5b506104b661049e366004614949565b60766020526000908152604090205463ffffffff1681565b60405163ffffffff9091168152602001610400565b3480156104d757600080fd5b506103d26104e63660046145d0565b61141d565b6103d26104f93660046148ef565b6114cb565b34801561050a57600080fd5b506105136117ab565b604051908152602001610400565b34801561052d57600080fd5b50607354610541906001600160401b031681565b6040516001600160401b039091168152602001610400565b34801561056557600080fd5b50610579610574366004614828565b6117ca565b60405161040093929190614ba2565b34801561059457600080fd5b506103d26105a33660046144e3565b611a6b565b3480156105b457600080fd5b506103d26105c3366004614638565b611c67565b3480156105d457600080fd5b506103d26105e33660046148ab565b611d89565b3480156105f457600080fd5b506103d26106033660046148ab565b611db3565b34801561061457600080fd5b506103d2610623366004614965565b6120c3565b34801561063457600080fd5b506104b6610643366004614992565b607260209081526000948552604080862082529385528385208152918452828420909152825290205463ffffffff1681565b34801561068157600080fd5b5061041e612118565b34801561069657600080fd5b506103d26106a53660046145f9565b6121a6565b3480156106b657600080fd5b506103d26106c53660046144e3565b6121ba565b3480156106d657600080fd5b506104b661084c81565b3480156106ec57600080fd5b5060735461054190600160801b90046001600160401b031681565b34801561071357600080fd5b506103d26107223660046144b1565b6121d5565b34801561073357600080fd5b5061041e610742366004614828565b61220b565b34801561075357600080fd5b506103d2610762366004614925565b612224565b34801561077357600080fd5b506104b661085081565b34801561078957600080fd5b5061046b610798366004614828565b612285565b3480156107a957600080fd5b506103d26107b83660046147ff565b612290565b3480156107c957600080fd5b506103d26107d8366004614828565b6122b1565b3480156107e957600080fd5b506105136107f8366004614497565b6122be565b34801561080957600080fd5b506104b6610818366004614828565b612326565b34801561082957600080fd5b506103d2612360565b34801561083e57600080fd5b5061088261084d366004614828565b60716020526000908152604090205460ff80821691610100810482169163ffffffff6201000083041691600160301b90041684565b6040805160ff9586168152938516602085015263ffffffff90921691830191909152919091166060820152608001610400565b3480156108c157600080fd5b5061041e6108d0366004614828565b612374565b3480156108e157600080fd5b506103d26108f03660046149ed565b61239f565b34801561090157600080fd5b506103d2610910366004614862565b612410565b34801561092157600080fd5b5061041e610930366004614828565b61285c565b34801561094157600080fd5b506033546001600160a01b031661046b565b34801561095f57600080fd5b506103d261096e36600461477e565b61286c565b34801561097f57600080fd5b506103d261098e3660046145f9565b612fd8565b34801561099f57600080fd5b5061041e6131b2565b3480156109b457600080fd5b5060735461054190600160c01b90046001600160401b031681565b3480156109db57600080fd5b506103d26109ea366004614596565b6131ca565b3480156109fb57600080fd5b50610513610a0a366004614828565b613271565b348015610a1b57600080fd5b506104b6610a2a366004614828565b613292565b348015610a3b57600080fd5b506103d2610a4a36600461474c565b6132a2565b348015610a5b57600080fd5b506103d2610a6a3660046148ab565b6132c1565b348015610a7b57600080fd5b506103d2610a8a36600461451e565b6132eb565b348015610a9b57600080fd5b50607554610aaf906001600160801b031681565b6040516001600160801b039091168152602001610400565b348015610ad357600080fd5b506103d2610ae2366004614840565b613335565b348015610af357600080fd5b5061041e610b02366004614828565b61339c565b348015610b1357600080fd5b5061051360655481565b348015610b2957600080fd5b5060675461046b906001600160a01b031681565b348015610b4957600080fd5b506103d2610b583660046148ab565b6137b3565b348015610b6957600080fd5b506103f4610b78366004614828565b60686020526000908152604090205460ff1681565b348015610b9957600080fd5b506103f4610ba8366004614828565b60746020526000908152604090205460ff1681565b348015610bc957600080fd5b5061041e610bd8366004614828565b613895565b348015610be957600080fd5b506103f4610bf83660046144b1565b6138a5565b348015610c0957600080fd5b5060735461054190600160401b90046001600160401b031681565b348015610c3057600080fd5b50607554610aaf90600160801b90046001600160801b031681565b348015610c5757600080fd5b506103d2610c66366004614497565b6138e2565b348015610c7757600080fd5b5060665461046b906001600160a01b031681565b6075546001600160801b03164210801590610cb85750607554600160801b90046001600160801b03164211155b610cf65760405162461bcd60e51b815260206004820152600a6024820152693a34b6b29032b93937b960b11b60448201526064015b60405180910390fd5b61084c600052607660205260008051602061516c8339815191525463ffffffff16151580610d435750610850600052607660205260008051602061518c8339815191525463ffffffff1615155b610d845760405162461bcd60e51b81526020600482015260126024820152711cddd85c0818d85c99081d5cd959081bdd5d60721b6044820152606401610ced565b8160038114610dca5760405162461bcd60e51b81526020600482015260126024820152713830b930b6903632b733ba341032b93937b960711b6044820152606401610ced565b60008281526071602052604090205462010000900463ffffffff1660d3811480610dfa57508063ffffffff1660da145b80610e0c57508063ffffffff1661083e145b80610e1e57508063ffffffff16610850145b8015610e3b575060008381526071602052604090205460ff166001145b8015610e5e575060008381526071602052604090205460ff610100909104166003145b610e975760405162461bcd60e51b815260206004820152600a602482015269323937b81032b93937b960b11b6044820152606401610ced565b60005b82811015610fc557600160716000888885818110610ec857634e487b7160e01b600052603260045260246000fd5b602090810292909201358352508101919091526040016000205460ff16148015610f375750600360716000888885818110610f1357634e487b7160e01b600052603260045260246000fd5b6020908102929092013583525081019190915260400160002054610100900460ff16145b610f755760405162461bcd60e51b815260206004820152600f60248201526e3830bc903a37b5b2b71032b93937b960891b6044820152606401610ced565b606654610fb39033906001600160a01b0316888885818110610fa757634e487b7160e01b600052603260045260246000fd5b90506020020135611a6b565b80610fbd8161501e565b915050610e9a565b50606754610fde9033906001600160a01b031685611a6b565b600042610fec600143614e14565b604080516020810193909352904090820152606080820186905233901b6bffffffffffffffffffffffff1916608082015260940160408051601f19818403018152919052805160209091012090506000611047600283615039565b90506000816110f85761084c600052607660205260008051602061516c8339815191525463ffffffff16156110c9575061084c6000818152607660205260008051602061516c833981519152805463ffffffff16916110a583614fc3565b91906101000a81548163ffffffff021916908363ffffffff1602179055505061119c565b506108506000818152607660205260008051602061518c833981519152805463ffffffff16916110a583614fc3565b610850600052607660205260008051602061518c8339815191525463ffffffff161561114d57506108506000818152607660205260008051602061518c833981519152805463ffffffff16916110a583614fc3565b5061084c6000818152607660205260008051602061516c833981519152805463ffffffff169161117c83614fc3565b91906101000a81548163ffffffff021916908363ffffffff160217905550505b60006111a66117ab565b6040805160808101825260018082526002602080840191825263ffffffff888116858701908152600d6060870190815260008981526071909452969092209451855493519251965160ff908116600160301b0260ff60301b199890931662010000029790971666ffffffffff0000199388166101000261ffff19909516979091169690961792909217169390931792909217905590915061124890339061395b565b6040805182815263ffffffff84166020820152338183015290517f26eb868424199138ca3409015dad875ffd7cccb3e0ff9544450906f918c5c4789181900360600190a1505050505050505050565b60006301ffc9a760e01b6001600160e01b0319831614806112c857506380ac58cd60e01b6001600160e01b03198316145b806112e35750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606112f3613975565b600201805461130190614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461132d90614fe3565b801561137a5780601f1061134f5761010080835404028352916020019161137a565b820191906000526020600020905b81548152906001019060200180831161135d57829003601f168201915b5050505050905090565b61138c613999565b80606c83815481106113ae57634e487b7160e01b600052603260045260246000fd5b9060005260206000200190805190602001906113cb929190613fc6565b505050565b60006113db826139f3565b6113f8576040516333d1c03960e21b815260040160405180910390fd5b611400613975565b60009283526006016020525060409020546001600160a01b031690565b600061142882612285565b9050336001600160a01b038216146114615761144481336138a5565b611461576040516367d9dca160e11b815260040160405180910390fd5b8261146a613975565b6000848152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b60735433906001600160401b03164210156115165760405162461bcd60e51b815260206004820152600b60248201526a139bdd0814dd185c9d195960aa1b6044820152606401610ced565b607354600160401b90046001600160401b03164211156115665760405162461bcd60e51b815260206004820152600b60248201526a456e64206f662073616c6560a81b6044820152606401610ced565b607354608084901c90600160801b90046001600160401b03164203818111156115bc5760405162461bcd60e51b8152602060048201526008602482015267151a5b59481bdd5d60c21b6044820152606401610ced565b6115c742603c614dc9565b8211156116205760405162461bcd60e51b815260206004820152602160248201527f54696d657374616d70206578636565647320626c6f636b2e74696d657374616d6044820152600760fc1b6064820152608401610ced565b60735461164490600160c01b90046001600160401b031666038d7ea4c68000614df5565b34146116835760405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606401610ced565b326001600160a01b038416146116cc5760405162461bcd60e51b815260206004820152600e60248201526d24b73b30b634b21039b2b73232b960911b6044820152606401610ced565b60008581526074602052604090205460ff16156117205760405162461bcd60e51b815260206004820152601260248201527114d85b1d081a185cc81899595b881d5cd95960721b6044820152606401610ced565b600061172a6117ab565b905061173784600161395b565b6000868152607460209081526040808320805460ff19166001179055838352607190915290208590611769828261508f565b5050604051869082906001600160a01b038716907fa9a40dec7a304e5915d11358b968c1e8d365992abf20f82285d1df1b30c8e24c90600090a4505050505050565b6000806117b6613975565b600101546117c2613975565b540303919050565b6000818152607160209081526040918290208251608081018452905460ff808216808452610100830482169484019490945263ffffffff6201000083041694830194909452600160301b9004909216606083810191909152606c8054919384938493919291811061184b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001606d826020015160ff168154811061187d57634e487b7160e01b600052603260045260246000fd5b90600052602060002001606e836060015160ff16815481106118af57634e487b7160e01b600052603260045260246000fd5b906000526020600020018280546118c590614fe3565b80601f01602080910402602001604051908101604052809291908181526020018280546118f190614fe3565b801561193e5780601f106119135761010080835404028352916020019161193e565b820191906000526020600020905b81548152906001019060200180831161192157829003601f168201915b5050505050925081805461195190614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461197d90614fe3565b80156119ca5780601f1061199f576101008083540402835291602001916119ca565b820191906000526020600020905b8154815290600101906020018083116119ad57829003601f168201915b505050505091508080546119dd90614fe3565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0990614fe3565b8015611a565780601f10611a2b57610100808354040283529160200191611a56565b820191906000526020600020905b815481529060010190602001808311611a3957829003601f168201915b50505050509050935093509350509193909250565b6000611a7682613a2f565b9050836001600160a01b0316816001600160a01b031614611aa95760405162a1148160e81b815260040160405180910390fd5b600080611ab584613abd565b91509150611ada8187611ac53390565b6001600160a01b039081169116811491141790565b611b0557611ae886336138a5565b611b0557604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516611b2c57604051633a954ecd60e21b815260040160405180910390fd5b611b398686866001613ae5565b8015611b4457600082555b611b4c613975565b6001600160a01b0387166000908152600591909101602052604090208054600019019055611b78613975565b6001600160a01b03861660008181526005929092016020526040909120805460010190554260a01b17600160e11b17611baf613975565b60008681526004919091016020526040902055600160e11b8316611c1e5760018401611bd9613975565b60008281526004919091016020526040902054611c1c57611bf8613975565b548114611c1c5783611c08613975565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b611c6f613999565b60c8831115611cb25760405162461bcd60e51b815260206004820152600f60248201526e746f6f206d75636820706172616d7360881b6044820152606401610ced565b828114611cf75760405162461bcd60e51b81526020600482015260136024820152723830b930b6b9903632b733ba341032b93937b960691b6044820152606401610ced565b60005b83811015611d8257828282818110611d2257634e487b7160e01b600052603260045260246000fd5b90506080020160716000878785818110611d4c57634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000208181611d6d919061508f565b50819050611d7a8161501e565b915050611cfa565b5050505050565b611d91613999565b80606e83815481106113ae57634e487b7160e01b600052603260045260246000fd5b611dbb613999565b606a5480611dfd57606a80546001810182556000919091527f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5101839055612065565b606a611e0a600183614e14565b81548110611e2857634e487b7160e01b600052603260045260246000fd5b9060005260206000200154831115611e7457606a80546001810182556000919091527f116fea137db6e131133e7f2bab296045d8f41cc5607279db17b218cab0929a5101839055612065565b6000611e81600183614e14565b90505b606a8181548110611ea557634e487b7160e01b600052603260045260246000fd5b9060005260206000200154841415611ef45760405162461bcd60e51b815260206004820152601260248201527139b0b6b29039ba30b3b2a4a21032b93937b960711b6044820152606401610ced565b8015801590611f375750606a611f0b600183614e14565b81548110611f2957634e487b7160e01b600052603260045260246000fd5b906000526020600020015484115b80611f40575080155b15611f4a57611f5c565b80611f5481614fac565b915050611e84565b606a80611f6a600185614e14565b81548110611f8857634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101548354600181810186559484529183209091015590611fb49084614e14565b90505b8181111561203457606a611fcc600183614e14565b81548110611fea57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154606a828154811061201657634e487b7160e01b600052603260045260246000fd5b6000918252602090912001558061202c81614fac565b915050611fb7565b5083606a828154811061205757634e487b7160e01b600052603260045260246000fd5b600091825260209091200155505b6000838152606b60209081526040909120835161208492850190613fc6565b507f309bc4820e81ca2b0ab9dadfeb9e26295d4662fe71b8ba832223d23e44204a2d83836040516120b6929190614cba565b60405180910390a1505050565b6120cb613999565b607660205260008051602061518c833981519152805463ffffffff93841663ffffffff199182161790915561084c60005260008051602061516c8339815191528054929093169116179055565b6069805461212590614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461215190614fe3565b801561219e5780601f106121735761010080835404028352916020019161219e565b820191906000526020600020905b81548152906001019060200180831161218157829003601f168201915b505050505081565b6121ae613999565b6113cb6070838361404a565b6113cb838383604051806020016040528060008152506132eb565b6121dd613999565b606680546001600160a01b039384166001600160a01b03199182161790915560678054929093169116179055565b606b602052600090815260409020805461212590614fe3565b61222c613999565b80606f838154811061224e57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055505050565b60006112e382613a2f565b612298613999565b6001600160801b03908116600160801b02911617607555565b6122b9613999565b606555565b60006001600160a01b0382166122e7576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b036122f7613975565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b606f818154811061233657600080fd5b9060005260206000209060089182820401919006600402915054906101000a900463ffffffff1681565b612368613999565b6123726000613b57565b565b606e818154811061238457600080fd5b90600052602060002001600091509050805461212590614fe3565b6123a7613999565b607380546001600160401b039586166fffffffffffffffffffffffffffffffff1990911617600160401b94861694909402939093176001600160801b0316600160801b928516929092026001600160c01b031691909117600160c01b9190931602919091179055565b612418613999565b60328111156124585760405162461bcd60e51b815260206004820152600c60248201526b0746f206d7563682064726f760a41b6044820152606401610ced565b6000805b828110156124c35783838281811061248457634e487b7160e01b600052603260045260246000fd5b90506020028101906124969190614d39565b6124a4906040810190614cd3565b6124af915083614dc9565b9150806124bb8161501e565b91505061245c565b506000816001600160401b038111156124ec57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612515578160200160208202803683370190505b5090506000805b8481101561281a57600086868381811061254657634e487b7160e01b600052603260045260246000fd5b90506020028101906125589190614d39565b61256190614ea4565b6020810151815151919250146125a75760405162461bcd60e51b815260206004820152600b60248201526a3830b930b69032b93937b960a91b6044820152606401610ced565b6040810151516125ea5760405162461bcd60e51b815260206004820152600e60248201526d3a37b5b2b724a2399032b93937b960911b6044820152606401610ced565b60005b8160400151518110156127155781606001516001600160a01b031661263c8360400151838151811061262f57634e487b7160e01b600052603260045260246000fd5b6020026020010151612285565b6001600160a01b03161461269e5760405162461bcd60e51b8152602060048201526024808201527f7265636569766572206973206e6f74206f776e6572206f662074686520746f6b604482015263195b925160e21b6064820152608401610ced565b816040015181815181106126c257634e487b7160e01b600052603260045260246000fd5b60200260200101518585815181106126ea57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152836126ff8161501e565b945050808061270d9061501e565b9150506125ed565b5060006127206117ab565b905060005b82602001518110156127f257825180518290811061275357634e487b7160e01b600052603260045260246000fd5b602002602001015160716000838561276b9190614dc9565b8152602080820192909252604090810160002083518154938501519285015160609095015160ff908116600160301b0260ff60301b1963ffffffff90971662010000029690961666ffffffffff0000199482166101000261ffff199096169190921617939093179190911691909117919091179055806127ea8161501e565b915050612725565b506128058260600151836020015161395b565b505080806128129061501e565b91505061251c565b507f224234ef0816b9f8f4769927465e1f03b82588d2329ece9ea7e3731bcc98e8b5868360405161284c929190614c7a565b60405180910390a1505050505050565b606d818154811061238457600080fd5b6000805160206151ac83398151915254610100900460ff166128a1576000805160206151ac8339815191525460ff16156128a5565b303b155b6129175760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610ced565b6000805160206151ac83398151915254610100900460ff16158015612953576000805160206151ac833981519152805461ffff19166101011790555b600054610100900460ff16158080156129735750600054600160ff909116105b8061298d5750303b15801561298d575060005460ff166001145b6129f05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610ced565b6000805460ff191660011790558015612a13576000805461ff0019166101001790555b612a1d8686613ba9565b612a25613be7565b61271060655560408051608081018252600c8183019081526b4d6f64656c204368616e676560a01b606083015281528151808301909252600982526814dd185c8810d85c9960ba1b602083810191909152810191909152612a8a90606c9060026140fa565b506040518060800160405280604051806040016040528060098152602001684c6567656e6461727960b81b8152508152602001604051806040016040528060048152602001634570696360e01b8152508152602001604051806040016040528060048152602001635261726560e01b81525081526020016040518060400160405280600681526020016521b7b6b6b7b760d11b815250815250606d906004612b33929190614153565b50604080516102608101825260126102208201818152714261736b657462616c6c5f6672616d655f4160701b610240840152825282518084018452908152712130b9b5b2ba3130b6362fb33930b6b2afa160711b60208281019190915280830191909152825180840184526007808252662134ba31b7b4b760c91b828401528385019190915283518085018552600c8082526b4d696e695f556e69666f726d60a01b8285015260608501919091528451808601865260108082526f416e696d655f6368617261637465727360801b82860152608086019190915285518087018752600880825267086c2e4c8be84def60c31b8287015260a087019190915286518088018852600f81526e29b1b4b2b731b2afb334b1ba34b7b760891b8187015260c08701528651808801885284815266446f6c6c61727360c81b8187015260e0870152865180880188529182526f5669727475616c5f536e65616b65727360801b8286015261010086019190915285518087018752600a8082526908cd2ceeae4cabec4def60b31b8287015261012087019190915286518088018852938452664d6f6e6b65797360c81b8486015261014086019390935285518087018752600e81526d14ddda5d18da1a5b99d7d0d85c9960921b81860152610160860152855180870187528281526b14d8da595b98d957d0d85c9960a21b8186015261018086015285518087018752600981526811dbdb1917d0d85c9960ba1b818601526101a0860152855180870187529182526b436172645f436972636c657360a01b828501526101c0850191909152845180860186529081526710d85c9917d4995960c21b818401526101e08401528351808501909452835269436172645f576869746560b01b90830152610200810191909152612dd190606e9060116141a0565b50604080516101808101825260d2815260d4602082015260d59181019190915260d6606082015260d7608082015260d960a082015261084b60c082015261084c60e082015260d361010082015260da61012082015261083e610140820152610850610160820152612e4690606f90600c6141ed565b506040805160e08101825260d2815260d4602082015260d59181019190915260d7606082015260d9608082015261084b60a082015261084c60c0820152612e919060709060076141ed565b50606680546001600160a01b038087166001600160a01b031992831617909255606780549286169290911691909117905560005b607054811015612f6b5760856072600060708481548110612ef657634e487b7160e01b600052603260045260246000fd5b6000918252602080832060088304015460079092166004026101000a90910463ffffffff90811684528382019490945260409283018220600283528152828220600183528152828220600d8352905220805463ffffffff19169290911691909117905580612f638161501e565b915050612ec5565b508015612fb2576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015611d825750506000805160206151ac833981519152805461ff0019169055505050565b612fe0613999565b60328111156130205760405162461bcd60e51b815260206004820152600c60248201526b0746f206d7563682064726f760a41b6044820152606401610ced565b60005b818110156113cb57600083838381811061304d57634e487b7160e01b600052603260045260246000fd5b905060200281019061305f9190614d1a565b61306890614e2b565b6020810151815151919250146130ae5760405162461bcd60e51b815260206004820152600b60248201526a3830b930b69032b93937b960a91b6044820152606401610ced565b60006130b86117ab565b905060005b826020015181101561318a5782518051829081106130eb57634e487b7160e01b600052603260045260246000fd5b60200260200101516071600083856131039190614dc9565b8152602080820192909252604090810160002083518154938501519285015160609095015160ff908116600160301b0260ff60301b1963ffffffff90971662010000029690961666ffffffffff0000199482166101000261ffff199096169190921617939093179190911691909117919091179055806131828161501e565b9150506130bd565b5061319d8260400151836020015161395b565b505080806131aa9061501e565b915050613023565b60606131bc613975565b600301805461130190614fe3565b6001600160a01b0382163314156131f45760405163b06307db60e01b815260040160405180910390fd5b806131fd613975565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b606a818154811061328157600080fd5b600091825260209091200154905081565b6070818154811061233657600080fd5b6132aa613999565b80516132bd906069906020840190613fc6565b5050565b6132c9613999565b80606d83815481106113ae57634e487b7160e01b600052603260045260246000fd5b6132f6848484611a6b565b6001600160a01b0383163b1561332f5761331284848484613c16565b61332f576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b61333d613999565b60006133476117ab565b9050613353828461395b565b60408051828152602081018590526001600160a01b038416918101919091527f70b05cddccca9a386d19ef2bf01d0e4c8cb3d4d6e7e9a226a23d21e06fbbe289906060016120b6565b60606133a7826139f3565b6133ec5760405162461bcd60e51b81526020600482015260166024820152753a37b5b2b71034b21034b9903737ba1032bc34b9ba1760511b6044820152606401610ced565b606a5460609080613489576069805461340490614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461343090614fe3565b801561347d5780601f106134525761010080835404028352916020019161347d565b820191906000526020600020905b81548152906001019060200180831161346057829003601f168201915b50505050509150613747565b600080613497600184614e14565b90505b80821161374457600060026134af8385614dc9565b6134b99190614de1565b90508061363f57606a6000815481106134e257634e487b7160e01b600052603260045260246000fd5b906000526020600020015487116135c357606b6000606a60008154811061351957634e487b7160e01b600052603260045260246000fd5b90600052602060002001548152602001908152602001600020805461353d90614fe3565b80601f016020809104026020016040519081016040528092919081815260200182805461356990614fe3565b80156135b65780601f1061358b576101008083540402835291602001916135b6565b820191906000526020600020905b81548152906001019060200180831161359957829003601f168201915b5050505050945050613744565b83600114156135d9576069805461353d90614fe3565b606a6001815481106135fb57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154871161363257606b6000606a60018154811061351957634e487b7160e01b600052603260045260246000fd5b6069805461353d90614fe3565b606a818154811061366057634e487b7160e01b600052603260045260246000fd5b906000526020600020015487116136e557606a61367e600183614e14565b8154811061369c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001548711156136d357606b6000606a838154811061351957634e487b7160e01b600052603260045260246000fd5b6136de600182614e14565b915061373e565b9150816136f3600183614e14565b81141561373e57606a828154811061371b57634e487b7160e01b600052603260045260246000fd5b906000526020600020015487111561373a576069805461353d90614fe3565b8192505b5061349a565b50505b600082511161378057606961375b85613d0d565b60405160200161376c929190614aac565b6040516020818303038152906040526137ab565b8161378a85613d0d565b60405160200161379b929190614a7d565b6040516020818303038152906040525b949350505050565b6137bb613999565b6000828152606b6020526040902080546137d490614fe3565b151590506138385760405162461bcd60e51b815260206004820152602b60248201527f55524920636f72726573706f6e64696e6720746f2069642073686f756c64206e60448201526a6f7420626520656d70747960a81b6064820152608401610ced565b6000828152606b60209081526040909120825161385792840190613fc6565b507f90632ebfccb36543d40f93c24990353a77ef3e61855f649bdf07a9f20ac84e9c8282604051613889929190614cba565b60405180910390a15050565b606c818154811061238457600080fd5b60006138af613975565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b6138ea613999565b6001600160a01b03811661394f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ced565b61395881613b57565b50565b6132bd828260405180602001604052806000815250613d5c565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6033546001600160a01b031633146123725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ced565b60006139fd613975565b54821080156112e35750600160e01b613a14613975565b60008481526004919091016020526040902054161592915050565b600081613a3a613975565b54811015613aa4576000613a4c613975565b600083815260049190910160205260409020549050600160e01b8116613aa2575b80613a9b57613a7a613975565b60001990920160008181526004939093016020526040909220549050613a6d565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806000613aca613975565b60009485526006016020525050604090912080549092909150565b6001600160a01b03841661332f5760655481613aff6117ab565b613b099190614dc9565b111561332f5760405162461bcd60e51b815260206004820152601760248201527f6578636565646564206d6178696d756d20737570706c790000000000000000006044820152606401610ced565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000805160206151ac83398151915254610100900460ff16613bdd5760405162461bcd60e51b8152600401610ced90614bdb565b6132bd8282613dd2565b600054610100900460ff16613c0e5760405162461bcd60e51b8152600401610ced90614c2f565b612372613e55565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613c4b903390899088908890600401614b52565b602060405180830381600087803b158015613c6557600080fd5b505af1925050508015613c95575060408051601f3d908101601f19168201909252613c9291810190614730565b60015b613cf0573d808015613cc3576040519150601f19603f3d011682016040523d82523d6000602084013e613cc8565b606091505b508051613ce8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810191829052607f0190826030600a8206018353600a90045b8015613d4a57600183039250600a81066030018353600a9004613d2c565b50819003601f19909101908152919050565b613d668383613e85565b6001600160a01b0383163b156113cb576000613d80613975565b5490508281035b613d9a6000868380600101945086613c16565b613db7576040516368d2bf6b60e11b815260040160405180910390fd5b818110613d875781613dc7613975565b5414611d8257600080fd5b6000805160206151ac83398151915254610100900460ff16613e065760405162461bcd60e51b8152600401610ced90614bdb565b81613e0f613975565b6002019080519060200190613e25929190613fc6565b5080613e2f613975565b6003019080519060200190613e45929190613fc6565b506000613e50613975565b555050565b600054610100900460ff16613e7c5760405162461bcd60e51b8152600401610ced90614c2f565b61237233613b57565b6000613e8f613975565b54905081613eb05760405163b562e8dd60e01b815260040160405180910390fd5b613ebd6000848385613ae5565b680100000000000000018202613ed1613975565b6001600160a01b038516600081815260059290920160205260409091208054929092019091554260a01b6001841460e11b1717613f0c613975565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114613f9657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613f5e565b5081613fb457604051622e076360e81b815260040160405180910390fd5b80613fbd613975565b55506113cb9050565b828054613fd290614fe3565b90600052602060002090601f016020900481019282613ff4576000855561403a565b82601f1061400d57805160ff191683800117855561403a565b8280016001018555821561403a579182015b8281111561403a57825182559160200191906001019061401f565b50614046929150614258565b5090565b8280548282559060005260206000209060070160089004810192821561403a5791602002820160005b838211156140bd57833563ffffffff1683826101000a81548163ffffffff021916908363ffffffff1602179055509260200192600401602081600301049283019260010302614073565b80156140ed5782816101000a81549063ffffffff02191690556004016020816003010492830192600103026140bd565b5050614046929150614258565b828054828255906000526020600020908101928215614147579160200282015b828111156141475782518051614137918491602090910190613fc6565b509160200191906001019061411a565b5061404692915061426d565b828054828255906000526020600020908101928215614147579160200282015b828111156141475782518051614190918491602090910190613fc6565b5091602001919060010190614173565b828054828255906000526020600020908101928215614147579160200282015b8281111561414757825180516141dd918491602090910190613fc6565b50916020019190600101906141c0565b8280548282559060005260206000209060070160089004810192821561403a5791602002820160005b838211156140bd57835183826101000a81548163ffffffff021916908361ffff1602179055509260200192600401602081600301049283019260010302614216565b5b808211156140465760008155600101614259565b80821115614046576000614281828261428a565b5060010161426d565b50805461429690614fe3565b6000825580601f106142a6575050565b601f0160209004906000526020600020908101906139589190614258565b60006001600160401b038311156142dd576142dd615079565b6142f0601f8401601f1916602001614d76565b905082815283838301111561430457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461433257600080fd5b919050565b60008083601f840112614348578182fd5b5081356001600160401b0381111561435e578182fd5b6020830191508360208260051b850101111561437957600080fd5b9250929050565b600082601f830112614390578081fd5b813560206143a56143a083614da6565b614d76565b80838252828201915082860187848660071b89010111156143c4578586fd5b855b8581101561443d57608080838b0312156143de578788fd5b6143e6614d4e565b83356143f18161515c565b8152838701356144008161515c565b818801526040848101356144138161514a565b908201526060848101356144268161515c565b9082015285529385019391909101906001016143c6565b5090979650505050505050565b600082601f83011261445a578081fd5b613a9b838335602085016142c4565b80356001600160801b038116811461433257600080fd5b80356001600160401b038116811461433257600080fd5b6000602082840312156144a8578081fd5b613a9b8261431b565b600080604083850312156144c3578081fd5b6144cc8361431b565b91506144da6020840161431b565b90509250929050565b6000806000606084860312156144f7578081fd5b6145008461431b565b925061450e6020850161431b565b9150604084013590509250925092565b60008060008060808587031215614533578182fd5b61453c8561431b565b935061454a6020860161431b565b92506040850135915060608501356001600160401b0381111561456b578182fd5b8501601f8101871361457b578182fd5b61458a878235602084016142c4565b91505092959194509250565b600080604083850312156145a8578182fd5b6145b18361431b565b9150602083013580151581146145c5578182fd5b809150509250929050565b600080604083850312156145e2578182fd5b6145eb8361431b565b946020939093013593505050565b6000806020838503121561460b578182fd5b82356001600160401b03811115614620578283fd5b61462c85828601614337565b90969095509350505050565b6000806000806040858703121561464d578182fd5b84356001600160401b0380821115614663578384fd5b61466f88838901614337565b90965094506020870135915080821115614687578384fd5b818701915087601f83011261469a578384fd5b8135818111156146a8578485fd5b8860208260071b85010111156146bc578485fd5b95989497505060200194505050565b6000806000604084860312156146df578081fd5b83356001600160401b038111156146f4578182fd5b61470086828701614337565b909790965060209590950135949350505050565b600060208284031215614725578081fd5b8135613a9b81615134565b600060208284031215614741578081fd5b8151613a9b81615134565b60006020828403121561475d578081fd5b81356001600160401b03811115614772578182fd5b6137ab8482850161444a565b60008060008060808587031215614793578182fd5b84356001600160401b03808211156147a9578384fd5b6147b58883890161444a565b955060208701359150808211156147ca578384fd5b506147d78782880161444a565b9350506147e66040860161431b565b91506147f46060860161431b565b905092959194509250565b60008060408385031215614811578182fd5b61481a83614469565b91506144da60208401614469565b600060208284031215614839578081fd5b5035919050565b60008060408385031215614852578182fd5b823591506144da6020840161431b565b600080600060408486031215614876578081fd5b8335925060208401356001600160401b03811115614892578182fd5b61489e86828701614337565b9497909650939450505050565b600080604083850312156148bd578182fd5b8235915060208301356001600160401b038111156148d9578182fd5b6148e58582860161444a565b9150509250929050565b60008082840360a0811215614902578283fd5b833592506080601f1982011215614917578182fd5b506020830190509250929050565b60008060408385031215614937578182fd5b8235915060208301356145c58161514a565b60006020828403121561495a578081fd5b8135613a9b8161514a565b60008060408385031215614977578182fd5b82356149828161514a565b915060208301356145c58161514a565b600080600080608085870312156149a7578182fd5b84356149b28161514a565b935060208501356149c28161515c565b925060408501356149d28161515c565b915060608501356149e28161515c565b939692955090935050565b60008060008060808587031215614a02578182fd5b614a0b85614480565b9350614a1960208601614480565b9250614a2760408601614480565b91506147f460608601614480565b60008151808452614a4d816020860160208601614f80565b601f01601f19169290920160200192915050565b60008151614a73818560208601614f80565b9290920192915050565b60008351614a8f818460208801614f80565b835190830190614aa3818360208801614f80565b01949350505050565b600080845482600182811c915080831680614ac857607f831692505b6020808410821415614ae857634e487b7160e01b87526022600452602487fd5b818015614afc5760018114614b0d57614b39565b60ff19861689528489019650614b39565b60008b815260209020885b86811015614b315781548b820152908501908301614b18565b505084890196505b505050505050614b498185614a61565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614b8590830184614a35565b9695505050505050565b602081526000613a9b6020830184614a35565b606081526000614bb56060830186614a35565b8281036020840152614bc78186614a35565b90508281036040840152614b858185614a35565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60006040820184835260206040818501528185518084526060860191508287019350845b8181101561443d57845183529383019391830191600101614c9e565b8281526040602082015260006137ab6040830184614a35565b6000808335601e19843603018112614ce9578283fd5b8301803591506001600160401b03821115614d02578283fd5b6020019150600581901b360382131561437957600080fd5b60008235605e19833603018112614d2f578182fd5b9190910192915050565b60008235607e19833603018112614d2f578182fd5b604051608081016001600160401b0381118282101715614d7057614d70615079565b60405290565b604051601f8201601f191681016001600160401b0381118282101715614d9e57614d9e615079565b604052919050565b60006001600160401b03821115614dbf57614dbf615079565b5060051b60200190565b60008219821115614ddc57614ddc61504d565b500190565b600082614df057614df0615063565b500490565b6000816000190483118215151615614e0f57614e0f61504d565b500290565b600082821015614e2657614e2661504d565b500390565b600060608236031215614e3c578081fd5b604051606081016001600160401b038282108183111715614e5f57614e5f615079565b816040528435915080821115614e73578384fd5b50614e8036828601614380565b82525060208301356020820152614e996040840161431b565b604082015292915050565b600060808236031215614eb5578081fd5b614ebd614d4e565b82356001600160401b0380821115614ed3578384fd5b614edf36838701614380565b8352602091508185013582840152604085013581811115614efe578485fd5b8501905036601f820112614f10578384fd5b8035614f1e6143a082614da6565b8181528381019083850136600585901b860187011115614f3c578788fd5b8794505b83851015614f5e578035835260019490940193918501918501614f40565b50604086015250614f75925050506060840161431b565b606082015292915050565b60005b83811015614f9b578181015183820152602001614f83565b8381111561332f5750506000910152565b600081614fbb57614fbb61504d565b506000190190565b600063ffffffff821680614fd957614fd961504d565b6000190192915050565b600181811c90821680614ff757607f821691505b6020821081141561501857634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156150325761503261504d565b5060010190565b60008261504857615048615063565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b813561509a8161515c565b60ff8116905081548160ff19821617835560208401356150b98161515c565b61ff008160081b169050808361ffff1984161717845560408501356150dd8161514a565b65ffffffff00008160101b1690508365ffffffffffff19841617935080848317178555606086013592506151108361515c565b60ff60301b1993909316179190911760309190911b66ff0000000000001617905550565b6001600160e01b03198116811461395857600080fd5b63ffffffff8116811461395857600080fd5b60ff8116811461395857600080fdfe19154197e630bee14ee00a08f584df45719fc09be853375551a2437e2061493fa4152dc3c9abdc34db68d3273948665907e439faa190ac9b74721c1531eea798ee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa264697066735822122086801f92292405e60bb2da6388256c76ce6051d7d05855d70f4bf2db5e3eb9de64736f6c63430008040033

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

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.