ETH Price: $3,988.91 (+2.04%)

Token

Planet Atmos | Gold Helm (GOLDHELM)
 

Overview

Max Total Supply

50 GOLDHELM

Holders

43

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
jkyap.eth
Balance
1 GOLDHELM
0x686224034c2b127F6045b2CBfc10AAE452989ae2
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:
GoldHelm

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion, MIT license
File 1 of 23 : GoldHelm.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@magiceden-oss/erc721m/contracts/creator-token-standards/ERC721ACQueryable.sol";
import "@magiceden-oss/erc721m/contracts/royalties/UpdatableRoyalties.sol";
import "@openzeppelin/contracts/access/Ownable.sol";


contract GoldHelm is ERC721ACQueryable, Ownable, UpdatableRoyalties {
    uint256 public constant INITIAL_SUPPLY = 50;
    uint256 public constant MAX_SUPPLY = 60;
    string private _uri;

    constructor(
        address initialSupplyTarget,
        address royaltyReceiver,
        string memory baseURI,
        uint96 royaltyFeeNumerator
    ) 
    ERC721ACQueryable("Planet Atmos | Gold Helm", "GOLDHELM")
    UpdatableRoyalties(royaltyReceiver, royaltyFeeNumerator)
    {
        _mintERC2309(initialSupplyTarget, INITIAL_SUPPLY);
        _uri = baseURI;
    }

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

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

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

                string memory base = _baseURI();
        return
            bytes(base).length > 0
                ? string(abi.encodePacked(base, _toString(tokenId), ".json"))
                : "";
    }

    function burn(uint256 tokenId) external {
        _burn(tokenId);
    }

    // admin

    function adminMint(address target, uint256 quantity) external onlyOwner {
        require(totalSupply() + quantity <= MAX_SUPPLY, "Exceeds max supply");
        _safeMint(target, quantity);
    }


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

    function sweep(address to) external onlyOwner {
        require(address(this).balance != 0, "Nothing to withdraw");
        // solhint-disable avoid-low-level-calls
        (bool success, ) = to.call{value: (address(this).balance)}("");
        require(success, "Transfer failed.");
    }

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

    function _requireCallerIsContractOwner() internal view virtual override {
        _checkOwner();
    }

}

File 2 of 23 : 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 3 of 23 : ICreatorToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./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 4 of 23 : 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 5 of 23 : 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 6 of 23 : 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 7 of 23 : 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 8 of 23 : TransferPolicy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** 
 * @dev Used in events to indicate the list type that an account or 
 * @dev codehash is being added to or removed from.
 * 
 * @dev Used in Creator Token Standards V2.
 */
enum ListTypes {
    // 0: List type that will block a matching address/codehash that is on the list.
    Blacklist,

    // 1: List type that will block any matching address/codehash that is not on the list.
    Whitelist
}

/** 
 * @dev Used in events to indicate the list type that event relates to.
 * 
 * @dev Used in Creator Token Standards V1.
 */
enum AllowlistTypes {
    // 0: List type that defines the allowed operator addresses.
    Operators,

    // 1: List type that defines the allowed contract receivers.
    PermittedContractReceivers
}

/**
 @dev Defines the constraints that will be applied for receipt of tokens.
 */
enum ReceiverConstraints {
    // 0: Any address may receive tokens.
    None,

    // 1: Address must not have deployed bytecode.
    NoCode,

    // 2: Address must verify a signature with the EOA Registry to prove it is an EOA.
    EOA
}

/**
 * @dev Defines the constraints that will be applied to the transfer caller.
 */
enum CallerConstraints {
    // 0: Any address may transfer tokens.
    None,

    // 1: Addresses and codehashes not on the blacklist may transfer tokens.
    OperatorBlacklistEnableOTC,

    // 2: Addresses and codehashes on the whitelist and the owner of the token may transfer tokens.
    OperatorWhitelistEnableOTC,

    // 3: Addresses and codehashes on the whitelist may transfer tokens.
    OperatorWhitelistDisableOTC
}

/**
 * @dev Defines constraints for staking tokens in token wrapper contracts.
 */
enum StakerConstraints {
    // 0: No constraints applied to staker.
    None,

    // 1: Transaction originator must be the address that will receive the wrapped tokens.
    CallerIsTxOrigin,

    // 2: Address that will receive the wrapped tokens must be a verified EOA.
    EOA
}

/**
 * @dev Used in both Creator Token Standards V1 and V2.
 * @dev Levels may have different transfer restrictions in V1 and V2. Refer to the 
 * @dev Creator Token Transfer Validator implementation for the version being utilized
 * @dev to determine the effect of the selected level.
 */
enum TransferSecurityLevels {
    Recommended,
    One,
    Two,
    Three,
    Four,
    Five,
    Six,
    Seven,
    Eight
}

/**
 * @dev Defines the caller and receiver constraints for a transfer security level.
 * @dev Used in Creator Token Standards V1.
 * 
 * @dev **callerConstraints**: The restrictions applied to the transfer caller.
 * @dev **receiverConstraints**: The restrictions applied to the transfer recipient.
 */
struct TransferSecurityPolicy {
    CallerConstraints callerConstraints;
    ReceiverConstraints receiverConstraints;
}

/**
 * @dev Defines the security policy for a token collection in Creator Token Standards V1.
 * 
 * @dev **transferSecurityLevel**: The transfer security level set for the collection.
 * @dev **operatorWhitelistId**: The list id for the operator whitelist.
 * @dev **permittedContractReceiversId: The list id for the contracts that are allowed to receive tokens.
 */
struct CollectionSecurityPolicy {
    TransferSecurityLevels transferSecurityLevel;
    uint120 operatorWhitelistId;
    uint120 permittedContractReceiversId;
}

/**
 * @dev Defines the security policy for a token collection in Creator Token Standards V2.
 * 
 * @dev **transferSecurityLevel**: The transfer security level set for the collection.
 * @dev **listId**: The list id that contains the blacklist and whitelist to apply to the collection.
 */
struct CollectionSecurityPolicyV2 {
    TransferSecurityLevels transferSecurityLevel;
    uint120 listId;
}

/** 
 * @dev Used internally in the Creator Token Base V2 contract to pack transfer validator configuration.
 * 
 * @dev **isInitialized**: If not initialized by the collection owner or admin the default validator will be used.
 * @dev **version**: The transfer validator version.
 * @dev **transferValidator**: The address of the transfer validator to use for applying collection security settings.
 */
struct TransferValidatorReference {
    bool isInitialized;
    uint16 version;
    address transferValidator;
}

File 9 of 23 : 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 {
    
    /// @dev Thrown when the from and to address are both the zero address.
    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 10 of 23 : CreatorTokenBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@limitbreak/creator-token-standards/src/access/OwnablePermissions.sol";
import "@limitbreak/creator-token-standards/src/interfaces/ICreatorToken.sol";
import "@limitbreak/creator-token-standards/src/interfaces/ICreatorTokenTransferValidator.sol";
import "@limitbreak/creator-token-standards/src/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
{
    /**
     * @dev Thrown when the transfer validator address is the zero address
     * @dev or it does not implement the `ICreatorTokenTransferValidator` interface.
     */
    error CreatorTokenBase__InvalidTransferValidatorContract();

    /// @dev Thrown when attempting to set transfer security settings before a transfer validator is set.
    error CreatorTokenBase__SetTransferValidatorFirst();

    /// @dev The default transfer validator address for calls to `setToDefaultSecurityPolicy`.
    address public constant DEFAULT_TRANSFER_VALIDATOR =
        address(0x721C00182a990771244d7A71B9FA2ea789A3b433);

    /// @dev The default transfer security level for calls to `setToDefaultSecurityPolicy`.
    TransferSecurityLevels public constant DEFAULT_TRANSFER_SECURITY_LEVEL =
        TransferSecurityLevels.Two;

    /// @dev The default operator whitelist id for calls to `setToDefaultSecurityPolicy`.
    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.Recommended,
                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 11 of 23 : ERC721ACQueryable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./CreatorTokenBase.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";

/**
 * @title ERC721ACQueryable
 */
abstract contract ERC721ACQueryable is ERC721AQueryable, CreatorTokenBase {
    constructor(
        string memory name_,
        string memory symbol_
    ) CreatorTokenBase() ERC721A(name_, symbol_) {}

    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC721A, IERC721A) returns (bool) {
        return
            interfaceId == type(ICreatorToken).interfaceId ||
            ERC721A.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 12 of 23 : UpdatableRoyalties.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol";

/**
 * @title BasicRoyaltiesBase
 */
abstract contract UpdatableRoyalties is ERC2981, Ownable {
    event DefaultRoyaltySet(address indexed receiver, uint96 feeNumerator);
    event TokenRoyaltySet(
        uint256 indexed tokenId,
        address indexed receiver,
        uint96 feeNumerator
    );

    constructor(address receiver, uint96 feeNumerator) {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    function setDefaultRoyalty(
        address receiver,
        uint96 feeNumerator
    ) public onlyOwner {
        super._setDefaultRoyalty(receiver, feeNumerator);
        emit DefaultRoyaltySet(receiver, feeNumerator);
    }

    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) public onlyOwner {
        super._setTokenRoyalty(tokenId, receiver, feeNumerator);
        emit TokenRoyaltySet(tokenId, receiver, feeNumerator);
    }
}

File 13 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 15 of 23 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

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

File 16 of 23 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

File 17 of 23 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 20 of 23 : 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 21 of 23 : 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 22 of 23 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

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

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

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

pragma solidity ^0.8.4;

import '../IERC721A.sol';

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"initialSupplyTarget","type":"address"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"uint96","name":"royaltyFeeNumerator","type":"uint96"}],"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":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"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":"INITIAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[{"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":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801562000010575f80fd5b50604051620039af380380620039af833981016040819052620000339162000533565b82816040518060400160405280601881526020017f506c616e65742041746d6f73207c20476f6c642048656c6d000000000000000081525060405180604001604052806008815260200167474f4c4448454c4d60c01b815250818181600290816200009f9190620006c3565b506003620000ae8282620006c3565b505060015f5550620000c49150339050620000f9565b620000d082826200014a565b50620000e090508460326200024f565b600c620000ee8382620006c3565b5050505050620007b1565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6127106001600160601b0382161115620001be5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002165760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001b5565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b5f546001600160a01b0383166200027857604051622e076360e81b815260040160405180910390fd5b815f03620002995760405163b562e8dd60e01b815260040160405180910390fd5b611388821115620002bd57604051633db1f9af60e01b815260040160405180910390fd5b620002cb5f84838562000360565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600482528083206001871460e11b4260a01b178517905580515f19868801018152905185927fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d928290030190a48082015f9081556200035b9084838562000393565b505050565b5f5b818110156200038c576200038385856200037d84876200078b565b620003bf565b60010162000362565b5050505050565b5f5b818110156200038c57620003b68585620003b084876200078b565b6200041c565b60010162000395565b6001600160a01b038381161590831615818015620003da5750805b15620003f957604051635cbd944160e01b815260040160405180910390fd5b811562000407575b6200038c565b8062000401576200038c338686863462000468565b6001600160a01b038381161590831615818015620004375750805b156200045657604051635cbd944160e01b815260040160405180910390fd5b8162000401578062000401576200038c565b600a546001600160a01b0316156200038c57600a5460405163050bf71960e31b81526001600160a01b038781166004830152868116602483015285811660448301529091169063285fb8c8906064015f6040518083038186803b158015620004ce575f80fd5b505afa158015620004e1573d5f803e3d5ffd5b505050505050505050565b80516001600160a01b038116811462000503575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b80516001600160601b038116811462000503575f80fd5b5f805f806080858703121562000547575f80fd5b6200055285620004ec565b9350602062000563818701620004ec565b60408701519094506001600160401b038082111562000580575f80fd5b818801915088601f83011262000594575f80fd5b815181811115620005a957620005a962000508565b604051601f8201601f19908116603f01168101908382118183101715620005d457620005d462000508565b816040528281528b86848701011115620005ec575f80fd5b5f93505b828410156200060f5784840186015181850187015292850192620005f0565b5f8684830101528097505050505050506200062d606086016200051c565b905092959194509250565b600181811c908216806200064d57607f821691505b6020821081036200066c57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200035b575f81815260208120601f850160051c810160208610156200069a5750805b601f850160051c820191505b81811015620006bb57828155600101620006a6565b505050505050565b81516001600160401b03811115620006df57620006df62000508565b620006f781620006f0845462000638565b8462000672565b602080601f8311600181146200072d575f8415620007155750858301515b5f19600386901b1c1916600185901b178555620006bb565b5f85815260208120601f198616915b828110156200075d578886015182559484019460019091019084016200073c565b50858210156200077b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b80820180821115620007ab57634e487b7160e01b5f52601160045260245ffd5b92915050565b6131f080620007bf5f395ff3fe60806040526004361061025f575f3560e01c80635d4c1d461161013f578063a22cb465116100b3578063c87b56dd11610078578063c87b56dd14610729578063d007af5c14610748578063e58306f91461075c578063e985e9c51461077b578063f2fde38b146107c2578063fd762d92146107e1575f80fd5b8063a22cb4651461068b578063a9fc664e146106aa578063b88d4fde146106c9578063be537f43146106dc578063c23dc68f146106fd575f80fd5b8063715018a611610104578063715018a6146105dc5780638462151c146105f05780638da5cb5b1461061c57806395d89b411461063957806399a2557a1461064d5780639d645a441461066c575f80fd5b80635d4c1d461461053f578063613471621461056b5780636352211e1461058a5780636c3b8699146105a957806370a08231146105bd575f80fd5b806323b872dd116101d657806342842e0e1161019b57806342842e0e1461048257806342966c6814610495578063495c8bf9146104b457806355f804b3146104d55780635944c753146104f45780635bbb217714610513575f80fd5b806323b872dd146103ea5780632a55205a146103fd5780632e8da8291461043b5780632ff2e9dc1461045a57806332cb6b0c1461046e575f80fd5b8063081812fc11610227578063081812fc14610337578063095ea7b314610356578063098144d41461036957806318160ddd146103865780631b25b077146103aa5780631c33b328146103c9575f80fd5b8063014635461461026357806301681a62146102a757806301ffc9a7146102c857806304634d8d146102f757806306fdde0314610316575b5f80fd5b34801561026e575f80fd5b5061028a73721c00182a990771244d7a71b9fa2ea789a3b43381565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b2575f80fd5b506102c66102c13660046126fc565b610800565b005b3480156102d3575f80fd5b506102e76102e236600461272c565b6108e8565b604051901515815260200161029e565b348015610302575f80fd5b506102c6610311366004612762565b610907565b348015610321575f80fd5b5061032a610964565b60405161029e91906127e2565b348015610342575f80fd5b5061028a6103513660046127f4565b6109f4565b6102c661036436600461280b565b610a36565b348015610374575f80fd5b50600a546001600160a01b031661028a565b348015610391575f80fd5b506001545f54035f19015b60405190815260200161029e565b3480156103b5575f80fd5b506102e76103c4366004612835565b610ad4565b3480156103d4575f80fd5b506103dd600281565b60405161029e919061289d565b6102c66103f83660046128ab565b610b69565b348015610408575f80fd5b5061041c6104173660046128e9565b610d09565b604080516001600160a01b03909316835260208301919091520161029e565b348015610446575f80fd5b506102e76104553660046126fc565b610db3565b348015610465575f80fd5b5061039c603281565b348015610479575f80fd5b5061039c603c81565b6102c66104903660046128ab565b610eb9565b3480156104a0575f80fd5b506102c66104af3660046127f4565b610ed8565b3480156104bf575f80fd5b506104c8610ee4565b60405161029e9190612909565b3480156104e0575f80fd5b506102c66104ef3660046129e1565b610fee565b3480156104ff575f80fd5b506102c661050e366004612a25565b611002565b34801561051e575f80fd5b5061053261052d366004612a60565b611063565b60405161029e9190612b0a565b34801561054a575f80fd5b50610553600181565b6040516001600160781b03909116815260200161029e565b348015610576575f80fd5b506102c6610585366004612b6b565b61112a565b348015610595575f80fd5b5061028a6105a43660046127f4565b611285565b3480156105b4575f80fd5b506102c661128f565b3480156105c8575f80fd5b5061039c6105d73660046126fc565b611384565b3480156105e7575f80fd5b506102c66113d0565b3480156105fb575f80fd5b5061060f61060a3660046126fc565b6113e3565b60405161029e9190612ba8565b348015610627575f80fd5b50600b546001600160a01b031661028a565b348015610644575f80fd5b5061032a6114e7565b348015610658575f80fd5b5061060f610667366004612bdf565b6114f6565b348015610677575f80fd5b506102e76106863660046126fc565b611673565b348015610696575f80fd5b506102c66106a5366004612c1e565b611738565b3480156106b5575f80fd5b506102c66106c43660046126fc565b6117b0565b6102c66106d7366004612c55565b6118cf565b3480156106e7575f80fd5b506106f0611913565b60405161029e9190612ccf565b348015610708575f80fd5b5061071c6107173660046127f4565b6119ca565b60405161029e9190612d0a565b348015610734575f80fd5b5061032a6107433660046127f4565b611a4f565b348015610753575f80fd5b506104c8611acf565b348015610767575f80fd5b506102c661077636600461280b565b611b86565b348015610786575f80fd5b506102e7610795366004612d18565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b3480156107cd575f80fd5b506102c66107dc3660046126fc565b611bf3565b3480156107ec575f80fd5b506102c66107fb366004612d44565b611c69565b610808611d5e565b475f036108525760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064015b60405180910390fd5b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f811461089b576040519150601f19603f3d011682016040523d82523d5f602084013e6108a0565b606091505b50509050806108e45760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610849565b5050565b5f6108f282611db8565b80610901575061090182611ddc565b92915050565b61090f611d5e565b6109198282611e10565b6040516001600160601b03821681526001600160a01b038316907f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef9060200160405180910390a25050565b60606002805461097390612d9d565b80601f016020809104026020016040519081016040528092919081815260200182805461099f90612d9d565b80156109ea5780601f106109c1576101008083540402835291602001916109ea565b820191905f5260205f20905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b5f6109fe82611eca565b610a1b576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4082611285565b9050336001600160a01b03821614610a7957610a5c8133610795565b610a79576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a545f906001600160a01b031615610b5e57600a5460405163050bf71960e31b81526001600160a01b038681166004830152858116602483015284811660448301529091169063285fb8c8906064015f6040518083038186803b158015610b3a575f80fd5b505afa925050508015610b4b575060015b610b5657505f610b62565b506001610b62565b5060015b9392505050565b5f610b7382611efc565b9050836001600160a01b0316816001600160a01b031614610ba65760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054610bd18187335b6001600160a01b039081169116811491141790565b610bfc57610bdf8633610795565b610bfc57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610c2357604051633a954ecd60e21b815260040160405180910390fd5b610c308686866001611f65565b8015610c3a575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610cc657600184015f818152600460205260408120549003610cc4575f548114610cc4575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03165f8051602061319b83398151915260405160405180910390a4610d018686866001611f92565b505050505050565b5f8281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d7d5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610d9b906001600160601b031687612de9565b610da59190612e00565b915196919550909350505050565b600a545f906001600160a01b031615610eb257600a54604051635caaa2a960e11b81523060048201526001600160a01b039091169063d72dde5e90829063b955455290602401606060405180830381865afa158015610e14573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e389190612e1f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044015b602060405180830381865afa158015610e8e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109019190612e8e565b505f919050565b610ed383838360405180602001604052805f8152506118cf565b505050565b610ee181611fb8565b50565b600a546060906001600160a01b031615610fdc57600a54604051635caaa2a960e11b81523060048201526001600160a01b0390911690633fe5df9990829063b955455290602401606060405180830381865afa158015610f46573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6a9190612e1f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526024015b5f60405180830381865afa158015610fb0573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610fd79190810190612ea9565b905090565b50604080515f81526020810190915290565b610ff6611d5e565b600c6108e48282612f9a565b61100a611d5e565b611015838383611fc2565b6040516001600160601b03821681526001600160a01b0383169084907f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c9060200160405180910390a3505050565b6060815f816001600160401b0381111561107f5761107f612949565b6040519080825280602002602001820160405280156110cf57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f1990920191018161109d5790505b5090505f5b828114611121576110fc8686838181106110f0576110f0613055565b905060200201356119ca565b82828151811061110e5761110e613055565b60209081029190910101526001016110d4565b50949350505050565b61113261208c565b5f611145600a546001600160a01b031690565b90506001600160a01b03811661116e57604051631cffe3dd60e11b815260040160405180910390fd5b604051630368065360e61b81526001600160a01b0382169063da0194c09061119c9030908890600401613069565b5f604051808303815f87803b1580156111b3575f80fd5b505af11580156111c5573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0384169250632304aa0291506111f79030908790600401613086565b5f604051808303815f87803b15801561120e575f80fd5b505af1158015611220573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0384169250638d74431491506112529030908690600401613086565b5f604051808303815f87803b158015611269575f80fd5b505af115801561127b573d5f803e3d5ffd5b5050505050505050565b5f61090182611efc565b61129761208c565b6112b473721c00182a990771244d7a71b9fa2ea789a3b4336117b0565b604051630368065360e61b815273721c00182a990771244d7a71b9fa2ea789a3b4339063da0194c0906112ee903090600290600401613069565b5f604051808303815f87803b158015611305575f80fd5b505af1158015611317573d5f803e3d5ffd5b5050604051631182550160e11b815273721c00182a990771244d7a71b9fa2ea789a3b4339250632304aa029150611355903090600190600401613086565b5f604051808303815f87803b15801561136c575f80fd5b505af115801561137e573d5f803e3d5ffd5b50505050565b5f6001600160a01b0382166113ac576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b6113d8611d5e565b6113e15f612094565b565b60605f805f6113f185611384565b90505f816001600160401b0381111561140c5761140c612949565b604051908082528060200260200182016040528015611435578160200160208202803683370190505b509050611461604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146114db57611474816120e5565b915081604001516114d35781516001600160a01b03161561149457815194505b876001600160a01b0316856001600160a01b0316036114d357808387806001019850815181106114c6576114c6613055565b6020026020010181815250505b600101611464565b50909695505050505050565b60606003805461097390612d9d565b606081831061151857604051631960ccad60e11b815260040160405180910390fd5b5f806115225f5490565b9050600185101561153257600194505b8084111561153e578093505b5f61154887611384565b9050848610156115675785850381811015611561578091505b5061156a565b505f5b5f816001600160401b0381111561158357611583612949565b6040519080825280602002602001820160405280156115ac578160200160208202803683370190505b509050815f036115c1579350610b6292505050565b5f6115cb886119ca565b90505f81604001516115db575080515b885b8881141580156115ed5750848714155b15611662576115fb816120e5565b9250826040015161165a5782516001600160a01b03161561161b57825191505b8a6001600160a01b0316826001600160a01b03160361165a578084888060010199508151811061164d5761164d613055565b6020026020010181815250505b6001016115dd565b505050928352509095945050505050565b600a545f906001600160a01b031615610eb257600a54604051635caaa2a960e11b81523060048201526001600160a01b0390911690639445f53090829063b955455290602401606060405180830381865afa1580156116d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f89190612e1f565b60409081015190516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b0385166024820152604401610e73565b335f8181526007602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117a4911515815260200190565b60405180910390a35050565b6117b861208c565b5f6001600160a01b0382163b15611831576040516301ffc9a760e01b81525f60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015611829575060408051601f3d908101601f1916820190925261182691810190612e8e565b60015b156118315790505b6001600160a01b03821615801590611847575080155b15611865576040516332483afb60e01b815260040160405180910390fd5b600a54604080516001600160a01b03928316815291841660208301527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a150600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6118da848484610b69565b6001600160a01b0383163b1561137e576118f68484848461211f565b61137e576040516368d2bf6b60e11b815260040160405180910390fd5b604080516060810182525f8082526020820181905291810191909152600a546001600160a01b0316156119aa57600a54604051635caaa2a960e11b81523060048201526001600160a01b039091169063b955455290602401606060405180830381865afa158015611986573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd79190612e1f565b50604080516060810182525f808252602082018190529181019190915290565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091526001831080611a2057505f548310155b15611a2b5792915050565b611a34836120e5565b9050806040015115611a465792915050565b610b6283612207565b6060611a5a82611eca565b611a7757604051630a14c4b560e41b815260040160405180910390fd5b5f611a8061223b565b90505f815111611a9e5760405180602001604052805f815250610b62565b80611aa88461224a565b604051602001611ab99291906130a8565b6040516020818303038152906040529392505050565b600a546060906001600160a01b031615610fdc57600a54604051635caaa2a960e11b81523060048201526001600160a01b03909116906317e94a6c90829063b955455290602401606060405180830381865afa158015611b31573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b559190612e1f565b60409081015190516001600160e01b031960e084901b1681526001600160781b039091166004820152602401610f96565b611b8e611d5e565b6001545f54603c918391035f1901611ba691906130e6565b1115611be95760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610849565b6108e4828261228d565b611bfb611d5e565b6001600160a01b038116611c605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610849565b610ee181612094565b611c7161208c565b611c7a846117b0565b604051630368065360e61b81526001600160a01b0385169063da0194c090611ca89030908790600401613069565b5f604051808303815f87803b158015611cbf575f80fd5b505af1158015611cd1573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0387169250632304aa029150611d039030908690600401613086565b5f604051808303815f87803b158015611d1a575f80fd5b505af1158015611d2c573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0387169250638d74431491506112529030908590600401613086565b600b546001600160a01b031633146113e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610849565b5f6001600160e01b031982166310c8aba560e31b14806109015750610901826122a6565b5f6001600160e01b0319821663152a902d60e11b148061090157506301ffc9a760e01b6001600160e01b0319831614610901565b6127106001600160601b0382161115611e3b5760405162461bcd60e51b8152600401610849906130f9565b6001600160a01b038216611e915760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610849565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b5f81600111158015611edc57505f5482105b80156109015750505f90815260046020526040902054600160e01b161590565b5f8180600111611f4c575f54811015611f4c575f8181526004602052604081205490600160e01b82169003611f4a575b805f03610b6257505f19015f81815260046020526040902054611f2c565b505b604051636f96cda160e11b815260040160405180910390fd5b5f5b81811015611f8b57611f838585611f7e84876130e6565b6122f3565b600101611f67565b5050505050565b5f5b81811015611f8b57611fb08585611fab84876130e6565b612349565b600101611f94565b610ee1815f612390565b6127106001600160601b0382161115611fed5760405162461bcd60e51b8152600401610849906130f9565b6001600160a01b0382166120435760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610849565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182525f968752600990529190942093519051909116600160a01b029116179055565b6113e1611d5e565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610901906124d7565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612153903390899088908890600401613143565b6020604051808303815f875af192505050801561218d575060408051601f3d908101601f1916820190925261218a9181019061317f565b60015b6121e9573d8080156121ba576040519150601f19603f3d011682016040523d82523d5f602084013e6121bf565b606091505b5080515f036121e1576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182525f80825260208201819052918101829052606081019190915261090161223683611efc565b6124d7565b6060600c805461097390612d9d565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806122635750819003601f19909101908152919050565b6108e4828260405180602001604052805f81525061251e565b5f6301ffc9a760e01b6001600160e01b0319831614806122d657506380ac58cd60e01b6001600160e01b03198316145b806109015750506001600160e01b031916635b5e139f60e01b1490565b6001600160a01b03838116159083161581801561230d5750805b1561232b57604051635cbd944160e01b815260040160405180910390fd5b8115612337575b611f8b565b8061233257611f8b3386868634612580565b6001600160a01b0383811615908316158180156123635750805b1561238157604051635cbd944160e01b815260040160405180910390fd5b81612332578061233257611f8b565b5f61239a83611efc565b9050805f806123b6865f90815260066020526040902080549091565b9150915084156123f6576123cb818433610bbc565b6123f6576123d98333610795565b6123f657604051632ce44b5f60e11b815260040160405180910390fd5b612403835f886001611f65565b801561240d575f82555b6001600160a01b0383165f81815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b175f87815260046020526040812091909155600160e11b8516900361249657600186015f818152600460205260408120549003612494575f548114612494575f8181526004602052604090208590555b505b60405186905f906001600160a01b038616905f8051602061319b833981519152908390a46124c7835f886001611f92565b5050600180548101905550505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6125288383612601565b6001600160a01b0383163b15610ed3575f548281035b6125505f86838060010194508661211f565b61256d576040516368d2bf6b60e11b815260040160405180910390fd5b81811061253e57815f5414611f8b575f80fd5b600a546001600160a01b031615611f8b57600a5460405163050bf71960e31b81526001600160a01b038781166004830152868116602483015285811660448301529091169063285fb8c8906064015f6040518083038186803b1580156125e4575f80fd5b505afa1580156125f6573d5f803e3d5ffd5b505050505050505050565b5f8054908290036126255760405163b562e8dd60e01b815260040160405180910390fd5b6126315f848385611f65565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083905f8051602061319b8339815191528180a4600183015b8181146126b75780835f5f8051602061319b8339815191525f80a4600101612694565b50815f036126d757604051622e076360e81b815260040160405180910390fd5b5f908155610ed39150848385611f92565b6001600160a01b0381168114610ee1575f80fd5b5f6020828403121561270c575f80fd5b8135610b62816126e8565b6001600160e01b031981168114610ee1575f80fd5b5f6020828403121561273c575f80fd5b8135610b6281612717565b80356001600160601b038116811461275d575f80fd5b919050565b5f8060408385031215612773575f80fd5b823561277e816126e8565b915061278c60208401612747565b90509250929050565b5f5b838110156127af578181015183820152602001612797565b50505f910152565b5f81518084526127ce816020860160208601612795565b601f01601f19169290920160200192915050565b602081525f610b6260208301846127b7565b5f60208284031215612804575f80fd5b5035919050565b5f806040838503121561281c575f80fd5b8235612827816126e8565b946020939093013593505050565b5f805f60608486031215612847575f80fd5b8335612852816126e8565b92506020840135612862816126e8565b91506040840135612872816126e8565b809150509250925092565b6009811061289957634e487b7160e01b5f52602160045260245ffd5b9052565b60208101610901828461287d565b5f805f606084860312156128bd575f80fd5b83356128c8816126e8565b925060208401356128d8816126e8565b929592945050506040919091013590565b5f80604083850312156128fa575f80fd5b50508035926020909101359150565b602080825282518282018190525f9190848201906040850190845b818110156114db5783516001600160a01b031683529284019291840191600101612924565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561298557612985612949565b604052919050565b5f6001600160401b038311156129a5576129a5612949565b6129b8601f8401601f191660200161295d565b90508281528383830111156129cb575f80fd5b828260208301375f602084830101529392505050565b5f602082840312156129f1575f80fd5b81356001600160401b03811115612a06575f80fd5b8201601f81018413612a16575f80fd5b6121ff8482356020840161298d565b5f805f60608486031215612a37575f80fd5b833592506020840135612a49816126e8565b9150612a5760408501612747565b90509250925092565b5f8060208385031215612a71575f80fd5b82356001600160401b0380821115612a87575f80fd5b818501915085601f830112612a9a575f80fd5b813581811115612aa8575f80fd5b8660208260051b8501011115612abc575f80fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156114db57612b38838551612ace565b9284019260809290920191600101612b25565b60098110610ee1575f80fd5b6001600160781b0381168114610ee1575f80fd5b5f805f60608486031215612b7d575f80fd5b8335612b8881612b4b565b92506020840135612b9881612b57565b9150604084013561287281612b57565b602080825282518282018190525f9190848201906040850190845b818110156114db57835183529284019291840191600101612bc3565b5f805f60608486031215612bf1575f80fd5b8335612bfc816126e8565b95602085013595506040909401359392505050565b8015158114610ee1575f80fd5b5f8060408385031215612c2f575f80fd5b8235612c3a816126e8565b91506020830135612c4a81612c11565b809150509250929050565b5f805f8060808587031215612c68575f80fd5b8435612c73816126e8565b93506020850135612c83816126e8565b92506040850135915060608501356001600160401b03811115612ca4575f80fd5b8501601f81018713612cb4575f80fd5b612cc38782356020840161298d565b91505092959194509250565b5f606082019050612ce182845161287d565b60208301516001600160781b038082166020850152806040860151166040850152505092915050565b608081016109018284612ace565b5f8060408385031215612d29575f80fd5b8235612d34816126e8565b91506020830135612c4a816126e8565b5f805f8060808587031215612d57575f80fd5b8435612d62816126e8565b93506020850135612d7281612b4b565b92506040850135612d8281612b57565b91506060850135612d9281612b57565b939692955090935050565b600181811c90821680612db157607f821691505b602082108103612dcf57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761090157610901612dd5565b5f82612e1a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60608284031215612e2f575f80fd5b604051606081018181106001600160401b0382111715612e5157612e51612949565b6040528251612e5f81612b4b565b81526020830151612e6f81612b57565b60208201526040830151612e8281612b57565b60408201529392505050565b5f60208284031215612e9e575f80fd5b8151610b6281612c11565b5f6020808385031215612eba575f80fd5b82516001600160401b0380821115612ed0575f80fd5b818501915085601f830112612ee3575f80fd5b815181811115612ef557612ef5612949565b8060051b9150612f0684830161295d565b8181529183018401918481019088841115612f1f575f80fd5b938501935b83851015612f495784519250612f39836126e8565b8282529385019390850190612f24565b98975050505050505050565b601f821115610ed3575f81815260208120601f850160051c81016020861015612f7b5750805b601f850160051c820191505b81811015610d0157828155600101612f87565b81516001600160401b03811115612fb357612fb3612949565b612fc781612fc18454612d9d565b84612f55565b602080601f831160018114612ffa575f8415612fe35750858301515b5f19600386901b1c1916600185901b178555610d01565b5f85815260208120601f198616915b8281101561302857888601518255948401946001909101908401613009565b508582101561304557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b038316815260408101610b62602083018461287d565b6001600160a01b039290921682526001600160781b0316602082015260400190565b5f83516130b9818460208801612795565b8351908301906130cd818360208801612795565b64173539b7b760d91b9101908152600501949350505050565b8082018082111561090157610901612dd5565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90613175908301846127b7565b9695505050505050565b5f6020828403121561318f575f80fd5b8151610b628161271756feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220978df6b22501620bf895f1968dba2e0a0edcb887aec083a0e8b705dc23915cc064736f6c63430008140033000000000000000000000000cf70c021e04e9ce8123cee078b6d8f99c84608c6000000000000000000000000fe9df826ed3beee9b7ed91f8deaf152db19c2af3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061025f575f3560e01c80635d4c1d461161013f578063a22cb465116100b3578063c87b56dd11610078578063c87b56dd14610729578063d007af5c14610748578063e58306f91461075c578063e985e9c51461077b578063f2fde38b146107c2578063fd762d92146107e1575f80fd5b8063a22cb4651461068b578063a9fc664e146106aa578063b88d4fde146106c9578063be537f43146106dc578063c23dc68f146106fd575f80fd5b8063715018a611610104578063715018a6146105dc5780638462151c146105f05780638da5cb5b1461061c57806395d89b411461063957806399a2557a1461064d5780639d645a441461066c575f80fd5b80635d4c1d461461053f578063613471621461056b5780636352211e1461058a5780636c3b8699146105a957806370a08231146105bd575f80fd5b806323b872dd116101d657806342842e0e1161019b57806342842e0e1461048257806342966c6814610495578063495c8bf9146104b457806355f804b3146104d55780635944c753146104f45780635bbb217714610513575f80fd5b806323b872dd146103ea5780632a55205a146103fd5780632e8da8291461043b5780632ff2e9dc1461045a57806332cb6b0c1461046e575f80fd5b8063081812fc11610227578063081812fc14610337578063095ea7b314610356578063098144d41461036957806318160ddd146103865780631b25b077146103aa5780631c33b328146103c9575f80fd5b8063014635461461026357806301681a62146102a757806301ffc9a7146102c857806304634d8d146102f757806306fdde0314610316575b5f80fd5b34801561026e575f80fd5b5061028a73721c00182a990771244d7a71b9fa2ea789a3b43381565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b2575f80fd5b506102c66102c13660046126fc565b610800565b005b3480156102d3575f80fd5b506102e76102e236600461272c565b6108e8565b604051901515815260200161029e565b348015610302575f80fd5b506102c6610311366004612762565b610907565b348015610321575f80fd5b5061032a610964565b60405161029e91906127e2565b348015610342575f80fd5b5061028a6103513660046127f4565b6109f4565b6102c661036436600461280b565b610a36565b348015610374575f80fd5b50600a546001600160a01b031661028a565b348015610391575f80fd5b506001545f54035f19015b60405190815260200161029e565b3480156103b5575f80fd5b506102e76103c4366004612835565b610ad4565b3480156103d4575f80fd5b506103dd600281565b60405161029e919061289d565b6102c66103f83660046128ab565b610b69565b348015610408575f80fd5b5061041c6104173660046128e9565b610d09565b604080516001600160a01b03909316835260208301919091520161029e565b348015610446575f80fd5b506102e76104553660046126fc565b610db3565b348015610465575f80fd5b5061039c603281565b348015610479575f80fd5b5061039c603c81565b6102c66104903660046128ab565b610eb9565b3480156104a0575f80fd5b506102c66104af3660046127f4565b610ed8565b3480156104bf575f80fd5b506104c8610ee4565b60405161029e9190612909565b3480156104e0575f80fd5b506102c66104ef3660046129e1565b610fee565b3480156104ff575f80fd5b506102c661050e366004612a25565b611002565b34801561051e575f80fd5b5061053261052d366004612a60565b611063565b60405161029e9190612b0a565b34801561054a575f80fd5b50610553600181565b6040516001600160781b03909116815260200161029e565b348015610576575f80fd5b506102c6610585366004612b6b565b61112a565b348015610595575f80fd5b5061028a6105a43660046127f4565b611285565b3480156105b4575f80fd5b506102c661128f565b3480156105c8575f80fd5b5061039c6105d73660046126fc565b611384565b3480156105e7575f80fd5b506102c66113d0565b3480156105fb575f80fd5b5061060f61060a3660046126fc565b6113e3565b60405161029e9190612ba8565b348015610627575f80fd5b50600b546001600160a01b031661028a565b348015610644575f80fd5b5061032a6114e7565b348015610658575f80fd5b5061060f610667366004612bdf565b6114f6565b348015610677575f80fd5b506102e76106863660046126fc565b611673565b348015610696575f80fd5b506102c66106a5366004612c1e565b611738565b3480156106b5575f80fd5b506102c66106c43660046126fc565b6117b0565b6102c66106d7366004612c55565b6118cf565b3480156106e7575f80fd5b506106f0611913565b60405161029e9190612ccf565b348015610708575f80fd5b5061071c6107173660046127f4565b6119ca565b60405161029e9190612d0a565b348015610734575f80fd5b5061032a6107433660046127f4565b611a4f565b348015610753575f80fd5b506104c8611acf565b348015610767575f80fd5b506102c661077636600461280b565b611b86565b348015610786575f80fd5b506102e7610795366004612d18565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b3480156107cd575f80fd5b506102c66107dc3660046126fc565b611bf3565b3480156107ec575f80fd5b506102c66107fb366004612d44565b611c69565b610808611d5e565b475f036108525760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b60448201526064015b60405180910390fd5b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f811461089b576040519150601f19603f3d011682016040523d82523d5f602084013e6108a0565b606091505b50509050806108e45760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610849565b5050565b5f6108f282611db8565b80610901575061090182611ddc565b92915050565b61090f611d5e565b6109198282611e10565b6040516001600160601b03821681526001600160a01b038316907f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef9060200160405180910390a25050565b60606002805461097390612d9d565b80601f016020809104026020016040519081016040528092919081815260200182805461099f90612d9d565b80156109ea5780601f106109c1576101008083540402835291602001916109ea565b820191905f5260205f20905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b5f6109fe82611eca565b610a1b576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4082611285565b9050336001600160a01b03821614610a7957610a5c8133610795565b610a79576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600a545f906001600160a01b031615610b5e57600a5460405163050bf71960e31b81526001600160a01b038681166004830152858116602483015284811660448301529091169063285fb8c8906064015f6040518083038186803b158015610b3a575f80fd5b505afa925050508015610b4b575060015b610b5657505f610b62565b506001610b62565b5060015b9392505050565b5f610b7382611efc565b9050836001600160a01b0316816001600160a01b031614610ba65760405162a1148160e81b815260040160405180910390fd5b5f8281526006602052604090208054610bd18187335b6001600160a01b039081169116811491141790565b610bfc57610bdf8633610795565b610bfc57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610c2357604051633a954ecd60e21b815260040160405180910390fd5b610c308686866001611f65565b8015610c3a575f82555b6001600160a01b038681165f9081526005602052604080822080545f19019055918716808252919020805460010190554260a01b17600160e11b175f85815260046020526040812091909155600160e11b84169003610cc657600184015f818152600460205260408120549003610cc4575f548114610cc4575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03165f8051602061319b83398151915260405160405180910390a4610d018686866001611f92565b505050505050565b5f8281526009602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d7d5750604080518082019091526008546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610d9b906001600160601b031687612de9565b610da59190612e00565b915196919550909350505050565b600a545f906001600160a01b031615610eb257600a54604051635caaa2a960e11b81523060048201526001600160a01b039091169063d72dde5e90829063b955455290602401606060405180830381865afa158015610e14573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e389190612e1f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b03851660248201526044015b602060405180830381865afa158015610e8e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109019190612e8e565b505f919050565b610ed383838360405180602001604052805f8152506118cf565b505050565b610ee181611fb8565b50565b600a546060906001600160a01b031615610fdc57600a54604051635caaa2a960e11b81523060048201526001600160a01b0390911690633fe5df9990829063b955455290602401606060405180830381865afa158015610f46573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f6a9190612e1f565b602001516040516001600160e01b031960e084901b1681526001600160781b0390911660048201526024015b5f60405180830381865afa158015610fb0573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610fd79190810190612ea9565b905090565b50604080515f81526020810190915290565b610ff6611d5e565b600c6108e48282612f9a565b61100a611d5e565b611015838383611fc2565b6040516001600160601b03821681526001600160a01b0383169084907f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c9060200160405180910390a3505050565b6060815f816001600160401b0381111561107f5761107f612949565b6040519080825280602002602001820160405280156110cf57816020015b604080516080810182525f8082526020808301829052928201819052606082015282525f1990920191018161109d5790505b5090505f5b828114611121576110fc8686838181106110f0576110f0613055565b905060200201356119ca565b82828151811061110e5761110e613055565b60209081029190910101526001016110d4565b50949350505050565b61113261208c565b5f611145600a546001600160a01b031690565b90506001600160a01b03811661116e57604051631cffe3dd60e11b815260040160405180910390fd5b604051630368065360e61b81526001600160a01b0382169063da0194c09061119c9030908890600401613069565b5f604051808303815f87803b1580156111b3575f80fd5b505af11580156111c5573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0384169250632304aa0291506111f79030908790600401613086565b5f604051808303815f87803b15801561120e575f80fd5b505af1158015611220573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0384169250638d74431491506112529030908690600401613086565b5f604051808303815f87803b158015611269575f80fd5b505af115801561127b573d5f803e3d5ffd5b5050505050505050565b5f61090182611efc565b61129761208c565b6112b473721c00182a990771244d7a71b9fa2ea789a3b4336117b0565b604051630368065360e61b815273721c00182a990771244d7a71b9fa2ea789a3b4339063da0194c0906112ee903090600290600401613069565b5f604051808303815f87803b158015611305575f80fd5b505af1158015611317573d5f803e3d5ffd5b5050604051631182550160e11b815273721c00182a990771244d7a71b9fa2ea789a3b4339250632304aa029150611355903090600190600401613086565b5f604051808303815f87803b15801561136c575f80fd5b505af115801561137e573d5f803e3d5ffd5b50505050565b5f6001600160a01b0382166113ac576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b6113d8611d5e565b6113e15f612094565b565b60605f805f6113f185611384565b90505f816001600160401b0381111561140c5761140c612949565b604051908082528060200260200182016040528015611435578160200160208202803683370190505b509050611461604080516080810182525f80825260208201819052918101829052606081019190915290565b60015b8386146114db57611474816120e5565b915081604001516114d35781516001600160a01b03161561149457815194505b876001600160a01b0316856001600160a01b0316036114d357808387806001019850815181106114c6576114c6613055565b6020026020010181815250505b600101611464565b50909695505050505050565b60606003805461097390612d9d565b606081831061151857604051631960ccad60e11b815260040160405180910390fd5b5f806115225f5490565b9050600185101561153257600194505b8084111561153e578093505b5f61154887611384565b9050848610156115675785850381811015611561578091505b5061156a565b505f5b5f816001600160401b0381111561158357611583612949565b6040519080825280602002602001820160405280156115ac578160200160208202803683370190505b509050815f036115c1579350610b6292505050565b5f6115cb886119ca565b90505f81604001516115db575080515b885b8881141580156115ed5750848714155b15611662576115fb816120e5565b9250826040015161165a5782516001600160a01b03161561161b57825191505b8a6001600160a01b0316826001600160a01b03160361165a578084888060010199508151811061164d5761164d613055565b6020026020010181815250505b6001016115dd565b505050928352509095945050505050565b600a545f906001600160a01b031615610eb257600a54604051635caaa2a960e11b81523060048201526001600160a01b0390911690639445f53090829063b955455290602401606060405180830381865afa1580156116d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116f89190612e1f565b60409081015190516001600160e01b031960e084901b1681526001600160781b0390911660048201526001600160a01b0385166024820152604401610e73565b335f8181526007602090815260408083206001600160a01b0387168085529252909120805460ff1916841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516117a4911515815260200190565b60405180910390a35050565b6117b861208c565b5f6001600160a01b0382163b15611831576040516301ffc9a760e01b81525f60048201526001600160a01b038316906301ffc9a790602401602060405180830381865afa925050508015611829575060408051601f3d908101601f1916820190925261182691810190612e8e565b60015b156118315790505b6001600160a01b03821615801590611847575080155b15611865576040516332483afb60e01b815260040160405180910390fd5b600a54604080516001600160a01b03928316815291841660208301527fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac910160405180910390a150600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6118da848484610b69565b6001600160a01b0383163b1561137e576118f68484848461211f565b61137e576040516368d2bf6b60e11b815260040160405180910390fd5b604080516060810182525f8082526020820181905291810191909152600a546001600160a01b0316156119aa57600a54604051635caaa2a960e11b81523060048201526001600160a01b039091169063b955455290602401606060405180830381865afa158015611986573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fd79190612e1f565b50604080516060810182525f808252602082018190529181019190915290565b604080516080810182525f808252602082018190529181018290526060810191909152604080516080810182525f8082526020820181905291810182905260608101919091526001831080611a2057505f548310155b15611a2b5792915050565b611a34836120e5565b9050806040015115611a465792915050565b610b6283612207565b6060611a5a82611eca565b611a7757604051630a14c4b560e41b815260040160405180910390fd5b5f611a8061223b565b90505f815111611a9e5760405180602001604052805f815250610b62565b80611aa88461224a565b604051602001611ab99291906130a8565b6040516020818303038152906040529392505050565b600a546060906001600160a01b031615610fdc57600a54604051635caaa2a960e11b81523060048201526001600160a01b03909116906317e94a6c90829063b955455290602401606060405180830381865afa158015611b31573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b559190612e1f565b60409081015190516001600160e01b031960e084901b1681526001600160781b039091166004820152602401610f96565b611b8e611d5e565b6001545f54603c918391035f1901611ba691906130e6565b1115611be95760405162461bcd60e51b815260206004820152601260248201527145786365656473206d617820737570706c7960701b6044820152606401610849565b6108e4828261228d565b611bfb611d5e565b6001600160a01b038116611c605760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610849565b610ee181612094565b611c7161208c565b611c7a846117b0565b604051630368065360e61b81526001600160a01b0385169063da0194c090611ca89030908790600401613069565b5f604051808303815f87803b158015611cbf575f80fd5b505af1158015611cd1573d5f803e3d5ffd5b5050604051631182550160e11b81526001600160a01b0387169250632304aa029150611d039030908690600401613086565b5f604051808303815f87803b158015611d1a575f80fd5b505af1158015611d2c573d5f803e3d5ffd5b505060405163235d10c560e21b81526001600160a01b0387169250638d74431491506112529030908590600401613086565b600b546001600160a01b031633146113e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610849565b5f6001600160e01b031982166310c8aba560e31b14806109015750610901826122a6565b5f6001600160e01b0319821663152a902d60e11b148061090157506301ffc9a760e01b6001600160e01b0319831614610901565b6127106001600160601b0382161115611e3b5760405162461bcd60e51b8152600401610849906130f9565b6001600160a01b038216611e915760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610849565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600855565b5f81600111158015611edc57505f5482105b80156109015750505f90815260046020526040902054600160e01b161590565b5f8180600111611f4c575f54811015611f4c575f8181526004602052604081205490600160e01b82169003611f4a575b805f03610b6257505f19015f81815260046020526040902054611f2c565b505b604051636f96cda160e11b815260040160405180910390fd5b5f5b81811015611f8b57611f838585611f7e84876130e6565b6122f3565b600101611f67565b5050505050565b5f5b81811015611f8b57611fb08585611fab84876130e6565b612349565b600101611f94565b610ee1815f612390565b6127106001600160601b0382161115611fed5760405162461bcd60e51b8152600401610849906130f9565b6001600160a01b0382166120435760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610849565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182525f968752600990529190942093519051909116600160a01b029116179055565b6113e1611d5e565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b604080516080810182525f8082526020820181905291810182905260608101919091525f82815260046020526040902054610901906124d7565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a0290612153903390899088908890600401613143565b6020604051808303815f875af192505050801561218d575060408051601f3d908101601f1916820190925261218a9181019061317f565b60015b6121e9573d8080156121ba576040519150601f19603f3d011682016040523d82523d5f602084013e6121bf565b606091505b5080515f036121e1576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080810182525f80825260208201819052918101829052606081019190915261090161223683611efc565b6124d7565b6060600c805461097390612d9d565b606060a06040510180604052602081039150505f815280825b600183039250600a81066030018353600a9004806122635750819003601f19909101908152919050565b6108e4828260405180602001604052805f81525061251e565b5f6301ffc9a760e01b6001600160e01b0319831614806122d657506380ac58cd60e01b6001600160e01b03198316145b806109015750506001600160e01b031916635b5e139f60e01b1490565b6001600160a01b03838116159083161581801561230d5750805b1561232b57604051635cbd944160e01b815260040160405180910390fd5b8115612337575b611f8b565b8061233257611f8b3386868634612580565b6001600160a01b0383811615908316158180156123635750805b1561238157604051635cbd944160e01b815260040160405180910390fd5b81612332578061233257611f8b565b5f61239a83611efc565b9050805f806123b6865f90815260066020526040902080549091565b9150915084156123f6576123cb818433610bbc565b6123f6576123d98333610795565b6123f657604051632ce44b5f60e11b815260040160405180910390fd5b612403835f886001611f65565b801561240d575f82555b6001600160a01b0383165f81815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b175f87815260046020526040812091909155600160e11b8516900361249657600186015f818152600460205260408120549003612494575f548114612494575f8181526004602052604090208590555b505b60405186905f906001600160a01b038616905f8051602061319b833981519152908390a46124c7835f886001611f92565b5050600180548101905550505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6125288383612601565b6001600160a01b0383163b15610ed3575f548281035b6125505f86838060010194508661211f565b61256d576040516368d2bf6b60e11b815260040160405180910390fd5b81811061253e57815f5414611f8b575f80fd5b600a546001600160a01b031615611f8b57600a5460405163050bf71960e31b81526001600160a01b038781166004830152868116602483015285811660448301529091169063285fb8c8906064015f6040518083038186803b1580156125e4575f80fd5b505afa1580156125f6573d5f803e3d5ffd5b505050505050505050565b5f8054908290036126255760405163b562e8dd60e01b815260040160405180910390fd5b6126315f848385611f65565b6001600160a01b0383165f8181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083905f8051602061319b8339815191528180a4600183015b8181146126b75780835f5f8051602061319b8339815191525f80a4600101612694565b50815f036126d757604051622e076360e81b815260040160405180910390fd5b5f908155610ed39150848385611f92565b6001600160a01b0381168114610ee1575f80fd5b5f6020828403121561270c575f80fd5b8135610b62816126e8565b6001600160e01b031981168114610ee1575f80fd5b5f6020828403121561273c575f80fd5b8135610b6281612717565b80356001600160601b038116811461275d575f80fd5b919050565b5f8060408385031215612773575f80fd5b823561277e816126e8565b915061278c60208401612747565b90509250929050565b5f5b838110156127af578181015183820152602001612797565b50505f910152565b5f81518084526127ce816020860160208601612795565b601f01601f19169290920160200192915050565b602081525f610b6260208301846127b7565b5f60208284031215612804575f80fd5b5035919050565b5f806040838503121561281c575f80fd5b8235612827816126e8565b946020939093013593505050565b5f805f60608486031215612847575f80fd5b8335612852816126e8565b92506020840135612862816126e8565b91506040840135612872816126e8565b809150509250925092565b6009811061289957634e487b7160e01b5f52602160045260245ffd5b9052565b60208101610901828461287d565b5f805f606084860312156128bd575f80fd5b83356128c8816126e8565b925060208401356128d8816126e8565b929592945050506040919091013590565b5f80604083850312156128fa575f80fd5b50508035926020909101359150565b602080825282518282018190525f9190848201906040850190845b818110156114db5783516001600160a01b031683529284019291840191600101612924565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b038111828210171561298557612985612949565b604052919050565b5f6001600160401b038311156129a5576129a5612949565b6129b8601f8401601f191660200161295d565b90508281528383830111156129cb575f80fd5b828260208301375f602084830101529392505050565b5f602082840312156129f1575f80fd5b81356001600160401b03811115612a06575f80fd5b8201601f81018413612a16575f80fd5b6121ff8482356020840161298d565b5f805f60608486031215612a37575f80fd5b833592506020840135612a49816126e8565b9150612a5760408501612747565b90509250925092565b5f8060208385031215612a71575f80fd5b82356001600160401b0380821115612a87575f80fd5b818501915085601f830112612a9a575f80fd5b813581811115612aa8575f80fd5b8660208260051b8501011115612abc575f80fd5b60209290920196919550909350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b602080825282518282018190525f9190848201906040850190845b818110156114db57612b38838551612ace565b9284019260809290920191600101612b25565b60098110610ee1575f80fd5b6001600160781b0381168114610ee1575f80fd5b5f805f60608486031215612b7d575f80fd5b8335612b8881612b4b565b92506020840135612b9881612b57565b9150604084013561287281612b57565b602080825282518282018190525f9190848201906040850190845b818110156114db57835183529284019291840191600101612bc3565b5f805f60608486031215612bf1575f80fd5b8335612bfc816126e8565b95602085013595506040909401359392505050565b8015158114610ee1575f80fd5b5f8060408385031215612c2f575f80fd5b8235612c3a816126e8565b91506020830135612c4a81612c11565b809150509250929050565b5f805f8060808587031215612c68575f80fd5b8435612c73816126e8565b93506020850135612c83816126e8565b92506040850135915060608501356001600160401b03811115612ca4575f80fd5b8501601f81018713612cb4575f80fd5b612cc38782356020840161298d565b91505092959194509250565b5f606082019050612ce182845161287d565b60208301516001600160781b038082166020850152806040860151166040850152505092915050565b608081016109018284612ace565b5f8060408385031215612d29575f80fd5b8235612d34816126e8565b91506020830135612c4a816126e8565b5f805f8060808587031215612d57575f80fd5b8435612d62816126e8565b93506020850135612d7281612b4b565b92506040850135612d8281612b57565b91506060850135612d9281612b57565b939692955090935050565b600181811c90821680612db157607f821691505b602082108103612dcf57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b808202811582820484141761090157610901612dd5565b5f82612e1a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f60608284031215612e2f575f80fd5b604051606081018181106001600160401b0382111715612e5157612e51612949565b6040528251612e5f81612b4b565b81526020830151612e6f81612b57565b60208201526040830151612e8281612b57565b60408201529392505050565b5f60208284031215612e9e575f80fd5b8151610b6281612c11565b5f6020808385031215612eba575f80fd5b82516001600160401b0380821115612ed0575f80fd5b818501915085601f830112612ee3575f80fd5b815181811115612ef557612ef5612949565b8060051b9150612f0684830161295d565b8181529183018401918481019088841115612f1f575f80fd5b938501935b83851015612f495784519250612f39836126e8565b8282529385019390850190612f24565b98975050505050505050565b601f821115610ed3575f81815260208120601f850160051c81016020861015612f7b5750805b601f850160051c820191505b81811015610d0157828155600101612f87565b81516001600160401b03811115612fb357612fb3612949565b612fc781612fc18454612d9d565b84612f55565b602080601f831160018114612ffa575f8415612fe35750858301515b5f19600386901b1c1916600185901b178555610d01565b5f85815260208120601f198616915b8281101561302857888601518255948401946001909101908401613009565b508582101561304557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b6001600160a01b038316815260408101610b62602083018461287d565b6001600160a01b039290921682526001600160781b0316602082015260400190565b5f83516130b9818460208801612795565b8351908301906130cd818360208801612795565b64173539b7b760d91b9101908152600501949350505050565b8082018082111561090157610901612dd5565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f90613175908301846127b7565b9695505050505050565b5f6020828403121561318f575f80fd5b8151610b628161271756feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220978df6b22501620bf895f1968dba2e0a0edcb887aec083a0e8b705dc23915cc064736f6c63430008140033

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

000000000000000000000000cf70c021e04e9ce8123cee078b6d8f99c84608c6000000000000000000000000fe9df826ed3beee9b7ed91f8deaf152db19c2af3000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : initialSupplyTarget (address): 0xCf70c021E04E9Ce8123CeE078B6d8F99c84608c6
Arg [1] : royaltyReceiver (address): 0xfe9df826Ed3BEee9b7Ed91F8DEAF152DB19c2af3
Arg [2] : baseURI (string):
Arg [3] : royaltyFeeNumerator (uint96): 500

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000cf70c021e04e9ce8123cee078b6d8f99c84608c6
Arg [1] : 000000000000000000000000fe9df826ed3beee9b7ed91f8deaf152db19c2af3
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000


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

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