ETH Price: $3,121.43 (-0.74%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...239728292025-12-09 4:24:594 hrs ago1765254299IN
0x00000000...8200EF77d
0 ETH0.000140162.27863994
Set Approval For...239727332025-12-09 4:05:354 hrs ago1765253135IN
0x00000000...8200EF77d
0 ETH0.000140092.27736815
Set Approval For...238958602025-11-28 8:02:5911 days ago1764316979IN
0x00000000...8200EF77d
0 ETH0.000126252.05245609
Set Approval For...237292532025-11-04 23:33:1134 days ago1762299191IN
0x00000000...8200EF77d
0 ETH0.000056410.91590572
Set Approval For...237179092025-11-03 9:29:2335 days ago1762162163IN
0x00000000...8200EF77d
0 ETH0.000089292.25077761
Set Approval For...236563102025-10-25 18:37:3544 days ago1761417455IN
0x00000000...8200EF77d
0 ETH0.000128222.08443367
Set Approval For...236354042025-10-22 20:20:4747 days ago1761164447IN
0x00000000...8200EF77d
0 ETH0.00013162.13941415
Set Approval For...236193662025-10-20 14:19:4749 days ago1760969987IN
0x00000000...8200EF77d
0 ETH0.00014132.297136
Transfer From236187812025-10-20 12:21:5949 days ago1760962919IN
0x00000000...8200EF77d
0 ETH0.000085991.61743166
Transfer From236187792025-10-20 12:21:3549 days ago1760962895IN
0x00000000...8200EF77d
0 ETH0.000094661.63342422
Transfer From236187772025-10-20 12:21:1149 days ago1760962871IN
0x00000000...8200EF77d
0 ETH0.00012181.62264025
Set Approval For...236172562025-10-20 7:13:1150 days ago1760944391IN
0x00000000...8200EF77d
0 ETH0.000007240.11772384
Set Approval For...236078222025-10-18 23:31:3551 days ago1760830295IN
0x00000000...8200EF77d
0 ETH0.000009220.15
Set Approval For...235899322025-10-16 11:29:3553 days ago1760614175IN
0x00000000...8200EF77d
0 ETH0.000107581.74898279
Set Approval For...235893142025-10-16 9:24:2353 days ago1760606663IN
0x00000000...8200EF77d
0 ETH0.000007550.12283503
Set Approval For...235618912025-10-12 13:17:5957 days ago1760275079IN
0x00000000...8200EF77d
0 ETH0.000104211.69412981
Set Approval For...235618762025-10-12 13:14:5957 days ago1760274899IN
0x00000000...8200EF77d
0 ETH0.000104491.69865961
Set Approval For...235618282025-10-12 13:05:2357 days ago1760274323IN
0x00000000...8200EF77d
0 ETH0.000103841.68807939
Set Approval For...235605452025-10-12 8:47:3557 days ago1760258855IN
0x00000000...8200EF77d
0 ETH0.000100371.63171879
Set Approval For...235605202025-10-12 8:42:3558 days ago1760258555IN
0x00000000...8200EF77d
0 ETH0.000099521.61785008
Safe Transfer Fr...235604992025-10-12 8:38:2358 days ago1760258303IN
0x00000000...8200EF77d
0 ETH0.000091121.6129245
Safe Transfer Fr...235604902025-10-12 8:36:3558 days ago1760258195IN
0x00000000...8200EF77d
0 ETH0.000091911.62653577
Safe Transfer Fr...235604832025-10-12 8:35:1158 days ago1760258111IN
0x00000000...8200EF77d
0 ETH0.000092131.63111514
Safe Transfer Fr...235604762025-10-12 8:33:4758 days ago1760258027IN
0x00000000...8200EF77d
0 ETH0.000092371.63474455
Safe Transfer Fr...235604682025-10-12 8:32:1158 days ago1760257931IN
0x00000000...8200EF77d
0 ETH0.000091391.61776057
View all transactions

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Place Order199837392024-05-30 16:06:23557 days ago1717085183
0x00000000...8200EF77d
500 wei
0x61010060198853672024-05-16 21:57:47571 days ago1715896667  Contract Creation0 ETH
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SuperPunkWorld

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.23;

import {OrderType} from "../helpers/OrderEnums.sol";
import {Order} from "../helpers/OrderStructs.sol";
import {IStash} from "../interfaces/IStash.sol";
import {IAuction} from "../interfaces/IAuction.sol";
import {IStashFactory} from "../interfaces/IStashFactory.sol";
import {ISanctionsList} from "../interfaces/ISanctionsList.sol";
import {IRegistry} from "../interfaces/IRegistry.sol";
import {ICreatorToken} from "../interfaces/ICreatorToken.sol";
import {ITransferValidator} from "../interfaces/ITransferValidator.sol";
import {SingleUseVRFConsumer} from "../helpers/SingleUseVRFConsumer.sol";
import {ERC2981} from "solady/tokens/ERC2981.sol";
import {Ownable} from "solady/auth/Ownable.sol";
import {IERC721} from "forge-std/interfaces/IERC721.sol";
import {IERC165} from "forge-std/interfaces/IERC165.sol";
import "ERC721A/extensions/ERC721AQueryable.sol";

error NotEnoughEther();
error ExceedMaxSupply();
error BidForZeroUnits();
error AuctionFinalized();
error FailedToWithdraw();
error AuctionInProgress();
error CallerNotEligible();
error CannotCloseAuction();
error ArrayLengthMismatch();
error AuctionNotConfigured();
error IncreasingPriceDisallowed();
error CannotTransferDuringAuction();
error ProvenanceMustBeSetBeforeFinalization();

/**
 * @title SuperPunkWorld
 * @notice Nina Chanel X Yuga Labs
 */
contract SuperPunkWorld is ERC721AQueryable, SingleUseVRFConsumer, ERC2981, Ownable, IAuction, ICreatorToken {
    event NewBid(uint256 bidAmount, uint256 numberOfUnits);

    struct AuctionInfo {
        uint24 dropInterval;
        uint32 startTime;
        uint32 endTime;
        uint32 priceCurveLength;
        uint64 endPrice;
        uint72 startPrice;
    }

    uint256 public constant MAX_SUPPLY = 500;
    address private constant _PAYMENT_TOKEN = address(0);
    OrderType private constant _ORDER_TYPE = OrderType.SUBSEQUENT_BIDS_OVERWRITE_PRICE_AND_ADD_UNITS;
    address private immutable _SPLITTER;
    address private immutable _CHAINALYSIS;
    address private constant _STASH_FACTORY = 0x000000000000A6fA31F5fC51c1640aAc76866750;

    AuctionInfo public auctionInfo;
    uint80 public finalPrice;
    bool public finalized;
    bytes32 public provenanceHash;
    string private _baseUri;
    ITransferValidator private _transferValidator;

    constructor(
        uint32 _startTime,
        uint32 _endTime,
        uint32 _priceCurveInSeconds,
        uint24 _dropIntervalInSeconds,
        address _chainalysis,
        address _splitterContract,
        address _link,
        address _vrfWrapper,
        address __transferValidator
    ) ERC721A("Super Punk World", "SPW") SingleUseVRFConsumer(_link, _vrfWrapper) {
        address _owner = tx.origin;
        _initializeOwner(_owner);

        auctionInfo = AuctionInfo(
            _dropIntervalInSeconds,
            _startTime,
            _endTime,
            _priceCurveInSeconds,
            0,
            0 // end price and start price to be set closer to auction start
        );

        _CHAINALYSIS = _chainalysis;
        _SPLITTER = _splitterContract;
        _transferValidator = ITransferValidator(__transferValidator);

        _setDefaultRoyalty(_splitterContract, 500);
    }

    // Allows the contract to receive Ether
    receive() external payable {}

    /**
     * @notice Performs checks and creates a bid in the stash of `msg.sender` on this auction. Supports
     * direct ownership, or ownership through warm or delegate cash
     * @param numberOfUnits The number of units to bid on
     * @dev Total amount bid is calculated as pricePerUnit * numberOfUnits
     * @dev If a user does not yet have a stash, one will be deployed for them as a part of this transaction.
     * @dev Total amount to bid must be fulfillable with a combination of `msg.value` and the balance of the user's stash.
     */
    function bid(uint16 numberOfUnits) external payable {
        if (!_canBid(msg.sender)) revert CallerNotEligible();
        if (_totalMinted() + numberOfUnits > MAX_SUPPLY) revert ExceedMaxSupply();
        if (numberOfUnits == 0) revert BidForZeroUnits();
        if (!open()) revert AuctionNotOpen();
        if (auctionInfo.endPrice == 0) revert AuctionNotConfigured();

        uint80 pricePerUnit = currentPrice();

        uint256 totalCost = pricePerUnit * numberOfUnits; // max 4300 eth

        address stashAddress = IStashFactory(_STASH_FACTORY).stashAddressFor(msg.sender);

        uint256 size;
        assembly {
            size := extcodesize(stashAddress)
        }

        if (size == 0) {
            IStashFactory(_STASH_FACTORY).deployStash(msg.sender);
        }

        IStash stash = IStash(stashAddress);

        uint256 stashBalance = stash.availableLiquidity(address(0));

        Order memory existingOrder;

        try stash.getOrder(address(this)) returns (Order memory order) {
            existingOrder = order;
        } catch {}

        uint256 liquidityToUnlock;

        if (existingOrder.numberOfUnits > 0) {
            // In a decreasing price auction, earlier bids get adjusted downwards to the new price upon re-bidding
            liquidityToUnlock = (existingOrder.pricePerUnit - pricePerUnit) * existingOrder.numberOfUnits;
        }

        if (stashBalance + liquidityToUnlock + msg.value < totalCost) {
            revert NotEnoughEther();
        }

        stash.placeOrder{value: msg.value}(pricePerUnit, numberOfUnits);

        _mint(msg.sender, numberOfUnits);

        if (_totalMinted() == MAX_SUPPLY) finalPrice = pricePerUnit;

        emit NewBid(pricePerUnit, numberOfUnits);
    }

    /**
     * @notice Claims units for a list of recipients. Used by Yuga prior to finalization to process claims for
     * bidders that have not done so.
     */
    function processOrders(address[] calldata _recipients, uint16[] calldata _unitCounts) external onlyOwner {
        if (open()) revert AuctionInProgress();
        if (finalized) revert AuctionFinalized();
        if (_recipients.length != _unitCounts.length) revert ArrayLengthMismatch();

        for (uint256 i = 0; i < _recipients.length;) {
            _processOrderFor(_recipients[i], _unitCounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    /**
     * @notice Finalizes the auction. This can only be done after the auction is closed.
     * @dev Once called, all bids will be released and bidders will be free to withdraw their funds.
     * @dev Ensure all bids have been claimed prior to calling this function.
     */
    function finalizeAuction() external onlyOwner {
        if (open()) revert CannotFinalizeOpenAuction();
        if (provenanceHash == 0) revert ProvenanceMustBeSetBeforeFinalization();
        finalized = true;
    }

    /**
     * @notice withdraws contract balance to `owner`
     */
    function withdraw() external onlyOwner {
        (bool success,) = payable(_SPLITTER).call{value: address(this).balance}("");
        if (!success) revert FailedToWithdraw();
    }

    /**
     * @notice Sets the auction start and end price.
     */
    function setPrice(uint72 _startPriceWei, uint64 _endPriceWei) external onlyOwner {
        if (_endPriceWei > _startPriceWei) revert IncreasingPriceDisallowed();
        auctionInfo.startPrice = _startPriceWei;
        auctionInfo.endPrice = _endPriceWei;
    }

    /**
     * @notice Sets the auction start, end, drop interval and price curve.
     */
    function setTime(uint32 _startTime, uint32 _endTime, uint32 _priceCurveInSeconds, uint24 _dropIntervalInSeconds)
        external
        onlyOwner
    {
        auctionInfo.startTime = _startTime;
        auctionInfo.endTime = _endTime;
        auctionInfo.priceCurveLength = _priceCurveInSeconds;
        auctionInfo.dropInterval = _dropIntervalInSeconds;
    }

    /**
     * @notice Sets the base URI for the collection. TokenURIs are the concatenation of baseURI + tokenId
     */
    function setBaseUri(string calldata baseUri) external onlyOwner {
        _baseUri = baseUri;
    }

    /**
     * @notice Sets the provenance hash for the collection.
     * @param hash The hash of the provenance information.
     * @dev This hash is used to verify the authenticity of the collection. It uses unshuffled metadata, concatenated in order
     * and hashed using keccak256. Once the auction is finalized, the metadata will be offset by a random number, to be determined
     * using chainlink VRF. Those seeking to verify the authenticity of the collection will need to apply the same offset when doing
     * so. It is publicly accessible by reading the `offset` on this contract.
     */
    function setProvenanceHash(bytes32 hash) external onlyOwner {
        if (finalized) revert ProvenanceMustBeSetBeforeFinalization();
        provenanceHash = hash;
    }

    /**
     * @notice Sets the VRF offset for the collection.
     * @dev This is used to offset the provenance hash by a random number, to be determined using chainlink VRF.
     * @dev Though this function can be called more than once, the `fullfillRandomWords` callback will revert if
     * the offset has already been set.
     */
    function setVrfOffset() external onlyOwner {
        vrfRequestId = requestRandomness(100000, 3, 1);
    }

    /**
     * @dev Sets the royalty information for the token collection.
     * @param receiver The address of the royalty recipient.
     * @param feeNumerator The royalty fee numerator.
     */
    function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    /**
     * @notice Sets the transfer validator for the collection.
     */
    function setTransferValidator(address transferValidator_) external onlyOwner {
        address oldValue = address(_transferValidator);
        _transferValidator = ITransferValidator(transferValidator_);
        emit TransferValidatorUpdated(oldValue, transferValidator_);
    }

    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
        functionSignature = 0x7c1e14b4;
        isViewFunction = true;
    }

    function getTransferValidator() external view returns (address validator) {
        validator = address(_transferValidator);
    }

    /**
     * @notice Used to retrieve bid type and payment token for this auction
     */
    function bidConfig() external pure override returns (address, OrderType) {
        return (_PAYMENT_TOKEN, _ORDER_TYPE);
    }

    /**
     * @notice Returns the current price of the auction, which will decrease over time until a final price is hit
     */
    function currentPrice() public view returns (uint80) {
        if (finalPrice > 0) return finalPrice;

        AuctionInfo memory info = auctionInfo;
        if (block.timestamp < info.startTime) {
            return info.startPrice;
        }
        if (block.timestamp - info.startTime >= info.priceCurveLength) {
            return info.endPrice;
        } else {
            uint256 steps = (block.timestamp - info.startTime) / info.dropInterval;
            uint256 auctionDropPerStep = (info.startPrice - info.endPrice) / (info.priceCurveLength / info.dropInterval);
            return info.startPrice - (uint80(steps * auctionDropPerStep));
        }
    }

    /**
     * @notice Returns whether the auction is currently accepting new bids
     */
    function open() public view returns (bool) {
        if (_totalMinted() == MAX_SUPPLY) return false;

        // If there are available units, the auction is open if the current time is between the start and end time
        return block.timestamp >= auctionInfo.startTime && block.timestamp < auctionInfo.endTime;
    }

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

    // override _approve, transferFrom, setApprovalForAll to prevent transfers while auction is ongoing
    function setApprovalForAll(address operator, bool approved) public override(ERC721A, IERC721A) {
        if (open()) revert CannotTransferDuringAuction();
        _transferValidator.validateTransfer(operator, msg.sender, operator);

        super.setApprovalForAll(operator, approved);
    }

    function transferFrom(address from, address to, uint256 tokenId) public payable override(ERC721A, IERC721A) {
        if (open()) revert CannotTransferDuringAuction();
        _transferValidator.validateTransfer(msg.sender, from, to, tokenId);

        super.transferFrom(from, to, tokenId);
    }

    function approve(address to, uint256 tokenId) public payable override(ERC721A, IERC721A) {
        if (open()) revert CannotTransferDuringAuction();
        _transferValidator.validateTransfer(to, msg.sender, to, tokenId);

        super.approve(to, tokenId);
    }

    /**
     * @notice Mints units to caller, transfers funds and modifies or removes the bid from their stash.
     * @dev This call will revert is the user does not have a bid of at least `currentPrice()` per unit and for at least `numberOfUnits`
     */
    function _processOrderFor(address user, uint16 numberOfUnits) internal {
        address stash = IStashFactory(_STASH_FACTORY).stashAddressFor(user);
        IStash(stash).processOrder(currentPrice(), numberOfUnits);
    }

    /**
     * @notice Supports ownership through the underlying asset contracts, warm wallets, and delegatexyz
     * @param bidder The address of the bidder
     * @dev the stash parameter should be address(0) if not bidding through delegatexyz.
     */
    function _canBid(address bidder) internal view virtual returns (bool) {
        return !ISanctionsList(_CHAINALYSIS).isSanctioned(bidder);
    }

    function _baseURI() internal view override returns (string memory) {
        return _baseUri;
    }

    function _maxOffsetValue() internal pure override returns (uint256) {
        return MAX_SUPPLY;
    }
}

File 2 of 22 : OrderEnums.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

enum OrderType
{
    // 0: Can replace previous bid. Alters bid price and adds `numberOfUnits`
    SUBSEQUENT_BIDS_OVERWRITE_PRICE_AND_ADD_UNITS,
    // 1: Can replace previous bid if new bid has higher `pricePerUnit`
    SUBSEQUENT_BIDS_REPLACE_EXISTING_PRICE_INCREASE_REQUIRED,
    // 2: Cannot replace previous bid under any circumstance
    UNREPLACEABLE
}

File 3 of 22 : OrderStructs.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

struct Order {
    uint16 numberOfUnits;
    uint80 pricePerUnit;
    address auction;
}

struct PunkBid {
    Order order;
    uint256 accountNonce;
    uint256 bidNonce;
    uint256 expiration;
    bytes32 root;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import {OrderType} from "../helpers/OrderEnums.sol";
import {Order} from "../helpers/OrderStructs.sol";

interface IStash {
    function placeOrder(uint80 pricePerUnit, uint16 numberOfUnits) external payable;
    function processOrder(uint80 pricePerUnit, uint16 numberOfUnits) external;
    function availableLiquidity(address tokenAddress) external view returns (uint256);
    function wrapPunk(uint256 punkIndex) external;
    function getOrder(address auction) external view returns (Order memory);
    function withdraw(address tokenAddress, uint256 amount) external;
    function owner() external view returns (address);
    function version() external view returns (uint256);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "forge-std/interfaces/IERC165.sol";
import {OrderType} from "../helpers/OrderEnums.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IAuction is IERC165 {
    error AuctionNotOpen();
    error BidTooLow();
    error CannotFinalizeOpenAuction();

    function bidConfig() external view returns (address, OrderType);

    function open() external view returns (bool);

    function finalized() external view returns (bool);

    function withdraw() external;

    function currentPrice() external view returns (uint80);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

interface IStashFactory {
    function isStash(address stash) external view returns (bool);
    function deployStash(address owner) external returns (address);
    function isAuction(address auction) external view returns (bool);
    function stashAddressFor(address owner) external view returns (address);
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

interface ISanctionsList {
    function isSanctioned(address addr) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

/**
 * @dev Required interface of an Registry compliant contract.
 */
interface IRegistry {
    /**
     * @dev Emitted when address trying to transfer is not allowed on the registry
     */
    error NotAllowed();

    /**
     * @dev Checks whether `operator` is valid on the registry; let the registry
     * decide across both allow and blocklists.
     * @param operator - Address of operator
     * @return Bool whether operator is valid against registry
     */
    function isAllowedOperator(address operator) external view returns (bool);

    /**
     * @dev Checks whether `operator` is allowed on the registry
     * @param operator - Address of operator
     * @return Bool whether operator is allowed
     */
    function isAllowed(address operator) external view returns (bool);

    /**
     * @dev Checks whether `operator` is blocked on the registry
     * @param operator - Address of operator
     * @return Bool whether operator is blocked
     */
    function isBlocked(address operator) external view returns (bool);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ICreatorToken {
    event TransferValidatorUpdated(address oldValidator, address newValidator);

    function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ITransferValidator {
    function validateTransfer(address caller, address from, address to) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId) external view;
    function validateTransfer(address caller, address from, address to, uint256 tokenId, uint256 amount) external;
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;

import {VRFV2WrapperConsumerBase} from "chainlink/vrf/VRFV2WrapperConsumerBase.sol";

abstract contract SingleUseVRFConsumer is VRFV2WrapperConsumerBase {
    uint256 public offset;
    uint256 internal vrfRequestId;

    error OffsetAlreadySet();

    constructor(address linkAddress, address wrapperAddress)
        VRFV2WrapperConsumerBase(linkAddress, wrapperAddress)
    {}

    function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal override {
        if (_requestId != vrfRequestId) revert();
        if (offset > 0) revert OffsetAlreadySet();

        uint256 randomNumber = _randomWords[0];

        offset = randomNumber % _maxOffsetValue();
    }

    /**
     * @dev Returns the maximum value that the offset can be. Setting to 0 will revert during fulfillRandomWords.
     */
    function _maxOffsetValue() internal view virtual returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Simple ERC2981 NFT Royalty Standard implementation.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC2981.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol)
abstract contract ERC2981 {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The royalty fee numerator exceeds the fee denominator.
    error RoyaltyOverflow();

    /// @dev The royalty receiver cannot be the zero address.
    error RoyaltyReceiverIsZeroAddress();

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STORAGE                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The default royalty info is given by:
    /// ```
    ///     let packed := sload(_ERC2981_MASTER_SLOT_SEED)
    ///     let receiver := shr(96, packed)
    ///     let royaltyFraction := xor(packed, shl(96, receiver))
    /// ```
    ///
    /// The per token royalty info is given by.
    /// ```
    ///     mstore(0x00, tokenId)
    ///     mstore(0x20, _ERC2981_MASTER_SLOT_SEED)
    ///     let packed := sload(keccak256(0x00, 0x40))
    ///     let receiver := shr(96, packed)
    ///     let royaltyFraction := xor(packed, shl(96, receiver))
    /// ```
    uint256 private constant _ERC2981_MASTER_SLOT_SEED = 0xaa4ec00224afccfdb7;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          ERC2981                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Checks that `_feeDenominator` is non-zero.
    constructor() {
        require(_feeDenominator() != 0, "Fee denominator cannot be zero.");
    }

    /// @dev Returns the denominator for the royalty amount.
    /// Defaults to 10000, which represents fees in basis points.
    /// Override this function to return a custom amount if needed.
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /// @dev Returns true if this contract implements the interface defined by `interfaceId`.
    /// See: https://eips.ethereum.org/EIPS/eip-165
    /// This function call must use less than 30000 gas.
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) {
        /// @solidity memory-safe-assembly
        assembly {
            let s := shr(224, interfaceId)
            // ERC165: 0x01ffc9a7, ERC2981: 0x2a55205a.
            result := or(eq(s, 0x01ffc9a7), eq(s, 0x2a55205a))
        }
    }

    /// @dev Returns the `receiver` and `royaltyAmount` for `tokenId` sold at `salePrice`.
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        public
        view
        virtual
        returns (address receiver, uint256 royaltyAmount)
    {
        uint256 feeDenominator = _feeDenominator();
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, tokenId)
            mstore(0x20, _ERC2981_MASTER_SLOT_SEED)
            let packed := sload(keccak256(0x00, 0x40))
            receiver := shr(96, packed)
            if iszero(receiver) {
                packed := sload(mload(0x20))
                receiver := shr(96, packed)
            }
            let x := salePrice
            let y := xor(packed, shl(96, receiver)) // `feeNumerator`.
            // Overflow check, equivalent to `require(y == 0 || x <= type(uint256).max / y)`.
            // Out-of-gas revert. Should not be triggered in practice, but included for safety.
            returndatacopy(returndatasize(), returndatasize(), mul(y, gt(x, div(not(0), y))))
            royaltyAmount := div(mul(x, y), feeDenominator)
        }
    }

    /// @dev Sets the default royalty `receiver` and `feeNumerator`.
    ///
    /// Requirements:
    /// - `receiver` must not be the zero address.
    /// - `feeNumerator` must not be greater than the fee denominator.
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        uint256 feeDenominator = _feeDenominator();
        /// @solidity memory-safe-assembly
        assembly {
            feeNumerator := shr(160, shl(160, feeNumerator))
            if gt(feeNumerator, feeDenominator) {
                mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`.
                revert(0x1c, 0x04)
            }
            let packed := shl(96, receiver)
            if iszero(packed) {
                mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`.
                revert(0x1c, 0x04)
            }
            sstore(_ERC2981_MASTER_SLOT_SEED, or(packed, feeNumerator))
        }
    }

    /// @dev Sets the default royalty `receiver` and `feeNumerator` to zero.
    function _deleteDefaultRoyalty() internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            sstore(_ERC2981_MASTER_SLOT_SEED, 0)
        }
    }

    /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId`.
    ///
    /// Requirements:
    /// - `receiver` must not be the zero address.
    /// - `feeNumerator` must not be greater than the fee denominator.
    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator)
        internal
        virtual
    {
        uint256 feeDenominator = _feeDenominator();
        /// @solidity memory-safe-assembly
        assembly {
            feeNumerator := shr(160, shl(160, feeNumerator))
            if gt(feeNumerator, feeDenominator) {
                mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`.
                revert(0x1c, 0x04)
            }
            let packed := shl(96, receiver)
            if iszero(packed) {
                mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`.
                revert(0x1c, 0x04)
            }
            mstore(0x00, tokenId)
            mstore(0x20, _ERC2981_MASTER_SLOT_SEED)
            sstore(keccak256(0x00, 0x40), or(packed, feeNumerator))
        }
    }

    /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId` to zero.
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, tokenId)
            mstore(0x20, _ERC2981_MASTER_SLOT_SEED)
            sstore(keccak256(0x00, 0x40), 0)
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Simple single owner authorization mixin.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol)
///
/// @dev Note:
/// This implementation does NOT auto-initialize the owner to `msg.sender`.
/// You MUST call the `_initializeOwner` in the constructor / initializer.
///
/// While the ownable portion follows
/// [EIP-173](https://eips.ethereum.org/EIPS/eip-173) for compatibility,
/// the nomenclature for the 2-step ownership handover may be unique to this codebase.
abstract contract Ownable {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The caller is not authorized to call the function.
    error Unauthorized();

    /// @dev The `newOwner` cannot be the zero address.
    error NewOwnerIsZeroAddress();

    /// @dev The `pendingOwner` does not have a valid handover request.
    error NoHandoverRequest();

    /// @dev Cannot double-initialize.
    error AlreadyInitialized();

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                           EVENTS                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The ownership is transferred from `oldOwner` to `newOwner`.
    /// This event is intentionally kept the same as OpenZeppelin's Ownable to be
    /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173),
    /// despite it not being as lightweight as a single argument event.
    event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

    /// @dev An ownership handover to `pendingOwner` has been requested.
    event OwnershipHandoverRequested(address indexed pendingOwner);

    /// @dev The ownership handover to `pendingOwner` has been canceled.
    event OwnershipHandoverCanceled(address indexed pendingOwner);

    /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`.
    uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE =
        0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0;

    /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE =
        0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d;

    /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`.
    uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE =
        0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                          STORAGE                           */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev The owner slot is given by:
    /// `bytes32(~uint256(uint32(bytes4(keccak256("_OWNER_SLOT_NOT")))))`.
    /// It is intentionally chosen to be a high value
    /// to avoid collision with lower slots.
    /// The choice of manual storage layout is to enable compatibility
    /// with both regular and upgradeable contracts.
    bytes32 internal constant _OWNER_SLOT =
        0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927;

    /// The ownership handover slot of `newOwner` is given by:
    /// ```
    ///     mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED))
    ///     let handoverSlot := keccak256(0x00, 0x20)
    /// ```
    /// It stores the expiry timestamp of the two-step ownership handover.
    uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1;

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                     INTERNAL FUNCTIONS                     */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Override to return true to make `_initializeOwner` prevent double-initialization.
    function _guardInitializeOwner() internal pure virtual returns (bool guard) {}

    /// @dev Initializes the owner directly without authorization guard.
    /// This function must be called upon initialization,
    /// regardless of whether the contract is upgradeable or not.
    /// This is to enable generalization to both regular and upgradeable contracts,
    /// and to save gas in case the initial owner is not the caller.
    /// For performance reasons, this function will not check if there
    /// is an existing owner.
    function _initializeOwner(address newOwner) internal virtual {
        if (_guardInitializeOwner()) {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                if sload(ownerSlot) {
                    mstore(0x00, 0x0dc149f0) // `AlreadyInitialized()`.
                    revert(0x1c, 0x04)
                }
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Store the new value.
                sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
            }
        } else {
            /// @solidity memory-safe-assembly
            assembly {
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Store the new value.
                sstore(_OWNER_SLOT, newOwner)
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner)
            }
        }
    }

    /// @dev Sets the owner directly without authorization guard.
    function _setOwner(address newOwner) internal virtual {
        if (_guardInitializeOwner()) {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
                // Store the new value.
                sstore(ownerSlot, or(newOwner, shl(255, iszero(newOwner))))
            }
        } else {
            /// @solidity memory-safe-assembly
            assembly {
                let ownerSlot := _OWNER_SLOT
                // Clean the upper 96 bits.
                newOwner := shr(96, shl(96, newOwner))
                // Emit the {OwnershipTransferred} event.
                log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner)
                // Store the new value.
                sstore(ownerSlot, newOwner)
            }
        }
    }

    /// @dev Throws if the sender is not the owner.
    function _checkOwner() internal view virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // If the caller is not the stored owner, revert.
            if iszero(eq(caller(), sload(_OWNER_SLOT))) {
                mstore(0x00, 0x82b42900) // `Unauthorized()`.
                revert(0x1c, 0x04)
            }
        }
    }

    /// @dev Returns how long a two-step ownership handover is valid for in seconds.
    /// Override to return a different value if needed.
    /// Made internal to conserve bytecode. Wrap it in a public function if needed.
    function _ownershipHandoverValidFor() internal view virtual returns (uint64) {
        return 48 * 3600;
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  PUBLIC UPDATE FUNCTIONS                   */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Allows the owner to transfer the ownership to `newOwner`.
    function transferOwnership(address newOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            if iszero(shl(96, newOwner)) {
                mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`.
                revert(0x1c, 0x04)
            }
        }
        _setOwner(newOwner);
    }

    /// @dev Allows the owner to renounce their ownership.
    function renounceOwnership() public payable virtual onlyOwner {
        _setOwner(address(0));
    }

    /// @dev Request a two-step ownership handover to the caller.
    /// The request will automatically expire in 48 hours (172800 seconds) by default.
    function requestOwnershipHandover() public payable virtual {
        unchecked {
            uint256 expires = block.timestamp + _ownershipHandoverValidFor();
            /// @solidity memory-safe-assembly
            assembly {
                // Compute and set the handover slot to `expires`.
                mstore(0x0c, _HANDOVER_SLOT_SEED)
                mstore(0x00, caller())
                sstore(keccak256(0x0c, 0x20), expires)
                // Emit the {OwnershipHandoverRequested} event.
                log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller())
            }
        }
    }

    /// @dev Cancels the two-step ownership handover to the caller, if any.
    function cancelOwnershipHandover() public payable virtual {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, caller())
            sstore(keccak256(0x0c, 0x20), 0)
            // Emit the {OwnershipHandoverCanceled} event.
            log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller())
        }
    }

    /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`.
    /// Reverts if there is no existing ownership handover requested by `pendingOwner`.
    function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and set the handover slot to 0.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            let handoverSlot := keccak256(0x0c, 0x20)
            // If the handover does not exist, or has expired.
            if gt(timestamp(), sload(handoverSlot)) {
                mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`.
                revert(0x1c, 0x04)
            }
            // Set the handover slot to 0.
            sstore(handoverSlot, 0)
        }
        _setOwner(pendingOwner);
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                   PUBLIC READ FUNCTIONS                    */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the owner of the contract.
    function owner() public view virtual returns (address result) {
        /// @solidity memory-safe-assembly
        assembly {
            result := sload(_OWNER_SLOT)
        }
    }

    /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`.
    function ownershipHandoverExpiresAt(address pendingOwner)
        public
        view
        virtual
        returns (uint256 result)
    {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute the handover slot.
            mstore(0x0c, _HANDOVER_SLOT_SEED)
            mstore(0x00, pendingOwner)
            // Load the handover slot.
            result := sload(keccak256(0x0c, 0x20))
        }
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                         MODIFIERS                          */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Marks a function as only callable by the owner.
    modifier onlyOwner() virtual {
        _checkOwner();
        _;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

import "./IERC165.sol";

/// @title ERC-721 Non-Fungible Token Standard
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// Note: the ERC-165 identifier for this interface is 0x80ac58cd.
interface IERC721 is IERC165 {
    /// @dev This emits when ownership of any NFT changes by any mechanism.
    /// This event emits when NFTs are created (`from` == 0) and destroyed
    /// (`to` == 0). Exception: during contract creation, any number of NFTs
    /// may be created and assigned without emitting Transfer. At the time of
    /// any transfer, the approved address for that NFT (if any) is reset to none.
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);

    /// @dev This emits when the approved address for an NFT is changed or
    /// reaffirmed. The zero address indicates there is no approved address.
    /// When a Transfer event emits, this also indicates that the approved
    /// address for that NFT (if any) is reset to none.
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

    /// @dev This emits when an operator is enabled or disabled for an owner.
    /// The operator can manage all NFTs of the owner.
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /// @notice Count all NFTs assigned to an owner
    /// @dev NFTs assigned to the zero address are considered invalid, and this
    /// function throws for queries about the zero address.
    /// @param _owner An address for whom to query the balance
    /// @return The number of NFTs owned by `_owner`, possibly zero
    function balanceOf(address _owner) external view returns (uint256);

    /// @notice Find the owner of an NFT
    /// @dev NFTs assigned to zero address are considered invalid, and queries
    /// about them do throw.
    /// @param _tokenId The identifier for an NFT
    /// @return The address of the owner of the NFT
    function ownerOf(uint256 _tokenId) external view returns (address);

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    /// operator, or the approved address for this NFT. Throws if `_from` is
    /// not the current owner. Throws if `_to` is the zero address. Throws if
    /// `_tokenId` is not a valid NFT. When transfer is complete, this function
    /// checks if `_to` is a smart contract (code size > 0). If so, it calls
    /// `onERC721Received` on `_to` and throws if the return value is not
    /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    /// @param data Additional data with no specified format, sent in call to `_to`
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes calldata data) external payable;

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev This works identically to the other function with an extra data parameter,
    /// except this function just sets data to "".
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;

    /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
    /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
    /// THEY MAY BE PERMANENTLY LOST
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    /// operator, or the approved address for this NFT. Throws if `_from` is
    /// not the current owner. Throws if `_to` is the zero address. Throws if
    /// `_tokenId` is not a valid NFT.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;

    /// @notice Change or reaffirm the approved address for an NFT
    /// @dev The zero address indicates there is no approved address.
    /// Throws unless `msg.sender` is the current NFT owner, or an authorized
    /// operator of the current owner.
    /// @param _approved The new approved NFT controller
    /// @param _tokenId The NFT to approve
    function approve(address _approved, uint256 _tokenId) external payable;

    /// @notice Enable or disable approval for a third party ("operator") to manage
    /// all of `msg.sender`'s assets
    /// @dev Emits the ApprovalForAll event. The contract MUST allow
    /// multiple operators per owner.
    /// @param _operator Address to add to the set of authorized operators
    /// @param _approved True if the operator is approved, false to revoke approval
    function setApprovalForAll(address _operator, bool _approved) external;

    /// @notice Get the approved address for a single NFT
    /// @dev Throws if `_tokenId` is not a valid NFT.
    /// @param _tokenId The NFT to find the approved address for
    /// @return The approved address for this NFT, or the zero address if there is none
    function getApproved(uint256 _tokenId) external view returns (address);

    /// @notice Query if an address is an authorized operator for another address
    /// @param _owner The address that owns the NFTs
    /// @param _operator The address that acts on behalf of the owner
    /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

/// @dev Note: the ERC-165 identifier for this interface is 0x150b7a02.
interface IERC721TokenReceiver {
    /// @notice Handle the receipt of an NFT
    /// @dev The ERC721 smart contract calls this function on the recipient
    /// after a `transfer`. This function MAY throw to revert and reject the
    /// transfer. Return of other than the magic value MUST result in the
    /// transaction being reverted.
    /// Note: the contract address is always the message sender.
    /// @param _operator The address which called `safeTransferFrom` function
    /// @param _from The address which previously owned the token
    /// @param _tokenId The NFT identifier which is being transferred
    /// @param _data Additional data with no specified format
    /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
    ///  unless throwing
    function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes calldata _data)
        external
        returns (bytes4);
}

/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// Note: the ERC-165 identifier for this interface is 0x5b5e139f.
interface IERC721Metadata is IERC721 {
    /// @notice A descriptive name for a collection of NFTs in this contract
    function name() external view returns (string memory _name);

    /// @notice An abbreviated name for NFTs in this contract
    function symbol() external view returns (string memory _symbol);

    /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
    /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
    /// 3986. The URI may point to a JSON file that conforms to the "ERC721
    /// Metadata JSON Schema".
    function tokenURI(uint256 _tokenId) external view returns (string memory);
}

/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
/// @dev See https://eips.ethereum.org/EIPS/eip-721
/// Note: the ERC-165 identifier for this interface is 0x780e9d63.
interface IERC721Enumerable is IERC721 {
    /// @notice Count NFTs tracked by this contract
    /// @return A count of valid NFTs tracked by this contract, where each one of
    /// them has an assigned and queryable owner not equal to the zero address
    function totalSupply() external view returns (uint256);

    /// @notice Enumerate valid NFTs
    /// @dev Throws if `_index` >= `totalSupply()`.
    /// @param _index A counter less than `totalSupply()`
    /// @return The token identifier for the `_index`th NFT,
    /// (sort order not specified)
    function tokenByIndex(uint256 _index) external view returns (uint256);

    /// @notice Enumerate NFTs assigned to an owner
    /// @dev Throws if `_index` >= `balanceOf(_owner)` or if
    /// `_owner` is the zero address, representing invalid NFTs.
    /// @param _owner An address where we are interested in NFTs owned by them
    /// @param _index A counter less than `balanceOf(_owner)`
    /// @return The token identifier for the `_index`th NFT assigned to `_owner`,
    /// (sort order not specified)
    function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}

// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2;

interface IERC165 {
    /// @notice Query if a contract implements an interface
    /// @param interfaceID The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    /// uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    /// `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {LinkTokenInterface} from "../shared/interfaces/LinkTokenInterface.sol";
import {VRFV2WrapperInterface} from "./interfaces/VRFV2WrapperInterface.sol";

/** *******************************************************************************
 * @notice Interface for contracts using VRF randomness through the VRF V2 wrapper
 * ********************************************************************************
 * @dev PURPOSE
 *
 * @dev Create VRF V2 requests without the need for subscription management. Rather than creating
 * @dev and funding a VRF V2 subscription, a user can use this wrapper to create one off requests,
 * @dev paying up front rather than at fulfillment.
 *
 * @dev Since the price is determined using the gas price of the request transaction rather than
 * @dev the fulfillment transaction, the wrapper charges an additional premium on callback gas
 * @dev usage, in addition to some extra overhead costs associated with the VRFV2Wrapper contract.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFV2WrapperConsumerBase. The consumer must be funded
 * @dev with enough LINK to make the request, otherwise requests will revert. To request randomness,
 * @dev call the 'requestRandomness' function with the desired VRF parameters. This function handles
 * @dev paying for the request based on the current pricing.
 *
 * @dev Consumers must implement the fullfillRandomWords function, which will be called during
 * @dev fulfillment with the randomness result.
 */
abstract contract VRFV2WrapperConsumerBase {
  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i
  LinkTokenInterface internal immutable LINK;
  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i
  VRFV2WrapperInterface internal immutable VRF_V2_WRAPPER;

  /**
   * @param _link is the address of LinkToken
   * @param _vrfV2Wrapper is the address of the VRFV2Wrapper contract
   */
  constructor(address _link, address _vrfV2Wrapper) {
    LINK = LinkTokenInterface(_link);
    VRF_V2_WRAPPER = VRFV2WrapperInterface(_vrfV2Wrapper);
  }

  /**
   * @dev Requests randomness from the VRF V2 wrapper.
   *
   * @param _callbackGasLimit is the gas limit that should be used when calling the consumer's
   *        fulfillRandomWords function.
   * @param _requestConfirmations is the number of confirmations to wait before fulfilling the
   *        request. A higher number of confirmations increases security by reducing the likelihood
   *        that a chain re-org changes a published randomness outcome.
   * @param _numWords is the number of random words to request.
   *
   * @return requestId is the VRF V2 request ID of the newly created randomness request.
   */
  // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore
  function requestRandomness(
    uint32 _callbackGasLimit,
    uint16 _requestConfirmations,
    uint32 _numWords
  ) internal returns (uint256 requestId) {
    LINK.transferAndCall(
      address(VRF_V2_WRAPPER),
      VRF_V2_WRAPPER.calculateRequestPrice(_callbackGasLimit),
      abi.encode(_callbackGasLimit, _requestConfirmations, _numWords)
    );
    return VRF_V2_WRAPPER.lastRequestId();
  }

  /**
   * @notice fulfillRandomWords handles the VRF V2 wrapper response. The consuming contract must
   * @notice implement it.
   *
   * @param _requestId is the VRF V2 request ID.
   * @param _randomWords is the randomness result.
   */
  // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore
  function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal virtual;

  function rawFulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) external {
    // solhint-disable-next-line gas-custom-errors
    require(msg.sender == address(VRF_V2_WRAPPER), "only VRF V2 wrapper can fulfill");
    fulfillRandomWords(_requestId, _randomWords);
  }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

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

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

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

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

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

File 19 of 22 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

    // Mapping from token ID to approved address.
    mapping(uint256 => TokenApprovalRef) private _tokenApprovals;

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

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

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

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

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

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

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

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

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

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

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

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

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

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

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

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

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

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

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

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

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

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

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

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

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

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

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

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

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

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

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);

  function transferFrom(address from, address to, uint256 value) external returns (bool success);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFV2WrapperInterface {
  /**
   * @return the request ID of the most recent VRF V2 request made by this wrapper. This should only
   * be relied option within the same transaction that the request was made.
   */
  function lastRequestId() external view returns (uint256);

  /**
   * @notice Calculates the price of a VRF request with the given callbackGasLimit at the current
   * @notice block.
   *
   * @dev This function relies on the transaction gas price which is not automatically set during
   * @dev simulation. To estimate the price at a specific gas price, use the estimatePrice function.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   */
  function calculateRequestPrice(uint32 _callbackGasLimit) external view returns (uint256);

  /**
   * @notice Estimates the price of a VRF request with a specific gas limit and gas price.
   *
   * @dev This is a convenience function that can be called in simulation to better understand
   * @dev pricing.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   * @param _requestGasPriceWei is the gas price in wei used for the estimation.
   */
  function estimateRequestPrice(uint32 _callbackGasLimit, uint256 _requestGasPriceWei) external view returns (uint256);
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

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

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

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

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

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

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ERC721A/=lib/ERC721A/contracts/",
    "solady/=lib/solady/src/",
    "soladytest/=lib/solady/test/",
    "sol-json/=lib/sol-json/src/",
    "chainlink/=lib/chainlink/contracts/src/v0.8/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "solmate/=lib/sol-json/lib/solady/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint32","name":"_startTime","type":"uint32"},{"internalType":"uint32","name":"_endTime","type":"uint32"},{"internalType":"uint32","name":"_priceCurveInSeconds","type":"uint32"},{"internalType":"uint24","name":"_dropIntervalInSeconds","type":"uint24"},{"internalType":"address","name":"_chainalysis","type":"address"},{"internalType":"address","name":"_splitterContract","type":"address"},{"internalType":"address","name":"_link","type":"address"},{"internalType":"address","name":"_vrfWrapper","type":"address"},{"internalType":"address","name":"__transferValidator","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"AuctionFinalized","type":"error"},{"inputs":[],"name":"AuctionInProgress","type":"error"},{"inputs":[],"name":"AuctionNotConfigured","type":"error"},{"inputs":[],"name":"AuctionNotOpen","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BidForZeroUnits","type":"error"},{"inputs":[],"name":"BidTooLow","type":"error"},{"inputs":[],"name":"CallerNotEligible","type":"error"},{"inputs":[],"name":"CannotFinalizeOpenAuction","type":"error"},{"inputs":[],"name":"CannotTransferDuringAuction","type":"error"},{"inputs":[],"name":"ExceedMaxSupply","type":"error"},{"inputs":[],"name":"FailedToWithdraw","type":"error"},{"inputs":[],"name":"IncreasingPriceDisallowed","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NotEnoughEther","type":"error"},{"inputs":[],"name":"OffsetAlreadySet","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ProvenanceMustBeSetBeforeFinalization","type":"error"},{"inputs":[],"name":"RoyaltyOverflow","type":"error"},{"inputs":[],"name":"RoyaltyReceiverIsZeroAddress","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"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bidAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numberOfUnits","type":"uint256"}],"name":"NewBid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":false,"internalType":"address","name":"newValidator","type":"address"}],"name":"TransferValidatorUpdated","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"auctionInfo","outputs":[{"internalType":"uint24","name":"dropInterval","type":"uint24"},{"internalType":"uint32","name":"startTime","type":"uint32"},{"internalType":"uint32","name":"endTime","type":"uint32"},{"internalType":"uint32","name":"priceCurveLength","type":"uint32"},{"internalType":"uint64","name":"endPrice","type":"uint64"},{"internalType":"uint72","name":"startPrice","type":"uint72"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"numberOfUnits","type":"uint16"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bidConfig","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"enum OrderType","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalPrice","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferValidationFunction","outputs":[{"internalType":"bytes4","name":"functionSignature","type":"bytes4"},{"internalType":"bool","name":"isViewFunction","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransferValidator","outputs":[{"internalType":"address","name":"validator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"offset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"open","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","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":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint16[]","name":"_unitCounts","type":"uint16[]"}],"name":"processOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"provenanceHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"},{"internalType":"uint256[]","name":"_randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint72","name":"_startPriceWei","type":"uint72"},{"internalType":"uint64","name":"_endPriceWei","type":"uint64"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hash","type":"bytes32"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_startTime","type":"uint32"},{"internalType":"uint32","name":"_endTime","type":"uint32"},{"internalType":"uint32","name":"_priceCurveInSeconds","type":"uint32"},{"internalType":"uint24","name":"_dropIntervalInSeconds","type":"uint24"}],"name":"setTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferValidator_","type":"address"}],"name":"setTransferValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setVrfOffset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101006040523480156200001257600080fd5b50604051620038ef380380620038ef833981016040819052620000359162000279565b828281816040518060400160405280601081526020016f14dd5c195c88141d5b9ac815dbdc9b1960821b8152506040518060400160405280600381526020016253505760e81b81525081600290816200008f9190620003e4565b5060036200009e8282620003e4565b505060008055506001600160a01b039182166080521660a05250620000c09050565b32620000cc81620001be565b6040805160c0808201835262ffffff8a1680835263ffffffff8e8116602085018190528e8216958501869052908d166060850181905260006080860181905260a090950194909452600a805466ffffffffffffff1916909217630100000090910217600160381b600160781b03191667010000000000000090940263ffffffff60581b1916939093176b010000000000000000000000909202919091176001600160781b03169091556001600160a01b0387811660e052868116909152600e80546001600160a01b031916918416919091179055620001ae856101f4620001fa565b50505050505050505050620004b0565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160601b0316612710808211156200021d5763350a88b36000526004601cfd5b8260601b80620002355763b4457eaa6000526004601cfd5b90911768aa4ec00224afccfdb7555050565b805163ffffffff811681146200025c57600080fd5b919050565b80516001600160a01b03811681146200025c57600080fd5b60008060008060008060008060006101208a8c0312156200029957600080fd5b620002a48a62000247565b9850620002b460208b0162000247565b9750620002c460408b0162000247565b965060608a015162ffffff81168114620002dd57600080fd5b9550620002ed60808b0162000261565b9450620002fd60a08b0162000261565b93506200030d60c08b0162000261565b92506200031d60e08b0162000261565b91506200032e6101008b0162000261565b90509295985092959850929598565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200036857607f821691505b6020821081036200038957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003df576000816000526020600020601f850160051c81016020861015620003ba5750805b601f850160051c820191505b81811015620003db57828155600101620003c6565b5050505b505050565b81516001600160401b038111156200040057620004006200033d565b620004188162000411845462000353565b846200038f565b602080601f831160018114620004505760008415620004375750858301515b600019600386901b1c1916600185901b178555620003db565b600085815260208120601f198616915b82811015620004815788860151825594840194600190910190840162000460565b5085821015620004a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05160e0516133f7620004f860003960006121e301526000611264015260008181610c3c015281816123a501526124ae0152600061237b01526133f76000f3fe6080604052600436106102b25760003560e01c8063715018a611610175578063c23dc68f116100dc578063e985e9c511610095578063f2fde38b1161006f578063f2fde38b146108ca578063f77282ab146108dd578063fcfff16f146108f2578063fee81cf41461090757600080fd5b8063e985e9c51461084e578063efdb01ea14610897578063f04e283e146108b757600080fd5b8063c23dc68f14610797578063c6ab67a3146107c4578063c87b56dd146107da578063cb94eb85146107fa578063d49342201461081a578063d55565441461083857600080fd5b8063a0bcfc7f1161012e578063a0bcfc7f146106e3578063a22cb46514610703578063a6b513ee14610723578063a9fc664e14610743578063b3f05b9714610763578063b88d4fde1461078457600080fd5b8063715018a6146106335780638462151c1461063b5780638da5cb5b1461066857806395d89b411461068157806399a2557a146106965780639d1b464a146106b657600080fd5b8063256929621161021957806354d1f13d116101d257806354d1f13d146104f657806355d64d03146104fe578063574ecc77146105b15780635bbb2177146105c65780636352211e146105f357806370a082311461061357600080fd5b8063256929621461045e578063263c4647146104665780632a55205a1461047957806332cb6b0c146104b85780633ccfd60b146104ce57806342842e0e146104e357600080fd5b8063098144d41161026b578063098144d4146103a2578063099b6bfa146103c05780630d705df6146103e057806318160ddd146104085780631fe543e31461042b57806323b872dd1461044b57600080fd5b806301ffc9a7146102be57806302fa7c47146102f357806306fdde0314610315578063081812fc1461033757806308d6de1e1461036f578063095ea7b31461038f57600080fd5b366102b957005b600080fd5b3480156102ca57600080fd5b506102de6102d9366004612853565b61093a565b60405190151581526020015b60405180910390f35b3480156102ff57600080fd5b5061031361030e366004612885565b610983565b005b34801561032157600080fd5b5061032a610999565b6040516102ea919061291f565b34801561034357600080fd5b50610357610352366004612932565b610a2b565b6040516001600160a01b0390911681526020016102ea565b34801561037b57600080fd5b5061031361038a366004612996565b610a6f565b61031361039d366004612a01565b610b58565b3480156103ae57600080fd5b50600e546001600160a01b0316610357565b3480156103cc57600080fd5b506103136103db366004612932565b610bf9565b3480156103ec57600080fd5b5060408051631f07852d60e21b815260016020820152016102ea565b34801561041457600080fd5b50600154600054035b6040519081526020016102ea565b34801561043757600080fd5b50610313610446366004612a73565b610c31565b610313610459366004612b24565b610cb7565b610313610d5f565b610313610474366004612b75565b610dae565b34801561048557600080fd5b50610499610494366004612b92565b611203565b604080516001600160a01b0390931683526020830191909152016102ea565b3480156104c457600080fd5b5061041d6101f481565b3480156104da57600080fd5b50610313611258565b6103136104f1366004612b24565b6112f7565b610313611312565b34801561050a57600080fd5b50600a546105609062ffffff81169063ffffffff63010000008204811691600160381b8104821691600160581b820416906001600160401b03600160781b820416906001600160481b03600160b81b9091041686565b6040805162ffffff909716875263ffffffff958616602088015293851693860193909352921660608401526001600160401b0390911660808301526001600160481b031660a082015260c0016102ea565b3480156105bd57600080fd5b5061031361134e565b3480156105d257600080fd5b506105e66105e1366004612bb4565b61136b565b6040516102ea9190612c31565b3480156105ff57600080fd5b5061035761060e366004612932565b611436565b34801561061f57600080fd5b5061041d61062e366004612c73565b611441565b61031361148f565b34801561064757600080fd5b5061065b610656366004612c73565b6114a3565b6040516102ea9190612c90565b34801561067457600080fd5b50638b78c6d81954610357565b34801561068d57600080fd5b5061032a6115ab565b3480156106a257600080fd5b5061065b6106b1366004612cc8565b6115ba565b3480156106c257600080fd5b506106cb611733565b6040516001600160501b0390911681526020016102ea565b3480156106ef57600080fd5b506103136106fe366004612cfd565b6118c4565b34801561070f57600080fd5b5061031361071e366004612d7c565b6118d9565b34801561072f57600080fd5b50600b546106cb906001600160501b031681565b34801561074f57600080fd5b5061031361075e366004612c73565b611973565b34801561076f57600080fd5b50600b546102de90600160501b900460ff1681565b610313610792366004612daa565b6119dc565b3480156107a357600080fd5b506107b76107b2366004612932565b611a26565b6040516102ea9190612e6d565b3480156107d057600080fd5b5061041d600c5481565b3480156107e657600080fd5b5061032a6107f5366004612932565b611a9e565b34801561080657600080fd5b50610313610815366004612e7b565b611b21565b34801561082657600080fd5b506000806040516102ea929190612ec1565b34801561084457600080fd5b5061041d60085481565b34801561085a57600080fd5b506102de610869366004612efc565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108a357600080fd5b506103136108b2366004612f43565b611bb2565b6103136108c5366004612c73565b611c30565b6103136108d8366004612c73565b611c6d565b3480156108e957600080fd5b50610313611c94565b3480156108fe57600080fd5b506102de611cfa565b34801561091357600080fd5b5061041d610922366004612c73565b63389a75e1600c908152600091909152602090205490565b60006001600160e01b03198216633a48789960e01b148061095f575061095f82611d45565b8061097d5750632a55205a60e083901c9081146301ffc9a791909114175b92915050565b61098b611d93565b6109958282611dae565b5050565b6060600280546109a890612fa1565b80601f01602080910402602001604051908101604052809291908181526020018280546109d490612fa1565b8015610a215780601f106109f657610100808354040283529160200191610a21565b820191906000526020600020905b815481529060010190602001808311610a0457829003601f168201915b5050505050905090565b6000610a3682611dfe565b610a53576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b610a77611d93565b610a7f611cfa565b15610a9d57604051639bbb1f3b60e01b815260040160405180910390fd5b600b54600160501b900460ff1615610ac8576040516332bebcfd60e01b815260040160405180910390fd5b828114610ae85760405163512509d360e11b815260040160405180910390fd5b60005b83811015610b5157610b49858583818110610b0857610b08612fdb565b9050602002016020810190610b1d9190612c73565b848484818110610b2f57610b2f612fdb565b9050602002016020810190610b449190612b75565b611e25565b600101610aeb565b5050505050565b610b60611cfa565b15610b7e5760405163031e88ad60e01b815260040160405180910390fd5b600e5460405163657711f560e11b81526001600160a01b03848116600483018190523360248401526044830152606482018490529091169063caee23ea9060840160006040518083038186803b158015610bd757600080fd5b505afa158015610beb573d6000803e3d6000fd5b505050506109958282611f1f565b610c01611d93565b600b54600160501b900460ff1615610c2c57604051637be9059760e01b815260040160405180910390fd5b600c55565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cad5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c00604482015260640160405180910390fd5b6109958282611fbf565b610cbf611cfa565b15610cdd5760405163031e88ad60e01b815260040160405180910390fd5b600e5460405163657711f560e11b81523360048201526001600160a01b0385811660248301528481166044830152606482018490529091169063caee23ea9060840160006040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b50505050610d5a838383612028565b505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b610db7336121c1565b610dd457604051631302dbff60e01b815260040160405180910390fd5b6101f48161ffff16610de560005490565b610def9190613007565b1115610e0e57604051630f0c37b960e11b815260040160405180910390fd5b8061ffff16600003610e335760405163f2b4fb2360e01b815260040160405180910390fd5b610e3b611cfa565b610e585760405163f046007760e01b815260040160405180910390fd5b600a54600160781b90046001600160401b0316600003610e8b5760405163493dcb8560e11b815260040160405180910390fd5b6000610e95611733565b90506000610ea761ffff84168361301a565b60405163332599d560e01b81523360048201526001600160501b039190911691506000906da6fa31f5fc51c1640aac768667509063332599d590602401602060405180830381865afa158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f259190613045565b9050803b6000819003610fa357604051631d85641960e01b81523360048201526da6fa31f5fc51c1640aac7686675090631d856419906024016020604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613045565b505b604051630303e6f960e31b815260006004820181905283916001600160a01b0383169063181f37c890602401602060405180830381865afa158015610fec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110109190613062565b60408051606081018252600080825260208201819052818301529051636eba2b1360e01b8152306004820152919250906001600160a01b03841690636eba2b1390602401606060405180830381865afa92505050801561108d575060408051601f3d908101601f1916820190925261108a9181019061307b565b60015b156110955790505b805160009061ffff16156110d257816000015161ffff168883602001516110bc91906130f8565b6110c6919061301a565b6001600160501b031690505b86346110de8386613007565b6110e89190613007565b101561110757604051638a0d377960e01b815260040160405180910390fd5b604051632376831760e21b81526001600160501b038916600482015261ffff8a1660248201526001600160a01b03851690638dda0c5c9034906044016000604051808303818588803b15801561115c57600080fd5b505af1158015611170573d6000803e3d6000fd5b5050505050611183338a61ffff16612257565b6101f461118f60005490565b036111b357600b805469ffffffffffffffffffff19166001600160501b038a161790555b604080516001600160501b038a16815261ffff8b1660208201527f632f5622fa7b1e8ef1a95c87de56ccc3584d8bc0f17283a3ad0ff221aa4cc612910160405180910390a1505050505050505050565b600082815268aa4ec00224afccfdb76020526040812054606081901c91906127109083611237576020515490508060601c93505b606084901b1884600019829004811182023d3d3e9396930204935090915050565b611260611d93565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03164760405160006040518083038185875af1925050503d80600081146112cd576040519150601f19603f3d011682016040523d82523d6000602084013e6112d2565b606091505b50509050806112f457604051632684a07960e01b815260040160405180910390fd5b50565b610d5a838383604051806020016040528060008152506119dc565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b611356611d93565b611366620186a060036001612355565b600955565b6060816000816001600160401b0381111561138857611388612a2d565b6040519080825280602002602001820160405280156113da57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816113a65790505b50905060005b82811461142d576114088686838181106113fc576113fc612fdb565b90506020020135611a26565b82828151811061141a5761141a612fdb565b60209081029190910101526001016113e0565b50949350505050565b600061097d82612536565b60006001600160a01b03821661146a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611497611d93565b6114a1600061259d565b565b606060008060006114b385611441565b90506000816001600160401b038111156114cf576114cf612a2d565b6040519080825280602002602001820160405280156114f8578160200160208202803683370190505b50905061152560408051608081018252600080825260208201819052918101829052606081019190915290565b60005b83861461159f57611538816125db565b915081604001516115975781516001600160a01b03161561155857815194505b876001600160a01b0316856001600160a01b031603611597578083878060010198508151811061158a5761158a612fdb565b6020026020010181815250505b600101611528565b50909695505050505050565b6060600380546109a890612fa1565b60608183106115dc57604051631960ccad60e11b815260040160405180910390fd5b6000806115e860005490565b9050808411156115f6578093505b600061160187611441565b905084861015611620578585038181101561161a578091505b50611624565b5060005b6000816001600160401b0381111561163e5761163e612a2d565b604051908082528060200260200182016040528015611667578160200160208202803683370190505b5090508160000361167d57935061172c92505050565b600061168888611a26565b905060008160400151611699575080515b885b8881141580156116ab5750848714155b15611720576116b9816125db565b925082604001516117185782516001600160a01b0316156116d957825191505b8a6001600160a01b0316826001600160a01b031603611718578084888060010199508151811061170b5761170b612fdb565b6020026020010181815250505b60010161169b565b50505092835250909150505b9392505050565b600b546000906001600160501b0316156117575750600b546001600160501b031690565b6040805160c081018252600a5462ffffff8116825263ffffffff63010000008204811660208401819052600160381b8304821694840194909452600160581b82041660608301526001600160401b03600160781b82041660808301526001600160481b03600160b81b9091041660a0820152904210156117e35760a001516001600160481b0316919050565b806060015163ffffffff16816020015163ffffffff1642611804919061311f565b1061181b57608001516001600160401b0316919050565b8051602082015160009162ffffff169061183b9063ffffffff164261311f565b6118459190613148565b90506000826000015162ffffff168360600151611862919061315c565b63ffffffff1683608001516001600160401b03168460a00151611885919061317f565b61188f919061319f565b6001600160481b031690506118a481836131b9565b8360a001516001600160481b03166118bc91906130f8565b935050505090565b6118cc611d93565b600d610d5a828483613218565b6118e1611cfa565b156118ff5760405163031e88ad60e01b815260040160405180910390fd5b600e54604051631f07852d60e21b81526001600160a01b0384811660048301819052336024840152604483015290911690637c1e14b49060640160006040518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506109958282612617565b61197b611d93565b600e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a15050565b6119e7848484610cb7565b6001600160a01b0383163b15611a2057611a0384848484612683565b611a20576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6040805160808082018352600080835260208084018290528385018290526060808501839052855193840186528284529083018290529382018190529281018390529091506000548310611a7a5792915050565b611a83836125db565b9050806040015115611a955792915050565b61172c8361276e565b6060611aa982611dfe565b611ac657604051630a14c4b560e41b815260040160405180910390fd5b6000611ad06127a3565b90508051600003611af0576040518060200160405280600081525061172c565b80611afa846127b2565b604051602001611b0b9291906132d7565b6040516020818303038152906040529392505050565b611b29611d93565b816001600160481b0316816001600160401b03161115611b5c5760405163e4db00d960e01b815260040160405180910390fd5b600a80546001600160401b03909216600160781b0267ffffffffffffffff60781b196001600160481b03909416600160b81b02939093166effffffffffffffffffffffffffffff90921691909117919091179055565b611bba611d93565b600a805462ffffff90921662ffffff1963ffffffff948516600160581b02166effffffff0000000000000000ffffff19958516600160381b026affffffff000000000000001995909716630100000002949094166affffffffffffffff0000001990931692909217949094179290921617179055565b611c38611d93565b63389a75e1600c52806000526020600c208054421115611c6057636f5e88186000526004601cfd5b600090556112f48161259d565b611c75611d93565b8060601b611c8b57637448fbae6000526004601cfd5b6112f48161259d565b611c9c611d93565b611ca4611cfa565b15611cc257604051631c184c2760e01b815260040160405180910390fd5b600c54600003611ce557604051637be9059760e01b815260040160405180910390fd5b600b805460ff60501b1916600160501b179055565b60006101f4611d0860005490565b03611d135750600090565b600a546301000000900463ffffffff164210801590611d405750600a54600160381b900463ffffffff1642105b905090565b60006301ffc9a760e01b6001600160e01b031983161480611d7657506380ac58cd60e01b6001600160e01b03198316145b8061097d5750506001600160e01b031916635b5e139f60e01b1490565b638b78c6d8195433146114a1576382b429006000526004601cfd5b6bffffffffffffffffffffffff1661271080821115611dd55763350a88b36000526004601cfd5b8260601b80611dec5763b4457eaa6000526004601cfd5b90911768aa4ec00224afccfdb7555050565b600080548210801561097d575050600090815260046020526040902054600160e01b161590565b60405163332599d560e01b81526001600160a01b03831660048201526000906da6fa31f5fc51c1640aac768667509063332599d590602401602060405180830381865afa158015611e7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9e9190613045565b9050806001600160a01b031663cd6c1abf611eb7611733565b6040516001600160e01b031960e084901b1681526001600160501b03909116600482015261ffff85166024820152604401600060405180830381600087803b158015611f0257600080fd5b505af1158015611f16573d6000803e3d6000fd5b50505050505050565b6000611f2a82611436565b9050336001600160a01b03821614611f6357611f468133610869565b611f63576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009548214611fcd57600080fd5b60085415611fee5760405163515b6f5b60e01b815260040160405180910390fd5b60008160008151811061200357612003612fdb565b602002602001015190506120166101f490565b6120209082613306565b600855505050565b600061203382612536565b9050836001600160a01b0316816001600160a01b0316146120665760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176120b3576120968633610869565b6120b357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166120da57604051633a954ecd60e21b815260040160405180910390fd5b80156120e557600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003612177576001840160008181526004602052604081205490036121755760005481146121755760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60405163df592f7d60e01b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063df592f7d90602401602060405180830381865afa15801561222c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612250919061331a565b1592915050565b600080549082900361227c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461232b57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016122f3565b508160000361234c57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6040516310c1b4d560e21b815263ffffffff841660048201526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691634000aea0917f00000000000000000000000000000000000000000000000000000000000000009190821690634306d35490602401602060405180830381865afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124139190613062565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b815260040161246893929190613337565b6020604051808303816000875af1158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061331a565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561250a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252e9190613062565b949350505050565b6000816000548110156125845760008181526004602052604081205490600160e01b82169003612582575b8060000361172c575060001901600081815260046020526040902054612561565b505b604051636f96cda160e11b815260040160405180910390fd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461097d906127f6565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906126b8903390899088908890600401613367565b6020604051808303816000875af19250505080156126f3575060408051601f3d908101601f191682019092526126f0918101906133a4565b60015b612751573d808015612721576040519150601f19603f3d011682016040523d82523d6000602084013e612726565b606091505b508051600003612749576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261097d61279e83612536565b6127f6565b6060600d80546109a890612fa1565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806127cc5750819003601f19909101908152919050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6001600160e01b0319811681146112f457600080fd5b60006020828403121561286557600080fd5b813561172c8161283d565b6001600160a01b03811681146112f457600080fd5b6000806040838503121561289857600080fd5b82356128a381612870565b915060208301356bffffffffffffffffffffffff811681146128c457600080fd5b809150509250929050565b60005b838110156128ea5781810151838201526020016128d2565b50506000910152565b6000815180845261290b8160208601602086016128cf565b601f01601f19169290920160200192915050565b60208152600061172c60208301846128f3565b60006020828403121561294457600080fd5b5035919050565b60008083601f84011261295d57600080fd5b5081356001600160401b0381111561297457600080fd5b6020830191508360208260051b850101111561298f57600080fd5b9250929050565b600080600080604085870312156129ac57600080fd5b84356001600160401b03808211156129c357600080fd5b6129cf8883890161294b565b909650945060208701359150808211156129e857600080fd5b506129f58782880161294b565b95989497509550505050565b60008060408385031215612a1457600080fd5b8235612a1f81612870565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612a6b57612a6b612a2d565b604052919050565b60008060408385031215612a8657600080fd5b823591506020808401356001600160401b0380821115612aa557600080fd5b818601915086601f830112612ab957600080fd5b813581811115612acb57612acb612a2d565b8060051b9150612adc848301612a43565b8181529183018401918481019089841115612af657600080fd5b938501935b83851015612b1457843582529385019390850190612afb565b8096505050505050509250929050565b600080600060608486031215612b3957600080fd5b8335612b4481612870565b92506020840135612b5481612870565b929592945050506040919091013590565b61ffff811681146112f457600080fd5b600060208284031215612b8757600080fd5b813561172c81612b65565b60008060408385031215612ba557600080fd5b50508035926020909101359150565b60008060208385031215612bc757600080fd5b82356001600160401b03811115612bdd57600080fd5b612be98582860161294b565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b8181101561159f57612c60838551612bf5565b9284019260809290920191600101612c4d565b600060208284031215612c8557600080fd5b813561172c81612870565b6020808252825182820181905260009190848201906040850190845b8181101561159f57835183529284019291840191600101612cac565b600080600060608486031215612cdd57600080fd5b8335612ce881612870565b95602085013595506040909401359392505050565b60008060208385031215612d1057600080fd5b82356001600160401b0380821115612d2757600080fd5b818501915085601f830112612d3b57600080fd5b813581811115612d4a57600080fd5b866020828501011115612d5c57600080fd5b60209290920196919550909350505050565b80151581146112f457600080fd5b60008060408385031215612d8f57600080fd5b8235612d9a81612870565b915060208301356128c481612d6e565b60008060008060808587031215612dc057600080fd5b8435612dcb81612870565b9350602085810135612ddc81612870565b93506040860135925060608601356001600160401b0380821115612dff57600080fd5b818801915088601f830112612e1357600080fd5b813581811115612e2557612e25612a2d565b612e37601f8201601f19168501612a43565b91508082528984828501011115612e4d57600080fd5b808484018584013760008482840101525080935050505092959194509250565b6080810161097d8284612bf5565b60008060408385031215612e8e57600080fd5b82356001600160481b0381168114612ea557600080fd5b915060208301356001600160401b03811681146128c457600080fd5b6001600160a01b03831681526040810160038310612eef57634e487b7160e01b600052602160045260246000fd5b8260208301529392505050565b60008060408385031215612f0f57600080fd5b8235612f1a81612870565b915060208301356128c481612870565b803563ffffffff81168114612f3e57600080fd5b919050565b60008060008060808587031215612f5957600080fd5b612f6285612f2a565b9350612f7060208601612f2a565b9250612f7e60408601612f2a565b9150606085013562ffffff81168114612f9657600080fd5b939692955090935050565b600181811c90821680612fb557607f821691505b602082108103612fd557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561097d5761097d612ff1565b6001600160501b0381811683821602808216919082811461303d5761303d612ff1565b505092915050565b60006020828403121561305757600080fd5b815161172c81612870565b60006020828403121561307457600080fd5b5051919050565b60006060828403121561308d57600080fd5b604051606081018181106001600160401b03821117156130af576130af612a2d565b60405282516130bd81612b65565b815260208301516001600160501b03811681146130d957600080fd5b602082015260408301516130ec81612870565b60408201529392505050565b6001600160501b0382811682821603908082111561311857613118612ff1565b5092915050565b8181038181111561097d5761097d612ff1565b634e487b7160e01b600052601260045260246000fd5b60008261315757613157613132565b500490565b600063ffffffff8084168061317357613173613132565b92169190910492915050565b6001600160481b0382811682821603908082111561311857613118612ff1565b60006001600160481b038084168061317357613173613132565b808202811582820484141761097d5761097d612ff1565b601f821115610d5a576000816000526020600020601f850160051c810160208610156131f95750805b601f850160051c820191505b818110156121b957828155600101613205565b6001600160401b0383111561322f5761322f612a2d565b6132438361323d8354612fa1565b836131d0565b6000601f841160018114613277576000851561325f5750838201355b600019600387901b1c1916600186901b178355610b51565b600083815260209020601f19861690835b828110156132a85786850135825560209485019460019092019101613288565b50868210156132c55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600083516132e98184602088016128cf565b8351908301906132fd8183602088016128cf565b01949350505050565b60008261331557613315613132565b500690565b60006020828403121561332c57600080fd5b815161172c81612d6e565b60018060a01b038416815282602082015260606040820152600061335e60608301846128f3565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061339a908301846128f3565b9695505050505050565b6000602082840312156133b657600080fd5b815161172c8161283d56fea2646970667358221220179a8c18246880415e3e564ad77bf32721b87111f12491bb52474f78b318c41364736f6c6343000817003300000000000000000000000000000000000000000000000000000000665742f00000000000000000000000000000000000000000000000000000000066575f100000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb00000000000000000000000000000000000000da7a8c35d2620ed5829e001aae000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000000000000000646261085794f6baf115bcbd2b00

Deployed Bytecode

0x6080604052600436106102b25760003560e01c8063715018a611610175578063c23dc68f116100dc578063e985e9c511610095578063f2fde38b1161006f578063f2fde38b146108ca578063f77282ab146108dd578063fcfff16f146108f2578063fee81cf41461090757600080fd5b8063e985e9c51461084e578063efdb01ea14610897578063f04e283e146108b757600080fd5b8063c23dc68f14610797578063c6ab67a3146107c4578063c87b56dd146107da578063cb94eb85146107fa578063d49342201461081a578063d55565441461083857600080fd5b8063a0bcfc7f1161012e578063a0bcfc7f146106e3578063a22cb46514610703578063a6b513ee14610723578063a9fc664e14610743578063b3f05b9714610763578063b88d4fde1461078457600080fd5b8063715018a6146106335780638462151c1461063b5780638da5cb5b1461066857806395d89b411461068157806399a2557a146106965780639d1b464a146106b657600080fd5b8063256929621161021957806354d1f13d116101d257806354d1f13d146104f657806355d64d03146104fe578063574ecc77146105b15780635bbb2177146105c65780636352211e146105f357806370a082311461061357600080fd5b8063256929621461045e578063263c4647146104665780632a55205a1461047957806332cb6b0c146104b85780633ccfd60b146104ce57806342842e0e146104e357600080fd5b8063098144d41161026b578063098144d4146103a2578063099b6bfa146103c05780630d705df6146103e057806318160ddd146104085780631fe543e31461042b57806323b872dd1461044b57600080fd5b806301ffc9a7146102be57806302fa7c47146102f357806306fdde0314610315578063081812fc1461033757806308d6de1e1461036f578063095ea7b31461038f57600080fd5b366102b957005b600080fd5b3480156102ca57600080fd5b506102de6102d9366004612853565b61093a565b60405190151581526020015b60405180910390f35b3480156102ff57600080fd5b5061031361030e366004612885565b610983565b005b34801561032157600080fd5b5061032a610999565b6040516102ea919061291f565b34801561034357600080fd5b50610357610352366004612932565b610a2b565b6040516001600160a01b0390911681526020016102ea565b34801561037b57600080fd5b5061031361038a366004612996565b610a6f565b61031361039d366004612a01565b610b58565b3480156103ae57600080fd5b50600e546001600160a01b0316610357565b3480156103cc57600080fd5b506103136103db366004612932565b610bf9565b3480156103ec57600080fd5b5060408051631f07852d60e21b815260016020820152016102ea565b34801561041457600080fd5b50600154600054035b6040519081526020016102ea565b34801561043757600080fd5b50610313610446366004612a73565b610c31565b610313610459366004612b24565b610cb7565b610313610d5f565b610313610474366004612b75565b610dae565b34801561048557600080fd5b50610499610494366004612b92565b611203565b604080516001600160a01b0390931683526020830191909152016102ea565b3480156104c457600080fd5b5061041d6101f481565b3480156104da57600080fd5b50610313611258565b6103136104f1366004612b24565b6112f7565b610313611312565b34801561050a57600080fd5b50600a546105609062ffffff81169063ffffffff63010000008204811691600160381b8104821691600160581b820416906001600160401b03600160781b820416906001600160481b03600160b81b9091041686565b6040805162ffffff909716875263ffffffff958616602088015293851693860193909352921660608401526001600160401b0390911660808301526001600160481b031660a082015260c0016102ea565b3480156105bd57600080fd5b5061031361134e565b3480156105d257600080fd5b506105e66105e1366004612bb4565b61136b565b6040516102ea9190612c31565b3480156105ff57600080fd5b5061035761060e366004612932565b611436565b34801561061f57600080fd5b5061041d61062e366004612c73565b611441565b61031361148f565b34801561064757600080fd5b5061065b610656366004612c73565b6114a3565b6040516102ea9190612c90565b34801561067457600080fd5b50638b78c6d81954610357565b34801561068d57600080fd5b5061032a6115ab565b3480156106a257600080fd5b5061065b6106b1366004612cc8565b6115ba565b3480156106c257600080fd5b506106cb611733565b6040516001600160501b0390911681526020016102ea565b3480156106ef57600080fd5b506103136106fe366004612cfd565b6118c4565b34801561070f57600080fd5b5061031361071e366004612d7c565b6118d9565b34801561072f57600080fd5b50600b546106cb906001600160501b031681565b34801561074f57600080fd5b5061031361075e366004612c73565b611973565b34801561076f57600080fd5b50600b546102de90600160501b900460ff1681565b610313610792366004612daa565b6119dc565b3480156107a357600080fd5b506107b76107b2366004612932565b611a26565b6040516102ea9190612e6d565b3480156107d057600080fd5b5061041d600c5481565b3480156107e657600080fd5b5061032a6107f5366004612932565b611a9e565b34801561080657600080fd5b50610313610815366004612e7b565b611b21565b34801561082657600080fd5b506000806040516102ea929190612ec1565b34801561084457600080fd5b5061041d60085481565b34801561085a57600080fd5b506102de610869366004612efc565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108a357600080fd5b506103136108b2366004612f43565b611bb2565b6103136108c5366004612c73565b611c30565b6103136108d8366004612c73565b611c6d565b3480156108e957600080fd5b50610313611c94565b3480156108fe57600080fd5b506102de611cfa565b34801561091357600080fd5b5061041d610922366004612c73565b63389a75e1600c908152600091909152602090205490565b60006001600160e01b03198216633a48789960e01b148061095f575061095f82611d45565b8061097d5750632a55205a60e083901c9081146301ffc9a791909114175b92915050565b61098b611d93565b6109958282611dae565b5050565b6060600280546109a890612fa1565b80601f01602080910402602001604051908101604052809291908181526020018280546109d490612fa1565b8015610a215780601f106109f657610100808354040283529160200191610a21565b820191906000526020600020905b815481529060010190602001808311610a0457829003601f168201915b5050505050905090565b6000610a3682611dfe565b610a53576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b610a77611d93565b610a7f611cfa565b15610a9d57604051639bbb1f3b60e01b815260040160405180910390fd5b600b54600160501b900460ff1615610ac8576040516332bebcfd60e01b815260040160405180910390fd5b828114610ae85760405163512509d360e11b815260040160405180910390fd5b60005b83811015610b5157610b49858583818110610b0857610b08612fdb565b9050602002016020810190610b1d9190612c73565b848484818110610b2f57610b2f612fdb565b9050602002016020810190610b449190612b75565b611e25565b600101610aeb565b5050505050565b610b60611cfa565b15610b7e5760405163031e88ad60e01b815260040160405180910390fd5b600e5460405163657711f560e11b81526001600160a01b03848116600483018190523360248401526044830152606482018490529091169063caee23ea9060840160006040518083038186803b158015610bd757600080fd5b505afa158015610beb573d6000803e3d6000fd5b505050506109958282611f1f565b610c01611d93565b600b54600160501b900460ff1615610c2c57604051637be9059760e01b815260040160405180910390fd5b600c55565b336001600160a01b037f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df61614610cad5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c00604482015260640160405180910390fd5b6109958282611fbf565b610cbf611cfa565b15610cdd5760405163031e88ad60e01b815260040160405180910390fd5b600e5460405163657711f560e11b81523360048201526001600160a01b0385811660248301528481166044830152606482018490529091169063caee23ea9060840160006040518083038186803b158015610d3757600080fd5b505afa158015610d4b573d6000803e3d6000fd5b50505050610d5a838383612028565b505050565b60006202a3006001600160401b03164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b610db7336121c1565b610dd457604051631302dbff60e01b815260040160405180910390fd5b6101f48161ffff16610de560005490565b610def9190613007565b1115610e0e57604051630f0c37b960e11b815260040160405180910390fd5b8061ffff16600003610e335760405163f2b4fb2360e01b815260040160405180910390fd5b610e3b611cfa565b610e585760405163f046007760e01b815260040160405180910390fd5b600a54600160781b90046001600160401b0316600003610e8b5760405163493dcb8560e11b815260040160405180910390fd5b6000610e95611733565b90506000610ea761ffff84168361301a565b60405163332599d560e01b81523360048201526001600160501b039190911691506000906da6fa31f5fc51c1640aac768667509063332599d590602401602060405180830381865afa158015610f01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f259190613045565b9050803b6000819003610fa357604051631d85641960e01b81523360048201526da6fa31f5fc51c1640aac7686675090631d856419906024016020604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613045565b505b604051630303e6f960e31b815260006004820181905283916001600160a01b0383169063181f37c890602401602060405180830381865afa158015610fec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110109190613062565b60408051606081018252600080825260208201819052818301529051636eba2b1360e01b8152306004820152919250906001600160a01b03841690636eba2b1390602401606060405180830381865afa92505050801561108d575060408051601f3d908101601f1916820190925261108a9181019061307b565b60015b156110955790505b805160009061ffff16156110d257816000015161ffff168883602001516110bc91906130f8565b6110c6919061301a565b6001600160501b031690505b86346110de8386613007565b6110e89190613007565b101561110757604051638a0d377960e01b815260040160405180910390fd5b604051632376831760e21b81526001600160501b038916600482015261ffff8a1660248201526001600160a01b03851690638dda0c5c9034906044016000604051808303818588803b15801561115c57600080fd5b505af1158015611170573d6000803e3d6000fd5b5050505050611183338a61ffff16612257565b6101f461118f60005490565b036111b357600b805469ffffffffffffffffffff19166001600160501b038a161790555b604080516001600160501b038a16815261ffff8b1660208201527f632f5622fa7b1e8ef1a95c87de56ccc3584d8bc0f17283a3ad0ff221aa4cc612910160405180910390a1505050505050505050565b600082815268aa4ec00224afccfdb76020526040812054606081901c91906127109083611237576020515490508060601c93505b606084901b1884600019829004811182023d3d3e9396930204935090915050565b611260611d93565b60007f00000000000000000000000000000000000000da7a8c35d2620ed5829e001aae6001600160a01b03164760405160006040518083038185875af1925050503d80600081146112cd576040519150601f19603f3d011682016040523d82523d6000602084013e6112d2565b606091505b50509050806112f457604051632684a07960e01b815260040160405180910390fd5b50565b610d5a838383604051806020016040528060008152506119dc565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b611356611d93565b611366620186a060036001612355565b600955565b6060816000816001600160401b0381111561138857611388612a2d565b6040519080825280602002602001820160405280156113da57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816113a65790505b50905060005b82811461142d576114088686838181106113fc576113fc612fdb565b90506020020135611a26565b82828151811061141a5761141a612fdb565b60209081029190910101526001016113e0565b50949350505050565b600061097d82612536565b60006001600160a01b03821661146a576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611497611d93565b6114a1600061259d565b565b606060008060006114b385611441565b90506000816001600160401b038111156114cf576114cf612a2d565b6040519080825280602002602001820160405280156114f8578160200160208202803683370190505b50905061152560408051608081018252600080825260208201819052918101829052606081019190915290565b60005b83861461159f57611538816125db565b915081604001516115975781516001600160a01b03161561155857815194505b876001600160a01b0316856001600160a01b031603611597578083878060010198508151811061158a5761158a612fdb565b6020026020010181815250505b600101611528565b50909695505050505050565b6060600380546109a890612fa1565b60608183106115dc57604051631960ccad60e11b815260040160405180910390fd5b6000806115e860005490565b9050808411156115f6578093505b600061160187611441565b905084861015611620578585038181101561161a578091505b50611624565b5060005b6000816001600160401b0381111561163e5761163e612a2d565b604051908082528060200260200182016040528015611667578160200160208202803683370190505b5090508160000361167d57935061172c92505050565b600061168888611a26565b905060008160400151611699575080515b885b8881141580156116ab5750848714155b15611720576116b9816125db565b925082604001516117185782516001600160a01b0316156116d957825191505b8a6001600160a01b0316826001600160a01b031603611718578084888060010199508151811061170b5761170b612fdb565b6020026020010181815250505b60010161169b565b50505092835250909150505b9392505050565b600b546000906001600160501b0316156117575750600b546001600160501b031690565b6040805160c081018252600a5462ffffff8116825263ffffffff63010000008204811660208401819052600160381b8304821694840194909452600160581b82041660608301526001600160401b03600160781b82041660808301526001600160481b03600160b81b9091041660a0820152904210156117e35760a001516001600160481b0316919050565b806060015163ffffffff16816020015163ffffffff1642611804919061311f565b1061181b57608001516001600160401b0316919050565b8051602082015160009162ffffff169061183b9063ffffffff164261311f565b6118459190613148565b90506000826000015162ffffff168360600151611862919061315c565b63ffffffff1683608001516001600160401b03168460a00151611885919061317f565b61188f919061319f565b6001600160481b031690506118a481836131b9565b8360a001516001600160481b03166118bc91906130f8565b935050505090565b6118cc611d93565b600d610d5a828483613218565b6118e1611cfa565b156118ff5760405163031e88ad60e01b815260040160405180910390fd5b600e54604051631f07852d60e21b81526001600160a01b0384811660048301819052336024840152604483015290911690637c1e14b49060640160006040518083038186803b15801561195157600080fd5b505afa158015611965573d6000803e3d6000fd5b505050506109958282612617565b61197b611d93565b600e80546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a15050565b6119e7848484610cb7565b6001600160a01b0383163b15611a2057611a0384848484612683565b611a20576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6040805160808082018352600080835260208084018290528385018290526060808501839052855193840186528284529083018290529382018190529281018390529091506000548310611a7a5792915050565b611a83836125db565b9050806040015115611a955792915050565b61172c8361276e565b6060611aa982611dfe565b611ac657604051630a14c4b560e41b815260040160405180910390fd5b6000611ad06127a3565b90508051600003611af0576040518060200160405280600081525061172c565b80611afa846127b2565b604051602001611b0b9291906132d7565b6040516020818303038152906040529392505050565b611b29611d93565b816001600160481b0316816001600160401b03161115611b5c5760405163e4db00d960e01b815260040160405180910390fd5b600a80546001600160401b03909216600160781b0267ffffffffffffffff60781b196001600160481b03909416600160b81b02939093166effffffffffffffffffffffffffffff90921691909117919091179055565b611bba611d93565b600a805462ffffff90921662ffffff1963ffffffff948516600160581b02166effffffff0000000000000000ffffff19958516600160381b026affffffff000000000000001995909716630100000002949094166affffffffffffffff0000001990931692909217949094179290921617179055565b611c38611d93565b63389a75e1600c52806000526020600c208054421115611c6057636f5e88186000526004601cfd5b600090556112f48161259d565b611c75611d93565b8060601b611c8b57637448fbae6000526004601cfd5b6112f48161259d565b611c9c611d93565b611ca4611cfa565b15611cc257604051631c184c2760e01b815260040160405180910390fd5b600c54600003611ce557604051637be9059760e01b815260040160405180910390fd5b600b805460ff60501b1916600160501b179055565b60006101f4611d0860005490565b03611d135750600090565b600a546301000000900463ffffffff164210801590611d405750600a54600160381b900463ffffffff1642105b905090565b60006301ffc9a760e01b6001600160e01b031983161480611d7657506380ac58cd60e01b6001600160e01b03198316145b8061097d5750506001600160e01b031916635b5e139f60e01b1490565b638b78c6d8195433146114a1576382b429006000526004601cfd5b6bffffffffffffffffffffffff1661271080821115611dd55763350a88b36000526004601cfd5b8260601b80611dec5763b4457eaa6000526004601cfd5b90911768aa4ec00224afccfdb7555050565b600080548210801561097d575050600090815260046020526040902054600160e01b161590565b60405163332599d560e01b81526001600160a01b03831660048201526000906da6fa31f5fc51c1640aac768667509063332599d590602401602060405180830381865afa158015611e7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9e9190613045565b9050806001600160a01b031663cd6c1abf611eb7611733565b6040516001600160e01b031960e084901b1681526001600160501b03909116600482015261ffff85166024820152604401600060405180830381600087803b158015611f0257600080fd5b505af1158015611f16573d6000803e3d6000fd5b50505050505050565b6000611f2a82611436565b9050336001600160a01b03821614611f6357611f468133610869565b611f63576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009548214611fcd57600080fd5b60085415611fee5760405163515b6f5b60e01b815260040160405180910390fd5b60008160008151811061200357612003612fdb565b602002602001015190506120166101f490565b6120209082613306565b600855505050565b600061203382612536565b9050836001600160a01b0316816001600160a01b0316146120665760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176120b3576120968633610869565b6120b357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166120da57604051633a954ecd60e21b815260040160405180910390fd5b80156120e557600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003612177576001840160008181526004602052604081205490036121755760005481146121755760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60405163df592f7d60e01b81526001600160a01b0382811660048301526000917f00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb9091169063df592f7d90602401602060405180830381865afa15801561222c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612250919061331a565b1592915050565b600080549082900361227c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461232b57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a46001016122f3565b508160000361234c57604051622e076360e81b815260040160405180910390fd5b60005550505050565b6040516310c1b4d560e21b815263ffffffff841660048201526000906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca811691634000aea0917f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df69190821690634306d35490602401602060405180830381865afa1580156123ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124139190613062565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b815260040161246893929190613337565b6020604051808303816000875af1158015612487573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ab919061331a565b507f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df66001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561250a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061252e9190613062565b949350505050565b6000816000548110156125845760008181526004602052604081205490600160e01b82169003612582575b8060000361172c575060001901600081815260046020526040902054612561565b505b604051636f96cda160e11b815260040160405180910390fd5b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461097d906127f6565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906126b8903390899088908890600401613367565b6020604051808303816000875af19250505080156126f3575060408051601f3d908101601f191682019092526126f0918101906133a4565b60015b612751573d808015612721576040519150601f19603f3d011682016040523d82523d6000602084013e612726565b606091505b508051600003612749576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915261097d61279e83612536565b6127f6565b6060600d80546109a890612fa1565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806127cc5750819003601f19909101908152919050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6001600160e01b0319811681146112f457600080fd5b60006020828403121561286557600080fd5b813561172c8161283d565b6001600160a01b03811681146112f457600080fd5b6000806040838503121561289857600080fd5b82356128a381612870565b915060208301356bffffffffffffffffffffffff811681146128c457600080fd5b809150509250929050565b60005b838110156128ea5781810151838201526020016128d2565b50506000910152565b6000815180845261290b8160208601602086016128cf565b601f01601f19169290920160200192915050565b60208152600061172c60208301846128f3565b60006020828403121561294457600080fd5b5035919050565b60008083601f84011261295d57600080fd5b5081356001600160401b0381111561297457600080fd5b6020830191508360208260051b850101111561298f57600080fd5b9250929050565b600080600080604085870312156129ac57600080fd5b84356001600160401b03808211156129c357600080fd5b6129cf8883890161294b565b909650945060208701359150808211156129e857600080fd5b506129f58782880161294b565b95989497509550505050565b60008060408385031215612a1457600080fd5b8235612a1f81612870565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612a6b57612a6b612a2d565b604052919050565b60008060408385031215612a8657600080fd5b823591506020808401356001600160401b0380821115612aa557600080fd5b818601915086601f830112612ab957600080fd5b813581811115612acb57612acb612a2d565b8060051b9150612adc848301612a43565b8181529183018401918481019089841115612af657600080fd5b938501935b83851015612b1457843582529385019390850190612afb565b8096505050505050509250929050565b600080600060608486031215612b3957600080fd5b8335612b4481612870565b92506020840135612b5481612870565b929592945050506040919091013590565b61ffff811681146112f457600080fd5b600060208284031215612b8757600080fd5b813561172c81612b65565b60008060408385031215612ba557600080fd5b50508035926020909101359150565b60008060208385031215612bc757600080fd5b82356001600160401b03811115612bdd57600080fd5b612be98582860161294b565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b8181101561159f57612c60838551612bf5565b9284019260809290920191600101612c4d565b600060208284031215612c8557600080fd5b813561172c81612870565b6020808252825182820181905260009190848201906040850190845b8181101561159f57835183529284019291840191600101612cac565b600080600060608486031215612cdd57600080fd5b8335612ce881612870565b95602085013595506040909401359392505050565b60008060208385031215612d1057600080fd5b82356001600160401b0380821115612d2757600080fd5b818501915085601f830112612d3b57600080fd5b813581811115612d4a57600080fd5b866020828501011115612d5c57600080fd5b60209290920196919550909350505050565b80151581146112f457600080fd5b60008060408385031215612d8f57600080fd5b8235612d9a81612870565b915060208301356128c481612d6e565b60008060008060808587031215612dc057600080fd5b8435612dcb81612870565b9350602085810135612ddc81612870565b93506040860135925060608601356001600160401b0380821115612dff57600080fd5b818801915088601f830112612e1357600080fd5b813581811115612e2557612e25612a2d565b612e37601f8201601f19168501612a43565b91508082528984828501011115612e4d57600080fd5b808484018584013760008482840101525080935050505092959194509250565b6080810161097d8284612bf5565b60008060408385031215612e8e57600080fd5b82356001600160481b0381168114612ea557600080fd5b915060208301356001600160401b03811681146128c457600080fd5b6001600160a01b03831681526040810160038310612eef57634e487b7160e01b600052602160045260246000fd5b8260208301529392505050565b60008060408385031215612f0f57600080fd5b8235612f1a81612870565b915060208301356128c481612870565b803563ffffffff81168114612f3e57600080fd5b919050565b60008060008060808587031215612f5957600080fd5b612f6285612f2a565b9350612f7060208601612f2a565b9250612f7e60408601612f2a565b9150606085013562ffffff81168114612f9657600080fd5b939692955090935050565b600181811c90821680612fb557607f821691505b602082108103612fd557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561097d5761097d612ff1565b6001600160501b0381811683821602808216919082811461303d5761303d612ff1565b505092915050565b60006020828403121561305757600080fd5b815161172c81612870565b60006020828403121561307457600080fd5b5051919050565b60006060828403121561308d57600080fd5b604051606081018181106001600160401b03821117156130af576130af612a2d565b60405282516130bd81612b65565b815260208301516001600160501b03811681146130d957600080fd5b602082015260408301516130ec81612870565b60408201529392505050565b6001600160501b0382811682821603908082111561311857613118612ff1565b5092915050565b8181038181111561097d5761097d612ff1565b634e487b7160e01b600052601260045260246000fd5b60008261315757613157613132565b500490565b600063ffffffff8084168061317357613173613132565b92169190910492915050565b6001600160481b0382811682821603908082111561311857613118612ff1565b60006001600160481b038084168061317357613173613132565b808202811582820484141761097d5761097d612ff1565b601f821115610d5a576000816000526020600020601f850160051c810160208610156131f95750805b601f850160051c820191505b818110156121b957828155600101613205565b6001600160401b0383111561322f5761322f612a2d565b6132438361323d8354612fa1565b836131d0565b6000601f841160018114613277576000851561325f5750838201355b600019600387901b1c1916600186901b178355610b51565b600083815260209020601f19861690835b828110156132a85786850135825560209485019460019092019101613288565b50868210156132c55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600083516132e98184602088016128cf565b8351908301906132fd8183602088016128cf565b01949350505050565b60008261331557613315613132565b500690565b60006020828403121561332c57600080fd5b815161172c81612d6e565b60018060a01b038416815282602082015260606040820152600061335e60608301846128f3565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061339a908301846128f3565b9695505050505050565b6000602082840312156133b657600080fd5b815161172c8161283d56fea2646970667358221220179a8c18246880415e3e564ad77bf32721b87111f12491bb52474f78b318c41364736f6c63430008170033

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

00000000000000000000000000000000000000000000000000000000665742f00000000000000000000000000000000000000000000000000000000066575f100000000000000000000000000000000000000000000000000000000000001c20000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb00000000000000000000000000000000000000da7a8c35d2620ed5829e001aae000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000000000000000646261085794f6baf115bcbd2b00

-----Decoded View---------------
Arg [0] : _startTime (uint32): 1716994800
Arg [1] : _endTime (uint32): 1717002000
Arg [2] : _priceCurveInSeconds (uint32): 7200
Arg [3] : _dropIntervalInSeconds (uint24): 60
Arg [4] : _chainalysis (address): 0x40C57923924B5c5c5455c48D93317139ADDaC8fb
Arg [5] : _splitterContract (address): 0x00000000000000DA7a8C35d2620eD5829e001aAe
Arg [6] : _link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [7] : _vrfWrapper (address): 0x5A861794B927983406fCE1D062e00b9368d97Df6
Arg [8] : __transferValidator (address): 0x000000000000646261085794f6baF115bCBd2B00

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000665742f0
Arg [1] : 0000000000000000000000000000000000000000000000000000000066575f10
Arg [2] : 0000000000000000000000000000000000000000000000000000000000001c20
Arg [3] : 000000000000000000000000000000000000000000000000000000000000003c
Arg [4] : 00000000000000000000000040c57923924b5c5c5455c48d93317139addac8fb
Arg [5] : 00000000000000000000000000000000000000da7a8c35d2620ed5829e001aae
Arg [6] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [7] : 0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6
Arg [8] : 000000000000000000000000000000000000646261085794f6baf115bcbd2b00


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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