ETH Price: $3,081.13 (+1.06%)
Gas: 4 Gwei

Token

Santa Fe NFT x Stacey Sullivan De Maldonado: In Lo... (SFNFT)
 

Overview

Max Total Supply

32 SFNFT

Holders

0

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
1 SFNFT

Value
$0.00
0xf9baaf3ef352abdea88314a73a023c08ba4e0137
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:
ERC721ACWithBasicRoyalties

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 26 : ERC721ACWithBasicRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@limitbreak/creator-token-contracts/contracts/erc721c/ERC721AC.sol";
import "@limitbreak/creator-token-contracts/contracts/access/OwnableBasic.sol";
import "@limitbreak/creator-token-contracts/contracts/programmable-royalties/BasicRoyalties.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

// Powered by https://nalikes.com
contract ERC721ACWithBasicRoyalties is OwnableBasic, ERC721AC, BasicRoyalties {
    using Strings for uint256;

    uint256 public maxSupply = 999;
    // public,allowlist,pass
    uint256[] public prices = [0.155 ether, 0.13 ether, 0.1 ether];

    string public baseURI;
    string public uriSuffix;
    string public hiddenURI;

    bool public paused = false;
    bool public publicMintEnabled = false;
    bool public allowlistMintEnabled = false;
    bool public passMintEnabled = true;

    bool public revealed = false;

    bytes32 public merkleRoot;

    address public passContract;
    address public treasury;
    address public artist;
    address public sfnft;

    constructor(address royaltyReceiver_, uint96 royaltyFeeNumerator_, string memory name_, string memory symbol_) 
        ERC721AC(name_, symbol_) 
        BasicRoyalties(royaltyReceiver_, royaltyFeeNumerator_) Ownable(msg.sender) {}

    //******************************* MODIFIERS

    modifier notPaused() {
        require(!paused, "The contract is paused!");
        _;
    }

    modifier mintCompliance(uint256 quantity) {
        require(_totalMinted() + quantity <= maxSupply, "Max Supply Exceeded.");
        _;
    }
    
    //******************************* OVERRIDES

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }

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

    //******************************* ROYALTY

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public {
        _requireCallerIsContractOwner();
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public {
        _requireCallerIsContractOwner();
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    //******************************* MINT

    function mintPublic(address to, uint256 quantity) external payable notPaused
        mintCompliance(quantity) {
            require(publicMintEnabled, "Public mint is disabled!");
            require(msg.value >= prices[0] * quantity, "Insufficient funds.");
            _safeMint(to, quantity);
    }

    function mintAllowlist(uint256 quantity, bytes32[] calldata proof) external payable notPaused
        mintCompliance(quantity) {
            require(allowlistMintEnabled, "Allowlist mint is disabled!");
            require(msg.value >= prices[1] * quantity, "Insufficient funds.");

            bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
            require(MerkleProof.verify(proof, merkleRoot, leaf), "Not a valid proof!");

            _safeMint(_msgSender(), quantity);
    }

    function mintPass(uint256 quantity) external payable notPaused
        mintCompliance(quantity) {
            require(passMintEnabled, "Pass mint is disabled!");
            require(msg.value >= prices[2] * quantity, "Insufficient funds.");

            require(checkElligibility(_msgSender()), "Address does not hold Pass!");

            _safeMint(_msgSender(), quantity);
    }

    function mintAdmin(address to, uint256 quantity) external onlyOwner mintCompliance(quantity) {
        _safeMint(to, quantity);
    }

    //******************************* ADMIN

    function setMaxSupply(uint256 _supply) external onlyOwner {
        require(_supply >= _totalMinted() && _supply <= maxSupply, "Invalid Max Supply.");
        maxSupply = _supply;
    }

    function setPrices(uint256[] calldata _prices) public onlyOwner {
        prices = _prices;
    }

    function setHiddenURI(string memory _uri) external onlyOwner {
        hiddenURI = _uri;
    }

    function setBaseURI(string memory _uri) external onlyOwner {
        baseURI = _uri;
    }

    function setUriSuffix(string memory _suffix) external onlyOwner {
        uriSuffix = _suffix;
    }

    function setRevealed(bool _state) public onlyOwner {
        revealed = _state;
    }

    function setPaused(bool _state) public onlyOwner {
        paused = _state;
    }

    function setPublicMintEnabled(bool _state) public onlyOwner {
        publicMintEnabled = _state;
    }

    function setAllowlistMintEnabled(bool _state) public onlyOwner {
        allowlistMintEnabled = _state;
    }

    function setPassMintEnabled(bool _state) public onlyOwner {
        passMintEnabled = _state;
    }

    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
    }

    function setPassContract(address _contract) public onlyOwner {
        passContract = _contract;
    }

    function setTreasury(address _recipient) public onlyOwner {
        require(_recipient != address(0), "Cannot be the 0 address!");
        treasury = _recipient;
    }

    function setArtist(address _recipient) public onlyOwner {
        require(_recipient != address(0), "Cannot be the 0 address!");
        artist = _recipient;
    }

    function setSfnft(address _recipient) public onlyOwner {
        require(_recipient != address(0), "Cannot be the 0 address!");
        sfnft = _recipient;
    }

    //******************************* VIEWS

    function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
        require(_exists(_tokenId), "URI query for nonexistent token");

        if (revealed == false) {
            return hiddenURI;
        }

        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, _tokenId.toString(), uriSuffix)) : "";    
    }

    function tokensOfOwner(address owner) external view virtual returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }

    function checkElligibility(address _address) public view returns (bool) {
        IERC721A token = IERC721A(passContract);
        return token.balanceOf(_address) > 0;
    }

    //******************************* WITHDRAW

    function withdrawTreasury(uint256 _amount) public onlyOwner {
            
        require(treasury != address(0), "Cannot be the 0 address!");
        
        uint256 balance = address(this).balance;

        require(_amount <= balance, "Incorrect Amount");

        bool success;
        (success, ) = payable(treasury).call{value: _amount}("");
        require(success, "Transaction Unsuccessful");
    }

    function withdrawAll() public onlyOwner {
        
        require(artist != address(0), "1 Cannot be the 0 address!");
        require(sfnft != address(0), "2 Cannot be the 0 address!");
        
        uint256 balance = address(this).balance;

        bool success;

        (success, ) = payable(artist).call{value: ((balance * 85) / 100)}("");
        require(success, "1 Transaction Unsuccessful");
        (success, ) = payable(sfnft).call{value: ((balance * 15) / 100)}("");
        require(success, "2 Transaction Unsuccessful");
    }
}

File 2 of 26 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 3 of 26 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

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

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @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), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(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) {
        uint256 localValue = value;
        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] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 4 of 26 : BasicRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/common/ERC2981.sol";

/**
 * @title BasicRoyaltiesBase
 * @author Limit Break, Inc.
 * @dev Base functionality of an NFT mix-in contract implementing the most basic form of programmable royalties.
 */
abstract contract BasicRoyaltiesBase is ERC2981 {

    event DefaultRoyaltySet(address indexed receiver, uint96 feeNumerator);
    event TokenRoyaltySet(uint256 indexed tokenId, address indexed receiver, uint96 feeNumerator);

    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual override {
        super._setDefaultRoyalty(receiver, feeNumerator);
        emit DefaultRoyaltySet(receiver, feeNumerator);
    }

    function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual override {
        super._setTokenRoyalty(tokenId, receiver, feeNumerator);
        emit TokenRoyaltySet(tokenId, receiver, feeNumerator);
    }
}

/**
 * @title BasicRoyalties
 * @author Limit Break, Inc.
 * @notice Constructable BasicRoyalties Contract implementation.
 */
abstract contract BasicRoyalties is BasicRoyaltiesBase {
    constructor(address receiver, uint96 feeNumerator) {
        _setDefaultRoyalty(receiver, feeNumerator);
    }
}

/**
 * @title BasicRoyaltiesInitializable
 * @author Limit Break, Inc.
 * @notice Initializable BasicRoyalties Contract implementation to allow for EIP-1167 clones. 
 */
abstract contract BasicRoyaltiesInitializable is BasicRoyaltiesBase {}

File 5 of 26 : OwnableBasic.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "./OwnablePermissions.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract OwnableBasic is OwnablePermissions, Ownable {
    function _requireCallerIsContractOwner() internal view virtual override {
        _checkOwner();
    }
}

File 6 of 26 : ERC721AC.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../utils/CreatorTokenBase.sol";
import "erc721a/contracts/ERC721A.sol";

/**
 * @title ERC721AC
 * @author Limit Break, Inc.
 * @notice Extends Azuki's ERC721-A implementation with Creator Token functionality, which
 *         allows the contract owner to update the transfer validation logic by managing a security policy in
 *         an external transfer validation security policy registry.  See {CreatorTokenTransferValidator}.
 */
abstract contract ERC721AC is ERC721A, CreatorTokenBase {

    constructor(string memory name_, string memory symbol_) CreatorTokenBase() ERC721A(name_, symbol_) {}

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(ICreatorToken).interfaceId || super.supportsInterface(interfaceId);
    }

    /// @dev Ties the erc721a _beforeTokenTransfers hook to more granular transfer validation logic
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override {
        for (uint256 i = 0; i < quantity;) {
            _validateBeforeTransfer(from, to, startTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    /// @dev Ties the erc721a _afterTokenTransfer hook to more granular transfer validation logic
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override {
        for (uint256 i = 0; i < quantity;) {
            _validateAfterTransfer(from, to, startTokenId + i);
            unchecked {
                ++i;
            }
        }
    }

    function _msgSenderERC721A() internal view virtual override returns (address) {
        return _msgSender();
    }
}

File 7 of 26 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

/**
 * @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 8 of 26 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (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 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                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.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 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.

            uint256 twos = denominator & (0 - denominator);
            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 (unsignedRoundsUp(rounding) && 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
     * towards zero.
     *
     * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 9 of 26 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.20;

import {IERC2981} from "../../interfaces/IERC2981.sol";
import {IERC165, ERC165} from "../../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.
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

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

    /**
     * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator);

    /**
     * @dev The default royalty receiver is invalid.
     */
    error ERC2981InvalidDefaultRoyaltyReceiver(address receiver);

    /**
     * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1).
     */
    error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator);

    /**
     * @dev The royalty receiver for `tokenId` is invalid.
     */
    error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver);

    /**
     * @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 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 {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidDefaultRoyaltyReceiver(address(0));
        }

        _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 {
        uint256 denominator = _feeDenominator();
        if (feeNumerator > denominator) {
            // Royalty fee will exceed the sale price
            revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator);
        }
        if (receiver == address(0)) {
            revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0));
        }

        _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 10 of 26 : 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 11 of 26 : CreatorTokenBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../access/OwnablePermissions.sol";
import "../interfaces/ICreatorToken.sol";
import "../interfaces/ICreatorTokenTransferValidator.sol";
import "../utils/TransferValidation.sol";
import "@openzeppelin/contracts/interfaces/IERC165.sol";

/**
 * @title CreatorTokenBase
 * @author Limit Break, Inc.
 * @notice CreatorTokenBase is an abstract contract that provides basic functionality for managing token 
 * transfer policies through an implementation of ICreatorTokenTransferValidator. This contract is intended to be used
 * as a base for creator-specific token contracts, enabling customizable transfer restrictions and security policies.
 *
 * <h4>Features:</h4>
 * <ul>Ownable: This contract can have an owner who can set and update the transfer validator.</ul>
 * <ul>TransferValidation: Implements the basic token transfer validation interface.</ul>
 * <ul>ICreatorToken: Implements the interface for creator tokens, providing view functions for token security policies.</ul>
 *
 * <h4>Benefits:</h4>
 * <ul>Provides a flexible and modular way to implement custom token transfer restrictions and security policies.</ul>
 * <ul>Allows creators to enforce policies such as whitelisted operators and permitted contract receivers.</ul>
 * <ul>Can be easily integrated into other token contracts as a base contract.</ul>
 *
 * <h4>Intended Usage:</h4>
 * <ul>Use as a base contract for creator token implementations that require advanced transfer restrictions and 
 *   security policies.</ul>
 * <ul>Set and update the ICreatorTokenTransferValidator implementation contract to enforce desired policies for the 
 *   creator token.</ul>
 */
abstract contract CreatorTokenBase is OwnablePermissions, TransferValidation, ICreatorToken {
    
    error CreatorTokenBase__InvalidTransferValidatorContract();
    error CreatorTokenBase__SetTransferValidatorFirst();

    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x0000721C310194CcfC01E523fc93C9cCcFa2A0Ac);
    TransferSecurityLevels public constant DEFAULT_TRANSFER_SECURITY_LEVEL = TransferSecurityLevels.One;
    uint120 public constant DEFAULT_OPERATOR_WHITELIST_ID = uint120(1);

    ICreatorTokenTransferValidator private transferValidator;

    /**
     * @notice Allows the contract owner to set the transfer validator to the official validator contract
     *         and set the security policy to the recommended default settings.
     * @dev    May be overridden to change the default behavior of an individual collection.
     */
    function setToDefaultSecurityPolicy() public virtual {
        _requireCallerIsContractOwner();
        setTransferValidator(DEFAULT_TRANSFER_VALIDATOR);
        ICreatorTokenTransferValidator(DEFAULT_TRANSFER_VALIDATOR).setTransferSecurityLevelOfCollection(address(this), DEFAULT_TRANSFER_SECURITY_LEVEL);
        ICreatorTokenTransferValidator(DEFAULT_TRANSFER_VALIDATOR).setOperatorWhitelistOfCollection(address(this), DEFAULT_OPERATOR_WHITELIST_ID);
    }

    /**
     * @notice Allows the contract owner to set the transfer validator to a custom validator contract
     *         and set the security policy to their own custom settings.
     */
    function setToCustomValidatorAndSecurityPolicy(
        address validator, 
        TransferSecurityLevels level, 
        uint120 operatorWhitelistId, 
        uint120 permittedContractReceiversAllowlistId) public {
        _requireCallerIsContractOwner();

        setTransferValidator(validator);

        ICreatorTokenTransferValidator(validator).
            setTransferSecurityLevelOfCollection(address(this), level);

        ICreatorTokenTransferValidator(validator).
            setOperatorWhitelistOfCollection(address(this), operatorWhitelistId);

        ICreatorTokenTransferValidator(validator).
            setPermittedContractReceiverAllowlistOfCollection(address(this), permittedContractReceiversAllowlistId);
    }

    /**
     * @notice Allows the contract owner to set the security policy to their own custom settings.
     * @dev    Reverts if the transfer validator has not been set.
     */
    function setToCustomSecurityPolicy(
        TransferSecurityLevels level, 
        uint120 operatorWhitelistId, 
        uint120 permittedContractReceiversAllowlistId) public {
        _requireCallerIsContractOwner();

        ICreatorTokenTransferValidator validator = getTransferValidator();
        if (address(validator) == address(0)) {
            revert CreatorTokenBase__SetTransferValidatorFirst();
        }

        validator.setTransferSecurityLevelOfCollection(address(this), level);
        validator.setOperatorWhitelistOfCollection(address(this), operatorWhitelistId);
        validator.setPermittedContractReceiverAllowlistOfCollection(address(this), permittedContractReceiversAllowlistId);
    }

    /**
     * @notice Sets the transfer validator for the token contract.
     *
     * @dev    Throws when provided validator contract is not the zero address and doesn't support 
     *         the ICreatorTokenTransferValidator interface. 
     * @dev    Throws when the caller is not the contract owner.
     *
     * @dev    <h4>Postconditions:</h4>
     *         1. The transferValidator address is updated.
     *         2. The `TransferValidatorUpdated` event is emitted.
     *
     * @param transferValidator_ The address of the transfer validator contract.
     */
    function setTransferValidator(address transferValidator_) public {
        _requireCallerIsContractOwner();

        bool isValidTransferValidator = false;

        if(transferValidator_.code.length > 0) {
            try IERC165(transferValidator_).supportsInterface(type(ICreatorTokenTransferValidator).interfaceId) 
                returns (bool supportsInterface) {
                isValidTransferValidator = supportsInterface;
            } catch {}
        }

        if(transferValidator_ != address(0) && !isValidTransferValidator) {
            revert CreatorTokenBase__InvalidTransferValidatorContract();
        }

        emit TransferValidatorUpdated(address(transferValidator), transferValidator_);

        transferValidator = ICreatorTokenTransferValidator(transferValidator_);
    }

    /**
     * @notice Returns the transfer validator contract address for this token contract.
     */
    function getTransferValidator() public view override returns (ICreatorTokenTransferValidator) {
        return transferValidator;
    }

    /**
     * @notice Returns the security policy for this token contract, which includes:
     *         Transfer security level, operator whitelist id, permitted contract receiver allowlist id.
     */
    function getSecurityPolicy() public view override returns (CollectionSecurityPolicy memory) {
        if (address(transferValidator) != address(0)) {
            return transferValidator.getCollectionSecurityPolicy(address(this));
        }

        return CollectionSecurityPolicy({
            transferSecurityLevel: TransferSecurityLevels.Zero,
            operatorWhitelistId: 0,
            permittedContractReceiversId: 0
        });
    }

    /**
     * @notice Returns the list of all whitelisted operators for this token contract.
     * @dev    This can be an expensive call and should only be used in view-only functions.
     */
    function getWhitelistedOperators() public view override returns (address[] memory) {
        if (address(transferValidator) != address(0)) {
            return transferValidator.getWhitelistedOperators(
                transferValidator.getCollectionSecurityPolicy(address(this)).operatorWhitelistId);
        }

        return new address[](0);
    }

    /**
     * @notice Returns the list of permitted contract receivers for this token contract.
     * @dev    This can be an expensive call and should only be used in view-only functions.
     */
    function getPermittedContractReceivers() public view override returns (address[] memory) {
        if (address(transferValidator) != address(0)) {
            return transferValidator.getPermittedContractReceivers(
                transferValidator.getCollectionSecurityPolicy(address(this)).permittedContractReceiversId);
        }

        return new address[](0);
    }

    /**
     * @notice Checks if an operator is whitelisted for this token contract.
     * @param operator The address of the operator to check.
     */
    function isOperatorWhitelisted(address operator) public view override returns (bool) {
        if (address(transferValidator) != address(0)) {
            return transferValidator.isOperatorWhitelisted(
                transferValidator.getCollectionSecurityPolicy(address(this)).operatorWhitelistId, operator);
        }

        return false;
    }

    /**
     * @notice Checks if a contract receiver is permitted for this token contract.
     * @param receiver The address of the receiver to check.
     */
    function isContractReceiverPermitted(address receiver) public view override returns (bool) {
        if (address(transferValidator) != address(0)) {
            return transferValidator.isContractReceiverPermitted(
                transferValidator.getCollectionSecurityPolicy(address(this)).permittedContractReceiversId, receiver);
        }

        return false;
    }

    /**
     * @notice Determines if a transfer is allowed based on the token contract's security policy.  Use this function
     *         to simulate whether or not a transfer made by the specified `caller` from the `from` address to the `to`
     *         address would be allowed by this token's security policy.
     *
     * @notice This function only checks the security policy restrictions and does not check whether token ownership
     *         or approvals are in place. 
     *
     * @param caller The address of the simulated caller.
     * @param from   The address of the sender.
     * @param to     The address of the receiver.
     * @return       True if the transfer is allowed, false otherwise.
     */
    function isTransferAllowed(address caller, address from, address to) public view override returns (bool) {
        if (address(transferValidator) != address(0)) {
            try transferValidator.applyCollectionTransferPolicy(caller, from, to) {
                return true;
            } catch {
                return false;
            }
        }
        return true;
    }

    /**
     * @dev Pre-validates a token transfer, reverting if the transfer is not allowed by this token's security policy.
     *      Inheriting contracts are responsible for overriding the _beforeTokenTransfer function, or its equivalent
     *      and calling _validateBeforeTransfer so that checks can be properly applied during token transfers.
     *
     * @dev Throws when the transfer doesn't comply with the collection's transfer policy, if the transferValidator is
     *      set to a non-zero address.
     *
     * @param caller  The address of the caller.
     * @param from    The address of the sender.
     * @param to      The address of the receiver.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 /*tokenId*/, 
        uint256 /*value*/) internal virtual override {
        if (address(transferValidator) != address(0)) {
            transferValidator.applyCollectionTransferPolicy(caller, from, to);
        }
    }
}

File 12 of 26 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 13 of 26 : OwnablePermissions.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";

abstract contract OwnablePermissions is Context {
    function _requireCallerIsContractOwner() internal view virtual;
}

File 14 of 26 : 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);
}

File 15 of 26 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 16 of 26 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../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.
 */
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 17 of 26 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 18 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../utils/introspection/IERC165.sol";

File 19 of 26 : TransferValidation.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Context.sol";

/**
 * @title TransferValidation
 * @author Limit Break, Inc.
 * @notice A mix-in that can be combined with ERC-721 contracts to provide more granular hooks.
 * Openzeppelin's ERC721 contract only provides hooks for before and after transfer.  This allows
 * developers to validate or customize transfers within the context of a mint, a burn, or a transfer.
 */
abstract contract TransferValidation is Context {
    
    error ShouldNotMintToBurnAddress();

    /// @dev Inheriting contracts should call this function in the _beforeTokenTransfer function to get more granular hooks.
    function _validateBeforeTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Inheriting contracts should call this function in the _afterTokenTransfer function to get more granular hooks.
    function _validateAfterTransfer(address from, address to, uint256 tokenId) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _postValidateMint(_msgSender(), to, tokenId, msg.value);
        } else if(toZeroAddress) {
            _postValidateBurn(_msgSender(), from, tokenId, msg.value);
        } else {
            _postValidateTransfer(_msgSender(), from, to, tokenId, msg.value);
        }
    }

    /// @dev Optional validation hook that fires before a mint
    function _preValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a mint
    function _postValidateMint(address caller, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a burn
    function _preValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a burn
    function _postValidateBurn(address caller, address from, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires before a transfer
    function _preValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}

    /// @dev Optional validation hook that fires after a transfer
    function _postValidateTransfer(address caller, address from, address to, uint256 tokenId, uint256 value) internal virtual {}
}

File 20 of 26 : ICreatorTokenTransferValidator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./IEOARegistry.sol";
import "./ITransferSecurityRegistry.sol";
import "./ITransferValidator.sol";

interface ICreatorTokenTransferValidator is ITransferSecurityRegistry, ITransferValidator, IEOARegistry {}

File 21 of 26 : ICreatorToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../interfaces/ICreatorTokenTransferValidator.sol";

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

    function getTransferValidator() external view returns (ICreatorTokenTransferValidator);
    function getSecurityPolicy() external view returns (CollectionSecurityPolicy memory);
    function getWhitelistedOperators() external view returns (address[] memory);
    function getPermittedContractReceivers() external view returns (address[] memory);
    function isOperatorWhitelisted(address operator) external view returns (bool);
    function isContractReceiverPermitted(address receiver) external view returns (bool);
    function isTransferAllowed(address caller, address from, address to) external view returns (bool);
}

File 22 of 26 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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 23 of 26 : ITransferValidator.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../utils/TransferPolicy.sol";

interface ITransferValidator {
    function applyCollectionTransferPolicy(address caller, address from, address to) external view;
}

File 24 of 26 : ITransferSecurityRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "../utils/TransferPolicy.sol";

interface ITransferSecurityRegistry {
    event AddedToAllowlist(AllowlistTypes indexed kind, uint256 indexed id, address indexed account);
    event CreatedAllowlist(AllowlistTypes indexed kind, uint256 indexed id, string indexed name);
    event ReassignedAllowlistOwnership(AllowlistTypes indexed kind, uint256 indexed id, address indexed newOwner);
    event RemovedFromAllowlist(AllowlistTypes indexed kind, uint256 indexed id, address indexed account);
    event SetAllowlist(AllowlistTypes indexed kind, address indexed collection, uint120 indexed id);
    event SetTransferSecurityLevel(address indexed collection, TransferSecurityLevels level);

    function createOperatorWhitelist(string calldata name) external returns (uint120);
    function createPermittedContractReceiverAllowlist(string calldata name) external returns (uint120);
    function reassignOwnershipOfOperatorWhitelist(uint120 id, address newOwner) external;
    function reassignOwnershipOfPermittedContractReceiverAllowlist(uint120 id, address newOwner) external;
    function renounceOwnershipOfOperatorWhitelist(uint120 id) external;
    function renounceOwnershipOfPermittedContractReceiverAllowlist(uint120 id) external;
    function setTransferSecurityLevelOfCollection(address collection, TransferSecurityLevels level) external;
    function setOperatorWhitelistOfCollection(address collection, uint120 id) external;
    function setPermittedContractReceiverAllowlistOfCollection(address collection, uint120 id) external;
    function addOperatorToWhitelist(uint120 id, address operator) external;
    function addPermittedContractReceiverToAllowlist(uint120 id, address receiver) external;
    function removeOperatorFromWhitelist(uint120 id, address operator) external;
    function removePermittedContractReceiverFromAllowlist(uint120 id, address receiver) external;
    function getCollectionSecurityPolicy(address collection) external view returns (CollectionSecurityPolicy memory);
    function getWhitelistedOperators(uint120 id) external view returns (address[] memory);
    function getPermittedContractReceivers(uint120 id) external view returns (address[] memory);
    function isOperatorWhitelisted(uint120 id, address operator) external view returns (bool);
    function isContractReceiverPermitted(uint120 id, address receiver) external view returns (bool);
}

File 25 of 26 : IEOARegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface IEOARegistry is IERC165 {
    function isVerifiedEOA(address account) external view returns (bool);
}

File 26 of 26 : TransferPolicy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

enum AllowlistTypes {
    Operators,
    PermittedContractReceivers
}

enum ReceiverConstraints {
    None,
    NoCode,
    EOA
}

enum CallerConstraints {
    None,
    OperatorWhitelistEnableOTC,
    OperatorWhitelistDisableOTC
}

enum StakerConstraints {
    None,
    CallerIsTxOrigin,
    EOA
}

enum TransferSecurityLevels {
    Zero,
    One,
    Two,
    Three,
    Four,
    Five,
    Six
}

struct TransferSecurityPolicy {
    CallerConstraints callerConstraints;
    ReceiverConstraints receiverConstraints;
}

struct CollectionSecurityPolicy {
    TransferSecurityLevels transferSecurityLevel;
    uint120 operatorWhitelistId;
    uint120 permittedContractReceiversId;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"uint96","name":"royaltyFeeNumerator_","type":"uint96"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CreatorTokenBase__InvalidTransferValidatorContract","type":"error"},{"inputs":[],"name":"CreatorTokenBase__SetTransferValidatorFirst","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ShouldNotMintToBurnAddress","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"TokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":false,"internalType":"address","name":"newValidator","type":"address"}],"name":"TransferValidatorUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_OPERATOR_WHITELIST_ID","outputs":[{"internalType":"uint120","name":"","type":"uint120"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_TRANSFER_SECURITY_LEVEL","outputs":[{"internalType":"enum TransferSecurityLevels","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_TRANSFER_VALIDATOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"artist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"checkElligibility","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPermittedContractReceivers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSecurityPolicy","outputs":[{"components":[{"internalType":"enum TransferSecurityLevels","name":"transferSecurityLevel","type":"uint8"},{"internalType":"uint120","name":"operatorWhitelistId","type":"uint120"},{"internalType":"uint120","name":"permittedContractReceiversId","type":"uint120"}],"internalType":"struct CollectionSecurityPolicy","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferValidator","outputs":[{"internalType":"contract ICreatorTokenTransferValidator","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistedOperators","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hiddenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"isContractReceiverPermitted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"isOperatorWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"isTransferAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPass","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"bool","name":"_state","type":"bool"}],"name":"setAllowlistMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"setArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setHiddenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"setPassContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPassMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"setPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPublicMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"setSfnft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum TransferSecurityLevels","name":"level","type":"uint8"},{"internalType":"uint120","name":"operatorWhitelistId","type":"uint120"},{"internalType":"uint120","name":"permittedContractReceiversAllowlistId","type":"uint120"}],"name":"setToCustomSecurityPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"validator","type":"address"},{"internalType":"enum TransferSecurityLevels","name":"level","type":"uint8"},{"internalType":"uint120","name":"operatorWhitelistId","type":"uint120"},{"internalType":"uint120","name":"permittedContractReceiversAllowlistId","type":"uint120"}],"name":"setToCustomValidatorAndSecurityPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setToDefaultSecurityPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferValidator_","type":"address"}],"name":"setTransferValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_suffix","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sfnft","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uriSuffix","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6103e7600c5560e0604052670226abadc42f800060809081526701cdda4faccd000060a05267016345785d8a000060c0526200004090600d90600362000258565b506011805464ffffffffff1916630100000017905534801562000061575f80fd5b506040516200444b3803806200444b833981016040819052620000849162000388565b838383833382826002620000998382620004b6565b506003620000a88282620004b6565b5060015f5550506001600160a01b038116620000de57604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000e9816200010a565b505050620000fe82826200015b60201b60201c565b50505050505062000582565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b620001678282620001b2565b6040516001600160601b03821681526001600160a01b038316907f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef9060200160405180910390a25050565b6127106001600160601b038216811015620001f357604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401620000d5565b6001600160a01b0383166200021e57604051635b6cc80560e11b81525f6004820152602401620000d5565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600a55565b828054828255905f5260205f209081019282156200029f579160200282015b828111156200029f57825182906001600160401b031690559160200191906001019062000277565b50620002ad929150620002b1565b5090565b5b80821115620002ad575f8155600101620002b2565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112620002eb575f80fd5b81516001600160401b0380821115620003085762000308620002c7565b604051601f8301601f19908116603f01168101908282118183101715620003335762000333620002c7565b816040528381526020925086602085880101111562000350575f80fd5b5f91505b8382101562000373578582018301518183018401529082019062000354565b5f602085830101528094505050505092915050565b5f805f80608085870312156200039c575f80fd5b84516001600160a01b0381168114620003b3575f80fd5b60208601519094506001600160601b0381168114620003d0575f80fd5b60408601519093506001600160401b0380821115620003ed575f80fd5b620003fb88838901620002db565b9350606087015191508082111562000411575f80fd5b506200042087828801620002db565b91505092959194509250565b600181811c908216806200044157607f821691505b6020821081036200046057634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620004b157805f5260205f20601f840160051c810160208510156200048d5750805b601f840160051c820191505b81811015620004ae575f815560010162000499565b50505b505050565b81516001600160401b03811115620004d257620004d2620002c7565b620004ea81620004e384546200042c565b8462000466565b602080601f83116001811462000520575f8415620005085750858301515b5f19600386901b1c1916600185901b1785556200057a565b5f85815260208120601f198616915b8281101562000550578886015182559484019460019091019084016200052f565b50858210156200056e57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b613ebb80620005905f395ff3fe60806040526004361061040b575f3560e01c80636c3b869911610215578063b46038551161011e578063d007af5c116100a8578063e985e9c511610078578063e985e9c514610bdf578063f0f4426014610c26578063f2fde38b14610c45578063f56116fc14610c64578063fd762d9214610c83575f80fd5b8063d007af5c14610b78578063d4c9753314610b8c578063d5abeb0114610bab578063e0a8085314610bc0575f80fd5b8063be537f43116100ee578063be537f4314610adb578063bf4fd90f14610afc578063c3a7199914610b1b578063c87b56dd14610b3a578063c9ca02fb14610b59575f80fd5b8063b460385514610a6b578063b88d4fde14610a8a578063bbaac02f14610a9d578063bc31c1c114610abc575f80fd5b80638462151c1161019f57806395d89b411161016f57806395d89b41146109e75780639d645a44146109fb5780639f93f77914610a1a578063a22cb46514610a2d578063a9fc664e14610a4c575f80fd5b80638462151c14610976578063853828b6146109a25780638cc54e7f146109b65780638da5cb5b146109ca575f80fd5b806371a94340116101e557806371a94340146108db57806379cf92d3146108fa57806379de186a146109195780637cb6475914610938578063818668d714610957575f80fd5b80636c3b8699146108755780636f8b44b01461088957806370a08231146108a8578063715018a6146108c7575f80fd5b80632eb4a7ab1161031757806355f804b3116102a1578063613471621161027157806361347162146107e457806361d027b3146108035780636352211e1461082257806363b040eb146108415780636c0360eb14610861575f80fd5b806355f804b3146107615780635944c753146107805780635c975abb1461079f5780635d4c1d46146107b8575f80fd5b8063495c8bf9116102e7578063495c8bf9146106d95780634f28e680146106fa578063518302271461070d57806352dd20821461072e5780635503a0e81461074d575f80fd5b80632eb4a7ab1461067f5780633671f8cf1461069457806342842e0e146106a757806343bc1612146106ba575f80fd5b806316ba10e0116103985780631b25b077116103685780631b25b077146105cf5780631c33b328146105ee57806323b872dd1461060f5780632a55205a146106225780632e8da82914610660575f80fd5b806316ba10e01461054e57806316c38b3c1461056d57806317efd77c1461058c57806318160ddd146105ab575f80fd5b8063081812fc116103de578063081812fc146104c2578063095ea7b3146104e1578063098144d4146104f45780630f4161aa1461051157806311f1fc991461052f575f80fd5b8063014635461461040f57806301ffc9a71461045157806304634d8d1461048057806306fdde03146104a1575b5f80fd5b34801561041a575f80fd5b5061043471721c310194ccfc01e523fc93c9cccfa2a0ac81565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561045c575f80fd5b5061047061046b36600461333b565b610ca2565b6040519015158152602001610448565b34801561048b575f80fd5b5061049f61049a366004613385565b610cb2565b005b3480156104ac575f80fd5b506104b5610cc8565b6040516104489190613405565b3480156104cd575f80fd5b506104346104dc366004613417565b610d58565b61049f6104ef36600461342e565b610d9a565b3480156104ff575f80fd5b506009546001600160a01b0316610434565b34801561051c575f80fd5b5060115461047090610100900460ff1681565b34801561053a575f80fd5b5061049f610549366004613417565b610e38565b348015610559575f80fd5b5061049f6105683660046134f0565b610f5c565b348015610578575f80fd5b5061049f610587366004613541565b610f70565b348015610597575f80fd5b506104706105a636600461355c565b610f8b565b3480156105b6575f80fd5b506001545f54035f19015b604051908152602001610448565b3480156105da575f80fd5b506104706105e9366004613577565b611003565b3480156105f9575f80fd5b50610602600181565b60405161044891906135df565b61049f61061d3660046135ed565b611098565b34801561062d575f80fd5b5061064161063c36600461362b565b611241565b604080516001600160a01b039093168352602083019190915201610448565b34801561066b575f80fd5b5061047061067a36600461355c565b6112ed565b34801561068a575f80fd5b506105c160125481565b61049f6106a236600461368b565b6113f3565b61049f6106b53660046135ed565b6115b7565b3480156106c5575f80fd5b50601554610434906001600160a01b031681565b3480156106e4575f80fd5b506106ed6115d1565b60405161044891906136d2565b61049f610708366004613417565b6116db565b348015610718575f80fd5b5060115461047090640100000000900460ff1681565b348015610739575f80fd5b50601654610434906001600160a01b031681565b348015610758575f80fd5b506104b561182e565b34801561076c575f80fd5b5061049f61077b3660046134f0565b6118ba565b34801561078b575f80fd5b5061049f61079a366004613712565b6118ce565b3480156107aa575f80fd5b506011546104709060ff1681565b3480156107c3575f80fd5b506107cc600181565b6040516001600160781b039091168152602001610448565b3480156107ef575f80fd5b5061049f6107fe36600461376d565b6118e1565b34801561080e575f80fd5b50601454610434906001600160a01b031681565b34801561082d575f80fd5b5061043461083c366004613417565b611a3c565b34801561084c575f80fd5b50601154610470906301000000900460ff1681565b34801561086c575f80fd5b506104b5611a46565b348015610880575f80fd5b5061049f611a53565b348015610894575f80fd5b5061049f6108a3366004613417565b611b42565b3480156108b3575f80fd5b506105c16108c236600461355c565b611ba7565b3480156108d2575f80fd5b5061049f611bf3565b3480156108e6575f80fd5b5061049f6108f5366004613541565b611c06565b348015610905575f80fd5b5061049f6109143660046137aa565b611c2a565b348015610924575f80fd5b506011546104709062010000900460ff1681565b348015610943575f80fd5b5061049f610952366004613417565b611c3e565b348015610962575f80fd5b5061049f610971366004613541565b611c4b565b348015610981575f80fd5b5061099561099036600461355c565b611c6d565b60405161044891906137e8565b3480156109ad575f80fd5b5061049f611d71565b3480156109c1575f80fd5b506104b5611f95565b3480156109d5575f80fd5b506008546001600160a01b0316610434565b3480156109f2575f80fd5b506104b5611fa2565b348015610a06575f80fd5b50610470610a1536600461355c565b611fb1565b61049f610a2836600461342e565b612076565b348015610a38575f80fd5b5061049f610a4736600461381f565b612178565b348015610a57575f80fd5b5061049f610a6636600461355c565b6121f0565b348015610a76575f80fd5b5061049f610a85366004613541565b61230f565b61049f610a98366004613856565b612335565b348015610aa8575f80fd5b5061049f610ab73660046134f0565b612379565b348015610ac7575f80fd5b506105c1610ad6366004613417565b61238d565b348015610ae6575f80fd5b50610aef6123ac565b60405161044891906138d0565b348015610b07575f80fd5b5061049f610b1636600461355c565b612463565b348015610b26575f80fd5b5061049f610b3536600461342e565b6124b3565b348015610b45575f80fd5b506104b5610b54366004613417565b6124f3565b348015610b64575f80fd5b5061049f610b7336600461355c565b61264d565b348015610b83575f80fd5b506106ed612677565b348015610b97575f80fd5b5061049f610ba636600461355c565b61272e565b348015610bb6575f80fd5b506105c1600c5481565b348015610bcb575f80fd5b5061049f610bda366004613541565b61277e565b348015610bea575f80fd5b50610470610bf936600461390b565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b348015610c31575f80fd5b5061049f610c4036600461355c565b6127a6565b348015610c50575f80fd5b5061049f610c5f36600461355c565b6127f6565b348015610c6f575f80fd5b50601354610434906001600160a01b031681565b348015610c8e575f80fd5b5061049f610c9d366004613937565b612833565b5f610cac82612928565b92915050565b610cba61295c565b610cc48282612964565b5050565b606060028054610cd790613990565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0390613990565b8015610d4e5780601f10610d2557610100808354040283529160200191610d4e565b820191905f5260205f20905b815481529060010190602001808311610d3157829003601f168201915b5050505050905090565b5f610d62826129b9565b610d7f576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610da482611a3c565b9050336001600160a01b03821614610ddd57610dc08133610bf9565b610ddd576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610e406129eb565b6014546001600160a01b0316610e715760405162461bcd60e51b8152600401610e68906139c8565b60405180910390fd5b4780821115610eb55760405162461bcd60e51b815260206004820152601060248201526f125b98dbdc9c9958dd08105b5bdd5b9d60821b6044820152606401610e68565b6014546040515f916001600160a01b03169084908381818185875af1925050503d805f8114610eff576040519150601f19603f3d011682016040523d82523d5f602084013e610f04565b606091505b50508091505080610f575760405162461bcd60e51b815260206004820152601860248201527f5472616e73616374696f6e20556e7375636365737366756c00000000000000006044820152606401610e68565b505050565b610f646129eb565b600f610cc48282613a43565b610f786129eb565b6011805460ff1916911515919091179055565b6013546040516370a0823160e01b81526001600160a01b0383811660048301525f921690829082906370a0823190602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb9190613afe565b119392505050565b6009545f906001600160a01b03161561108d5760095460405163050bf71960e31b81526001600160a01b038681166004830152858116602483015284811660448301529091169063285fb8c8906064015f6040518083038186803b158015611069575f80fd5b505afa92505050801561107a575060015b61108557505f611091565b506001611091565b5060015b9392505050565b5f6110a282612a18565b9050836001600160a01b0316816001600160a01b0316146110d55760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054338082146001600160a01b03881690911417611121576111048633610bf9565b61112157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661114857604051633a954ecd60e21b815260040160405180910390fd5b6111558686866001612a81565b801561115f575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b841690036111eb57600184015f8181526004602052604081205490036111e9575f5481146111e9575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112398686866001612aa7565b505050505050565b5f828152600b602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112b5575060408051808201909152600a546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f90612710906112d3906001600160601b031687613b29565b6112dd9190613b40565b91519350909150505b9250929050565b6009545f906001600160a01b0316156113ec57600954604051635caaa2a960e11b81523060048201526001600160a01b039091169063d72dde5e90829063b955455290602401606060405180830381865afa15801561134e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113729190613b5f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044015b602060405180830381865afa1580156113c8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cac9190613bce565b505f919050565b60115460ff16156114165760405162461bcd60e51b8152600401610e6890613be9565b82600c54816114265f545f190190565b6114309190613c20565b111561144e5760405162461bcd60e51b8152600401610e6890613c33565b60115462010000900460ff166114a65760405162461bcd60e51b815260206004820152601b60248201527f416c6c6f776c697374206d696e742069732064697361626c65642100000000006044820152606401610e68565b83600d6001815481106114bb576114bb613c61565b905f5260205f2001546114ce9190613b29565b3410156114ed5760405162461bcd60e51b8152600401610e6890613c75565b6040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506115658484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506012549150849050612acd565b6115a65760405162461bcd60e51b81526020600482015260126024820152714e6f7420612076616c69642070726f6f662160701b6044820152606401610e68565b6115b03386612ae2565b5050505050565b610f5783838360405180602001604052805f815250612335565b6009546060906001600160a01b0316156116c957600954604051635caaa2a960e11b81523060048201526001600160a01b0390911690633fe5df9990829063b955455290602401606060405180830381865afa158015611633573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116579190613b5f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526024015b5f60405180830381865afa15801561169d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116c49190810190613ca2565b905090565b50604080515f81526020810190915290565b60115460ff16156116fe5760405162461bcd60e51b8152600401610e6890613be9565b80600c548161170e5f545f190190565b6117189190613c20565b11156117365760405162461bcd60e51b8152600401610e6890613c33565b6011546301000000900460ff166117885760405162461bcd60e51b815260206004820152601660248201527550617373206d696e742069732064697361626c65642160501b6044820152606401610e68565b81600d60028154811061179d5761179d613c61565b905f5260205f2001546117b09190613b29565b3410156117cf5760405162461bcd60e51b8152600401610e6890613c75565b6117d833610f8b565b6118245760405162461bcd60e51b815260206004820152601b60248201527f4164647265737320646f6573206e6f7420686f6c6420506173732100000000006044820152606401610e68565b610cc43383612ae2565b600f805461183b90613990565b80601f016020809104026020016040519081016040528092919081815260200182805461186790613990565b80156118b25780601f10611889576101008083540402835291602001916118b2565b820191905f5260205f20905b81548152906001019060200180831161189557829003601f168201915b505050505081565b6118c26129eb565b600e610cc48282613a43565b6118d661295c565b610f57838383612afb565b6118e961295c565b5f6118fc6009546001600160a01b031690565b90506001600160a01b03811661192557604051631cffe3dd60e11b815260040160405180910390fd5b604051630368065360e61b81526001600160a01b0382169063da0194c0906119539030908890600401613d4e565b5f604051808303815f87803b15801561196a575f80fd5b505af115801561197c573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0384169250632304aa0291506119ae9030908790600401613d6b565b5f604051808303815f87803b1580156119c5575f80fd5b505af11580156119d7573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0384169250638d7443149150611a099030908690600401613d6b565b5f604051808303815f87803b158015611a20575f80fd5b505af1158015611a32573d5f803e3d5ffd5b5050505050505050565b5f610cac82612a18565b600e805461183b90613990565b611a5b61295c565b611a7671721c310194ccfc01e523fc93c9cccfa2a0ac6121f0565b604051630368065360e61b815271721c310194ccfc01e523fc93c9cccfa2a0ac9063da0194c090611aae903090600190600401613d4e565b5f604051808303815f87803b158015611ac5575f80fd5b505af1158015611ad7573d5f803e3d5ffd5b5050604051631182550160e11b815271721c310194ccfc01e523fc93c9cccfa2a0ac9250632304aa029150611b13903090600190600401613d6b565b5f604051808303815f87803b158015611b2a575f80fd5b505af1158015611b3c573d5f803e3d5ffd5b50505050565b611b4a6129eb565b5f545f19018110158015611b605750600c548111155b611ba25760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21026b0bc1029bab838363c9760691b6044820152606401610e68565b600c55565b5f6001600160a01b038216611bcf576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b611bfb6129eb565b611c045f612b54565b565b611c0e6129eb565b60118054911515620100000262ff000019909216919091179055565b611c326129eb565b610f57600d83836132c9565b611c466129eb565b601255565b611c536129eb565b601180549115156101000261ff0019909216919091179055565b60605f805f611c7b85611ba7565b90505f816001600160401b03811115611c9657611c96613458565b604051908082528060200260200182016040528015611cbf578160200160208202803683370190505b509050611ceb604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b838614611d6557611cfe81612ba5565b91508160400151611d5d5781516001600160a01b031615611d1e57815194505b876001600160a01b0316856001600160a01b031603611d5d5780838780600101985081518110611d5057611d50613c61565b6020026020010181815250505b600101611cee565b50909695505050505050565b611d796129eb565b6015546001600160a01b0316611dd15760405162461bcd60e51b815260206004820152601a60248201527f312043616e6e6f742062652074686520302061646472657373210000000000006044820152606401610e68565b6016546001600160a01b0316611e295760405162461bcd60e51b815260206004820152601a60248201527f322043616e6e6f742062652074686520302061646472657373210000000000006044820152606401610e68565b60155447905f906001600160a01b03166064611e46846055613b29565b611e509190613b40565b6040515f81818185875af1925050503d805f8114611e89576040519150601f19603f3d011682016040523d82523d5f602084013e611e8e565b606091505b50508091505080611ee15760405162461bcd60e51b815260206004820152601a60248201527f31205472616e73616374696f6e20556e7375636365737366756c0000000000006044820152606401610e68565b6016546001600160a01b03166064611efa84600f613b29565b611f049190613b40565b6040515f81818185875af1925050503d805f8114611f3d576040519150601f19603f3d011682016040523d82523d5f602084013e611f42565b606091505b50508091505080610cc45760405162461bcd60e51b815260206004820152601a60248201527f32205472616e73616374696f6e20556e7375636365737366756c0000000000006044820152606401610e68565b6010805461183b90613990565b606060038054610cd790613990565b6009545f906001600160a01b0316156113ec57600954604051635caaa2a960e11b81523060048201526001600160a01b0390911690639445f53090829063b955455290602401606060405180830381865afa158015612012573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120369190613b5f565b60409081015190516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044016113ad565b60115460ff16156120995760405162461bcd60e51b8152600401610e6890613be9565b80600c54816120a95f545f190190565b6120b39190613c20565b11156120d15760405162461bcd60e51b8152600401610e6890613c33565b601154610100900460ff166121285760405162461bcd60e51b815260206004820152601860248201527f5075626c6963206d696e742069732064697361626c65642100000000000000006044820152606401610e68565b81600d5f8154811061213c5761213c613c61565b905f5260205f20015461214f9190613b29565b34101561216e5760405162461bcd60e51b8152600401610e6890613c75565b610f578383612ae2565b335f8181526007602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516121e4911515815260200190565b60405180910390a35050565b6121f861295c565b5f6001600160a01b0382163b15612271576040516301ffc9a760e01b81525f60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015612269575060408051601f3d908101601f1916820190925261226691810190613bce565b60015b156122715790505b6001600160a01b03821615801590612287575080155b156122a5576040516332483afb60e01b815260040160405180910390fd5b600954604080516001600160a01b03928316815291841660208301527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a150600980546001600160a01b0319166001600160a01b0392909216919091179055565b6123176129eb565b6011805491151563010000000263ff00000019909216919091179055565b612340848484611098565b6001600160a01b0383163b15611b3c5761235c84848484612c21565b611b3c576040516368d2bf6b60e11b815260040160405180910390fd5b6123816129eb565b6010610cc48282613a43565b600d818154811061239c575f80fd5b5f91825260209091200154905081565b604080516060810182525f80825260208201819052918101919091526009546001600160a01b03161561244357600954604051635caaa2a960e11b81523060048201526001600160a01b039091169063b955455290602401606060405180830381865afa15801561241f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116c49190613b5f565b50604080516060810182525f808252602082018190529181019190915290565b61246b6129eb565b6001600160a01b0381166124915760405162461bcd60e51b8152600401610e68906139c8565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6124bb6129eb565b80600c54816124cb5f545f190190565b6124d59190613c20565b111561216e5760405162461bcd60e51b8152600401610e6890613c33565b60606124fe826129b9565b61254a5760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610e68565b601154640100000000900460ff1615155f036125f0576010805461256d90613990565b80601f016020809104026020016040519081016040528092919081815260200182805461259990613990565b80156125e45780601f106125bb576101008083540402835291602001916125e4565b820191905f5260205f20905b8154815290600101906020018083116125c757829003601f168201915b50505050509050919050565b5f600e80546125fe90613990565b9050116126195760405180602001604052805f815250610cac565b600e61262483612d09565b600f60405160200161263893929190613dfc565b60405160208183030381529060405292915050565b6126556129eb565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6009546060906001600160a01b0316156116c957600954604051635caaa2a960e11b81523060048201526001600160a01b03909116906317e94a6c90829063b955455290602401606060405180830381865afa1580156126d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126fd9190613b5f565b60409081015190516001600160e01b031960e084901b1681526001600160781b039091166004820152602401611683565b6127366129eb565b6001600160a01b03811661275c5760405162461bcd60e51b8152600401610e68906139c8565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6127866129eb565b601180549115156401000000000264ff0000000019909216919091179055565b6127ae6129eb565b6001600160a01b0381166127d45760405162461bcd60e51b8152600401610e68906139c8565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6127fe6129eb565b6001600160a01b03811661282757604051631e4fbdf760e01b81525f6004820152602401610e68565b61283081612b54565b50565b61283b61295c565b612844846121f0565b604051630368065360e61b81526001600160a01b0385169063da0194c0906128729030908790600401613d4e565b5f604051808303815f87803b158015612889575f80fd5b505af115801561289b573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0387169250632304aa0291506128cd9030908690600401613d6b565b5f604051808303815f87803b1580156128e4575f80fd5b505af11580156128f6573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0387169250638d7443149150611a099030908590600401613d6b565b5f6001600160e01b0319821663152a902d60e11b1480610cac57506301ffc9a760e01b6001600160e01b0319831614610cac565b611c046129eb565b61296e8282612d98565b6040516001600160601b03821681526001600160a01b038316907f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef9060200160405180910390a25050565b5f816001111580156129cb57505f5482105b8015610cac5750505f90815260046020526040902054600160e01b161590565b6008546001600160a01b03163314611c045760405163118cdaa760e01b8152336004820152602401610e68565b5f8180600111612a68575f54811015612a68575f8181526004602052604081205490600160e01b82169003612a66575b805f0361109157505f19015f81815260046020526040902054612a48565b505b604051636f96cda160e11b815260040160405180910390fd5b5f5b818110156115b057612a9f8585612a9a8487613c20565b612e3a565b600101612a83565b5f5b818110156115b057612ac58585612ac08487613c20565b612e90565b600101612aa9565b5f82612ad98584612ed7565b14949350505050565b610cc4828260405180602001604052805f815250612f19565b612b06838383612f7b565b6040516001600160601b03821681526001600160a01b0383169084907f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c9060200160405180910390a3505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610cac90604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612c55903390899088908890600401613e2e565b6020604051808303815f875af1925050508015612c8f575060408051601f3d908101601f19168201909252612c8c91810190613e6a565b60015b612ceb573d808015612cbc576040519150601f19603f3d011682016040523d82523d5f602084013e612cc1565b606091505b5080515f03612ce3576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f612d158361303b565b60010190505f816001600160401b03811115612d3357612d33613458565b6040519080825280601f01601f191660200182016040528015612d5d576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612d6757509392505050565b6127106001600160601b038216811015612dd757604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401610e68565b6001600160a01b038316612e0057604051635b6cc80560e11b81525f6004820152602401610e68565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600a55565b6001600160a01b038381161590831615818015612e545750805b15612e7257604051635cbd944160e01b815260040160405180910390fd5b8115612e7e575b6115b0565b80612e79576115b03386868634613112565b6001600160a01b038381161590831615818015612eaa5750805b15612ec857604051635cbd944160e01b815260040160405180910390fd5b81612e795780612e79576115b0565b5f81815b8451811015612f1157612f0782868381518110612efa57612efa613c61565b6020026020010151613193565b9150600101612edb565b509392505050565b612f2383836131bc565b6001600160a01b0383163b15610f57575f548281035b612f4b5f868380600101945086612c21565b612f68576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f3957815f54146115b0575f80fd5b6127106001600160601b038216811015612fc15760405163dfd1fc1b60e01b8152600481018590526001600160601b038316602482015260448101829052606401610e68565b6001600160a01b038316612ff157604051634b4f842960e11b8152600481018590525f6024820152604401610e68565b506040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182525f968752600b90529190942093519051909116600160a01b029116179055565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106130795772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106130a5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106130c357662386f26fc10000830492506010015b6305f5e10083106130db576305f5e100830492506008015b61271083106130ef57612710830492506004015b60648310613101576064830492506002015b600a8310610cac5760010192915050565b6009546001600160a01b0316156115b05760095460405163050bf71960e31b81526001600160a01b038781166004830152868116602483015285811660448301529091169063285fb8c8906064015f6040518083038186803b158015613176575f80fd5b505afa158015613188573d5f803e3d5ffd5b505050505050505050565b5f8183106131ad575f828152602084905260409020611091565b505f9182526020526040902090565b5f8054908290036131e05760405163b562e8dd60e01b815260040160405180910390fd5b6131ec5f848385612a81565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146132985780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101613262565b50815f036132b857604051622e076360e81b815260040160405180910390fd5b5f908155610f579150848385612aa7565b828054828255905f5260205f20908101928215613302579160200282015b828111156133025782358255916020019190600101906132e7565b5061330e929150613312565b5090565b5b8082111561330e575f8155600101613313565b6001600160e01b031981168114612830575f80fd5b5f6020828403121561334b575f80fd5b813561109181613326565b6001600160a01b0381168114612830575f80fd5b80356001600160601b0381168114613380575f80fd5b919050565b5f8060408385031215613396575f80fd5b82356133a181613356565b91506133af6020840161336a565b90509250929050565b5f5b838110156133d25781810151838201526020016133ba565b50505f910152565b5f81518084526133f18160208601602086016133b8565b601f01601f19169290920160200192915050565b602081525f61109160208301846133da565b5f60208284031215613427575f80fd5b5035919050565b5f806040838503121561343f575f80fd5b823561344a81613356565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561349457613494613458565b604052919050565b5f6001600160401b038311156134b4576134b4613458565b6134c7601f8401601f191660200161346c565b90508281528383830111156134da575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215613500575f80fd5b81356001600160401b03811115613515575f80fd5b8201601f81018413613525575f80fd5b612d018482356020840161349c565b8015158114612830575f80fd5b5f60208284031215613551575f80fd5b813561109181613534565b5f6020828403121561356c575f80fd5b813561109181613356565b5f805f60608486031215613589575f80fd5b833561359481613356565b925060208401356135a481613356565b915060408401356135b481613356565b809150509250925092565b600781106135db57634e487b7160e01b5f52602160045260245ffd5b9052565b60208101610cac82846135bf565b5f805f606084860312156135ff575f80fd5b833561360a81613356565b9250602084013561361a81613356565b929592945050506040919091013590565b5f806040838503121561363c575f80fd5b50508035926020909101359150565b5f8083601f84011261365b575f80fd5b5081356001600160401b03811115613671575f80fd5b6020830191508360208260051b85010111156112e6575f80fd5b5f805f6040848603121561369d575f80fd5b8335925060208401356001600160401b038111156136b9575f80fd5b6136c58682870161364b565b9497909650939450505050565b602080825282518282018190525f9190848201906040850190845b81811015611d655783516001600160a01b0316835292840192918401916001016136ed565b5f805f60608486031215613724575f80fd5b83359250602084013561373681613356565b91506137446040850161336a565b90509250925092565b60078110612830575f80fd5b6001600160781b0381168114612830575f80fd5b5f805f6060848603121561377f575f80fd5b833561378a8161374d565b9250602084013561379a81613759565b915060408401356135b481613759565b5f80602083850312156137bb575f80fd5b82356001600160401b038111156137d0575f80fd5b6137dc8582860161364b565b90969095509350505050565b602080825282518282018190525f9190848201906040850190845b81811015611d6557835183529284019291840191600101613803565b5f8060408385031215613830575f80fd5b823561383b81613356565b9150602083013561384b81613534565b809150509250929050565b5f805f8060808587031215613869575f80fd5b843561387481613356565b9350602085013561388481613356565b92506040850135915060608501356001600160401b038111156138a5575f80fd5b8501601f810187136138b5575f80fd5b6138c48782356020840161349c565b91505092959194509250565b5f6060820190506138e28284516135bf565b60208301516001600160781b038082166020850152806040860151166040850152505092915050565b5f806040838503121561391c575f80fd5b823561392781613356565b9150602083013561384b81613356565b5f805f806080858703121561394a575f80fd5b843561395581613356565b935060208501356139658161374d565b9250604085013561397581613759565b9150606085013561398581613759565b939692955090935050565b600181811c908216806139a457607f821691505b6020821081036139c257634e487b7160e01b5f52602260045260245ffd5b50919050565b60208082526018908201527f43616e6e6f742062652074686520302061646472657373210000000000000000604082015260600190565b601f821115610f5757805f5260205f20601f840160051c81016020851015613a245750805b601f840160051c820191505b818110156115b0575f8155600101613a30565b81516001600160401b03811115613a5c57613a5c613458565b613a7081613a6a8454613990565b846139ff565b602080601f831160018114613aa3575f8415613a8c5750858301515b5f19600386901b1c1916600185901b178555611239565b5f85815260208120601f198616915b82811015613ad157888601518255948401946001909101908401613ab2565b5085821015613aee57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215613b0e575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610cac57610cac613b15565b5f82613b5a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60608284031215613b6f575f80fd5b604051606081018181106001600160401b0382111715613b9157613b91613458565b6040528251613b9f8161374d565b81526020830151613baf81613759565b60208201526040830151613bc281613759565b60408201529392505050565b5f60208284031215613bde575f80fd5b815161109181613534565b60208082526017908201527f54686520636f6e74726163742069732070617573656421000000000000000000604082015260600190565b80820180821115610cac57610cac613b15565b60208082526014908201527326b0bc1029bab838363c9022bc31b2b2b232b21760611b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b5f6020808385031215613cb3575f80fd5b82516001600160401b0380821115613cc9575f80fd5b818501915085601f830112613cdc575f80fd5b815181811115613cee57613cee613458565b8060051b9150613cff84830161346c565b8181529183018401918481019088841115613d18575f80fd5b938501935b83851015613d425784519250613d3283613356565b8282529385019390850190613d1d565b98975050505050505050565b6001600160a01b03831681526040810161109160208301846135bf565b6001600160a01b039290921682526001600160781b0316602082015260400190565b5f8154613d9981613990565b60018281168015613db15760018114613dc657613df2565b60ff1984168752821515830287019450613df2565b855f526020805f205f5b85811015613de95781548a820152908401908201613dd0565b50505082870194505b5050505092915050565b5f613e078286613d8d565b8451613e178183602089016133b8565b613e2381830186613d8d565b979650505050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90613e60908301846133da565b9695505050505050565b5f60208284031215613e7a575f80fd5b81516110918161332656fea2646970667358221220110651523c91d356c959df3226927a46520215a31d7356247ee839253ddd82ee64736f6c634300081600330000000000000000000000001909a071e8cfddb74bce5ed2ae3249107694cab700000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004053616e7461204665204e46542078205374616365792053756c6c6976616e204465204d616c646f6e61646f3a20496e204c6f766520746f2074686520426f6e65000000000000000000000000000000000000000000000000000000000000000553464e4654000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061040b575f3560e01c80636c3b869911610215578063b46038551161011e578063d007af5c116100a8578063e985e9c511610078578063e985e9c514610bdf578063f0f4426014610c26578063f2fde38b14610c45578063f56116fc14610c64578063fd762d9214610c83575f80fd5b8063d007af5c14610b78578063d4c9753314610b8c578063d5abeb0114610bab578063e0a8085314610bc0575f80fd5b8063be537f43116100ee578063be537f4314610adb578063bf4fd90f14610afc578063c3a7199914610b1b578063c87b56dd14610b3a578063c9ca02fb14610b59575f80fd5b8063b460385514610a6b578063b88d4fde14610a8a578063bbaac02f14610a9d578063bc31c1c114610abc575f80fd5b80638462151c1161019f57806395d89b411161016f57806395d89b41146109e75780639d645a44146109fb5780639f93f77914610a1a578063a22cb46514610a2d578063a9fc664e14610a4c575f80fd5b80638462151c14610976578063853828b6146109a25780638cc54e7f146109b65780638da5cb5b146109ca575f80fd5b806371a94340116101e557806371a94340146108db57806379cf92d3146108fa57806379de186a146109195780637cb6475914610938578063818668d714610957575f80fd5b80636c3b8699146108755780636f8b44b01461088957806370a08231146108a8578063715018a6146108c7575f80fd5b80632eb4a7ab1161031757806355f804b3116102a1578063613471621161027157806361347162146107e457806361d027b3146108035780636352211e1461082257806363b040eb146108415780636c0360eb14610861575f80fd5b806355f804b3146107615780635944c753146107805780635c975abb1461079f5780635d4c1d46146107b8575f80fd5b8063495c8bf9116102e7578063495c8bf9146106d95780634f28e680146106fa578063518302271461070d57806352dd20821461072e5780635503a0e81461074d575f80fd5b80632eb4a7ab1461067f5780633671f8cf1461069457806342842e0e146106a757806343bc1612146106ba575f80fd5b806316ba10e0116103985780631b25b077116103685780631b25b077146105cf5780631c33b328146105ee57806323b872dd1461060f5780632a55205a146106225780632e8da82914610660575f80fd5b806316ba10e01461054e57806316c38b3c1461056d57806317efd77c1461058c57806318160ddd146105ab575f80fd5b8063081812fc116103de578063081812fc146104c2578063095ea7b3146104e1578063098144d4146104f45780630f4161aa1461051157806311f1fc991461052f575f80fd5b8063014635461461040f57806301ffc9a71461045157806304634d8d1461048057806306fdde03146104a1575b5f80fd5b34801561041a575f80fd5b5061043471721c310194ccfc01e523fc93c9cccfa2a0ac81565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561045c575f80fd5b5061047061046b36600461333b565b610ca2565b6040519015158152602001610448565b34801561048b575f80fd5b5061049f61049a366004613385565b610cb2565b005b3480156104ac575f80fd5b506104b5610cc8565b6040516104489190613405565b3480156104cd575f80fd5b506104346104dc366004613417565b610d58565b61049f6104ef36600461342e565b610d9a565b3480156104ff575f80fd5b506009546001600160a01b0316610434565b34801561051c575f80fd5b5060115461047090610100900460ff1681565b34801561053a575f80fd5b5061049f610549366004613417565b610e38565b348015610559575f80fd5b5061049f6105683660046134f0565b610f5c565b348015610578575f80fd5b5061049f610587366004613541565b610f70565b348015610597575f80fd5b506104706105a636600461355c565b610f8b565b3480156105b6575f80fd5b506001545f54035f19015b604051908152602001610448565b3480156105da575f80fd5b506104706105e9366004613577565b611003565b3480156105f9575f80fd5b50610602600181565b60405161044891906135df565b61049f61061d3660046135ed565b611098565b34801561062d575f80fd5b5061064161063c36600461362b565b611241565b604080516001600160a01b039093168352602083019190915201610448565b34801561066b575f80fd5b5061047061067a36600461355c565b6112ed565b34801561068a575f80fd5b506105c160125481565b61049f6106a236600461368b565b6113f3565b61049f6106b53660046135ed565b6115b7565b3480156106c5575f80fd5b50601554610434906001600160a01b031681565b3480156106e4575f80fd5b506106ed6115d1565b60405161044891906136d2565b61049f610708366004613417565b6116db565b348015610718575f80fd5b5060115461047090640100000000900460ff1681565b348015610739575f80fd5b50601654610434906001600160a01b031681565b348015610758575f80fd5b506104b561182e565b34801561076c575f80fd5b5061049f61077b3660046134f0565b6118ba565b34801561078b575f80fd5b5061049f61079a366004613712565b6118ce565b3480156107aa575f80fd5b506011546104709060ff1681565b3480156107c3575f80fd5b506107cc600181565b6040516001600160781b039091168152602001610448565b3480156107ef575f80fd5b5061049f6107fe36600461376d565b6118e1565b34801561080e575f80fd5b50601454610434906001600160a01b031681565b34801561082d575f80fd5b5061043461083c366004613417565b611a3c565b34801561084c575f80fd5b50601154610470906301000000900460ff1681565b34801561086c575f80fd5b506104b5611a46565b348015610880575f80fd5b5061049f611a53565b348015610894575f80fd5b5061049f6108a3366004613417565b611b42565b3480156108b3575f80fd5b506105c16108c236600461355c565b611ba7565b3480156108d2575f80fd5b5061049f611bf3565b3480156108e6575f80fd5b5061049f6108f5366004613541565b611c06565b348015610905575f80fd5b5061049f6109143660046137aa565b611c2a565b348015610924575f80fd5b506011546104709062010000900460ff1681565b348015610943575f80fd5b5061049f610952366004613417565b611c3e565b348015610962575f80fd5b5061049f610971366004613541565b611c4b565b348015610981575f80fd5b5061099561099036600461355c565b611c6d565b60405161044891906137e8565b3480156109ad575f80fd5b5061049f611d71565b3480156109c1575f80fd5b506104b5611f95565b3480156109d5575f80fd5b506008546001600160a01b0316610434565b3480156109f2575f80fd5b506104b5611fa2565b348015610a06575f80fd5b50610470610a1536600461355c565b611fb1565b61049f610a2836600461342e565b612076565b348015610a38575f80fd5b5061049f610a4736600461381f565b612178565b348015610a57575f80fd5b5061049f610a6636600461355c565b6121f0565b348015610a76575f80fd5b5061049f610a85366004613541565b61230f565b61049f610a98366004613856565b612335565b348015610aa8575f80fd5b5061049f610ab73660046134f0565b612379565b348015610ac7575f80fd5b506105c1610ad6366004613417565b61238d565b348015610ae6575f80fd5b50610aef6123ac565b60405161044891906138d0565b348015610b07575f80fd5b5061049f610b1636600461355c565b612463565b348015610b26575f80fd5b5061049f610b3536600461342e565b6124b3565b348015610b45575f80fd5b506104b5610b54366004613417565b6124f3565b348015610b64575f80fd5b5061049f610b7336600461355c565b61264d565b348015610b83575f80fd5b506106ed612677565b348015610b97575f80fd5b5061049f610ba636600461355c565b61272e565b348015610bb6575f80fd5b506105c1600c5481565b348015610bcb575f80fd5b5061049f610bda366004613541565b61277e565b348015610bea575f80fd5b50610470610bf936600461390b565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b348015610c31575f80fd5b5061049f610c4036600461355c565b6127a6565b348015610c50575f80fd5b5061049f610c5f36600461355c565b6127f6565b348015610c6f575f80fd5b50601354610434906001600160a01b031681565b348015610c8e575f80fd5b5061049f610c9d366004613937565b612833565b5f610cac82612928565b92915050565b610cba61295c565b610cc48282612964565b5050565b606060028054610cd790613990565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0390613990565b8015610d4e5780601f10610d2557610100808354040283529160200191610d4e565b820191905f5260205f20905b815481529060010190602001808311610d3157829003601f168201915b5050505050905090565b5f610d62826129b9565b610d7f576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610da482611a3c565b9050336001600160a01b03821614610ddd57610dc08133610bf9565b610ddd576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610e406129eb565b6014546001600160a01b0316610e715760405162461bcd60e51b8152600401610e68906139c8565b60405180910390fd5b4780821115610eb55760405162461bcd60e51b815260206004820152601060248201526f125b98dbdc9c9958dd08105b5bdd5b9d60821b6044820152606401610e68565b6014546040515f916001600160a01b03169084908381818185875af1925050503d805f8114610eff576040519150601f19603f3d011682016040523d82523d5f602084013e610f04565b606091505b50508091505080610f575760405162461bcd60e51b815260206004820152601860248201527f5472616e73616374696f6e20556e7375636365737366756c00000000000000006044820152606401610e68565b505050565b610f646129eb565b600f610cc48282613a43565b610f786129eb565b6011805460ff1916911515919091179055565b6013546040516370a0823160e01b81526001600160a01b0383811660048301525f921690829082906370a0823190602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb9190613afe565b119392505050565b6009545f906001600160a01b03161561108d5760095460405163050bf71960e31b81526001600160a01b038681166004830152858116602483015284811660448301529091169063285fb8c8906064015f6040518083038186803b158015611069575f80fd5b505afa92505050801561107a575060015b61108557505f611091565b506001611091565b5060015b9392505050565b5f6110a282612a18565b9050836001600160a01b0316816001600160a01b0316146110d55760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054338082146001600160a01b03881690911417611121576111048633610bf9565b61112157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661114857604051633a954ecd60e21b815260040160405180910390fd5b6111558686866001612a81565b801561115f575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b841690036111eb57600184015f8181526004602052604081205490036111e9575f5481146111e9575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46112398686866001612aa7565b505050505050565b5f828152600b602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112b5575060408051808201909152600a546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f90612710906112d3906001600160601b031687613b29565b6112dd9190613b40565b91519350909150505b9250929050565b6009545f906001600160a01b0316156113ec57600954604051635caaa2a960e11b81523060048201526001600160a01b039091169063d72dde5e90829063b955455290602401606060405180830381865afa15801561134e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113729190613b5f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044015b602060405180830381865afa1580156113c8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610cac9190613bce565b505f919050565b60115460ff16156114165760405162461bcd60e51b8152600401610e6890613be9565b82600c54816114265f545f190190565b6114309190613c20565b111561144e5760405162461bcd60e51b8152600401610e6890613c33565b60115462010000900460ff166114a65760405162461bcd60e51b815260206004820152601b60248201527f416c6c6f776c697374206d696e742069732064697361626c65642100000000006044820152606401610e68565b83600d6001815481106114bb576114bb613c61565b905f5260205f2001546114ce9190613b29565b3410156114ed5760405162461bcd60e51b8152600401610e6890613c75565b6040516bffffffffffffffffffffffff193360601b1660208201525f906034016040516020818303038152906040528051906020012090506115658484808060200260200160405190810160405280939291908181526020018383602002808284375f92019190915250506012549150849050612acd565b6115a65760405162461bcd60e51b81526020600482015260126024820152714e6f7420612076616c69642070726f6f662160701b6044820152606401610e68565b6115b03386612ae2565b5050505050565b610f5783838360405180602001604052805f815250612335565b6009546060906001600160a01b0316156116c957600954604051635caaa2a960e11b81523060048201526001600160a01b0390911690633fe5df9990829063b955455290602401606060405180830381865afa158015611633573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116579190613b5f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526024015b5f60405180830381865afa15801561169d573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116c49190810190613ca2565b905090565b50604080515f81526020810190915290565b60115460ff16156116fe5760405162461bcd60e51b8152600401610e6890613be9565b80600c548161170e5f545f190190565b6117189190613c20565b11156117365760405162461bcd60e51b8152600401610e6890613c33565b6011546301000000900460ff166117885760405162461bcd60e51b815260206004820152601660248201527550617373206d696e742069732064697361626c65642160501b6044820152606401610e68565b81600d60028154811061179d5761179d613c61565b905f5260205f2001546117b09190613b29565b3410156117cf5760405162461bcd60e51b8152600401610e6890613c75565b6117d833610f8b565b6118245760405162461bcd60e51b815260206004820152601b60248201527f4164647265737320646f6573206e6f7420686f6c6420506173732100000000006044820152606401610e68565b610cc43383612ae2565b600f805461183b90613990565b80601f016020809104026020016040519081016040528092919081815260200182805461186790613990565b80156118b25780601f10611889576101008083540402835291602001916118b2565b820191905f5260205f20905b81548152906001019060200180831161189557829003601f168201915b505050505081565b6118c26129eb565b600e610cc48282613a43565b6118d661295c565b610f57838383612afb565b6118e961295c565b5f6118fc6009546001600160a01b031690565b90506001600160a01b03811661192557604051631cffe3dd60e11b815260040160405180910390fd5b604051630368065360e61b81526001600160a01b0382169063da0194c0906119539030908890600401613d4e565b5f604051808303815f87803b15801561196a575f80fd5b505af115801561197c573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0384169250632304aa0291506119ae9030908790600401613d6b565b5f604051808303815f87803b1580156119c5575f80fd5b505af11580156119d7573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0384169250638d7443149150611a099030908690600401613d6b565b5f604051808303815f87803b158015611a20575f80fd5b505af1158015611a32573d5f803e3d5ffd5b5050505050505050565b5f610cac82612a18565b600e805461183b90613990565b611a5b61295c565b611a7671721c310194ccfc01e523fc93c9cccfa2a0ac6121f0565b604051630368065360e61b815271721c310194ccfc01e523fc93c9cccfa2a0ac9063da0194c090611aae903090600190600401613d4e565b5f604051808303815f87803b158015611ac5575f80fd5b505af1158015611ad7573d5f803e3d5ffd5b5050604051631182550160e11b815271721c310194ccfc01e523fc93c9cccfa2a0ac9250632304aa029150611b13903090600190600401613d6b565b5f604051808303815f87803b158015611b2a575f80fd5b505af1158015611b3c573d5f803e3d5ffd5b50505050565b611b4a6129eb565b5f545f19018110158015611b605750600c548111155b611ba25760405162461bcd60e51b815260206004820152601360248201527224b73b30b634b21026b0bc1029bab838363c9760691b6044820152606401610e68565b600c55565b5f6001600160a01b038216611bcf576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b611bfb6129eb565b611c045f612b54565b565b611c0e6129eb565b60118054911515620100000262ff000019909216919091179055565b611c326129eb565b610f57600d83836132c9565b611c466129eb565b601255565b611c536129eb565b601180549115156101000261ff0019909216919091179055565b60605f805f611c7b85611ba7565b90505f816001600160401b03811115611c9657611c96613458565b604051908082528060200260200182016040528015611cbf578160200160208202803683370190505b509050611ceb604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b838614611d6557611cfe81612ba5565b91508160400151611d5d5781516001600160a01b031615611d1e57815194505b876001600160a01b0316856001600160a01b031603611d5d5780838780600101985081518110611d5057611d50613c61565b6020026020010181815250505b600101611cee565b50909695505050505050565b611d796129eb565b6015546001600160a01b0316611dd15760405162461bcd60e51b815260206004820152601a60248201527f312043616e6e6f742062652074686520302061646472657373210000000000006044820152606401610e68565b6016546001600160a01b0316611e295760405162461bcd60e51b815260206004820152601a60248201527f322043616e6e6f742062652074686520302061646472657373210000000000006044820152606401610e68565b60155447905f906001600160a01b03166064611e46846055613b29565b611e509190613b40565b6040515f81818185875af1925050503d805f8114611e89576040519150601f19603f3d011682016040523d82523d5f602084013e611e8e565b606091505b50508091505080611ee15760405162461bcd60e51b815260206004820152601a60248201527f31205472616e73616374696f6e20556e7375636365737366756c0000000000006044820152606401610e68565b6016546001600160a01b03166064611efa84600f613b29565b611f049190613b40565b6040515f81818185875af1925050503d805f8114611f3d576040519150601f19603f3d011682016040523d82523d5f602084013e611f42565b606091505b50508091505080610cc45760405162461bcd60e51b815260206004820152601a60248201527f32205472616e73616374696f6e20556e7375636365737366756c0000000000006044820152606401610e68565b6010805461183b90613990565b606060038054610cd790613990565b6009545f906001600160a01b0316156113ec57600954604051635caaa2a960e11b81523060048201526001600160a01b0390911690639445f53090829063b955455290602401606060405180830381865afa158015612012573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120369190613b5f565b60409081015190516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044016113ad565b60115460ff16156120995760405162461bcd60e51b8152600401610e6890613be9565b80600c54816120a95f545f190190565b6120b39190613c20565b11156120d15760405162461bcd60e51b8152600401610e6890613c33565b601154610100900460ff166121285760405162461bcd60e51b815260206004820152601860248201527f5075626c6963206d696e742069732064697361626c65642100000000000000006044820152606401610e68565b81600d5f8154811061213c5761213c613c61565b905f5260205f20015461214f9190613b29565b34101561216e5760405162461bcd60e51b8152600401610e6890613c75565b610f578383612ae2565b335f8181526007602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516121e4911515815260200190565b60405180910390a35050565b6121f861295c565b5f6001600160a01b0382163b15612271576040516301ffc9a760e01b81525f60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015612269575060408051601f3d908101601f1916820190925261226691810190613bce565b60015b156122715790505b6001600160a01b03821615801590612287575080155b156122a5576040516332483afb60e01b815260040160405180910390fd5b600954604080516001600160a01b03928316815291841660208301527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a150600980546001600160a01b0319166001600160a01b0392909216919091179055565b6123176129eb565b6011805491151563010000000263ff00000019909216919091179055565b612340848484611098565b6001600160a01b0383163b15611b3c5761235c84848484612c21565b611b3c576040516368d2bf6b60e11b815260040160405180910390fd5b6123816129eb565b6010610cc48282613a43565b600d818154811061239c575f80fd5b5f91825260209091200154905081565b604080516060810182525f80825260208201819052918101919091526009546001600160a01b03161561244357600954604051635caaa2a960e11b81523060048201526001600160a01b039091169063b955455290602401606060405180830381865afa15801561241f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116c49190613b5f565b50604080516060810182525f808252602082018190529181019190915290565b61246b6129eb565b6001600160a01b0381166124915760405162461bcd60e51b8152600401610e68906139c8565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6124bb6129eb565b80600c54816124cb5f545f190190565b6124d59190613c20565b111561216e5760405162461bcd60e51b8152600401610e6890613c33565b60606124fe826129b9565b61254a5760405162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e006044820152606401610e68565b601154640100000000900460ff1615155f036125f0576010805461256d90613990565b80601f016020809104026020016040519081016040528092919081815260200182805461259990613990565b80156125e45780601f106125bb576101008083540402835291602001916125e4565b820191905f5260205f20905b8154815290600101906020018083116125c757829003601f168201915b50505050509050919050565b5f600e80546125fe90613990565b9050116126195760405180602001604052805f815250610cac565b600e61262483612d09565b600f60405160200161263893929190613dfc565b60405160208183030381529060405292915050565b6126556129eb565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6009546060906001600160a01b0316156116c957600954604051635caaa2a960e11b81523060048201526001600160a01b03909116906317e94a6c90829063b955455290602401606060405180830381865afa1580156126d9573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906126fd9190613b5f565b60409081015190516001600160e01b031960e084901b1681526001600160781b039091166004820152602401611683565b6127366129eb565b6001600160a01b03811661275c5760405162461bcd60e51b8152600401610e68906139c8565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b6127866129eb565b601180549115156401000000000264ff0000000019909216919091179055565b6127ae6129eb565b6001600160a01b0381166127d45760405162461bcd60e51b8152600401610e68906139c8565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b6127fe6129eb565b6001600160a01b03811661282757604051631e4fbdf760e01b81525f6004820152602401610e68565b61283081612b54565b50565b61283b61295c565b612844846121f0565b604051630368065360e61b81526001600160a01b0385169063da0194c0906128729030908790600401613d4e565b5f604051808303815f87803b158015612889575f80fd5b505af115801561289b573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0387169250632304aa0291506128cd9030908690600401613d6b565b5f604051808303815f87803b1580156128e4575f80fd5b505af11580156128f6573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0387169250638d7443149150611a099030908590600401613d6b565b5f6001600160e01b0319821663152a902d60e11b1480610cac57506301ffc9a760e01b6001600160e01b0319831614610cac565b611c046129eb565b61296e8282612d98565b6040516001600160601b03821681526001600160a01b038316907f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef9060200160405180910390a25050565b5f816001111580156129cb57505f5482105b8015610cac5750505f90815260046020526040902054600160e01b161590565b6008546001600160a01b03163314611c045760405163118cdaa760e01b8152336004820152602401610e68565b5f8180600111612a68575f54811015612a68575f8181526004602052604081205490600160e01b82169003612a66575b805f0361109157505f19015f81815260046020526040902054612a48565b505b604051636f96cda160e11b815260040160405180910390fd5b5f5b818110156115b057612a9f8585612a9a8487613c20565b612e3a565b600101612a83565b5f5b818110156115b057612ac58585612ac08487613c20565b612e90565b600101612aa9565b5f82612ad98584612ed7565b14949350505050565b610cc4828260405180602001604052805f815250612f19565b612b06838383612f7b565b6040516001600160601b03821681526001600160a01b0383169084907f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c9060200160405180910390a3505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610cac90604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612c55903390899088908890600401613e2e565b6020604051808303815f875af1925050508015612c8f575060408051601f3d908101601f19168201909252612c8c91810190613e6a565b60015b612ceb573d808015612cbc576040519150601f19603f3d011682016040523d82523d5f602084013e612cc1565b606091505b5080515f03612ce3576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f612d158361303b565b60010190505f816001600160401b03811115612d3357612d33613458565b6040519080825280601f01601f191660200182016040528015612d5d576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612d6757509392505050565b6127106001600160601b038216811015612dd757604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401610e68565b6001600160a01b038316612e0057604051635b6cc80560e11b81525f6004820152602401610e68565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600a55565b6001600160a01b038381161590831615818015612e545750805b15612e7257604051635cbd944160e01b815260040160405180910390fd5b8115612e7e575b6115b0565b80612e79576115b03386868634613112565b6001600160a01b038381161590831615818015612eaa5750805b15612ec857604051635cbd944160e01b815260040160405180910390fd5b81612e795780612e79576115b0565b5f81815b8451811015612f1157612f0782868381518110612efa57612efa613c61565b6020026020010151613193565b9150600101612edb565b509392505050565b612f2383836131bc565b6001600160a01b0383163b15610f57575f548281035b612f4b5f868380600101945086612c21565b612f68576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f3957815f54146115b0575f80fd5b6127106001600160601b038216811015612fc15760405163dfd1fc1b60e01b8152600481018590526001600160601b038316602482015260448101829052606401610e68565b6001600160a01b038316612ff157604051634b4f842960e11b8152600481018590525f6024820152604401610e68565b506040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182525f968752600b90529190942093519051909116600160a01b029116179055565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106130795772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106130a5576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106130c357662386f26fc10000830492506010015b6305f5e10083106130db576305f5e100830492506008015b61271083106130ef57612710830492506004015b60648310613101576064830492506002015b600a8310610cac5760010192915050565b6009546001600160a01b0316156115b05760095460405163050bf71960e31b81526001600160a01b038781166004830152868116602483015285811660448301529091169063285fb8c8906064015f6040518083038186803b158015613176575f80fd5b505afa158015613188573d5f803e3d5ffd5b505050505050505050565b5f8183106131ad575f828152602084905260409020611091565b505f9182526020526040902090565b5f8054908290036131e05760405163b562e8dd60e01b815260040160405180910390fd5b6131ec5f848385612a81565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b8181146132985780835f7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a4600101613262565b50815f036132b857604051622e076360e81b815260040160405180910390fd5b5f908155610f579150848385612aa7565b828054828255905f5260205f20908101928215613302579160200282015b828111156133025782358255916020019190600101906132e7565b5061330e929150613312565b5090565b5b8082111561330e575f8155600101613313565b6001600160e01b031981168114612830575f80fd5b5f6020828403121561334b575f80fd5b813561109181613326565b6001600160a01b0381168114612830575f80fd5b80356001600160601b0381168114613380575f80fd5b919050565b5f8060408385031215613396575f80fd5b82356133a181613356565b91506133af6020840161336a565b90509250929050565b5f5b838110156133d25781810151838201526020016133ba565b50505f910152565b5f81518084526133f18160208601602086016133b8565b601f01601f19169290920160200192915050565b602081525f61109160208301846133da565b5f60208284031215613427575f80fd5b5035919050565b5f806040838503121561343f575f80fd5b823561344a81613356565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561349457613494613458565b604052919050565b5f6001600160401b038311156134b4576134b4613458565b6134c7601f8401601f191660200161346c565b90508281528383830111156134da575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215613500575f80fd5b81356001600160401b03811115613515575f80fd5b8201601f81018413613525575f80fd5b612d018482356020840161349c565b8015158114612830575f80fd5b5f60208284031215613551575f80fd5b813561109181613534565b5f6020828403121561356c575f80fd5b813561109181613356565b5f805f60608486031215613589575f80fd5b833561359481613356565b925060208401356135a481613356565b915060408401356135b481613356565b809150509250925092565b600781106135db57634e487b7160e01b5f52602160045260245ffd5b9052565b60208101610cac82846135bf565b5f805f606084860312156135ff575f80fd5b833561360a81613356565b9250602084013561361a81613356565b929592945050506040919091013590565b5f806040838503121561363c575f80fd5b50508035926020909101359150565b5f8083601f84011261365b575f80fd5b5081356001600160401b03811115613671575f80fd5b6020830191508360208260051b85010111156112e6575f80fd5b5f805f6040848603121561369d575f80fd5b8335925060208401356001600160401b038111156136b9575f80fd5b6136c58682870161364b565b9497909650939450505050565b602080825282518282018190525f9190848201906040850190845b81811015611d655783516001600160a01b0316835292840192918401916001016136ed565b5f805f60608486031215613724575f80fd5b83359250602084013561373681613356565b91506137446040850161336a565b90509250925092565b60078110612830575f80fd5b6001600160781b0381168114612830575f80fd5b5f805f6060848603121561377f575f80fd5b833561378a8161374d565b9250602084013561379a81613759565b915060408401356135b481613759565b5f80602083850312156137bb575f80fd5b82356001600160401b038111156137d0575f80fd5b6137dc8582860161364b565b90969095509350505050565b602080825282518282018190525f9190848201906040850190845b81811015611d6557835183529284019291840191600101613803565b5f8060408385031215613830575f80fd5b823561383b81613356565b9150602083013561384b81613534565b809150509250929050565b5f805f8060808587031215613869575f80fd5b843561387481613356565b9350602085013561388481613356565b92506040850135915060608501356001600160401b038111156138a5575f80fd5b8501601f810187136138b5575f80fd5b6138c48782356020840161349c565b91505092959194509250565b5f6060820190506138e28284516135bf565b60208301516001600160781b038082166020850152806040860151166040850152505092915050565b5f806040838503121561391c575f80fd5b823561392781613356565b9150602083013561384b81613356565b5f805f806080858703121561394a575f80fd5b843561395581613356565b935060208501356139658161374d565b9250604085013561397581613759565b9150606085013561398581613759565b939692955090935050565b600181811c908216806139a457607f821691505b6020821081036139c257634e487b7160e01b5f52602260045260245ffd5b50919050565b60208082526018908201527f43616e6e6f742062652074686520302061646472657373210000000000000000604082015260600190565b601f821115610f5757805f5260205f20601f840160051c81016020851015613a245750805b601f840160051c820191505b818110156115b0575f8155600101613a30565b81516001600160401b03811115613a5c57613a5c613458565b613a7081613a6a8454613990565b846139ff565b602080601f831160018114613aa3575f8415613a8c5750858301515b5f19600386901b1c1916600185901b178555611239565b5f85815260208120601f198616915b82811015613ad157888601518255948401946001909101908401613ab2565b5085821015613aee57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f60208284031215613b0e575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610cac57610cac613b15565b5f82613b5a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60608284031215613b6f575f80fd5b604051606081018181106001600160401b0382111715613b9157613b91613458565b6040528251613b9f8161374d565b81526020830151613baf81613759565b60208201526040830151613bc281613759565b60408201529392505050565b5f60208284031215613bde575f80fd5b815161109181613534565b60208082526017908201527f54686520636f6e74726163742069732070617573656421000000000000000000604082015260600190565b80820180821115610cac57610cac613b15565b60208082526014908201527326b0bc1029bab838363c9022bc31b2b2b232b21760611b604082015260600190565b634e487b7160e01b5f52603260045260245ffd5b60208082526013908201527224b739bab33334b1b4b2b73a10333ab732399760691b604082015260600190565b5f6020808385031215613cb3575f80fd5b82516001600160401b0380821115613cc9575f80fd5b818501915085601f830112613cdc575f80fd5b815181811115613cee57613cee613458565b8060051b9150613cff84830161346c565b8181529183018401918481019088841115613d18575f80fd5b938501935b83851015613d425784519250613d3283613356565b8282529385019390850190613d1d565b98975050505050505050565b6001600160a01b03831681526040810161109160208301846135bf565b6001600160a01b039290921682526001600160781b0316602082015260400190565b5f8154613d9981613990565b60018281168015613db15760018114613dc657613df2565b60ff1984168752821515830287019450613df2565b855f526020805f205f5b85811015613de95781548a820152908401908201613dd0565b50505082870194505b5050505092915050565b5f613e078286613d8d565b8451613e178183602089016133b8565b613e2381830186613d8d565b979650505050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90613e60908301846133da565b9695505050505050565b5f60208284031215613e7a575f80fd5b81516110918161332656fea2646970667358221220110651523c91d356c959df3226927a46520215a31d7356247ee839253ddd82ee64736f6c63430008160033

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

0000000000000000000000001909a071e8cfddb74bce5ed2ae3249107694cab700000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000004053616e7461204665204e46542078205374616365792053756c6c6976616e204465204d616c646f6e61646f3a20496e204c6f766520746f2074686520426f6e65000000000000000000000000000000000000000000000000000000000000000553464e4654000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : royaltyReceiver_ (address): 0x1909A071e8CFddb74BCE5ED2ae3249107694CAb7
Arg [1] : royaltyFeeNumerator_ (uint96): 1000
Arg [2] : name_ (string): Santa Fe NFT x Stacey Sullivan De Maldonado: In Love to the Bone
Arg [3] : symbol_ (string): SFNFT

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000001909a071e8cfddb74bce5ed2ae3249107694cab7
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [5] : 53616e7461204665204e46542078205374616365792053756c6c6976616e2044
Arg [6] : 65204d616c646f6e61646f3a20496e204c6f766520746f2074686520426f6e65
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 53464e4654000000000000000000000000000000000000000000000000000000


Loading...
Loading
Loading...
Loading
[ 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.