ETH Price: $3,404.21 (+2.78%)

Token

SourceOnNFTsbyROBERTALICE (SONNFTRA)
 

Overview

Max Total Supply

125 SONNFTRA

Holders

32

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
3 SONNFTRA
0x95b9f6e91212014ed3224c8ccc17dcd5895a7f53
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
SourceOnNFTsbyROBERTALICE

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 55 : SourceOnNFTsbyROBERTALICE.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.22;

// NFTC Prerelease Contracts
import '@nftculture/nftc-contracts-private/contracts/access/v2/OwnableDeferralResolution.sol';

// Local References
import './SourceGenerativeArtNFTBase.sol';
import './SourceRoyaltySplitter.sol';

/**
 *   ░▒▓███████▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓████████▓▒░
 *  ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
 *  ░▒▓█▓▒░      ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░
 *   ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓█▓▒░      ░▒▓██████▓▒░
 *         ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░
 *         ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
 *  ░▒▓███████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓████████▓▒░
 *                         SOURCE [On NFTs] by ROBERT ALICE
 */
contract SourceOnNFTsbyROBERTALICE is SourceRoyaltySplitter, SourceGenerativeArtNFTBase, OwnableDeferralResolution {
    string private constant DEFAULT_CONTRACT_METADATA_URI =
        'https://arweave.net/HI9YASJnR6yq5KRjpCufrZajUk8Fw-qXOVwFjI8r9_o'; // v3-0-0/sourceonnfts.json

    // Default Mainnet dependencies
    address private constant DEFAULT_METADATA_MANAGER = 0x65419C1eeC692E3D30FcB9E99889C6B8C723226A; // Mainnet v1
    address private constant DEFAULT_ENTROPY_PROVIDER = 0x2b00E8E837e7e7D530197800499c36bDe20F7318; // Mainnet v1
    address private constant DEFAULT_PRIVILEGED_MINTER = 0x9D3c936d7e2ff74B068862F439925B570e46775f; // Mainnet

    // Dutch auction prices and times for phase one. Times subject to adjustment after deploy.
    uint192 private constant PHASE_ONE_PRICE_INFO = uint192((5 ether << 96) | (1.5 ether)); // Mainnet -- Phase One -- Start Price / End Price
    uint64 private constant PHASE_ONE_BLOCK_INFO = uint64((19417238 << 32) | uint32(19417478)); // Mainnet -- Phase One -- Start Block / End Block

    // Dutch auction prices and times for phase two. Times subject to adjustment after deploy.
    uint192 private constant PHASE_TWO_PRICE_INFO = uint192((1.5 ether << 96) | (0.3 ether)); // Mainnet -- Phase Two -- Start Price / End Price
    uint64 private constant PHASE_TWO_BLOCK_INFO = uint64((19417480 << 32) | uint32(19417720)); // Mainnet -- Phase Two -- Start Block / End Block

    constructor()
        ERC721A('SourceOnNFTsbyROBERTALICE', 'SONNFTRA')
        SourceGenerativeArtNFTBase(
            'https://arweave.net/',
            (uint256(PHASE_ONE_PRICE_INFO) << 64) | PHASE_ONE_BLOCK_INFO,
            (uint256(PHASE_TWO_PRICE_INFO) << 64) | PHASE_TWO_BLOCK_INFO
        )
        SingletonMetadataConsumer(DEFAULT_METADATA_MANAGER)
        PrivilegedMinter(DEFAULT_PRIVILEGED_MINTER)
    {
        _setContractURI(DEFAULT_CONTRACT_METADATA_URI);
        _setEntropyProvider(DEFAULT_ENTROPY_PROVIDER);
    }

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

    /**
     * Fulfill _isOwner() implementation, backed by OZ Ownable.
     */
    function _isOwner()
        internal
        view
        override(SourceGenerativeArtNFTBase, NFTCSplitsAndRoyalties, OwnableDeferralResolution)
    {
        /// @dev see OwnableDeferral/OwnableDeferralResolution for more explanation on this.
        OwnableDeferralResolution._isOwner();
    }
}

File 2 of 55 : OwnableDeferral.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title OwnableDeferral
 * @author @NiftyMike | @NFTCulture
 * @dev Implements checks for contract admin operations. Will be Backed by
 * OZ Ownable.
 *
 * This contract is helpful when a contract tree gets complicated,
 * and multiple contracts need to leverage Ownable.
 *
 * Sample Implementation:
 *
 * modifier isOwner() override(...) {
 *     _isOwner();
 *     _;
 * }
 *
 * function _isOwner() internal view override(...) {
 *     _checkOwner();
 * }
 */
abstract contract OwnableDeferral {
    modifier isOwner() virtual;

    function _isOwner() internal view virtual;
}

File 3 of 55 : OwnableDeferralResolution.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// OZ Libraries
import '@openzeppelin/contracts/access/Ownable.sol';

// Local References
import './OwnableDeferral.sol';

// Error Codes
error CallerIsNotOwner();

/**
 * @title OwnableDeferralResolution
 * @author @NiftyMike | @NFTCulture
 * @dev Implements checks for contract admin (Owner) operations. Backed by OZ Ownable.
 *
 * Ownership is assigned to contract deployer wallet by default.
 *
 * NOTE: IMPORTANT - This resolution will work great in a simple inheritance situation,
 * however, if multiple inheritance is involved, it might not adequately satisfy
 * override (...) conditions. In those scenarios, this code should be used as a
 * starting point and then adjusted appropriately.
 */
contract OwnableDeferralResolution is Ownable, OwnableDeferral {
    modifier isOwner() virtual override {
        _isOwner();
        _;
    }

    function _isOwner() internal view virtual override {
        // Same as _checkOwner() but using error code instead of a require statement.
        if (owner() != _msgSender()) revert CallerIsNotOwner();
    }
}

File 4 of 55 : IImmutableProvideTokenEntropy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IImmutableProvideTokenEntropy
 * @author @NiftyMike | @NFTCulture
 * @dev Interface for a contract that can provide entropy for a token.
 */
interface IImmutableProvideTokenEntropy {
    function getEntropyForToken(address tokenContract, uint256 tokenId) external view returns (bytes32);
}

File 5 of 55 : AbstractMetadataConsumer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import './IChainNativeMetadataConsumer.sol';
import './IChainNativeMetadataProducer.sol';

/**
 * @title AbstractMetadataConsumer
 * @author @NiftyMike | @NFTCulture
 * @dev Abstract contract that defines what a MetadataConsumer should do.
 */
abstract contract AbstractMetadataConsumer is IChainNativeMetadataConsumer {
    function _getMetadataProducer(
        address collection,
        uint256 selectionCriteria
    ) internal view virtual returns (IChainNativeMetadataProducer);
}

File 6 of 55 : IChainNativeMetadataConsumer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IChainNativeMetadataConsumer
 * @author @NiftyMike | @NFTCulture
 * @dev Super thin interface definition for a contract that
 * consumes art from an IChainNativeMetadataProducer
 */
interface IChainNativeMetadataConsumer {
    /**
     * Given a collection address, provide a metadata producer.
     *
     * @param collection collection we are requesting a producer for.
     * @param selectionCriteria data pertinent to selection of the producer.
     *
     * NOTE: It is important to realize that selectionCriteria is generic and does not imply a tokenType or
     * tokenId or anything else, it depends on the circumstance of the implementation.
     */
    function getMetadataProducer(address collection, uint256 selectionCriteria) external view returns (address);
}

File 7 of 55 : IChainNativeMetadataProducer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IChainNativeMetadataProducer
 * @author @NiftyMike | @NFTCulture
 * @dev Super thin interface definition for a contract that
 * produces metadata in a chain native way.
 */
interface IChainNativeMetadataProducer {
    /**
     *
     * @param collection - the collection details that we are providing info for.
     * @param tokenId - the tokenId that we should provide a tokenType for.
     */
    function getTokenTypeForToken(address collection, uint256 tokenId) external view returns (uint64);

    /**
     * Provide a human-readable version of the metadata JSON.
     *
     * @param collection - the collection details that we are providing info for.
     * @param tokenType - the type of the token we should provide metadata for
     * @param tokenId - the specific tokenId
     * @param extraData - extra info that might be used to effect the metadata
     */
    function getJsonAsString(
        address collection,
        uint64 tokenType,
        uint256 tokenId,
        uint256 extraData
    ) external view returns (string memory);

    /**
     * Provide base64 encoded metadata JSON that can be consumed by an external service.
     *
     * @param collection - the collection details that we are providing info for.
     * @param tokenType - the type of the token we should provide metadata for
     * @param tokenId - the specific tokenIds
     * @param extraData - extra info that might be used to effect the metadata
     */
    function getJsonAsEncodedString(
        address collection,
        uint64 tokenType,
        uint256 tokenId,
        uint256 extraData
    ) external view returns (string memory);
}

File 8 of 55 : SingletonMetadataConsumer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import '../../../access/v2/OwnableDeferral.sol';
import '../interfaces/AbstractMetadataConsumer.sol';

/**
 * @title SingletonMetadataConsumer
 * @author @NiftyMike | @NFTCulture
 * @dev Contract intended to be used to consume from a single on-chain source for NFT metadata.
 */
abstract contract SingletonMetadataConsumer is AbstractMetadataConsumer, OwnableDeferral {
    // External contract that manages the collection's metadata in a chain-native way.
    address private _metadataProducer;

    constructor(address __metadataProducer) {
        _setMetadataProducer(__metadataProducer);
    }

    /**
     * @notice Set the on-chain metadata producer contract.
     * Can only be called if caller is owner.
     *
     * @param __metadataProducer address of the producer contract.
     */
    function setMetadataProducer(address __metadataProducer) external isOwner {
        _setMetadataProducer(__metadataProducer);
    }

    function _setMetadataProducer(address __metadataProducer) internal {
        if (__metadataProducer != address(0)) {
            _metadataProducer = __metadataProducer;
        }
    }

    function getMetadataProducer(address, uint256) external view override returns (address) {
        return _metadataProducer;
    }

    function _getMetadataProducer(address, uint256) internal view override returns (IChainNativeMetadataProducer) {
        return IChainNativeMetadataProducer(_metadataProducer);
    }
}

File 9 of 55 : BasicPhasedMintBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import {BooleanPacking} from '@nftculture/nftc-contracts/contracts/utility/BooleanPacking.sol';

// NFTC Prerelease Contracts
import '../../../access/v2/OwnableDeferral.sol';
import '../IMintablePublic.sol';

/**
 * @title BasicPhasedMintBase
 * @author @NiftyMike | @NFTCulture
 * @dev
 * PhasedMint: An approach to a standard system of controlling mint phases.
 * The 'Basic' flavor only provides on/off controls for each phase, no pricing info or anything else.
 */
abstract contract BasicPhasedMintBase is IMintablePublic, OwnableDeferral {
    using BooleanPacking for uint256;

    // BooleanPacking used on _mintControlFlags
    uint256 internal _mintControlFlags;

    uint256 private immutable PUBLIC_MINT_PHASE;

    modifier isPublicMinting() {
        require(_mintControlFlags.getBoolean(PUBLIC_MINT_PHASE), 'Minting stopped');
        _;
    }

    constructor(uint256 publicMintPhase) {
        PUBLIC_MINT_PHASE = publicMintPhase;
    }

    function _calculateMintingState(bool __publicMintingActive) internal view returns (uint256) {
        uint256 tempControlFlags;

        tempControlFlags = tempControlFlags.setBoolean(PUBLIC_MINT_PHASE, __publicMintingActive);

        // This does not set state, because state is held by the child classes.
        return tempControlFlags;
    }

    function isPublicMintingActive() external view virtual returns (bool) {
        return _isPublicMintingActive();
    }

    function _isPublicMintingActive() internal view returns (bool) {
        return _mintControlFlags.getBoolean(PUBLIC_MINT_PHASE);
    }

    function supportedPhases() external view returns (uint256) {
        return PUBLIC_MINT_PHASE;
    }
}

File 10 of 55 : BasicPhasedMintTwo.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// OZ Libraries
import '@openzeppelin/contracts/access/Ownable.sol';

// Local References
import './BasicPhasedMintBase.sol';
import '../IMintablePhaseOne.sol';
import '../IMintablePhaseTwo.sol';

/**
 * @title BasicPhasedMintTwo
 * @author @NiftyMike | @NFTCulture
 * @dev
 * PhasedMint: An approach to a standard system of controlling mint phases.
 * The 'Basic' flavor only provides on/off controls for each phase, no pricing info or anything else.
 *
 * This is the "Two" phase mint flavor of the PhasedMint approach.
 *
 * Note: Since the last phase is always assumed to be the public mint phase, we only
 * need to define the first phase here.
 */
abstract contract BasicPhasedMintTwo is BasicPhasedMintBase, IMintablePhaseOne {
    using BooleanPacking for uint256;

    uint256 private constant PHASE_ONE = 1;

    modifier isPhaseOne() {
        require(_mintControlFlags.getBoolean(PHASE_ONE), 'Phase one stopped');
        _;
    }

    constructor() BasicPhasedMintBase(2) {}

    function setMintingState(bool __phaseOneActive, bool __publicMintingActive) external virtual isOwner {
        uint256 tempControlFlags = _calculateMintingState(__publicMintingActive);

        tempControlFlags = tempControlFlags.setBoolean(PHASE_ONE, __phaseOneActive);

        _mintControlFlags = tempControlFlags;
    }

    function isPhaseOneActive() external view virtual returns (bool) {
        return _isPhaseOneActive();
    }

    function _isPhaseOneActive() internal view returns (bool) {
        return _mintControlFlags.getBoolean(PHASE_ONE);
    }
}

File 11 of 55 : IMintablePhaseOne.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IMintablePhaseOne
 * @author @NFTCulture
 * @dev Interface to define standardized functionality that should be exposed
 * on NFTC Mint contracts, so that Front End widgets can rely on a standard set
 * capabilities.
 *
 * Supported Contract Specs:
 *  - ERC721A Static
 *  - ERC721A Expandable
 *  - ERC1155
 */
interface IMintablePhaseOne {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - Phase One Functions                 |
    \____________________________________________________________*/

    function isPhaseOneActive() external view returns (bool);

    function phaseOneBatchSize() external view returns (uint256);
}

File 12 of 55 : IMintablePhaseTwo.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IMintablePhaseTwo
 * @author @NFTCulture
 * @dev Interface to define standardized functionality that should be exposed
 * on NFTC Mint contracts, so that Front End widgets can rely on a standard set
 * capabilities.
 *
 * Supported Contract Specs:
 *  - ERC721A Static
 *  - ERC721A Expandable
 *  - ERC1155
 */
interface IMintablePhaseTwo {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - Phase Two Functions                 |
    \____________________________________________________________*/

    function isPhaseTwoActive() external view returns (bool);

    function phaseTwoBatchSize() external view returns (uint256);
}

File 13 of 55 : IMintablePublic.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IMintablePublic
 * @author @NFTCulture
 * @dev Interface to define standardized functionality that should be exposed
 * on NFTC Mint contracts, so that Front End widgets can rely on a standard set
 * capabilities.
 *
 * Supported Contract Specs:
 *  - ERC721A Static
 *  - ERC721A Expandable
 *  - ERC1155
 */
interface IMintablePublic {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - Public Mint Functions               |
    \____________________________________________________________*/

    function isPublicMintingActive() external returns (bool);

    function publicMintBatchSize() external returns (uint256);
}

File 14 of 55 : StaticPhasedMintBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title StaticPhasedMintBase
 * @author @NiftyMike | @NFTCulture
 * @dev The base static phased mint implementation.
 *
 * PhasedMint: An approach to a standard system of controlling mint phases.
 * Static: An approach to ERC721 contracts that allows only a single type of tokens.
 *
 * This implementation also contains code to hold on to the pricing info, since it is global for all NFTs.
 */
abstract contract StaticPhasedMintBase {
    uint256 public publicMintPricePerNft;

    constructor(uint256 __publicMintPricePerNft) {
        publicMintPricePerNft = __publicMintPricePerNft;
    }

    function getPublicMintPricePerNft() external view virtual returns (uint256) {
        return publicMintPricePerNft;
    }
}

File 15 of 55 : StaticPhasedMintTwo.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import '../basic/BasicPhasedMintTwo.sol';
import './StaticPhasedMintBase.sol';

/**
 * @title StaticPhasedMintTwo
 * @author @NiftyMike | @NFTCulture
 * @dev Static, PhasedMint, Implementation for Two phases.
 *
 * PhasedMint: An approach to a standard system of controlling mint phases.
 * Static: An approach to ERC721 contracts that allows only a single type of tokens.
 *
 * This is the "Two" phase mint flavor of the PhasedMint approach.
 *
 * Note: Since the last phase is always assumed to be the public mint phase, we only
 * need to define the first phase here.
 *
 * This implementation also contains code to hold on to the pricing info, since it is global for all NFTs.
 */
abstract contract StaticPhasedMintTwo is BasicPhasedMintTwo, StaticPhasedMintBase {
    uint256 public phaseOnePricePerNft;

    constructor(
        uint256 __phaseOnePricePerNft,
        uint256 __publicMintPricePerNft
    ) StaticPhasedMintBase(__publicMintPricePerNft) {
        phaseOnePricePerNft = __phaseOnePricePerNft;
    }

    function setMintingPrice(uint256 __phaseOnePricePerNft, uint256 __publicMintPricePerNft) external virtual isOwner {
        phaseOnePricePerNft = __phaseOnePricePerNft;
        publicMintPricePerNft = __publicMintPricePerNft;
    }

    function getPhaseOnePricePerNft() external view virtual returns (uint256) {
        return phaseOnePricePerNft;
    }
}

File 16 of 55 : MutablePrivilegedMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import '../access/v2/OwnableDeferral.sol';
import './PrivilegedMinter.sol';

/**
 * @title MutablePrivilegedMinter
 * @author @NiftyMike | @NFTCulture
 * @dev Add mutability to PrivilegedMinter
 */
abstract contract MutablePrivilegedMinter is PrivilegedMinter, OwnableDeferral {
    function setPrivilegedMinter(address __newPrivilegedMinter) external isOwner {
        _setPrivilegedMinter(__newPrivilegedMinter);
    }
}

File 17 of 55 : PrivilegedMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// OZ Libraries
import '@openzeppelin/contracts/utils/Context.sol';

/**
 * @title PrivilegedMinter
 * @author @NiftyMike | @NFTCulture
 * @dev Control functions for supporting a privileged minter that mints to other, typically custodial wallets.
 */
abstract contract PrivilegedMinter is Context {
    address internal _privilegedMinter;

    modifier onlyPrivilegedMinter() {
        require(_privilegedMinter == _msgSender(), 'DM: caller is not delegate');
        _;
    }

    constructor(address __defaultPrivilegedMinter) {
        _privilegedMinter = __defaultPrivilegedMinter;
    }

    function _setPrivilegedMinter(address __newPrivilegedMinter) internal virtual {
        _privilegedMinter = __newPrivilegedMinter;
    }

    function getPrivilegedMinter() external view returns (address) {
        return _privilegedMinter;
    }
}

File 18 of 55 : ERC721A_NFTC.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// ERC721A from Chiru Labs
import 'erc721a/contracts/extensions/ERC721ABurnable.sol';

// ClosedSea by Vectorized
import 'closedsea/src/OperatorFilterer.sol';

// OZ Libraries
import '@openzeppelin/contracts/access/Ownable.sol';

// NFTC Prerelease Contracts
import '../../access/v2/OwnableDeferral.sol';

/**
 * @title  ERC721A_NFTC
 * @author @NFTCulture
 * @dev ERC721A plus NFTC-preferred extensions and add-ons.
 *  - Burnable
 *  - Ownable
 *  - OperatorFilterer
 *
 * Using implementation and approach created by Vectorized for OperatorFilterer.
 * See: https://github.com/Vectorized/closedsea/blob/main/src/example/ExampleERC721A.sol
 *
 * This contract is intended to be a distilled 'base' starting point for NFTC functionality.
 *
 * @notice Be sure to add the following to your impl constructor:
 * >>  _registerForOperatorFiltering();
 * >>  operatorFilteringEnabled = true;
 */
abstract contract ERC721A_NFTC is ERC721ABurnable, OperatorFilterer, OwnableDeferral {
    bool public operatorFilteringEnabled;

    function setApprovalForAll(
        address operator,
        bool approved
    ) public override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(
        address operator,
        uint256 tokenId
    ) public payable override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    /**
     * Failsafe in case we need to turn operator filtering off.
     */
    function setOperatorFilteringEnabled(bool value) external isOwner {
        operatorFilteringEnabled = value;
    }

    /**
     * Failsafe in case we need to change what subscription we are using, for whatever reason.
     */
    function registerForOperatorFiltering(address subscription, bool subscribe) external isOwner {
        _registerForOperatorFiltering(subscription, subscribe);
    }

    function _operatorFilteringEnabled() internal view virtual override returns (bool) {
        return operatorFilteringEnabled;
    }

    function _isPriorityOperator(address operator) internal pure override returns (bool) {
        // OpenSea Seaport Conduit:
        // https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        // https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71
        return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71);
    }
}

File 19 of 55 : IBaseURIConfigurable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IBaseURIConfigurable
 * @author @NFTCulture
 * @dev Interface to define Base URI configuration functions.
 *
 * Supported Contract Specs:
 *  - ERC721A Static
 *  - ERC721A Expandable
 *  - ERC1155
 */
interface IBaseURIConfigurable {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - General Functions                   |
    \____________________________________________________________*/

    // Set Art URI for all tokens. ERC721 - Base URI. ERC1155 - Uri.
    function setArtURI(string memory) external;

    // Get Art URI for all tokens. ERC721 - Base URI. ERC1155 - Uri.
    function getArtURI() external view returns (string memory);
}

File 20 of 55 : INFTCNonFungibleToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Prerelease Contracts
import './IBaseURIConfigurable.sol';
import './INonFungibleTokenQueryable.sol';

/**
 * @title INFTCNonFungibleToken
 * @author @NFTCulture
 * @dev Interface to define standardized functionality that should be exposed
 * on NFTC NonFungible Token contracts.
 */
interface INFTCNonFungibleToken is IBaseURIConfigurable, INonFungibleTokenQueryable {
    // Tag Interface
}

File 21 of 55 : INonFungibleTokenQueryable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title INonFungibleTokenQueryable
 * @author @NFTCulture
 * @dev Interface to define data-retrieval functions for a NonFungible Token contract.
 */
interface INonFungibleTokenQueryable {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - General Functions                   |
    \____________________________________________________________*/

    // Return the maximum possible number of tokens that can be minted by this contract.
    function maxSupply() external view returns (uint256);

    // Return the number of tokens that have been minted.
    function totalMinted() external view returns (uint256);

    // Return the current number of tokens that exist, minted less burned.
    function totalTokensExist() external view returns (uint256);

    // Return the balance owned by an address.
    function balanceOwnedBy(address) external view returns (uint256);
}

File 22 of 55 : BasicNFTMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import '../ERC721A_NFTC.sol';
import '../interfaces/INFTCNonFungibleToken.sol';

/**
 * @title BasicNFTMinter
 * @author @NiftyMike | @NFTCulture
 * @dev Minter with no explicit external minting API.
 *
 *  - INFTCNonFungibleToken: Important mint functions for Base URI Management
 *    and Query Helpers
 */
abstract contract BasicNFTMinter is ERC721A_NFTC, INFTCNonFungibleToken {
    string public baseURI;

    constructor(string memory __baseURI) {
        baseURI = __baseURI;
    }

    function setArtURI(string memory __baseURI) external override isOwner {
        baseURI = __baseURI;
    }

    function getArtURI() external view override returns (string memory) {
        return _getArtURI();
    }

    function _getArtURI() internal view returns (string memory) {
        return baseURI;
    }

    function totalMinted() external view override returns (uint256) {
        return _totalMinted();
    }

    function balanceOwnedBy(address tokenOwner) external view override returns (uint256) {
        return super.balanceOf(tokenOwner);
    }
}

File 23 of 55 : FlavorInfo.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title FlavorInfo
 * @author @NFTCulture
 * @dev Library for FlavorInfoV4 objects.
 *
 *  Bits Layout:
 *    256 bit slot #1
 *    - [0..63]    `flavorId`
 *    - [64..127]  `maxSupply`
 *    - [128..191] `totalMinted`
 *    - [192..255] `totalSupply`
 *
 *    256 bit slot #2
 *    - [0..159]   `provider`
 *    - [160..255] `price`
 *
 *  NOTE: Provider is responsible for the following:
 *  - Storage of ipfsHash and uriFragment, if they exist
 *      bytes32 uriFragment; // Fragment to append to URI
 *      string ipfsHash; // IPFS Hash to append to URI
 *  - Splitting out uriFragment and ipfsHash to live with the provider makes FlavorInfo objects much more gas efficient.
 *
 *  - Instead of updating uri details, a new product list contract can be deployed that contains the updated data.
 *  Updating FlavorInfos in the main contract would just involve passing one new address to an update address function.
 *  This would involve many fewer writes of ipfsHashes if all that has changed is the ipfsHash, as the replacement contract wouldn't
 *  need to contain all the original flavor definitions.
 *
 *  URI should be built like: `${baseURI}${ipfsHash}${uriFragment}
 *    - Care should be taken to properly include '/' chars. Typically baseURI will have a trailing slash.
 *    - If ipfsHash is used, uriFragment should contain a leading '/'.
 *    - If ipfsHash is not used, uriFragment should not contain a leading '/'.
 */
library FlavorInfo {
    struct FlavorInfoV4 {
        uint64 flavorId;
        uint64 maxSupply;
        uint64 totalMinted;
        uint64 totalSupply; // TotalSupply or Extra storage space that can be used however needed by the caller.
        address provider; // Address of the provider.
        uint96 price; // Price needs to be 96 bit. 64bit for value sets a cap at about 9.2 ETH (9.2e18 wei)
    }
}

File 24 of 55 : IMintable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import '../token-types/FlavorInfo.sol';

/**
 * @title IMintable
 * @author @NFTCulture
 * @dev Interface to define standardized functionality that is needed to drive
 * user-interactive functionality via a generalized front-end interface.
 *
 * Supported Contract Specs:
 *  - ERC721A Static
 *  - ERC721A Expandable
 *  - ERC1155
 */
interface IMintable {
    /*°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°\
    |                   API - General Functions                   |
    \____________________________________________________________*/

    // Return a JSON representation of contract capabilities.
    function nftcContractDefinition() external view returns (string memory);

    // Return the list of TokenTypes that can be minted (was formerly getFlavors)
    function nftcTokenTypeList() external view returns (uint64[] memory);

    // Return the tokenTypeDefinition for a specific tokenType
    function nftcTokenTypeDefinition(uint64 tokenType) external view returns (FlavorInfo.FlavorInfoV4 memory);
}

File 25 of 55 : ERC2981_NFTCExtended.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/token/common/ERC2981.sol';

/**
 * @title ERC2981_NFTCExtended
 * @author @NiftyMike | @NFTCulture
 * @dev A wrapper around ERC2981 which adds some common functionality.
 */
abstract contract ERC2981_NFTCExtended is ERC2981 {
    function setDefaultRoyalty(address newReceiver, uint96 newRoyalty) external {
        _isOwner();

        _setDefaultRoyalty(newReceiver, newRoyalty);
    }

    function _isOwner() internal view virtual;
}

File 26 of 55 : NFTCPaymentSplitter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import './NFTCPaymentSplitterBase.sol';

/**
 * @title NFTCPaymentSplitter
 * @author @NiftyMike | @NFTCulture
 * @dev NFTC's Implementation of a Payment Splitter
 *
 * Underlying is based on OpenZeppelin Contracts v4.8.0 (finance/PaymentSplitter.sol)
 */
abstract contract NFTCPaymentSplitter is NFTCPaymentSplitterBase {
    /**
     * @dev Overrides release() method, so that it can only be called by owner.
     * @notice Owner: Release funds to a specific address.
     *
     * @param account Payable address that will receive funds.
     */
    function release(address payable account) public override {
        _isOwner();

        _release(account);
    }

    /**
     * @dev Triggers a transfer to caller's address of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     * @notice Sender: request payment.
     */
    function releaseToSelf() public {
        _release(payable(_msgSender()));
    }

    function _isOwner() internal view virtual;
}

File 27 of 55 : NFTCPaymentSplitterBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';

/**
 * @title NFTCPaymentSplitterBase
 * @author @NiftyMike | @NFTCulture
 * @dev An opinionated replacement of OZ's Payment Splitter.
 *
 * Notes:
 *  - Based on OZ Contracts v4.8.0 (finance/PaymentSplitter.sol)
 *  - ERC-20 token functionality removed to save gas.
 *  - Transferability of Payees, but only by Payee
 *  - Some require messages are shortened.
 *  - contract changed to abstract and release() functionality moved to internal method.
 *
 * IMPORTANT: changes to release() require higher level classes to expose release() in order
 * for funds to be withdrawn. This allows higher level classes to enforce better controls.
 */
abstract contract NFTCPaymentSplitterBase is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);
    event PayeeTransferred(address oldOwner, address newOwner);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, 'PaymentSplitter: length mismatch');
        require(payees.length > 0, 'PaymentSplitter: no payees');

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        return _releasable(account);
    }

    function _releasable(address account) internal view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function _release(address payable account) internal {
        require(_shares[account] > 0, 'PaymentSplitter: no shares');

        uint256 payment = _releasable(account);

        require(payment != 0, 'PaymentSplitter: not due payment');

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += payment;
        }

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), 'PaymentSplitter: zero address');
        require(shares_ > 0, 'PaymentSplitter: no shares');
        require(_shares[account] == 0, 'PaymentSplitter: payee has shares');

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }

    /**
     * @dev Allows owner to transfer their shares to somebody else; it can only be called by of a share.
     * @notice Owner: Release funds to a specific address.
     *
     * @param newOwner Payable address which has no shares and will receive the shares of the current owner.
     */
    function transferPayee(address payable newOwner) public {
        require(newOwner != address(0), 'PaymentSplitter: zero address');
        require(_shares[_msgSender()] > 0, 'PaymentSplitter: no owned shares');
        require(_shares[newOwner] == 0, 'PaymentSplitter: payee has shares');

        _transferPayee(newOwner);
        emit PayeeTransferred(_msgSender(), newOwner);
    }

    function _transferPayee(address newOwner) private {
        if (_payees.length == 0) return;

        for (uint i = 0; i < _payees.length - 1; i++) {
            if (_payees[i] == _msgSender()) {
                _payees[i] = newOwner;
                _shares[newOwner] = _shares[_msgSender()];
                _shares[_msgSender()] = 0;
            }
        }
    }

    function release(address payable account) public virtual;
}

File 28 of 55 : NFTCSplitsAndRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import './ERC2981_NFTCExtended.sol';
import './NFTCPaymentSplitter.sol';

/**
 * @title NFTCSplitsAndRoyalties
 * @author @NiftyMike | @NFTCulture
 * @dev One stop shop for Payment Splits and ERC2981 Royalty Definition.
 */
abstract contract NFTCSplitsAndRoyalties is NFTCPaymentSplitter, ERC2981_NFTCExtended {
    constructor(
        address[] memory __addresses,
        uint256[] memory __splits,
        address defaultRoyaltyReceiver,
        uint96 defaultRoyaltyBasisPoints
    ) NFTCPaymentSplitterBase(__addresses, __splits) {
        // Default royalty information to be this contract, so that no potential
        // royalty payments are missed by marketplaces that support ERC2981.
        _setDefaultRoyalty(defaultRoyaltyReceiver, defaultRoyaltyBasisPoints);
    }

    function _isOwner() internal view virtual override(NFTCPaymentSplitter, ERC2981_NFTCExtended);
}

File 29 of 55 : ILazyDelivery.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

interface ILazyDelivery {
    /**
     *  @dev Deliver an asset and deliver to the specified party
     *  When implementing this interface, please ensure you restrict access.
     *  If using LazyDeliver.sol, you can use authorizedDelivererRequired modifier to restrict access.
     *  Delivery can be for an existing asset or newly minted assets.
     *
     *  @param listingId      The listingId associated with this delivery.  Useful for permissioning.
     *  @param to             The address to deliver the asset to
     *  @param assetId        The assetId to deliver
     *  @param payableCount   The number of assets to deliver
     *  @param payableAmount  The amount seller will receive upon delivery of asset
     *  @param payableERC20   The erc20 token address of the amount (0x0 if ETH)
     *  @param index          (Optional): Index value for certain sales methods
     *
     *  Suggestion: If determining a refund amount based on total sales data, do not enable this function
     *              until the sales data is finalized and recorded in contract
     *
     *  Exploit Prevention for dynamic/random assignment
     *  1. Ensure attributes are not assigned until AFTER underlying mint if using _safeMint.
     *     This is to ensure a receiver cannot check attribute values on receive and revert transaction.
     *     However, even if this is the case, the recipient can wrap its mint in a contract that checks
     *     post mint completion and reverts if unsuccessful.
     *  2. Ensure that "to" is not a contract address. This prevents a contract from doing the lazy
     *     mint, which could exploit random assignment by reverting if they do not receive the desired
     *     item post mint.
     */
    function deliver(
        uint40 listingId,
        address to,
        uint256 assetId,
        uint24 payableCount,
        uint256 payableAmount,
        address payableERC20,
        uint256 index
    ) external;
}

File 30 of 55 : ILazyDeliveryMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * Metadata for lazy delivery tokens
 */
interface ILazyDeliveryMetadata {
    function assetURI(uint256 assetId) external view returns (string memory);
}

File 31 of 55 : IPriceEngine.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

interface IPriceEngine {
    /**
     *  @dev Determine price of an asset given the number
     *  already minted.
     */
    function price(uint256 assetId, uint256 alreadyMinted, uint24 count) external view returns (uint256);
}

File 32 of 55 : ERC7572_ContractMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// Local References
import './IERC7572.sol';

// OZ References
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @title ERC7572_ContractMetadata
 * @author @NiftyMike | @NFTCulture
 * @dev A basic implementation of ERC-7572 for exposing contract-level metadata for
 * external marketplaces via IPFS. This approach can be used to provide out-of-the-box
 * pretty metadata on contract deployment.
 */
abstract contract ERC7572_ContractMetadata is IERC7572, ERC165 {
    string private _contractURI;

    /**
     * @dev return the contract URI.
     *
     * See: https://docs.opensea.io/docs/contract-level-metadata
     *
     * Three approaches:
     *
     * - Native IPFS Addressing: "ipfs://QmTNgv3jx2HHfBjQX9RnKtxj2xv2xQDtbVXoRi5rJ3a46e"
     * - Link to a JSON file: "https://external-link-url.com/my-contract-metadata.json"
     * - OnChain/Encoded in Contract:
     *      string memory json = '{"name": "Creatures","description":"..."}';
     *      return string.concat("data:application/json;utf8,", json);
     */
    function contractURI() external view override returns (string memory) {
        return _contractURI;
    }

    function setContractURI(string calldata __contractUri) external {
        _isOwner();

        _setContractURI(__contractUri);
    }

    function _setContractURI(string memory __contractUri) internal {
        _contractURI = __contractUri;

        emit ContractURIUpdated();
    }

    function _getContractURI() internal view returns (string memory) {
        return _contractURI;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165) returns (bool) {
        return interfaceId == type(IERC7572).interfaceId || super.supportsInterface(interfaceId);
    }

    function _isOwner() internal view virtual;
}

File 33 of 55 : IERC7572.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title IERC7572
 * @author @NiftyMike | @NFTCulture
 * @dev This specification standardizes contractURI() to return contract-level metadata.
 *
 * @notice See: https://eips.ethereum.org/EIPS/eip-7572
 */
interface IERC7572 {
    function contractURI() external view returns (string memory);

    event ContractURIUpdated();
}

File 34 of 55 : BooleanPacking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

/**
 * @title BooleanPacking
 * @author @NiftyMike | @NFTCulture
 * @dev Credit to Zimri Leijen
 * See https://ethereum.stackexchange.com/a/92235
 */
library BooleanPacking {
    function getBoolean(uint256 _packedBools, uint256 _columnNumber) internal pure returns (bool) {
        uint256 flag = (_packedBools >> _columnNumber) & uint256(1);
        return (flag == 1 ? true : false);
    }

    function setBoolean(uint256 _packedBools, uint256 _columnNumber, bool _value) internal pure returns (uint256) {
        if (_value) {
            _packedBools = _packedBools | (uint256(1) << _columnNumber);
            return _packedBools;
        } else {
            _packedBools = _packedBools & ~(uint256(1) << _columnNumber);
            return _packedBools;
        }
    }
}

File 35 of 55 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 36 of 55 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(
        uint256 tokenId,
        uint256 salePrice
    ) external view returns (address receiver, uint256 royaltyAmount);
}

File 37 of 55 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 38 of 55 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 39 of 55 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 40 of 55 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 41 of 55 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 42 of 55 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 43 of 55 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 44 of 55 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 45 of 55 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 46 of 55 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Optimized and flexible operator filterer to abide to OpenSea's
/// mandatory on-chain royalty enforcement in order for new collections to
/// receive royalties.
/// For more information, see:
/// See: https://github.com/ProjectOpenSea/operator-filter-registry
abstract contract OperatorFilterer {
    /// @dev The default OpenSea operator blocklist subscription.
    address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

    /// @dev The OpenSea operator filter registry.
    address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E;

    /// @dev Registers the current contract to OpenSea's operator filter,
    /// and subscribe to the default OpenSea operator blocklist.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering() internal virtual {
        _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true);
    }

    /// @dev Registers the current contract to OpenSea's operator filter.
    /// Note: Will not revert nor update existing settings for repeated registration.
    function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe)
        internal
        virtual
    {
        /// @solidity memory-safe-assembly
        assembly {
            let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`.

            // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty.
            subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy))

            for {} iszero(subscribe) {} {
                if iszero(subscriptionOrRegistrantToCopy) {
                    functionSelector := 0x4420e486 // `register(address)`.
                    break
                }
                functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`.
                break
            }
            // Store the function selector.
            mstore(0x00, shl(224, functionSelector))
            // Store the `address(this)`.
            mstore(0x04, address())
            // Store the `subscriptionOrRegistrantToCopy`.
            mstore(0x24, subscriptionOrRegistrantToCopy)
            // Register into the registry.
            if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) {
                // If the function selector has not been overwritten,
                // it is an out-of-gas error.
                if eq(shr(224, mload(0x00)), functionSelector) {
                    // To prevent gas under-estimation.
                    revert(0, 0)
                }
            }
            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, because of Solidity's memory size limits.
            mstore(0x24, 0)
        }
    }

    /// @dev Modifier to guard a function and revert if the caller is a blocked operator.
    modifier onlyAllowedOperator(address from) virtual {
        if (from != msg.sender) {
            if (!_isPriorityOperator(msg.sender)) {
                if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender);
            }
        }
        _;
    }

    /// @dev Modifier to guard a function from approving a blocked operator..
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        if (!_isPriorityOperator(operator)) {
            if (_operatorFilteringEnabled()) _revertIfBlocked(operator);
        }
        _;
    }

    /// @dev Helper function that reverts if the `operator` is blocked by the registry.
    function _revertIfBlocked(address operator) private view {
        /// @solidity memory-safe-assembly
        assembly {
            // Store the function selector of `isOperatorAllowed(address,address)`,
            // shifted left by 6 bytes, which is enough for 8tb of memory.
            // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL).
            mstore(0x00, 0xc6171134001122334455)
            // Store the `address(this)`.
            mstore(0x1a, address())
            // Store the `operator`.
            mstore(0x3a, operator)

            // `isOperatorAllowed` always returns true if it does not revert.
            if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) {
                // Bubble up the revert if the staticcall reverts.
                returndatacopy(0x00, 0x00, returndatasize())
                revert(0x00, returndatasize())
            }

            // We'll skip checking if `from` is inside the blacklist.
            // Even though that can block transferring out of wrapper contracts,
            // we don't want tokens to be stuck.

            // Restore the part of the free memory pointer that was overwritten,
            // which is guaranteed to be zero, if less than 8tb of memory is used.
            mstore(0x3a, 0)
        }
    }

    /// @dev For deriving contracts to override, so that operator filtering
    /// can be turned on / off.
    /// Returns true by default.
    function _operatorFilteringEnabled() internal view virtual returns (bool) {
        return true;
    }

    /// @dev For deriving contracts to override, so that preferred marketplaces can
    /// skip operator filtering, helping users save gas.
    /// Returns false for all inputs by default.
    function _isPriorityOperator(address) internal view virtual returns (bool) {
        return false;
    }
}

File 47 of 55 : ChristiesMarketplaceMintAPIV1.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import '@nftculture/nftc-contracts/contracts/interfaces/manifoldxyz/ILazyDelivery.sol';
import '@nftculture/nftc-contracts/contracts/interfaces/manifoldxyz/ILazyDeliveryMetadata.sol';
import '@nftculture/nftc-contracts/contracts/interfaces/manifoldxyz/IPriceEngine.sol';

/**
 * @title ChristiesMarketplaceMintAPIV1
 * @author @NiftyMike | @NFTCulture
 * @dev This interface defines the mint functions necessary for integration with the Christie's 3.0
 * Marketplace contract.
 *
 * This interface is compatible with both Fungible and Non-Fungible tokens.
 *
 * Note: NFTC "Mint-Tag" interfaces are just helpers to set guidelines for implementing token
 * minting functions in a consistent way across projects, and to help readers more quickly
 * understand the public endpoints in the contract.
 */
interface ChristiesMarketplaceMintAPIV1 is ILazyDelivery, ILazyDeliveryMetadata, IPriceEngine {
    // Tag Interface
}

File 48 of 55 : ChristiesMarketplaceMinter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import '@nftculture/nftc-contracts/contracts/meta/ERC7572_ContractMetadata.sol';

// NFTC Prerelease Contracts
import '@nftculture/nftc-contracts-private/contracts/token/v4/minter-extensions/BasicNFTMinter.sol';

// Local References
import './ChristiesMarketplaceMintAPIV1.sol';

/**
 * @title ChristiesMarketplaceMinter
 * @author @NiftyMike | @NFTCulture
 * @dev Minter for mints that are executed by a Christie's 3.0 Marketplace contract.
 *
 * This contract is built on top of the NFTC BasicNFTMinter ERC721 implementation, which
 * itself provides NFTC's standard NFT functionality, including the INFTCNonFungibleToken
 * for web3 front ends.
 */
abstract contract ChristiesMarketplaceMinter is BasicNFTMinter, ChristiesMarketplaceMintAPIV1, ERC7572_ContractMetadata {
    uint256 internal marketAssetId = 1;

    /**
     * @dev Marketplace asset Id should never change, but leaving this here just in case.
     * @param __marketAssetId - the asset Id associated with the origin listing.
     */
    function setMarketAssetId(uint256 __marketAssetId) external isOwner {
        marketAssetId = __marketAssetId;
    }

    /**
     * @notice ChristiesMarketplaceMintAPIV1: JSON definition for the collection.
     *
     * @param - assetId - not used.
     */
    function assetURI(uint256) external view override returns (string memory) {
        return _getContractURI();
    }

    function _isOwner() internal view virtual override(ERC7572_ContractMetadata, OwnableDeferral);

    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721A, IERC721A, ERC7572_ContractMetadata) returns (bool) {
        if (
            interfaceId == type(ILazyDelivery).interfaceId ||
            interfaceId == type(ILazyDeliveryMetadata).interfaceId ||
            interfaceId == type(IPriceEngine).interfaceId
        ) {
            return true;
        }

        return ERC721A.supportsInterface(interfaceId) || ERC7572_ContractMetadata.supportsInterface(interfaceId);
    }
}

File 49 of 55 : SourceGenerativeArtNFTBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Prerelease Contracts
import '@nftculture/nftc-contracts-private/contracts/metadata/v2/metadata-consumers/SingletonMetadataConsumer.sol';
import '@nftculture/nftc-contracts-private/contracts/token/v4/user-interactive/IMintable.sol';
import '@nftculture/nftc-contracts-private/contracts/token-phasing/v2/static-extensions/StaticPhasedMintTwo.sol';
import '@nftculture/nftc-contracts-private/contracts/token/MutablePrivilegedMinter.sol';

// OZ Libraries
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/Strings.sol';

// Local References
import './ChristiesMarketplaceMinter.sol';
import './SourceGenerativeArtState.sol';

// Error Codes
error ExceedsBatchSize(uint256);
error ExceedsSupplyCap(uint256);
error InvalidPayment(uint256);
error MintNotActive();
error InvalidAssetId(uint256);

/**
 * @title SourceGenerativeArtNFTBase
 * @author @NiftyMike | @NFTCulture
 * @dev ERC721a Implementation with @NFTCulture standardized components.
 *
 * Two phase mint, in a dutch auction format, all mints requested from an external marketplace contract.
 *
 * @dev Credit to Digital Practice - James Healy and @JacobJoaquin - for development of the generative scripts hosted
 * by this project.
 *
 * @dev Special thanks to Scripty.sol - @0xthedude and @xtremetom - the library that makes this all possible.
 *
 * @dev Also thanks to Patrick Gillespie (@patorjk) for Text to ASCII Art Generator (TAAG).
 */
abstract contract SourceGenerativeArtNFTBase is
    ChristiesMarketplaceMinter,
    ReentrancyGuard,
    StaticPhasedMintTwo,
    MutablePrivilegedMinter,
    SingletonMetadataConsumer,
    SourceGenerativeArtState
{
    using Strings for uint256;

    uint256 private constant MAX_RESERVE_BATCH_SIZE = 20;
    uint256 private constant PHASE_ONE_BATCH_SIZE = 20;
    uint256 private constant PHASE_TWO_BATCH_SIZE = 20;

    uint256 internal _dutchAuctionBlockThrottle = 10;

    constructor(
        string memory __baseURI,
        uint256 __phaseOnePricePerNft,
        uint256 __publicMintPricePerNft
    ) BasicNFTMinter(__baseURI) StaticPhasedMintTwo(__phaseOnePricePerNft, __publicMintPricePerNft) {
        _registerForOperatorFiltering();
        operatorFilteringEnabled = true;
    }

    /**
     * @notice Max number of tokens that can exist.
     */
    function maxSupply() external pure returns (uint256) {
        return MINT_SUPPLY_CAP;
    }

    /**
     * @notice Total tokens that currently exist - minted less burned
     */
    function totalTokensExist() external view override returns (uint256) {
        return _totalMinted() - _totalBurned();
    }

    function phaseOneBatchSize() external pure returns (uint256) {
        return PHASE_ONE_BATCH_SIZE;
    }

    function publicMintBatchSize() external pure returns (uint256) {
        return PHASE_TWO_BATCH_SIZE;
    }

    function setDutchAuctionBlockThrottle(uint256 __dutchAuctionBlockThrottle) external isOwner {
        _dutchAuctionBlockThrottle = __dutchAuctionBlockThrottle;
    }

    function setEntropyProvider(address __entropyProvider) external isOwner {
        _setEntropyProvider(__entropyProvider);
    }

    function setTraitMap(uint256 tokenId, uint256 traitMap) external isOwner {
        require(_exists(tokenId), 'No token');
        _setTraitMap(tokenId, traitMap);
    }

    function setTraitMapBatch(uint256[] calldata tokenId, uint256[] calldata traitMap) external isOwner {
        require(tokenId.length == traitMap.length, 'Array mismatch');

        uint256 currentTraitMap;
        uint256 idx;
        for (; idx < tokenId.length; ) {
            require(_exists(tokenId[idx]), 'No token');
            currentTraitMap = _getTraitMap(tokenId[idx]);
            if (currentTraitMap == 0) {
                _setTraitMap(tokenId[idx], traitMap[idx]);
            }

            unchecked {
                idx++;
            }
        }
    }

    /**
     * @notice ChristiesMarketplaceMinter: retrieve pricing model. Internally will assess the correct phase.
     *
     * @param - assetId - id of the asset in the marketplace
     * @param - alreadyMinted - number minted
     * @param - count - number to mint
     */
    function price(uint256 assetId, uint256, uint24 count) external view returns (uint256) {
        if (assetId != marketAssetId) revert InvalidAssetId(assetId);

        uint256 currentBlock = block.number;

        if (_isPhaseOneActive()) {
            return _calculateCurrentPerNFTPrice(phaseOnePricePerNft, currentBlock) * count;
        }

        if (_isPublicMintingActive()) {
            return _calculateCurrentPerNFTPrice(publicMintPricePerNft, currentBlock) * count;
        }

        // Return phaseOne price as the default starting price, since this will be the highest possible value.
        return uint96(phaseOnePricePerNft >> 160) * count;
    }

    function _calculateCurrentPerNFTPrice(
        uint256 priceInformation,
        uint256 currentBlock
    ) internal view returns (uint256) {
        // Using a single uint256 to simplify contract management. All datasizes fit values appropriate to this project.
        // [ startPrice (96 bits) | endPrice (96 bits) | startBlock (32 bits) | endBlock (32 bits) ]
        uint256 startPrice = uint96(priceInformation >> 160);
        uint256 endPrice = uint96(priceInformation >> 64);
        uint256 startBlock = uint32(priceInformation >> 32);
        uint256 endBlock = uint32(priceInformation);

        if (currentBlock >= endBlock) {
            return endPrice;
        } else if (currentBlock <= startBlock) {
            return startPrice;
        } else {
            uint256 effectiveBlocksElapsed = ((currentBlock - startBlock) / _dutchAuctionBlockThrottle) *
                _dutchAuctionBlockThrottle;
            uint256 totalSteps = (endBlock - startBlock) / _dutchAuctionBlockThrottle;
            uint256 completionPercent = (effectiveBlocksElapsed * 10000) / (totalSteps * _dutchAuctionBlockThrottle);
            return startPrice - ((startPrice - endPrice) * completionPercent) / 10000;
        }
    }

    /**
     * @notice Owner: reserve tokens for team.
     *
     * @param count - the number of tokens to mint.
     * @param - unused
     * @param destinations - addresses to send tokens to.
     */
    function reserveTokens(uint256 count, uint256, address[] calldata destinations) external payable isOwner {
        _reserveTokens(destinations, count);
    }

    function _reserveTokens(address[] memory friends, uint256 count) internal {
        if (0 >= count || count > MAX_RESERVE_BATCH_SIZE) revert ExceedsBatchSize(count);
        if (_totalMinted() + (friends.length * count) > MINT_SUPPLY_CAP) revert ExceedsSupplyCap(MINT_SUPPLY_CAP);

        uint256 idx;
        for (idx = 0; idx < friends.length; idx++) {
            _internalMintTokens(friends[idx], count);
        }
    }

    /**
     * ChristiesMarketplaceMinter: deliver a NFT that has been purchased
     *
     * @param - listingId - collection id in the marketplace
     * @param to - address to deliver the tokens
     * @param assetId - id of the asset in the marketplace
     * @param payableCount - the number of tokens to mint.
     * @param payableAmount - amount paid
     * @param - payableERC20 - amount paid in erc20?
     * @param - index - (optional) not used
     */
    function deliver(
        uint40,
        address to,
        uint256 assetId,
        uint24 payableCount,
        uint256 payableAmount,
        address,
        uint256
    ) external override nonReentrant onlyPrivilegedMinter {
        if (assetId != marketAssetId) revert InvalidAssetId(assetId);

        if (_isPhaseOneActive()) {
            _phaseOneMintTokensTo(payableCount, payableAmount, to);
        } else if (_isPublicMintingActive()) {
            _publicMintTokensTo(payableCount, payableAmount, to);
        } else {
            revert MintNotActive();
        }
    }

    function _phaseOneMintTokensTo(uint256 count, uint256 payableAmount, address destination) internal {
        if (0 >= count || count > PHASE_ONE_BATCH_SIZE) revert ExceedsBatchSize(count);
        if (_totalMinted() + count > MINT_SUPPLY_CAP) revert ExceedsSupplyCap(MINT_SUPPLY_CAP);

        uint256 perUnitPrice = _calculateCurrentPerNFTPrice(phaseOnePricePerNft, block.number);
        if (payableAmount != perUnitPrice * count) revert InvalidPayment(payableAmount);

        _internalMintTokens(destination, count);
    }

    function _publicMintTokensTo(uint256 count, uint256 payableAmount, address destination) internal {
        if (0 >= count || count > PHASE_TWO_BATCH_SIZE) revert ExceedsBatchSize(count);
        if (_totalMinted() + count > MINT_SUPPLY_CAP) revert ExceedsSupplyCap(MINT_SUPPLY_CAP);

        uint256 perUnitPrice = _calculateCurrentPerNFTPrice(publicMintPricePerNft, block.number);
        if (payableAmount != perUnitPrice * count) revert InvalidPayment(payableAmount);

        _internalMintTokens(destination, count);
    }

    function _internalMintTokens(address minter, uint256 count) internal {
        uint256 nextToken = _nextTokenId();

        _safeMint(minter, count);

        _setEntropy(nextToken);

        if (count > 1) {
            for (uint256 nextTokenIdx = nextToken + 1; nextTokenIdx < nextToken + count; nextTokenIdx++) {
                //_initializeOwnershipAt(nextTokenIdx); // needed if we use extradata
                _setEntropy(nextTokenIdx);
            }
        }
    }

    function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) {
        require(_exists(tokenId), 'No token');

        uint64 tokenType = _getMetadataProducer(address(this), tokenId).getTokenTypeForToken(address(this), tokenId);
        return
            _getMetadataProducer(address(this), tokenId).getJsonAsEncodedString(
                address(this),
                tokenType,
                (_getTraitMap(tokenId) << 16) | uint16(tokenId),
                _getEntropy(tokenId)
            );
    }

    // Defer to entry contract
    function _isOwner() internal view virtual override(ChristiesMarketplaceMinter, OwnableDeferral);
}

File 50 of 55 : SourceGenerativeArtState.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Prerelease Contracts
import '@nftculture/nftc-contracts-private/contracts/metadata/v2/entropy/IImmutableProvideTokenEntropy.sol';

/**
 * @title SourceGenerativeArtState
 * @author @NiftyMike | @NFTCulture
 * @dev This contract is responsible for managing state related to generative art pieces.
 *
 * State consists of two primary components:
 *      - entropy: the randomness used to seed an art generation script
 *      - traitMap: a bitmap encoding of traits assigned to the token
 *
 * There should exist a deterministic calculation somewhere (on or off-chain) that can compute a
 * traitMap from a given entropy value. Storing the traitMap encoding on-chain allows for flexibility
 * in the home of said deterministic calculation. Also, this contract does not concern itself with
 * the actual generation of entropy.
 */
abstract contract SourceGenerativeArtState {
    struct TokenDetails {
        uint256 entropy;
        uint256 traitMap;
    }

    uint256 internal constant MINT_SUPPLY_CAP = 400;
    TokenDetails[MINT_SUPPLY_CAP] private _tokenDetails;

    IImmutableProvideTokenEntropy private _entropyProvider;

    function _getEntropyProvider() internal view returns (IImmutableProvideTokenEntropy) {
        return _entropyProvider;
    }

    function _setEntropyProvider(address __entropyProvider) internal {
        _entropyProvider = IImmutableProvideTokenEntropy(__entropyProvider);
    }

    function getEntropy(uint256 tokenId) external view returns (uint256) {
        return _getEntropy(tokenId);
    }

    function _getEntropy(uint256 tokenId) internal view returns (uint256) {
        return _tokenDetails[tokenId].entropy;
    }

    function getTraitMap(uint256 tokenId) external view returns (uint256) {
        return _getTraitMap(tokenId);
    }

    function _getTraitMap(uint256 tokenId) internal view returns (uint256) {
        return _tokenDetails[tokenId].traitMap;
    }

    function _setEntropy(uint256 tokenId) internal {
        _tokenDetails[tokenId].entropy = uint256(_getEntropyProvider().getEntropyForToken(address(this), tokenId));
    }

    function _setTraitMap(uint256 tokenId, uint256 traitValues) internal {
        _tokenDetails[tokenId].traitMap = traitValues;
    }

    /**
     * Convenience function for computing a traitMap from a uint array of attribute indexes.
     *
     * @param values - indexed attribute selections for each trait represented in whole by traitMap
     */
    function encodeTraitMap(uint8[] memory values) external pure returns (uint256) {
        uint256 packedBytes = 0;
        for (uint256 idx = 0; idx < values.length; idx++) {
            uint256 shiftedValue = uint256(values[idx]) << (8 * idx);
            packedBytes |= shiftedValue;
        }

        return packedBytes;
    }
}

File 51 of 55 : SourceRoyaltySplitter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

// NFTC Open Source Contracts See: https://github.com/NFTCulture/nftc-contracts
import '@nftculture/nftc-contracts/contracts/financial/NFTCSplitsAndRoyalties.sol';

abstract contract SourceRoyaltySplitter is NFTCSplitsAndRoyalties {
    address[] internal addresses = [
        0x2000b2f10A697cF77Edf57dFA2B128EDC9ceF4A1, // RA
        0x3e34B9b01FCFA76C61A703584F1b10cb8e23B9eD  // DP
    ];

    uint256[] internal splits = [70, 30];

    uint96 private constant DEFAULT_ROYALTY_BASIS_POINTS = 1000; // 10%

    constructor() NFTCSplitsAndRoyalties(addresses, splits, address(this), DEFAULT_ROYALTY_BASIS_POINTS) {
        // Nothing to do.
    }
}

File 52 of 55 : 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)
        }
    }
}

File 53 of 55 : ERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721ABurnable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721ABurnable.
 *
 * @dev ERC721A token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual override {
        _burn(tokenId, true);
    }
}

File 54 of 55 : IERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721ABurnable.
 */
interface IERC721ABurnable is IERC721A {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

File 55 of 55 : IERC721A.sol
// 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
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CallerIsNotOwner","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ExceedsBatchSize","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ExceedsSupplyCap","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"InvalidAssetId","type":"error"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"InvalidPayment","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintNotActive","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"PayeeTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assetURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"address","name":"tokenOwner","type":"address"}],"name":"balanceOwnedBy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint40","name":"","type":"uint40"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint24","name":"payableCount","type":"uint24"},{"internalType":"uint256","name":"payableAmount","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"deliver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"values","type":"uint8[]"}],"name":"encodeTraitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getArtURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getEntropy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"getMetadataProducer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPhaseOnePricePerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrivilegedMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPublicMintPricePerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTraitMap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"isPhaseOneActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phaseOneBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"phaseOnePricePerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint24","name":"count","type":"uint24"}],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintBatchSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"publicMintPricePerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"subscription","type":"address"},{"internalType":"bool","name":"subscribe","type":"bool"}],"name":"registerForOperatorFiltering","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseToSelf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address[]","name":"destinations","type":"address[]"}],"name":"reserveTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"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":"setArtURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__contractUri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newReceiver","type":"address"},{"internalType":"uint96","name":"newRoyalty","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"__dutchAuctionBlockThrottle","type":"uint256"}],"name":"setDutchAuctionBlockThrottle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"__entropyProvider","type":"address"}],"name":"setEntropyProvider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"__marketAssetId","type":"uint256"}],"name":"setMarketAssetId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"__metadataProducer","type":"address"}],"name":"setMetadataProducer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"__phaseOnePricePerNft","type":"uint256"},{"internalType":"uint256","name":"__publicMintPricePerNft","type":"uint256"}],"name":"setMintingPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"__phaseOneActive","type":"bool"},{"internalType":"bool","name":"__publicMintingActive","type":"bool"}],"name":"setMintingState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"__newPrivilegedMinter","type":"address"}],"name":"setPrivilegedMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"traitMap","type":"uint256"}],"name":"setTraitMap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"uint256[]","name":"traitMap","type":"uint256[]"}],"name":"setTraitMapBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supportedPhases","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensExist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newOwner","type":"address"}],"name":"transferPayee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e0604052732000b2f10a697cf77edf57dfa2b128edc9cef4a160a0908152733e34b9b01fcfa76c61a703584f1b10cb8e23b9ed60c0526200004690601290600262000873565b506040805180820190915260468152601e60208201526200006c906013906002620008dd565b506001601555600a61033c553480156200008557600080fd5b50604080518082018252601481527f68747470733a2f2f617277656176652e6e65742f0000000000000000000000006020808301919091526012805484518184028101840190955280855292937b4563918244f400000000000014d1120d7b1600000128489601284986937b14d1120d7b160000000000000429d069189e00000128498801284a78937365419c1eec692e3d30fcb9e99889c6b8c723226a9386938693849360029391908301828280156200016a57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200014b575b50505050506013805480602002602001604051908101604052809291908181526020018280548015620001bd57602002820191906000526020600020905b815481526020019060010190808311620001a8575b5050505050306103e88b739d3c936d7e2ff74b068862f439925b570e46775f85856040518060400160405280601981526020017f536f757263654f6e4e4654736279524f42455254414c4943450000000000000081525060405180604001604052806008815260200167534f4e4e4654524160c01b8152508160029081620002469190620009de565b506003620002558282620009de565b506000805550508051825114620002b35760405162461bcd60e51b815260206004820181905260248201527f5061796d656e7453706c69747465723a206c656e677468206d69736d6174636860448201526064015b60405180910390fd5b6000825111620003065760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620002aa565b60005b825181101562000366576200035d8382815181106200032c576200032c62000aaa565b602002602001015183838151811062000349576200034962000aaa565b60200260200101516200044a60201b60201c565b60010162000309565b5050600d80546001600160a01b0319166001600160a01b039390931692909217909155506200039c620003963390565b62000619565b600f620003aa8282620009de565b50620003b9905082826200066b565b50506001601655505060805260185550601955620003d7816200076c565b50620003e26200079b565b5050600e805460ff60a01b1916600160a01b179055506040805160608101909152603f8082526200041d91906200462f6020830139620007be565b61033b80546001600160a01b031916732b00e8e837e7e7d530197800499c36bde20f731817905562000ae8565b6001600160a01b038216620004a25760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207a65726f20616464726573730000006044820152606401620002aa565b60008111620004f45760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207368617265730000000000006044820152606401620002aa565b6001600160a01b0382166000908152600a602052604090205415620005665760405162461bcd60e51b815260206004820152602160248201527f5061796d656e7453706c69747465723a207061796565206861732073686172656044820152607360f81b6064820152608401620002aa565b600c8054600181019091557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b0319166001600160a01b0384169081179091556000908152600a60205260409020819055600854620005d090829062000ac0565b600855604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b600e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620006db5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620002aa565b6001600160a01b038216620007335760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002aa565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217601055565b6001600160a01b038116156200079857601a80546001600160a01b0319166001600160a01b0383161790555b50565b620007bc733cc6cdda760b79bafa08df41ecfa224f810dceb66001620007f9565b565b6014620007cc8282620009de565b506040517fa5d4097edda6d87cb9329af83fb3712ef77eeb13738ffe43cc35a4ce305ad96290600090a150565b6001600160a01b0390911690637d3e3dbe81620008295782620008225750634420e48662000829565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af162000869578060005160e01c036200086957600080fd5b5060006024525050565b828054828255906000526020600020908101928215620008cb579160200282015b82811115620008cb57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000894565b50620008d992915062000920565b5090565b828054828255906000526020600020908101928215620008cb579160200282015b82811115620008cb578251829060ff16905591602001919060010190620008fe565b5b80821115620008d9576000815560010162000921565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200096257607f821691505b6020821081036200098357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620009d9576000816000526020600020601f850160051c81016020861015620009b45750805b601f850160051c820191505b81811015620009d557828155600101620009c0565b5050505b505050565b81516001600160401b03811115620009fa57620009fa62000937565b62000a128162000a0b84546200094d565b8462000989565b602080601f83116001811462000a4a576000841562000a315750858301515b600019600386901b1c1916600185901b178555620009d5565b600085815260208120601f198616915b8281101562000a7b5788860151825594840194600190910190840162000a5a565b508582101562000a9a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b8082018082111562000ae257634e487b7160e01b600052601160045260246000fd5b92915050565b608051613b1d62000b1260003960008181610b8d0152818161250d01526127cd0152613b1d6000f3fe6080604052600436106104335760003560e01c80638fb5170e11610228578063c6625a9211610128578063e8a3d485116100bb578063f2fde38b1161008a578063fb796e6c1161006f578063fb796e6c14610c5a578063fdb8e8a214610732578063ff9e7e1514610c7b57600080fd5b8063f2fde38b14610c1a578063f9c3af6314610c3a57600080fd5b8063e8a3d48514610b69578063e8ad246f14610b7e578063e985e9c514610bb1578063f1c6898214610bfa57600080fd5b8063d5abeb01116100f7578063d5abeb0114610b15578063db828e5d14610b2a578063e228c6fe14610b3f578063e33b7de314610b5457600080fd5b8063c6625a9214610a7f578063c87b56dd14610a9f578063ce7c2ac214610abf578063ce99e37b14610af557600080fd5b8063a22cb465116101bb578063b7c0b8e81161018a578063bfbfa9651161016f578063bfbfa96514610a2a578063c057e15714610a3f578063c4d1230914610a5f57600080fd5b8063b7c0b8e8146109f7578063b88d4fde14610a1757600080fd5b8063a22cb4651461098d578063a2309ff8146109ad578063a3f8eace146109c2578063ab9f7e75146109e257600080fd5b80639852595c116101f75780639852595c1461090b5780639e04c45214610941578063a0e2406214610957578063a13cf3861461096d57600080fd5b80638fb5170e14610896578063938e3d7b146108b657806395d89b41146108d657806396a96857146108eb57600080fd5b806342966c68116103335780636c0360eb116102c6578063730ac125116102955780638b83209b1161027a5780638b83209b146108385780638da5cb5b146108585780638e0272441461087657600080fd5b8063730ac1251461080557806374e6a4691461081857600080fd5b80636c0360eb146107a65780636ef39a28146107bb57806370a08231146107d0578063715018a6146107f057600080fd5b80635b18692b116103025780635b18692b146107325780636352211e1461074657806365b6d4d3146107665780636b5f49d61461078657600080fd5b806342966c68146106c857806343a2b576146106e857806346d8efad146106fd578063585997e31461071d57600080fd5b806319165587116103c65780632a55205a116103955780632c5e02df1161037a5780632c5e02df146106805780633a98ef39146106a057806342842e0e146106b557600080fd5b80632a55205a146106215780632a8b91d41461066057600080fd5b806319165587146105a257806321fddcd5146105c257806323b872dd146105e257806324cd7c28146105f557600080fd5b8063081812fc11610402578063081812fc1461052c578063095ea7b31461054c578063163480091461055f57806318160ddd1461057f57600080fd5b806301ffc9a71461048157806304634d8d146104b657806306c8ef45146104d857806306fdde031461050a57600080fd5b3661047c577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048d57600080fd5b506104a161049c366004613120565b610c9b565b60405190151581526020015b60405180910390f35b3480156104c257600080fd5b506104d66104d1366004613152565b610cbb565b005b3480156104e457600080fd5b50600d546001600160a01b03165b6040516001600160a01b0390911681526020016104ad565b34801561051657600080fd5b5061051f610cd1565b6040516104ad91906131ec565b34801561053857600080fd5b506104f26105473660046131ff565b610d63565b6104d661055a366004613218565b610dc0565b34801561056b57600080fd5b506104d661057a366004613244565b610e0f565b34801561058b57600080fd5b50600154600054035b6040519081526020016104ad565b3480156105ae57600080fd5b506104d66105bd366004613244565b610fa2565b3480156105ce57600080fd5b506105946105dd3660046132a8565b610fb6565b6104d66105f0366004613361565b611008565b34801561060157600080fd5b506104f2610610366004613218565b5050601a546001600160a01b031690565b34801561062d57600080fd5b5061064161063c3660046133a2565b611060565b604080516001600160a01b0390931683526020830191909152016104ad565b34801561066c57600080fd5b506104d661067b3660046133a2565b61111d565b34801561068c57600080fd5b506104d661069b366004613409565b61116f565b3480156106ac57600080fd5b50600854610594565b6104d66106c3366004613361565b61129f565b3480156106d457600080fd5b506104d66106e33660046131ff565b6112f1565b3480156106f457600080fd5b506104a16112fc565b34801561070957600080fd5b506104d661071836600461348a565b61130b565b34801561072957600080fd5b5061059461131d565b34801561073e57600080fd5b506014610594565b34801561075257600080fd5b506104f26107613660046131ff565b611335565b34801561077257600080fd5b506104d66107813660046134bf565b611340565b34801561079257600080fd5b506104d66107a13660046131ff565b611369565b3480156107b257600080fd5b5061051f611376565b3480156107c757600080fd5b50601854610594565b3480156107dc57600080fd5b506105946107eb366004613244565b611404565b3480156107fc57600080fd5b506104d661146c565b6104d66108133660046134db565b611480565b34801561082457600080fd5b506105946108333660046131ff565b6114c6565b34801561084457600080fd5b506104f26108533660046131ff565b6114d1565b34801561086457600080fd5b50600e546001600160a01b03166104f2565b34801561088257600080fd5b50610594610891366004613535565b611501565b3480156108a257600080fd5b506104d66108b136600461356a565b6115a8565b3480156108c257600080fd5b506104d66108d13660046135ed565b6116b3565b3480156108e257600080fd5b5061051f6116fa565b3480156108f757600080fd5b50610594610906366004613244565b611709565b34801561091757600080fd5b50610594610926366004613244565b6001600160a01b03166000908152600b602052604090205490565b34801561094d57600080fd5b5061059460195481565b34801561096357600080fd5b5061059460185481565b34801561097957600080fd5b506104d6610988366004613244565b611714565b34801561099957600080fd5b506104d66109a836600461348a565b61173b565b3480156109b957600080fd5b50600054610594565b3480156109ce57600080fd5b506105946109dd366004613244565b611785565b3480156109ee57600080fd5b5061051f611790565b348015610a0357600080fd5b506104d6610a1236600461365f565b61179a565b6104d6610a253660046136e0565b6117db565b348015610a3657600080fd5b50601954610594565b348015610a4b57600080fd5b506104d6610a5a3660046133a2565b611835565b348015610a6b57600080fd5b50610594610a7a3660046131ff565b611848565b348015610a8b57600080fd5b506104d6610a9a366004613244565b611853565b348015610aab57600080fd5b5061051f610aba3660046131ff565b611864565b348015610acb57600080fd5b50610594610ada366004613244565b6001600160a01b03166000908152600a602052604090205490565b348015610b0157600080fd5b506104d6610b10366004613760565b611a0b565b348015610b2157600080fd5b50610190610594565b348015610b3657600080fd5b506104a1611a1f565b348015610b4b57600080fd5b506104d6611a29565b348015610b6057600080fd5b50600954610594565b348015610b7557600080fd5b5061051f611a32565b348015610b8a57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610594565b348015610bbd57600080fd5b506104a1610bcc3660046137a9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610c0657600080fd5b5061051f610c153660046131ff565b611a41565b348015610c2657600080fd5b506104d6610c35366004613244565b611a4b565b348015610c4657600080fd5b506104d6610c55366004613244565b611ad8565b348015610c6657600080fd5b50600e546104a190600160a01b900460ff1681565b348015610c8757600080fd5b506104d6610c963660046131ff565b611afe565b6000610ca682611b0c565b80610cb55750610cb582611bc8565b92915050565b610cc3611c16565b610ccd8282611c1e565b5050565b606060028054610ce0906137d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0c906137d7565b8015610d595780601f10610d2e57610100808354040283529160200191610d59565b820191906000526020600020905b815481529060010190602001808311610d3c57829003601f168201915b5050505050905090565b6000610d6e82611d38565b610da4576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b03821614610e0057600e54600160a01b900460ff1615610e0057610e0081611d5f565b610e0a8383611da3565b505050565b6001600160a01b038116610e6a5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207a65726f206164647265737300000060448201526064015b60405180910390fd5b336000908152600a6020526040902054610ec65760405162461bcd60e51b815260206004820181905260248201527f5061796d656e7453706c69747465723a206e6f206f776e6564207368617265736044820152606401610e61565b6001600160a01b0381166000908152600a602052604090205415610f525760405162461bcd60e51b815260206004820152602160248201527f5061796d656e7453706c69747465723a2070617965652068617320736861726560448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610e61565b610f5b81611e5c565b7f6829b4029cd073199f80f49556d32953c9bc4e14d395388e678d2cc4604d481933604080516001600160a01b03928316815291841660208301520160405180910390a150565b610faa611c16565b610fb381611f1e565b50565b600080805b8351811015611001576000610fd1826008613827565b858381518110610fe357610fe361383e565b602090810291909101015160ff16901b929092179150600101610fbb565b5092915050565b826001600160a01b038116331461104f57731e0049783f008a0085193e00003d00cd54003c71331461104f57600e54600160a01b900460ff161561104f5761104f33611d5f565b61105a848484612065565b50505050565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916110df5750604080518082019091526010546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611103906bffffffffffffffffffffffff1687613827565b61110d9190613854565b91519350909150505b9250929050565b611125611c16565b61112e82611d38565b6111655760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b610ccd8282612237565b611177611c16565b8281146111c65760405162461bcd60e51b815260206004820152600e60248201527f4172726179206d69736d617463680000000000000000000000000000000000006044820152606401610e61565b6000805b84811015611297576111f38686838181106111e7576111e761383e565b90506020020135611d38565b61122a5760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b61124b86868381811061123f5761123f61383e565b9050602002013561225b565b91508160000361128f5761128f86868381811061126a5761126a61383e565b905060200201358585848181106112835761128361383e565b90506020020135612237565b6001016111ca565b505050505050565b826001600160a01b03811633146112e657731e0049783f008a0085193e00003d00cd54003c7133146112e657600e54600160a01b900460ff16156112e6576112e633611d5f565b61105a848484612280565b610fb381600161229b565b60006113066123fe565b905090565b611313611c16565b610ccd828261240f565b600061132860015490565b6000546113069190613876565b6000610cb582612484565b611348611c16565b600061135382612504565b90506113618160018561252e565b601755505050565b611371611c16565b601555565b600f8054611383906137d7565b80601f01602080910402602001604051908101604052809291908181526020018280546113af906137d7565b80156113fc5780601f106113d1576101008083540402835291602001916113fc565b820191906000526020600020905b8154815290600101906020018083116113df57829003601f168201915b505050505081565b60006001600160a01b038216611446576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611474612557565b61147e60006125b1565b565b611488611c16565b61105a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250889250612603915050565b6000610cb5826126a8565b6000600c82815481106114e6576114e661383e565b6000918252602090912001546001600160a01b031692915050565b60006015548414611528576040516307aa545560e21b815260048101859052602401610e61565b436115316123fe565b1561155a578262ffffff16611548601954836126c9565b6115529190613827565b9150506115a1565b6115626127c1565b15611579578262ffffff16611548601854836126c9565b60195461158f9062ffffff85169060a01c613889565b6bffffffffffffffffffffffff169150505b9392505050565b6115b06127f1565b600d546001600160a01b0316331461160a5760405162461bcd60e51b815260206004820152601a60248201527f444d3a2063616c6c6572206973206e6f742064656c65676174650000000000006044820152606401610e61565b601554851461162f576040516307aa545560e21b815260048101869052602401610e61565b6116376123fe565b156116515761164c8462ffffff16848861284a565b6116a0565b6116596127c1565b1561166e5761164c8462ffffff168488612911565b6040517f914edb0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116aa6001601655565b50505050505050565b6116bb611c16565b610ccd82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061298792505050565b606060038054610ce0906137d7565b6000610cb582611404565b61171c611c16565b61033b80546001600160a01b0319166001600160a01b03831617905550565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b0382161461177b57600e54600160a01b900460ff161561177b5761177b81611d5f565b610e0a83836129c0565b6000610cb582612a2c565b6060611306612a6d565b6117a2611c16565b600e8054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b836001600160a01b038116331461182257731e0049783f008a0085193e00003d00cd54003c71331461182257600e54600160a01b900460ff16156118225761182233611d5f565b61182e85858585612a7c565b5050505050565b61183d611c16565b601991909155601855565b6000610cb58261225b565b61185b611c16565b610fb381612ac0565b606061186f82611d38565b6118a65760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b60006118ba601a546001600160a01b031690565b6040517f0e63540a000000000000000000000000000000000000000000000000000000008152306004820152602481018590526001600160a01b039190911690630e63540a90604401602060405180830381865afa158015611920573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194491906138b9565b9050611958601a546001600160a01b031690565b6001600160a01b031663f0f52cea30838661ffff1660106119788961225b565b901b17611984886126a8565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015267ffffffffffffffff909216602484015260448301526064820152608401600060405180830381865afa1580156119e3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115a191908101906138e3565b611a13611c16565b600f610ccd82826139a2565b60006113066127c1565b61147e33611f1e565b606060148054610ce0906137d7565b6060610cb5611a32565b611a53612557565b6001600160a01b038116611acf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e61565b610fb3816125b1565b611ae0611c16565b600d80546001600160a01b0319166001600160a01b03831617905550565b611b06611c16565b61033c55565b60006001600160e01b031982167f8fb5170e000000000000000000000000000000000000000000000000000000001480611b6f57506001600160e01b031982167ff1c6898200000000000000000000000000000000000000000000000000000000145b80611ba357506001600160e01b031982167f8e02724400000000000000000000000000000000000000000000000000000000145b15611bb057506001919050565b611bb982612aef565b80610cb55750610cb582612b6f565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610cb557506301ffc9a760e01b6001600160e01b0319831614610cb5565b61147e612bad565b6127106bffffffffffffffffffffffff82161115611ca45760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610e61565b6001600160a01b038216611cfa5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610e61565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217601055565b6000805482108015610cb5575050600090815260046020526040902054600160e01b161590565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa611d9b573d6000803e3d6000fd5b6000603a5250565b6000611dae82611335565b9050336001600160a01b03821614611e0057611dca8133610bcc565b611e00576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600c54600003611e695750565b60005b600c54611e7b90600190613876565b811015610ccd57336001600160a01b0316600c8281548110611e9f57611e9f61383e565b6000918252602090912001546001600160a01b031603611f165781600c8281548110611ecd57611ecd61383e565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905533808352600a90915260408083208054948716845290832093909355815290555b600101611e6c565b6001600160a01b0381166000908152600a6020526040902054611f835760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207368617265730000000000006044820152606401610e61565b6000611f8e82612a2c565b905080600003611fe05760405162461bcd60e51b815260206004820181905260248201527f5061796d656e7453706c69747465723a206e6f7420647565207061796d656e746044820152606401610e61565b8060096000828254611ff29190613a62565b90915550506001600160a01b0382166000908152600b6020526040902080548201905561201f8282612bf1565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b600061207082612484565b9050836001600160a01b0316816001600160a01b0316146120bd576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080546120e98187335b6001600160a01b039081169116811491141790565b612114576120f78633610bcc565b61211457604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516612154576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561215f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036121f1576001840160008181526004602052604081205490036121ef5760005481146121ef5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611297565b80601b83610190811061224c5761224c61383e565b60020201600101819055505050565b6000601b8261019081106122715761227161383e565b60020201600101549050919050565b610e0a838383604051806020016040528060008152506117db565b60006122a683612484565b9050806000806122c486600090815260066020526040902080549091565b915091508415612304576122d98184336120d4565b612304576122e78333610bcc565b61230457604051632ce44b5f60e11b815260040160405180910390fd5b801561230f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b851690036123b6576001860160008181526004602052604081205490036123b45760005481146123b45760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b601754600090611306906001612d0a565b6001600160a01b0390911690637d3e3dbe8161243c57826124355750634420e48661243c565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af161247a578060005160e01c0361247a57600080fd5b5060006024525050565b6000816000548110156124d25760008181526004602052604081205490600160e01b821690036124d0575b806000036115a15750600019016000818152600460205260409020546124af565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806115a1817f0000000000000000000000000000000000000000000000000000000000000000855b6000811561254657506001821b9290921791826115a1565b506001821b199290921691826115a1565b600e546001600160a01b0316331461147e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e61565b600e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8015806126105750601481115b1561263157604051635fb5f8f560e11b815260048101829052602401610e61565b6101908183516126419190613827565b60005461264e9190613a62565b11156126715760405163df193cf160e01b81526101906004820152602401610e61565b60005b8251811015610e0a576126a08382815181106126925761269261383e565b602002602001015183612d2c565b600101612674565b6000601b8261019081106126be576126be61383e565b600202015492915050565b600060a083901c604084901c6bffffffffffffffffffffffff1663ffffffff602086901c81169086168086106127055782945050505050610cb5565b8186116127185783945050505050610cb5565b61033c546000908061272a858a613876565b6127349190613854565b61273e9190613827565b9050600061033c5484846127529190613876565b61275c9190613854565b9050600061033c548261276f9190613827565b61277b84612710613827565b6127859190613854565b905061271081612795888a613876565b61279f9190613827565b6127a99190613854565b6127b39088613876565b975050505050505050610cb5565b601754600090611306907f0000000000000000000000000000000000000000000000000000000000000000612d0a565b6002601654036128435760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e61565b6002601655565b8215806128575750601483115b1561287857604051635fb5f8f560e11b815260048101849052602401610e61565b6101908361288560005490565b61288f9190613a62565b11156128b25760405163df193cf160e01b81526101906004820152602401610e61565b60006128c0601954436126c9565b90506128cc8482613827565b8314612907576040517f0e2e092600000000000000000000000000000000000000000000000000000000815260048101849052602401610e61565b61105a8285612d2c565b82158061291e5750601483115b1561293f57604051635fb5f8f560e11b815260048101849052602401610e61565b6101908361294c60005490565b6129569190613a62565b11156129795760405163df193cf160e01b81526101906004820152602401610e61565b60006128c0601854436126c9565b601461299382826139a2565b506040517fa5d4097edda6d87cb9329af83fb3712ef77eeb13738ffe43cc35a4ce305ad96290600090a150565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612a3860095490565b612a429047613a62565b90506115a18382612a68866001600160a01b03166000908152600b602052604090205490565b612d7d565b6060600f8054610ce0906137d7565b612a87848484611008565b6001600160a01b0383163b1561105a57612aa384848484612dbb565b61105a576040516368d2bf6b60e11b815260040160405180910390fd5b6001600160a01b03811615610fb357601a80546001600160a01b0383166001600160a01b031990911617905550565b60006301ffc9a760e01b6001600160e01b031983161480612b3957507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610cb55750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60006001600160e01b031982167fe8a3d485000000000000000000000000000000000000000000000000000000001480610cb55750610cb582611bc8565b600e546001600160a01b0316331461147e576040517f6db2465f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80471015612c415760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e61565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612c8e576040519150601f19603f3d011682016040523d82523d6000602084013e612c93565b606091505b5050905080610e0a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e61565b6000600183831c8116908114612d21576000612d24565b60015b949350505050565b600054612d398383612ea6565b612d4281612ec0565b6001821115610e0a576000612d58826001613a62565b90505b612d658383613a62565b81101561105a57612d7581612ec0565b600101612d5b565b6008546001600160a01b0384166000908152600a602052604081205490918391612da79086613827565b612db19190613854565b612d249190613876565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612df0903390899088908890600401613a75565b6020604051808303816000875af1925050508015612e2b575060408051601f3d908101601f19168201909252612e2891810190613ab1565b60015b612e89573d808015612e59576040519150601f19603f3d011682016040523d82523d6000602084013e612e5e565b606091505b508051600003612e81576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b610ccd828260405180602001604052806000815250612f73565b61033b546001600160a01b03166040517fdce397d2000000000000000000000000000000000000000000000000000000008152306004820152602481018390526001600160a01b03919091169063dce397d290604401602060405180830381865afa158015612f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f579190613ace565b601b826101908110612f6b57612f6b61383e565b600202015550565b612f7d8383612fd9565b6001600160a01b0383163b15610e0a576000548281035b612fa76000868380600101945086612dbb565b612fc4576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f9457816000541461182e57600080fd5b6000805490829003613017576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146130c657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161308e565b5081600003613101576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6001600160e01b031981168114610fb357600080fd5b60006020828403121561313257600080fd5b81356115a18161310a565b6001600160a01b0381168114610fb357600080fd5b6000806040838503121561316557600080fd5b82356131708161313d565b915060208301356bffffffffffffffffffffffff8116811461319157600080fd5b809150509250929050565b60005b838110156131b757818101518382015260200161319f565b50506000910152565b600081518084526131d881602086016020860161319c565b601f01601f19169290920160200192915050565b6020815260006115a160208301846131c0565b60006020828403121561321157600080fd5b5035919050565b6000806040838503121561322b57600080fd5b82356132368161313d565b946020939093013593505050565b60006020828403121561325657600080fd5b81356115a18161313d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132a0576132a0613261565b604052919050565b600060208083850312156132bb57600080fd5b823567ffffffffffffffff808211156132d357600080fd5b818501915085601f8301126132e757600080fd5b8135818111156132f9576132f9613261565b8060051b915061330a848301613277565b818152918301840191848101908884111561332457600080fd5b938501935b83851015613355578435925060ff831683146133455760008081fd5b8282529385019390850190613329565b98975050505050505050565b60008060006060848603121561337657600080fd5b83356133818161313d565b925060208401356133918161313d565b929592945050506040919091013590565b600080604083850312156133b557600080fd5b50508035926020909101359150565b60008083601f8401126133d657600080fd5b50813567ffffffffffffffff8111156133ee57600080fd5b6020830191508360208260051b850101111561111657600080fd5b6000806000806040858703121561341f57600080fd5b843567ffffffffffffffff8082111561343757600080fd5b613443888389016133c4565b9096509450602087013591508082111561345c57600080fd5b50613469878288016133c4565b95989497509550505050565b8035801515811461348557600080fd5b919050565b6000806040838503121561349d57600080fd5b82356134a88161313d565b91506134b660208401613475565b90509250929050565b600080604083850312156134d257600080fd5b6134a883613475565b600080600080606085870312156134f157600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561351657600080fd5b613469878288016133c4565b803562ffffff8116811461348557600080fd5b60008060006060848603121561354a57600080fd5b833592506020840135915061356160408501613522565b90509250925092565b600080600080600080600060e0888a03121561358557600080fd5b873564ffffffffff8116811461359a57600080fd5b965060208801356135aa8161313d565b9550604088013594506135bf60608901613522565b93506080880135925060a08801356135d68161313d565b8092505060c0880135905092959891949750929550565b6000806020838503121561360057600080fd5b823567ffffffffffffffff8082111561361857600080fd5b818501915085601f83011261362c57600080fd5b81358181111561363b57600080fd5b86602082850101111561364d57600080fd5b60209290920196919550909350505050565b60006020828403121561367157600080fd5b6115a182613475565b600067ffffffffffffffff82111561369457613694613261565b50601f01601f191660200190565b60006136b56136b08461367a565b613277565b90508281528383830111156136c957600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136f657600080fd5b84356137018161313d565b935060208501356137118161313d565b925060408501359150606085013567ffffffffffffffff81111561373457600080fd5b8501601f8101871361374557600080fd5b613754878235602084016136a2565b91505092959194509250565b60006020828403121561377257600080fd5b813567ffffffffffffffff81111561378957600080fd5b8201601f8101841361379a57600080fd5b612d24848235602084016136a2565b600080604083850312156137bc57600080fd5b82356137c78161313d565b915060208301356131918161313d565b600181811c908216806137eb57607f821691505b60208210810361380b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610cb557610cb5613811565b634e487b7160e01b600052603260045260246000fd5b60008261387157634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cb557610cb5613811565b6bffffffffffffffffffffffff8181168382160280821691908281146138b1576138b1613811565b505092915050565b6000602082840312156138cb57600080fd5b815167ffffffffffffffff811681146115a157600080fd5b6000602082840312156138f557600080fd5b815167ffffffffffffffff81111561390c57600080fd5b8201601f8101841361391d57600080fd5b805161392b6136b08261367a565b81815285602083850101111561394057600080fd5b61395182602083016020860161319c565b95945050505050565b601f821115610e0a576000816000526020600020601f850160051c810160208610156139835750805b601f850160051c820191505b818110156112975782815560010161398f565b815167ffffffffffffffff8111156139bc576139bc613261565b6139d0816139ca84546137d7565b8461395a565b602080601f831160018114613a0557600084156139ed5750858301515b600019600386901b1c1916600185901b178555611297565b600085815260208120601f198616915b82811015613a3457888601518255948401946001909101908401613a15565b5085821015613a525787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610cb557610cb5613811565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613aa760808301846131c0565b9695505050505050565b600060208284031215613ac357600080fd5b81516115a18161310a565b600060208284031215613ae057600080fd5b505191905056fea26469706673582212202350bd4346c1b8c2940db9fdd71166333712e8163ca481bb79672701dbfddbfb64736f6c6343000816003368747470733a2f2f617277656176652e6e65742f4849395941534a6e52367971354b526a70437566725a616a556b3846772d71584f5677466a493872395f6f

Deployed Bytecode

0x6080604052600436106104335760003560e01c80638fb5170e11610228578063c6625a9211610128578063e8a3d485116100bb578063f2fde38b1161008a578063fb796e6c1161006f578063fb796e6c14610c5a578063fdb8e8a214610732578063ff9e7e1514610c7b57600080fd5b8063f2fde38b14610c1a578063f9c3af6314610c3a57600080fd5b8063e8a3d48514610b69578063e8ad246f14610b7e578063e985e9c514610bb1578063f1c6898214610bfa57600080fd5b8063d5abeb01116100f7578063d5abeb0114610b15578063db828e5d14610b2a578063e228c6fe14610b3f578063e33b7de314610b5457600080fd5b8063c6625a9214610a7f578063c87b56dd14610a9f578063ce7c2ac214610abf578063ce99e37b14610af557600080fd5b8063a22cb465116101bb578063b7c0b8e81161018a578063bfbfa9651161016f578063bfbfa96514610a2a578063c057e15714610a3f578063c4d1230914610a5f57600080fd5b8063b7c0b8e8146109f7578063b88d4fde14610a1757600080fd5b8063a22cb4651461098d578063a2309ff8146109ad578063a3f8eace146109c2578063ab9f7e75146109e257600080fd5b80639852595c116101f75780639852595c1461090b5780639e04c45214610941578063a0e2406214610957578063a13cf3861461096d57600080fd5b80638fb5170e14610896578063938e3d7b146108b657806395d89b41146108d657806396a96857146108eb57600080fd5b806342966c68116103335780636c0360eb116102c6578063730ac125116102955780638b83209b1161027a5780638b83209b146108385780638da5cb5b146108585780638e0272441461087657600080fd5b8063730ac1251461080557806374e6a4691461081857600080fd5b80636c0360eb146107a65780636ef39a28146107bb57806370a08231146107d0578063715018a6146107f057600080fd5b80635b18692b116103025780635b18692b146107325780636352211e1461074657806365b6d4d3146107665780636b5f49d61461078657600080fd5b806342966c68146106c857806343a2b576146106e857806346d8efad146106fd578063585997e31461071d57600080fd5b806319165587116103c65780632a55205a116103955780632c5e02df1161037a5780632c5e02df146106805780633a98ef39146106a057806342842e0e146106b557600080fd5b80632a55205a146106215780632a8b91d41461066057600080fd5b806319165587146105a257806321fddcd5146105c257806323b872dd146105e257806324cd7c28146105f557600080fd5b8063081812fc11610402578063081812fc1461052c578063095ea7b31461054c578063163480091461055f57806318160ddd1461057f57600080fd5b806301ffc9a71461048157806304634d8d146104b657806306c8ef45146104d857806306fdde031461050a57600080fd5b3661047c577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561048d57600080fd5b506104a161049c366004613120565b610c9b565b60405190151581526020015b60405180910390f35b3480156104c257600080fd5b506104d66104d1366004613152565b610cbb565b005b3480156104e457600080fd5b50600d546001600160a01b03165b6040516001600160a01b0390911681526020016104ad565b34801561051657600080fd5b5061051f610cd1565b6040516104ad91906131ec565b34801561053857600080fd5b506104f26105473660046131ff565b610d63565b6104d661055a366004613218565b610dc0565b34801561056b57600080fd5b506104d661057a366004613244565b610e0f565b34801561058b57600080fd5b50600154600054035b6040519081526020016104ad565b3480156105ae57600080fd5b506104d66105bd366004613244565b610fa2565b3480156105ce57600080fd5b506105946105dd3660046132a8565b610fb6565b6104d66105f0366004613361565b611008565b34801561060157600080fd5b506104f2610610366004613218565b5050601a546001600160a01b031690565b34801561062d57600080fd5b5061064161063c3660046133a2565b611060565b604080516001600160a01b0390931683526020830191909152016104ad565b34801561066c57600080fd5b506104d661067b3660046133a2565b61111d565b34801561068c57600080fd5b506104d661069b366004613409565b61116f565b3480156106ac57600080fd5b50600854610594565b6104d66106c3366004613361565b61129f565b3480156106d457600080fd5b506104d66106e33660046131ff565b6112f1565b3480156106f457600080fd5b506104a16112fc565b34801561070957600080fd5b506104d661071836600461348a565b61130b565b34801561072957600080fd5b5061059461131d565b34801561073e57600080fd5b506014610594565b34801561075257600080fd5b506104f26107613660046131ff565b611335565b34801561077257600080fd5b506104d66107813660046134bf565b611340565b34801561079257600080fd5b506104d66107a13660046131ff565b611369565b3480156107b257600080fd5b5061051f611376565b3480156107c757600080fd5b50601854610594565b3480156107dc57600080fd5b506105946107eb366004613244565b611404565b3480156107fc57600080fd5b506104d661146c565b6104d66108133660046134db565b611480565b34801561082457600080fd5b506105946108333660046131ff565b6114c6565b34801561084457600080fd5b506104f26108533660046131ff565b6114d1565b34801561086457600080fd5b50600e546001600160a01b03166104f2565b34801561088257600080fd5b50610594610891366004613535565b611501565b3480156108a257600080fd5b506104d66108b136600461356a565b6115a8565b3480156108c257600080fd5b506104d66108d13660046135ed565b6116b3565b3480156108e257600080fd5b5061051f6116fa565b3480156108f757600080fd5b50610594610906366004613244565b611709565b34801561091757600080fd5b50610594610926366004613244565b6001600160a01b03166000908152600b602052604090205490565b34801561094d57600080fd5b5061059460195481565b34801561096357600080fd5b5061059460185481565b34801561097957600080fd5b506104d6610988366004613244565b611714565b34801561099957600080fd5b506104d66109a836600461348a565b61173b565b3480156109b957600080fd5b50600054610594565b3480156109ce57600080fd5b506105946109dd366004613244565b611785565b3480156109ee57600080fd5b5061051f611790565b348015610a0357600080fd5b506104d6610a1236600461365f565b61179a565b6104d6610a253660046136e0565b6117db565b348015610a3657600080fd5b50601954610594565b348015610a4b57600080fd5b506104d6610a5a3660046133a2565b611835565b348015610a6b57600080fd5b50610594610a7a3660046131ff565b611848565b348015610a8b57600080fd5b506104d6610a9a366004613244565b611853565b348015610aab57600080fd5b5061051f610aba3660046131ff565b611864565b348015610acb57600080fd5b50610594610ada366004613244565b6001600160a01b03166000908152600a602052604090205490565b348015610b0157600080fd5b506104d6610b10366004613760565b611a0b565b348015610b2157600080fd5b50610190610594565b348015610b3657600080fd5b506104a1611a1f565b348015610b4b57600080fd5b506104d6611a29565b348015610b6057600080fd5b50600954610594565b348015610b7557600080fd5b5061051f611a32565b348015610b8a57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000002610594565b348015610bbd57600080fd5b506104a1610bcc3660046137a9565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610c0657600080fd5b5061051f610c153660046131ff565b611a41565b348015610c2657600080fd5b506104d6610c35366004613244565b611a4b565b348015610c4657600080fd5b506104d6610c55366004613244565b611ad8565b348015610c6657600080fd5b50600e546104a190600160a01b900460ff1681565b348015610c8757600080fd5b506104d6610c963660046131ff565b611afe565b6000610ca682611b0c565b80610cb55750610cb582611bc8565b92915050565b610cc3611c16565b610ccd8282611c1e565b5050565b606060028054610ce0906137d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0c906137d7565b8015610d595780601f10610d2e57610100808354040283529160200191610d59565b820191906000526020600020905b815481529060010190602001808311610d3c57829003601f168201915b5050505050905090565b6000610d6e82611d38565b610da4576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b03821614610e0057600e54600160a01b900460ff1615610e0057610e0081611d5f565b610e0a8383611da3565b505050565b6001600160a01b038116610e6a5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207a65726f206164647265737300000060448201526064015b60405180910390fd5b336000908152600a6020526040902054610ec65760405162461bcd60e51b815260206004820181905260248201527f5061796d656e7453706c69747465723a206e6f206f776e6564207368617265736044820152606401610e61565b6001600160a01b0381166000908152600a602052604090205415610f525760405162461bcd60e51b815260206004820152602160248201527f5061796d656e7453706c69747465723a2070617965652068617320736861726560448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610e61565b610f5b81611e5c565b7f6829b4029cd073199f80f49556d32953c9bc4e14d395388e678d2cc4604d481933604080516001600160a01b03928316815291841660208301520160405180910390a150565b610faa611c16565b610fb381611f1e565b50565b600080805b8351811015611001576000610fd1826008613827565b858381518110610fe357610fe361383e565b602090810291909101015160ff16901b929092179150600101610fbb565b5092915050565b826001600160a01b038116331461104f57731e0049783f008a0085193e00003d00cd54003c71331461104f57600e54600160a01b900460ff161561104f5761104f33611d5f565b61105a848484612065565b50505050565b60008281526011602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046bffffffffffffffffffffffff169282019290925282916110df5750604080518082019091526010546001600160a01b0381168252600160a01b90046bffffffffffffffffffffffff1660208201525b602081015160009061271090611103906bffffffffffffffffffffffff1687613827565b61110d9190613854565b91519350909150505b9250929050565b611125611c16565b61112e82611d38565b6111655760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b610ccd8282612237565b611177611c16565b8281146111c65760405162461bcd60e51b815260206004820152600e60248201527f4172726179206d69736d617463680000000000000000000000000000000000006044820152606401610e61565b6000805b84811015611297576111f38686838181106111e7576111e761383e565b90506020020135611d38565b61122a5760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b61124b86868381811061123f5761123f61383e565b9050602002013561225b565b91508160000361128f5761128f86868381811061126a5761126a61383e565b905060200201358585848181106112835761128361383e565b90506020020135612237565b6001016111ca565b505050505050565b826001600160a01b03811633146112e657731e0049783f008a0085193e00003d00cd54003c7133146112e657600e54600160a01b900460ff16156112e6576112e633611d5f565b61105a848484612280565b610fb381600161229b565b60006113066123fe565b905090565b611313611c16565b610ccd828261240f565b600061132860015490565b6000546113069190613876565b6000610cb582612484565b611348611c16565b600061135382612504565b90506113618160018561252e565b601755505050565b611371611c16565b601555565b600f8054611383906137d7565b80601f01602080910402602001604051908101604052809291908181526020018280546113af906137d7565b80156113fc5780601f106113d1576101008083540402835291602001916113fc565b820191906000526020600020905b8154815290600101906020018083116113df57829003601f168201915b505050505081565b60006001600160a01b038216611446576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611474612557565b61147e60006125b1565b565b611488611c16565b61105a828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250889250612603915050565b6000610cb5826126a8565b6000600c82815481106114e6576114e661383e565b6000918252602090912001546001600160a01b031692915050565b60006015548414611528576040516307aa545560e21b815260048101859052602401610e61565b436115316123fe565b1561155a578262ffffff16611548601954836126c9565b6115529190613827565b9150506115a1565b6115626127c1565b15611579578262ffffff16611548601854836126c9565b60195461158f9062ffffff85169060a01c613889565b6bffffffffffffffffffffffff169150505b9392505050565b6115b06127f1565b600d546001600160a01b0316331461160a5760405162461bcd60e51b815260206004820152601a60248201527f444d3a2063616c6c6572206973206e6f742064656c65676174650000000000006044820152606401610e61565b601554851461162f576040516307aa545560e21b815260048101869052602401610e61565b6116376123fe565b156116515761164c8462ffffff16848861284a565b6116a0565b6116596127c1565b1561166e5761164c8462ffffff168488612911565b6040517f914edb0f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116aa6001601655565b50505050505050565b6116bb611c16565b610ccd82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061298792505050565b606060038054610ce0906137d7565b6000610cb582611404565b61171c611c16565b61033b80546001600160a01b0319166001600160a01b03831617905550565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b0382161461177b57600e54600160a01b900460ff161561177b5761177b81611d5f565b610e0a83836129c0565b6000610cb582612a2c565b6060611306612a6d565b6117a2611c16565b600e8054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b836001600160a01b038116331461182257731e0049783f008a0085193e00003d00cd54003c71331461182257600e54600160a01b900460ff16156118225761182233611d5f565b61182e85858585612a7c565b5050505050565b61183d611c16565b601991909155601855565b6000610cb58261225b565b61185b611c16565b610fb381612ac0565b606061186f82611d38565b6118a65760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610e61565b60006118ba601a546001600160a01b031690565b6040517f0e63540a000000000000000000000000000000000000000000000000000000008152306004820152602481018590526001600160a01b039190911690630e63540a90604401602060405180830381865afa158015611920573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194491906138b9565b9050611958601a546001600160a01b031690565b6001600160a01b031663f0f52cea30838661ffff1660106119788961225b565b901b17611984886126a8565b6040516001600160e01b031960e087901b1681526001600160a01b03909416600485015267ffffffffffffffff909216602484015260448301526064820152608401600060405180830381865afa1580156119e3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115a191908101906138e3565b611a13611c16565b600f610ccd82826139a2565b60006113066127c1565b61147e33611f1e565b606060148054610ce0906137d7565b6060610cb5611a32565b611a53612557565b6001600160a01b038116611acf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610e61565b610fb3816125b1565b611ae0611c16565b600d80546001600160a01b0319166001600160a01b03831617905550565b611b06611c16565b61033c55565b60006001600160e01b031982167f8fb5170e000000000000000000000000000000000000000000000000000000001480611b6f57506001600160e01b031982167ff1c6898200000000000000000000000000000000000000000000000000000000145b80611ba357506001600160e01b031982167f8e02724400000000000000000000000000000000000000000000000000000000145b15611bb057506001919050565b611bb982612aef565b80610cb55750610cb582612b6f565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610cb557506301ffc9a760e01b6001600160e01b0319831614610cb5565b61147e612bad565b6127106bffffffffffffffffffffffff82161115611ca45760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610e61565b6001600160a01b038216611cfa5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610e61565b604080518082019091526001600160a01b039092168083526bffffffffffffffffffffffff9091166020909201829052600160a01b90910217601055565b6000805482108015610cb5575050600090815260046020526040902054600160e01b161590565b69c617113400112233445560005230601a5280603a52600080604460166daaeb6d7670e522a718067333cd4e5afa611d9b573d6000803e3d6000fd5b6000603a5250565b6000611dae82611335565b9050336001600160a01b03821614611e0057611dca8133610bcc565b611e00576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600c54600003611e695750565b60005b600c54611e7b90600190613876565b811015610ccd57336001600160a01b0316600c8281548110611e9f57611e9f61383e565b6000918252602090912001546001600160a01b031603611f165781600c8281548110611ecd57611ecd61383e565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905533808352600a90915260408083208054948716845290832093909355815290555b600101611e6c565b6001600160a01b0381166000908152600a6020526040902054611f835760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207368617265730000000000006044820152606401610e61565b6000611f8e82612a2c565b905080600003611fe05760405162461bcd60e51b815260206004820181905260248201527f5061796d656e7453706c69747465723a206e6f7420647565207061796d656e746044820152606401610e61565b8060096000828254611ff29190613a62565b90915550506001600160a01b0382166000908152600b6020526040902080548201905561201f8282612bf1565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b600061207082612484565b9050836001600160a01b0316816001600160a01b0316146120bd576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260066020526040902080546120e98187335b6001600160a01b039081169116811491141790565b612114576120f78633610bcc565b61211457604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516612154576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561215f57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036121f1576001840160008181526004602052604081205490036121ef5760005481146121ef5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611297565b80601b83610190811061224c5761224c61383e565b60020201600101819055505050565b6000601b8261019081106122715761227161383e565b60020201600101549050919050565b610e0a838383604051806020016040528060008152506117db565b60006122a683612484565b9050806000806122c486600090815260066020526040902080549091565b915091508415612304576122d98184336120d4565b612304576122e78333610bcc565b61230457604051632ce44b5f60e11b815260040160405180910390fd5b801561230f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b177c030000000000000000000000000000000000000000000000000000000017600087815260046020526040812091909155600160e11b851690036123b6576001860160008181526004602052604081205490036123b45760005481146123b45760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b601754600090611306906001612d0a565b6001600160a01b0390911690637d3e3dbe8161243c57826124355750634420e48661243c565b5063a0af29035b8060e01b60005230600452826024526004600060446000806daaeb6d7670e522a718067333cd4e5af161247a578060005160e01c0361247a57600080fd5b5060006024525050565b6000816000548110156124d25760008181526004602052604081205490600160e01b821690036124d0575b806000036115a15750600019016000818152600460205260409020546124af565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806115a1817f0000000000000000000000000000000000000000000000000000000000000002855b6000811561254657506001821b9290921791826115a1565b506001821b199290921691826115a1565b600e546001600160a01b0316331461147e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e61565b600e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8015806126105750601481115b1561263157604051635fb5f8f560e11b815260048101829052602401610e61565b6101908183516126419190613827565b60005461264e9190613a62565b11156126715760405163df193cf160e01b81526101906004820152602401610e61565b60005b8251811015610e0a576126a08382815181106126925761269261383e565b602002602001015183612d2c565b600101612674565b6000601b8261019081106126be576126be61383e565b600202015492915050565b600060a083901c604084901c6bffffffffffffffffffffffff1663ffffffff602086901c81169086168086106127055782945050505050610cb5565b8186116127185783945050505050610cb5565b61033c546000908061272a858a613876565b6127349190613854565b61273e9190613827565b9050600061033c5484846127529190613876565b61275c9190613854565b9050600061033c548261276f9190613827565b61277b84612710613827565b6127859190613854565b905061271081612795888a613876565b61279f9190613827565b6127a99190613854565b6127b39088613876565b975050505050505050610cb5565b601754600090611306907f0000000000000000000000000000000000000000000000000000000000000002612d0a565b6002601654036128435760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610e61565b6002601655565b8215806128575750601483115b1561287857604051635fb5f8f560e11b815260048101849052602401610e61565b6101908361288560005490565b61288f9190613a62565b11156128b25760405163df193cf160e01b81526101906004820152602401610e61565b60006128c0601954436126c9565b90506128cc8482613827565b8314612907576040517f0e2e092600000000000000000000000000000000000000000000000000000000815260048101849052602401610e61565b61105a8285612d2c565b82158061291e5750601483115b1561293f57604051635fb5f8f560e11b815260048101849052602401610e61565b6101908361294c60005490565b6129569190613a62565b11156129795760405163df193cf160e01b81526101906004820152602401610e61565b60006128c0601854436126c9565b601461299382826139a2565b506040517fa5d4097edda6d87cb9329af83fb3712ef77eeb13738ffe43cc35a4ce305ad96290600090a150565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080612a3860095490565b612a429047613a62565b90506115a18382612a68866001600160a01b03166000908152600b602052604090205490565b612d7d565b6060600f8054610ce0906137d7565b612a87848484611008565b6001600160a01b0383163b1561105a57612aa384848484612dbb565b61105a576040516368d2bf6b60e11b815260040160405180910390fd5b6001600160a01b03811615610fb357601a80546001600160a01b0383166001600160a01b031990911617905550565b60006301ffc9a760e01b6001600160e01b031983161480612b3957507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b80610cb55750506001600160e01b0319167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60006001600160e01b031982167fe8a3d485000000000000000000000000000000000000000000000000000000001480610cb55750610cb582611bc8565b600e546001600160a01b0316331461147e576040517f6db2465f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80471015612c415760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610e61565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612c8e576040519150601f19603f3d011682016040523d82523d6000602084013e612c93565b606091505b5050905080610e0a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610e61565b6000600183831c8116908114612d21576000612d24565b60015b949350505050565b600054612d398383612ea6565b612d4281612ec0565b6001821115610e0a576000612d58826001613a62565b90505b612d658383613a62565b81101561105a57612d7581612ec0565b600101612d5b565b6008546001600160a01b0384166000908152600a602052604081205490918391612da79086613827565b612db19190613854565b612d249190613876565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612df0903390899088908890600401613a75565b6020604051808303816000875af1925050508015612e2b575060408051601f3d908101601f19168201909252612e2891810190613ab1565b60015b612e89573d808015612e59576040519150601f19603f3d011682016040523d82523d6000602084013e612e5e565b606091505b508051600003612e81576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b610ccd828260405180602001604052806000815250612f73565b61033b546001600160a01b03166040517fdce397d2000000000000000000000000000000000000000000000000000000008152306004820152602481018390526001600160a01b03919091169063dce397d290604401602060405180830381865afa158015612f33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f579190613ace565b601b826101908110612f6b57612f6b61383e565b600202015550565b612f7d8383612fd9565b6001600160a01b0383163b15610e0a576000548281035b612fa76000868380600101945086612dbb565b612fc4576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f9457816000541461182e57600080fd5b6000805490829003613017576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146130c657808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a460010161308e565b5081600003613101576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005550505050565b6001600160e01b031981168114610fb357600080fd5b60006020828403121561313257600080fd5b81356115a18161310a565b6001600160a01b0381168114610fb357600080fd5b6000806040838503121561316557600080fd5b82356131708161313d565b915060208301356bffffffffffffffffffffffff8116811461319157600080fd5b809150509250929050565b60005b838110156131b757818101518382015260200161319f565b50506000910152565b600081518084526131d881602086016020860161319c565b601f01601f19169290920160200192915050565b6020815260006115a160208301846131c0565b60006020828403121561321157600080fd5b5035919050565b6000806040838503121561322b57600080fd5b82356132368161313d565b946020939093013593505050565b60006020828403121561325657600080fd5b81356115a18161313d565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156132a0576132a0613261565b604052919050565b600060208083850312156132bb57600080fd5b823567ffffffffffffffff808211156132d357600080fd5b818501915085601f8301126132e757600080fd5b8135818111156132f9576132f9613261565b8060051b915061330a848301613277565b818152918301840191848101908884111561332457600080fd5b938501935b83851015613355578435925060ff831683146133455760008081fd5b8282529385019390850190613329565b98975050505050505050565b60008060006060848603121561337657600080fd5b83356133818161313d565b925060208401356133918161313d565b929592945050506040919091013590565b600080604083850312156133b557600080fd5b50508035926020909101359150565b60008083601f8401126133d657600080fd5b50813567ffffffffffffffff8111156133ee57600080fd5b6020830191508360208260051b850101111561111657600080fd5b6000806000806040858703121561341f57600080fd5b843567ffffffffffffffff8082111561343757600080fd5b613443888389016133c4565b9096509450602087013591508082111561345c57600080fd5b50613469878288016133c4565b95989497509550505050565b8035801515811461348557600080fd5b919050565b6000806040838503121561349d57600080fd5b82356134a88161313d565b91506134b660208401613475565b90509250929050565b600080604083850312156134d257600080fd5b6134a883613475565b600080600080606085870312156134f157600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561351657600080fd5b613469878288016133c4565b803562ffffff8116811461348557600080fd5b60008060006060848603121561354a57600080fd5b833592506020840135915061356160408501613522565b90509250925092565b600080600080600080600060e0888a03121561358557600080fd5b873564ffffffffff8116811461359a57600080fd5b965060208801356135aa8161313d565b9550604088013594506135bf60608901613522565b93506080880135925060a08801356135d68161313d565b8092505060c0880135905092959891949750929550565b6000806020838503121561360057600080fd5b823567ffffffffffffffff8082111561361857600080fd5b818501915085601f83011261362c57600080fd5b81358181111561363b57600080fd5b86602082850101111561364d57600080fd5b60209290920196919550909350505050565b60006020828403121561367157600080fd5b6115a182613475565b600067ffffffffffffffff82111561369457613694613261565b50601f01601f191660200190565b60006136b56136b08461367a565b613277565b90508281528383830111156136c957600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136f657600080fd5b84356137018161313d565b935060208501356137118161313d565b925060408501359150606085013567ffffffffffffffff81111561373457600080fd5b8501601f8101871361374557600080fd5b613754878235602084016136a2565b91505092959194509250565b60006020828403121561377257600080fd5b813567ffffffffffffffff81111561378957600080fd5b8201601f8101841361379a57600080fd5b612d24848235602084016136a2565b600080604083850312156137bc57600080fd5b82356137c78161313d565b915060208301356131918161313d565b600181811c908216806137eb57607f821691505b60208210810361380b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610cb557610cb5613811565b634e487b7160e01b600052603260045260246000fd5b60008261387157634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610cb557610cb5613811565b6bffffffffffffffffffffffff8181168382160280821691908281146138b1576138b1613811565b505092915050565b6000602082840312156138cb57600080fd5b815167ffffffffffffffff811681146115a157600080fd5b6000602082840312156138f557600080fd5b815167ffffffffffffffff81111561390c57600080fd5b8201601f8101841361391d57600080fd5b805161392b6136b08261367a565b81815285602083850101111561394057600080fd5b61395182602083016020860161319c565b95945050505050565b601f821115610e0a576000816000526020600020601f850160051c810160208610156139835750805b601f850160051c820191505b818110156112975782815560010161398f565b815167ffffffffffffffff8111156139bc576139bc613261565b6139d0816139ca84546137d7565b8461395a565b602080601f831160018114613a0557600084156139ed5750858301515b600019600386901b1c1916600185901b178555611297565b600085815260208120601f198616915b82811015613a3457888601518255948401946001909101908401613a15565b5085821015613a525787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115610cb557610cb5613811565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613aa760808301846131c0565b9695505050505050565b600060208284031215613ac357600080fd5b81516115a18161310a565b600060208284031215613ae057600080fd5b505191905056fea26469706673582212202350bd4346c1b8c2940db9fdd71166333712e8163ca481bb79672701dbfddbfb64736f6c63430008160033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.