ETH Price: $3,420.76 (+4.19%)

Token

Building Together (BT)
 

Overview

Max Total Supply

1,000 BT

Holders

1,000

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 BT
0xb6721c54fc4bfc7bfa197cffaba58d6a70ea2f4b
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:
BuildingTogether

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
File 1 of 20 : BuildingTogether.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/**
 * @title Building Together
 *
 * To celebrate the launch of Magic Eden’s ETH marketplace, we collaborated
 * with some of the biggest ETH collections to create this commemorative art
 * piece, designed by Clon of Cool Cats.
 */
import "solady/auth/Ownable.sol";
import "@limitbreak/creator-token-standards/erc721c/v2/ERC721AC.sol";

contract BuildingTogether is Ownable, ERC721AC {
    uint32 public constant MAX_SUPPLY = 1_000;
    string public baseURI;
    string public contractURI;

    constructor(string memory name_, string memory symbol_, string memory baseURI_, string memory contractURI_)
        ERC721AC(name_, symbol_)
    {
        _initializeOwner(msg.sender);

        baseURI = baseURI_;
        contractURI = contractURI_;
    }

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

    function mintSupply(address to) public onlyOwner {
        _mint(to, MAX_SUPPLY);
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        return baseURI;
    }

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

    function setBaseURI(string memory newBaseURI) public onlyOwner {
        baseURI = newBaseURI;
    }

    function setContractURI(string memory newContractURI) public onlyOwner {
        contractURI = newContractURI;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

import "../../utils/AutomaticValidatorTransferApproval.sol";
import "../../utils/CreatorTokenBaseV2.sol";
import "erc721a/contracts/ERC721A.sol";

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

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

    /**
     * @notice Overrides behavior of isApprovedFor all such that if an operator is not explicitly approved
     *         for all, the contract owner can optionally auto-approve the 721-C transfer validator for transfers.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool isApproved) {
        isApproved = super.isApprovedForAll(owner, operator);

        if (!isApproved) {
            if (autoApproveTransfersFromValidator) {
                isApproved = operator == address(getTransferValidator());
            }
        }
    }

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

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

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

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

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

import "../access/OwnablePermissions.sol";

/**
 * @title AutomaticValidatorTransferApproval
 * @author Limit Break, Inc.
 * @notice Base contract mix-in that provides boilerplate code giving the contract owner the
 *         option to automatically approve a 721-C transfer validator implementation for transfers.
 */
abstract contract AutomaticValidatorTransferApproval is OwnablePermissions {

    /// @dev Emitted when the automatic approval flag is modified by the creator.
    event AutomaticApprovalOfTransferValidatorSet(bool autoApproved);

    /// @dev If true, the collection's transfer validator is automatically approved to transfer holder's tokens.
    bool public autoApproveTransfersFromValidator;

    /**
     * @notice Sets if the transfer validator is automatically approved as an operator for all token owners.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * 
     * @param autoApprove If true, the collection's transfer validator will be automatically approved to
     *                    transfer holder's tokens.
     */
    function setAutomaticApprovalOfTransfersFromValidator(bool autoApprove) external {
        _requireCallerIsContractOwner();
        autoApproveTransfersFromValidator = autoApprove;
        emit AutomaticApprovalOfTransferValidatorSet(autoApprove);
    }
}

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

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

/**
 * @title CreatorTokenBaseV2
 * @author Limit Break, Inc.
 * @notice CreatorTokenBaseV2 is an abstract contract that provides basic functionality for managing token 
 * transfer policies through an implementation of ICreatorTokenTransferValidator/ICreatorTokenTransferValidatorV2. 
 * 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>ICreatorTokenV2: 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 account and codehash blacklists and whitelists.</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>
 *
 * <h4>Compatibility:</h4>
 * <ul>Backward and Forward Compatible - V1/V2 Creator Token Base will work with both V1 and V2 Transfer Validators.</ul>
 */
abstract contract CreatorTokenBaseV2 is OwnablePermissions, TransferValidation, ICreatorToken {

    error CreatorTokenBase__FunctionDeprecatedUseTransferValidatorInstead();
    error CreatorTokenBase__InvalidTransferValidatorContract();
    error CreatorTokenBase__SetTransferValidatorFirst();

    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x721C00182a990771244d7A71B9FA2ea789A3b433);
    TransferSecurityLevels public constant DEFAULT_TRANSFER_SECURITY_LEVEL = TransferSecurityLevels.Recommended;
    uint120 public constant DEFAULT_LIST_ID = uint120(0);

    TransferValidatorReference private transferValidatorReference;

    /**
     * @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    Throws when the caller is not the contract owner.
     * @dev    May be overridden to change the default behavior of an individual collection.
     */
    function setToDefaultSecurityPolicy() public virtual {
        _requireCallerIsContractOwner();
        setTransferValidator(DEFAULT_TRANSFER_VALIDATOR);

        ICreatorTokenTransferValidatorV2(DEFAULT_TRANSFER_VALIDATOR).
            setTransferSecurityLevelOfCollection(address(this), DEFAULT_TRANSFER_SECURITY_LEVEL);

        ICreatorTokenTransferValidatorV2(DEFAULT_TRANSFER_VALIDATOR).
            applyListToCollection(address(this), DEFAULT_LIST_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.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * 
     * @param validator The address of the transfer validator to set for the collection.
     * @param level     The transfer security level to set for the collection.
     * @param listId    The id of the list to set for the collection.
     */
    function setToCustomValidatorAndSecurityPolicy(
        address validator, 
        TransferSecurityLevels level, 
        uint120 listId
    ) public {
        _requireCallerIsContractOwner();

        setTransferValidator(validator);

        if (validator != address(0)) {
            ICreatorTokenTransferValidator(validator).setTransferSecurityLevelOfCollection(address(this), level);
            ICreatorTokenTransferValidator(validator).setOperatorWhitelistOfCollection(address(this), listId);
        }
    }

    /**
     * @notice Allows the contract owner to set the security policy to their own custom settings.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * @dev    Throws when the transfer validator has not been set.
     * 
     * @param level  The transfer security level to set for the collection.
     * @param listId The id of the list to set for the collection.
     */
    function setToCustomSecurityPolicy(
        TransferSecurityLevels level, 
        uint120 listId
    ) public {
        _requireCallerIsContractOwner();

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

        validator.setTransferSecurityLevelOfCollection(address(this), level);
        validator.setOperatorWhitelistOfCollection(address(this), listId);
    }

    /**
     * @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 or ICreatorTokenTransferValidatorV2 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;
        uint16 version = 0;

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

            if (!isValidTransferValidator) {
                try IERC165(transferValidator_).supportsInterface(type(ICreatorTokenTransferValidator).interfaceId) 
                    returns (bool supportsInterface) {
                    isValidTransferValidator = supportsInterface;
                    version = 1;
                } catch {}
            }
        }

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

        emit TransferValidatorUpdated(address(getTransferValidator()), transferValidator_);

        transferValidatorReference = TransferValidatorReference({
            isInitialized: true,
            version: version,
            transferValidator: transferValidator_
        });
    }

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

        if (address(transferValidator) == address(0)) {
            if (!transferValidatorReference.isInitialized) {
                transferValidator = ICreatorTokenTransferValidator(DEFAULT_TRANSFER_VALIDATOR);
            }
        }
    }

    /**
     * @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) {
        ICreatorTokenTransferValidator transferValidator = getTransferValidator();

        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 {
        ICreatorTokenTransferValidator transferValidator = getTransferValidator();

        if (address(transferValidator) != address(0)) {
            transferValidator.applyCollectionTransferPolicy(caller, from, to);
        }
    }

    /*************************************************************************/
    /*                        BACKWARDS COMPATIBILITY                        */
    /*************************************************************************/

    /**
     * @notice Allows the contract owner to set the security policy to their own custom settings.
     * 
     * @dev    Throws when the caller is not the contract owner.
     * @dev    Throws when the transfer validator has not been set.
     * 
     * @param level                                 The transfer security level to set for the collection.
     * @param operatorWhitelistId                   The id of the allowed operators list to use
                                                    for the collection.
     * @param permittedContractReceiversAllowlistId The id of the permitted contract receivers 
                                                    list to use for the collection.
     */
    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 Allows the contract owner to set the transfer validator to a custom validator contract
     *         and set the security policy to their own custom settings.
     *
     * @dev    Throws when the caller is not the contract owner.
     *
     * @param validator                             The transfer validator to set for the collection.
     * @param level                                 The transfer security level to set for the collection.
     * @param operatorWhitelistId                   The id of the allowed operators list to use
                                                    for the collection.
     * @param permittedContractReceiversAllowlistId The id of the permitted contract receivers 
                                                    list to use for the collection.
     */
    function setToCustomValidatorAndSecurityPolicy(
        address validator, 
        TransferSecurityLevels level, 
        uint120 operatorWhitelistId, 
        uint120 permittedContractReceiversAllowlistId
    ) public {
        _requireCallerIsContractOwner();

        setTransferValidator(validator);

        if (validator != address(0)) {
            ICreatorTokenTransferValidator(validator).
                setTransferSecurityLevelOfCollection(address(this), level);

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

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

    /**
     * @notice Deprecated - Query On Transfer Validator Instead
     */
    function getSecurityPolicy() public view override throwsDeprecatedError returns (CollectionSecurityPolicy memory) {}

    /**
     * @notice Deprecated - Query On Transfer Validator Instead
     */
    function getWhitelistedOperators() public view override throwsDeprecatedError returns (address[] memory) {}

    /**
     * @notice Deprecated - Query On Transfer Validator Instead
     */
    function getPermittedContractReceivers() public view override throwsDeprecatedError returns (address[] memory) {}

    /**
     * @notice Deprecated - Query On Transfer Validator Instead
     */
    function isOperatorWhitelisted(address operator) public view override throwsDeprecatedError returns (bool) {}

    /**
     * @notice Deprecated - Query On Transfer Validator Instead
     */
    function isContractReceiverPermitted(address receiver) public view override throwsDeprecatedError returns (bool) {}

    modifier throwsDeprecatedError() {
        _throwDeprecatedError();
        _;
    }

    function _throwDeprecatedError() internal pure {
        revert CreatorTokenBase__FunctionDeprecatedUseTransferValidatorInstead();
    }
}

File 6 of 20 : 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 7 of 20 : 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 8 of 20 : 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 9 of 20 : ICreatorTokenTransferValidatorV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

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

interface ICreatorTokenTransferValidatorV2 is ITransferSecurityRegistryV2, ITransferValidator, IEOARegistry {}

File 10 of 20 : 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 11 of 20 : 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 12 of 20 : 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 13 of 20 : 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 14 of 20 : 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 15 of 20 : 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 16 of 20 : ITransferSecurityRegistryV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./ITransferSecurityRegistry.sol";

interface ITransferSecurityRegistryV2 is ITransferSecurityRegistry {
    event CreatedList(uint256 indexed id, string name);
    event AppliedListToCollection(address indexed collection, uint120 indexed id);
    event ReassignedListOwnership(uint256 indexed id, address indexed newOwner);
    event AddedAccountToList(ListTypes indexed kind, uint256 indexed id, address indexed account);
    event AddedCodeHashToList(ListTypes indexed kind, uint256 indexed id, bytes32 indexed codehash);
    event RemovedAccountFromList(ListTypes indexed kind, uint256 indexed id, address indexed account);
    event RemovedCodeHashFromList(ListTypes indexed kind, uint256 indexed id, bytes32 indexed codehash);

    function transferSecurityPolicies(TransferSecurityLevels level) external pure returns (CallerConstraints callerConstraints, ReceiverConstraints receiverConstraints);
    function createList(string calldata name) external returns (uint120);
    function createListCopy(string calldata name, uint120 sourceListId) external returns (uint120);
    function reassignOwnershipOfList(uint120 id, address newOwner) external;
    function renounceOwnershipOfList(uint120 id) external;
    function applyListToCollection(address collection, uint120 id) external;
    function getCollectionSecurityPolicyV2(address collection) external view returns (CollectionSecurityPolicyV2 memory);
    function addAccountsToBlacklist(uint120 id, address[] calldata accounts) external;
    function addAccountsToWhitelist(uint120 id, address[] calldata accounts) external;
    function addCodeHashesToBlacklist(uint120 id, bytes32[] calldata codehashes) external;
    function addCodeHashesToWhitelist(uint120 id, bytes32[] calldata codehashes) external;
    function removeAccountsFromBlacklist(uint120 id, address[] calldata accounts) external;
    function removeAccountsFromWhitelist(uint120 id, address[] calldata accounts) external;
    function removeCodeHashesFromBlacklist(uint120 id, bytes32[] calldata codehashes) external;
    function removeCodeHashesFromWhitelist(uint120 id, bytes32[] calldata codehashes) external;
    function getBlacklistedAccounts(uint120 id) external view returns (address[] memory);
    function getWhitelistedAccounts(uint120 id) external view returns (address[] memory);
    function getBlacklistedCodeHashes(uint120 id) external view returns (bytes32[] memory);
    function getWhitelistedCodeHashes(uint120 id) external view returns (bytes32[] memory);
    function isAccountBlacklisted(uint120 id, address account) external view returns (bool);
    function isAccountWhitelisted(uint120 id, address account) external view returns (bool);
    function isCodeHashBlacklisted(uint120 id, bytes32 codehash) external view returns (bool);
    function isCodeHashWhitelisted(uint120 id, bytes32 codehash) external view returns (bool);
    function getBlacklistedAccountsByCollection(address collection) external view returns (address[] memory);
    function getWhitelistedAccountsByCollection(address collection) external view returns (address[] memory);
    function getBlacklistedCodeHashesByCollection(address collection) external view returns (bytes32[] memory);
    function getWhitelistedCodeHashesByCollection(address collection) external view returns (bytes32[] memory);
    function isAccountBlacklistedByCollection(address collection, address account) external view returns (bool);
    function isAccountWhitelistedByCollection(address collection, address account) external view returns (bool);
    function isCodeHashBlacklistedByCollection(address collection, bytes32 codehash) external view returns (bool);
    function isCodeHashWhitelistedByCollection(address collection, bytes32 codehash) external view returns (bool);
}

File 17 of 20 : 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : 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;
}

Settings
{
  "remappings": [
    "@limitbreak/creator-token-standards/=lib/creator-token-standards/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "murky/=lib/murky/src/",
    "erc721a/=lib/ERC721A/",
    "solady/=lib/solady/src/",
    "gaslite/=lib/gaslite-core/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"string","name":"contractURI_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"CreatorTokenBase__FunctionDeprecatedUseTransferValidatorInstead","type":"error"},{"inputs":[],"name":"CreatorTokenBase__InvalidTransferValidatorContract","type":"error"},{"inputs":[],"name":"CreatorTokenBase__SetTransferValidatorFirst","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"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"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"autoApproved","type":"bool"}],"name":"AutomaticApprovalOfTransferValidatorSet","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":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldValidator","type":"address"},{"indexed":false,"internalType":"address","name":"newValidator","type":"address"}],"name":"TransferValidatorUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_LIST_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":"MAX_SUPPLY","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"autoApproveTransfersFromValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"transferValidator","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":"isApproved","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":[{"internalType":"address","name":"to","type":"address"}],"name":"mintSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","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":"bool","name":"autoApprove","type":"bool"}],"name":"setAutomaticApprovalOfTransfersFromValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum TransferSecurityLevels","name":"level","type":"uint8"},{"internalType":"uint120","name":"listId","type":"uint120"}],"name":"setToCustomSecurityPolicy","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":"listId","type":"uint120"}],"name":"setToCustomValidatorAndSecurityPolicy","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":"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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002e9838038062002e98833981016040819052620000349162000194565b838381816002620000468382620002dc565b506003620000558282620002dc565b5060008055506200006b92503391505062000093565b600a620000798382620002dc565b50600b620000888282620002dc565b5050505050620003a8565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000f757600080fd5b81516001600160401b0380821115620001145762000114620000cf565b604051601f8301601f19908116603f011681019082821181831017156200013f576200013f620000cf565b816040528381526020925086838588010111156200015c57600080fd5b600091505b8382101562000180578582018301518183018401529082019062000161565b600093810190920192909252949350505050565b60008060008060808587031215620001ab57600080fd5b84516001600160401b0380821115620001c357600080fd5b620001d188838901620000e5565b95506020870151915080821115620001e857600080fd5b620001f688838901620000e5565b945060408701519150808211156200020d57600080fd5b6200021b88838901620000e5565b935060608701519150808211156200023257600080fd5b506200024187828801620000e5565b91505092959194509250565b600181811c908216806200026257607f821691505b6020821081036200028357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002d757600081815260208120601f850160051c81016020861015620002b25750805b601f850160051c820191505b81811015620002d357828155600101620002be565b5050505b505050565b81516001600160401b03811115620002f857620002f8620000cf565b62000310816200030984546200024d565b8462000289565b602080601f8311600181146200034857600084156200032f5750858301515b600019600386901b1c1916600185901b178555620002d3565b600085815260208120601f198616915b82811015620003795788860151825594840194600190910190840162000358565b5085821015620003985787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b612ae080620003b86000396000f3fe6080604052600436106102f25760003560e01c80636c0360eb1161018f578063a9fc664e116100e1578063e8a3d4851161008a578063f2fde38b11610064578063f2fde38b146107a7578063fd762d92146107ba578063fee81cf4146107da57600080fd5b8063e8a3d4851461075f578063e985e9c514610774578063f04e283e1461079457600080fd5b8063c87b56dd116100bb578063c87b56dd1461071f578063d007af5c146104d6578063d7889bba1461073f57600080fd5b8063a9fc664e146106ca578063b88d4fde146106ea578063be537f43146106fd57600080fd5b80638da5cb5b116101435780639d645a441161011d5780639d645a44146104585780639e05d2401461068a578063a22cb465146106aa57600080fd5b80638da5cb5b14610621578063938e3d7b1461065557806395d89b411461067557600080fd5b806370a082311161017457806370a08231146105d9578063715018a6146105f9578063800a06d11461060157600080fd5b80636c0360eb146105af5780636c3b8699146105c457600080fd5b80632e8da8291161024857806354d1f13d116101fc57806361347162116101d657806361347162146105555780636221d13c146105755780636352211e1461058f57600080fd5b806354d1f13d146104f857806355f804b3146105005780635d4155761461052057600080fd5b806332cb6b0c1161022d57806332cb6b0c1461049857806342842e0e146104c3578063495c8bf9146104d657600080fd5b80632e8da8291461045857806331395b901461047857600080fd5b8063098144d4116102aa5780631c33b328116102845780631c33b3281461041b57806323b872dd1461043d578063256929621461045057600080fd5b8063098144d4146103c357806318160ddd146103d85780631b25b077146103fb57600080fd5b806306fdde03116102db57806306fdde031461036c578063081812fc1461038e578063095ea7b3146103ae57600080fd5b806301463546146102f757806301ffc9a71461033c575b600080fd5b34801561030357600080fd5b5061031f73721c00182a990771244d7a71b9fa2ea789a3b43381565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561034857600080fd5b5061035c6103573660046122f3565b61080d565b6040519015158152602001610333565b34801561037857600080fd5b5061038161081e565b6040516103339190612356565b34801561039a57600080fd5b5061031f6103a9366004612369565b6108b0565b6103c16103bc366004612399565b61090d565b005b3480156103cf57600080fd5b5061031f6109de565b3480156103e457600080fd5b50600154600054035b604051908152602001610333565b34801561040757600080fd5b5061035c6104163660046123c3565b610a1a565b34801561042757600080fd5b50610430600081565b6040516103339190612441565b6103c161044b36600461244f565b610ad6565b6103c1610d24565b34801561046457600080fd5b5061035c61047336600461248b565b610d74565b34801561048457600080fd5b506103c16104933660046124d4565b610d83565b3480156104a457600080fd5b506104ae6103e881565b60405163ffffffff9091168152602001610333565b6103c16104d136600461244f565b610edf565b3480156104e257600080fd5b506104eb610eff565b6040516103339190612507565b6103c1610f09565b34801561050c57600080fd5b506103c161051b3660046125f9565b610f45565b34801561052c57600080fd5b50610535600081565b6040516effffffffffffffffffffffffffffff9091168152602001610333565b34801561056157600080fd5b506103c1610570366004612642565b610f5d565b34801561058157600080fd5b5060095461035c9060ff1681565b34801561059b57600080fd5b5061031f6105aa366004612369565b611143565b3480156105bb57600080fd5b5061038161114e565b3480156105d057600080fd5b506103c16111dc565b3480156105e557600080fd5b506103ed6105f436600461248b565b61130c565b6103c1611374565b34801561060d57600080fd5b506103c161061c36600461267c565b611388565b34801561062d57600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461031f565b34801561066157600080fd5b506103c16106703660046125f9565b61147d565b34801561068157600080fd5b50610381611491565b34801561069657600080fd5b506103c16106a53660046126b6565b6114a0565b3480156106b657600080fd5b506103c16106c53660046126d3565b61150d565b3480156106d657600080fd5b506103c16106e536600461248b565b6115a4565b6103c16106f836600461270a565b6117fa565b34801561070957600080fd5b50610712611857565b6040516103339190612786565b34801561072b57600080fd5b5061038161073a366004612369565b61187c565b34801561074b57600080fd5b506103c161075a36600461248b565b611910565b34801561076b57600080fd5b50610381611927565b34801561078057600080fd5b5061035c61078f3660046127ca565b611934565b6103c16107a236600461248b565b611991565b6103c16107b536600461248b565b6119ce565b3480156107c657600080fd5b506103c16107d53660046127f4565b6119f5565b3480156107e657600080fd5b506103ed6107f536600461248b565b63389a75e1600c908152600091909152602090205490565b600061081882611b73565b92915050565b60606002805461082d90612848565b80601f016020809104026020016040519081016040528092919081815260200182805461085990612848565b80156108a65780601f1061087b576101008083540402835291602001916108a6565b820191906000526020600020905b81548152906001019060200180831161088957829003601f168201915b5050505050905090565b60006108bb82611bc9565b6108f1576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061091882611143565b9050336001600160a01b0382161461096a576109348133611934565b61096a576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600854630100000090046001600160a01b031680610a175760085460ff16610a17575073721c00182a990771244d7a71b9fa2ea789a3b4335b90565b600080610a256109de565b90506001600160a01b03811615610ac9576040517f285fb8c80000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152848116604483015282169063285fb8c89060640160006040518083038186803b158015610aa057600080fd5b505afa925050508015610ab1575060015b610abf576000915050610acf565b6001915050610acf565b60019150505b9392505050565b6000610ae182611c09565b9050836001600160a01b0316816001600160a01b031614610b2e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610b9457610b5e8633611934565b610b94576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610bd4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610be18686866001611cc0565b8015610bec57600082555b6001600160a01b0386811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610cce57600184016000818152600460205260408120549003610ccc576000548114610ccc5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610d1c8686866001611cee565b505050505050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6000610d7e611d15565b919050565b610d8b611d47565b6000610d956109de565b90506001600160a01b038116610dd7576040517f39ffc7ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063da0194c090610e1e903090879060040161289b565b600060405180830381600087803b158015610e3857600080fd5b505af1158015610e4c573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0384169250632304aa0291506044015b600060405180830381600087803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050505050565b610efa838383604051806020016040528060008152506117fa565b505050565b6060610a17611d15565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610f4d611d4b565b600a610f5982826128fe565b5050565b610f65611d47565b6000610f6f6109de565b90506001600160a01b038116610fb1576040517f39ffc7ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063da0194c090610ff8903090889060040161289b565b600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff861660248201526001600160a01b0384169250632304aa029150604401600060405180830381600087803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b50506040517f8d7443140000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0384169250638d74431491506044015b600060405180830381600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b5050505050505050565b600061081882611c09565b600a805461115b90612848565b80601f016020809104026020016040519081016040528092919081815260200182805461118790612848565b80156111d45780601f106111a9576101008083540402835291602001916111d4565b820191906000526020600020905b8154815290600101906020018083116111b757829003601f168201915b505050505081565b6111e4611d47565b61120173721c00182a990771244d7a71b9fa2ea789a3b4336115a4565b6040517fda0194c000000000000000000000000000000000000000000000000000000000815273721c00182a990771244d7a71b9fa2ea789a3b4339063da0194c09061125490309060009060040161289b565b600060405180830381600087803b15801561126e57600080fd5b505af1158015611282573d6000803e3d6000fd5b50506040517fbf7bfd7e0000000000000000000000000000000000000000000000000000000081523060048201526000602482015273721c00182a990771244d7a71b9fa2ea789a3b433925063bf7bfd7e9150604401600060405180830381600087803b1580156112f257600080fd5b505af1158015611306573d6000803e3d6000fd5b50505050565b60006001600160a01b03821661134e576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61137c611d4b565b6113866000611d81565b565b611390611d47565b611399836115a4565b6001600160a01b03831615610efa576040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063da0194c0906113ef903090869060040161289b565b600060405180830381600087803b15801561140957600080fd5b505af115801561141d573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff841660248201526001600160a01b0386169250632304aa029150604401610ea8565b611485611d4b565b600b610f5982826128fe565b60606003805461082d90612848565b6114a8611d47565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc9060200160405180910390a150565b3360008181526007602090815260408083206001600160a01b038716808552925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611598911515815260200190565b60405180910390a35050565b6115ac611d47565b6000806001600160a01b0383163b156116d0576040517f01ffc9a7000000000000000000000000000000000000000000000000000000008152600060048201526001600160a01b038416906301ffc9a790602401602060405180830381865afa925050508015611639575060408051601f3d908101601f19168201909252611636918101906129fa565b60015b15611645579150600290505b816116d0576040517f01ffc9a7000000000000000000000000000000000000000000000000000000008152600060048201526001600160a01b038416906301ffc9a790602401602060405180830381865afa9250505080156116c4575060408051601f3d908101601f191682019092526116c1918101906129fa565b60015b156116d0579150600190505b6001600160a01b038316158015906116e6575081155b1561171d576040517f32483afb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6117466109de565b604080516001600160a01b03928316815291861660208301520160405180910390a160408051606081018252600180825261ffff93909316602082018190526001600160a01b03959095169101819052600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000016610100909502949094179091177fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000009091021790915550565b611805848484610ad6565b6001600160a01b0383163b156113065761182184848484611dda565b611306576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160608101825260008082526020820181905291810191909152610a17611d15565b6060600a805461188b90612848565b80601f01602080910402602001604051908101604052809291908181526020018280546118b790612848565b80156119045780601f106118d957610100808354040283529160200191611904565b820191906000526020600020905b8154815290600101906020018083116118e757829003601f168201915b50505050509050919050565b611918611d4b565b611924816103e8611f29565b50565b600b805461115b90612848565b6001600160a01b0382811660009081526007602090815260408083209385168352929052205460ff16806108185760095460ff1615610818576119756109de565b6001600160a01b0316826001600160a01b031614905092915050565b611999611d4b565b63389a75e1600c52806000526020600c2080544211156119c157636f5e88186000526004601cfd5b6000905561192481611d81565b6119d6611d4b565b8060601b6119ec57637448fbae6000526004601cfd5b61192481611d81565b6119fd611d47565b611a06846115a4565b6001600160a01b03841615611306576040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063da0194c090611a5c903090879060040161289b565b600060405180830381600087803b158015611a7657600080fd5b505af1158015611a8a573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0387169250632304aa029150604401600060405180830381600087803b158015611aff57600080fd5b505af1158015611b13573d6000803e3d6000fd5b50506040517f8d7443140000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff841660248201526001600160a01b0387169250638d744314915060440161110b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f86455d28000000000000000000000000000000000000000000000000000000001480610818575061081882612070565b60008054821080156108185750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b600081600054811015611c8e57600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003611c8c575b80600003610acf57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020526040902054611c4d565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015611ce757611cdf8585611cda8487612a17565b612151565b600101611cc3565b5050505050565b60005b81811015611ce757611d0d8585611d088487612a17565b6121c0565b600101611cf1565b6040517f1454a55900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113865b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611386576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290611e28903390899088908890600401612a51565b6020604051808303816000875af1925050508015611e63575060408051601f3d908101601f19168201909252611e6091810190612a8d565b60015b611eda573d808015611e91576040519150601f19603f3d011682016040523d82523d6000602084013e611e96565b606091505b508051600003611ed2576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000805490829003611f67576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f746000848385611cc0565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461202357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611feb565b508160000361205e576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000908155610efa9150848385611cee565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061210357507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806108185750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6001600160a01b03838116159083161581801561216b5750805b156121a2576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156121ae575b611ce7565b806121a957611ce73386868634612220565b6001600160a01b0383811615908316158180156121da5750805b15612211576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816121a957806121a957611ce7565b600061222a6109de565b90506001600160a01b03811615610d1c576040517f285fb8c80000000000000000000000000000000000000000000000000000000081526001600160a01b0387811660048301528681166024830152858116604483015282169063285fb8c89060640160006040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b50505050505050505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461192457600080fd5b60006020828403121561230557600080fd5b8135610acf816122c5565b6000815180845260005b818110156123365760208185018101518683018201520161231a565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610acf6020830184612310565b60006020828403121561237b57600080fd5b5035919050565b80356001600160a01b0381168114610d7e57600080fd5b600080604083850312156123ac57600080fd5b6123b583612382565b946020939093013593505050565b6000806000606084860312156123d857600080fd5b6123e184612382565b92506123ef60208501612382565b91506123fd60408501612382565b90509250925092565b6009811061243d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016108188284612406565b60008060006060848603121561246457600080fd5b61246d84612382565b925061247b60208501612382565b9150604084013590509250925092565b60006020828403121561249d57600080fd5b610acf82612382565b803560098110610d7e57600080fd5b80356effffffffffffffffffffffffffffff81168114610d7e57600080fd5b600080604083850312156124e757600080fd5b6124f0836124a6565b91506124fe602084016124b5565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156125485783516001600160a01b031683529284019291840191600101612523565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561259e5761259e612554565b604051601f8501601f19908116603f011681019082821181831017156125c6576125c6612554565b816040528093508581528686860111156125df57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561260b57600080fd5b813567ffffffffffffffff81111561262257600080fd5b8201601f8101841361263357600080fd5b611f2184823560208401612583565b60008060006060848603121561265757600080fd5b612660846124a6565b925061266e602085016124b5565b91506123fd604085016124b5565b60008060006060848603121561269157600080fd5b61269a84612382565b925061266e602085016124a6565b801515811461192457600080fd5b6000602082840312156126c857600080fd5b8135610acf816126a8565b600080604083850312156126e657600080fd5b6126ef83612382565b915060208301356126ff816126a8565b809150509250929050565b6000806000806080858703121561272057600080fd5b61272985612382565b935061273760208601612382565b925060408501359150606085013567ffffffffffffffff81111561275a57600080fd5b8501601f8101871361276b57600080fd5b61277a87823560208401612583565b91505092959194509250565b6000606082019050612799828451612406565b60208301516effffffffffffffffffffffffffffff8082166020850152806040860151166040850152505092915050565b600080604083850312156127dd57600080fd5b6127e683612382565b91506124fe60208401612382565b6000806000806080858703121561280a57600080fd5b61281385612382565b9350612821602086016124a6565b925061282f604086016124b5565b915061283d606086016124b5565b905092959194509250565b600181811c9082168061285c57607f821691505b602082108103612895577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6001600160a01b038316815260408101610acf6020830184612406565b601f821115610efa57600081815260208120601f850160051c810160208610156128df5750805b601f850160051c820191505b81811015610d1c578281556001016128eb565b815167ffffffffffffffff81111561291857612918612554565b61292c816129268454612848565b846128b8565b602080601f83116001811461297f57600084156129495750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610d1c565b600085815260208120601f198616915b828110156129ae5788860151825594840194600190910190840161298f565b50858210156129ea57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215612a0c57600080fd5b8151610acf816126a8565b80820180821115610818577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152612a836080830184612310565b9695505050505050565b600060208284031215612a9f57600080fd5b8151610acf816122c556fea2646970667358221220f7c08958c483e78ca1eea8c8a3523fba76fd97725a7bfe9d122d3e5f3b65516064736f6c63430008140033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000114275696c64696e6720546f676574686572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d5776544831435341636a674e7a4179464e5958336773704b48505077414e317675485a6737386b7033374a6200000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d505846715668466351696a42474e384567665a57485052315944756e45516e6a6a38323868654e76504a57660000000000000000000000

Deployed Bytecode

0x6080604052600436106102f25760003560e01c80636c0360eb1161018f578063a9fc664e116100e1578063e8a3d4851161008a578063f2fde38b11610064578063f2fde38b146107a7578063fd762d92146107ba578063fee81cf4146107da57600080fd5b8063e8a3d4851461075f578063e985e9c514610774578063f04e283e1461079457600080fd5b8063c87b56dd116100bb578063c87b56dd1461071f578063d007af5c146104d6578063d7889bba1461073f57600080fd5b8063a9fc664e146106ca578063b88d4fde146106ea578063be537f43146106fd57600080fd5b80638da5cb5b116101435780639d645a441161011d5780639d645a44146104585780639e05d2401461068a578063a22cb465146106aa57600080fd5b80638da5cb5b14610621578063938e3d7b1461065557806395d89b411461067557600080fd5b806370a082311161017457806370a08231146105d9578063715018a6146105f9578063800a06d11461060157600080fd5b80636c0360eb146105af5780636c3b8699146105c457600080fd5b80632e8da8291161024857806354d1f13d116101fc57806361347162116101d657806361347162146105555780636221d13c146105755780636352211e1461058f57600080fd5b806354d1f13d146104f857806355f804b3146105005780635d4155761461052057600080fd5b806332cb6b0c1161022d57806332cb6b0c1461049857806342842e0e146104c3578063495c8bf9146104d657600080fd5b80632e8da8291461045857806331395b901461047857600080fd5b8063098144d4116102aa5780631c33b328116102845780631c33b3281461041b57806323b872dd1461043d578063256929621461045057600080fd5b8063098144d4146103c357806318160ddd146103d85780631b25b077146103fb57600080fd5b806306fdde03116102db57806306fdde031461036c578063081812fc1461038e578063095ea7b3146103ae57600080fd5b806301463546146102f757806301ffc9a71461033c575b600080fd5b34801561030357600080fd5b5061031f73721c00182a990771244d7a71b9fa2ea789a3b43381565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561034857600080fd5b5061035c6103573660046122f3565b61080d565b6040519015158152602001610333565b34801561037857600080fd5b5061038161081e565b6040516103339190612356565b34801561039a57600080fd5b5061031f6103a9366004612369565b6108b0565b6103c16103bc366004612399565b61090d565b005b3480156103cf57600080fd5b5061031f6109de565b3480156103e457600080fd5b50600154600054035b604051908152602001610333565b34801561040757600080fd5b5061035c6104163660046123c3565b610a1a565b34801561042757600080fd5b50610430600081565b6040516103339190612441565b6103c161044b36600461244f565b610ad6565b6103c1610d24565b34801561046457600080fd5b5061035c61047336600461248b565b610d74565b34801561048457600080fd5b506103c16104933660046124d4565b610d83565b3480156104a457600080fd5b506104ae6103e881565b60405163ffffffff9091168152602001610333565b6103c16104d136600461244f565b610edf565b3480156104e257600080fd5b506104eb610eff565b6040516103339190612507565b6103c1610f09565b34801561050c57600080fd5b506103c161051b3660046125f9565b610f45565b34801561052c57600080fd5b50610535600081565b6040516effffffffffffffffffffffffffffff9091168152602001610333565b34801561056157600080fd5b506103c1610570366004612642565b610f5d565b34801561058157600080fd5b5060095461035c9060ff1681565b34801561059b57600080fd5b5061031f6105aa366004612369565b611143565b3480156105bb57600080fd5b5061038161114e565b3480156105d057600080fd5b506103c16111dc565b3480156105e557600080fd5b506103ed6105f436600461248b565b61130c565b6103c1611374565b34801561060d57600080fd5b506103c161061c36600461267c565b611388565b34801561062d57600080fd5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff748739275461031f565b34801561066157600080fd5b506103c16106703660046125f9565b61147d565b34801561068157600080fd5b50610381611491565b34801561069657600080fd5b506103c16106a53660046126b6565b6114a0565b3480156106b657600080fd5b506103c16106c53660046126d3565b61150d565b3480156106d657600080fd5b506103c16106e536600461248b565b6115a4565b6103c16106f836600461270a565b6117fa565b34801561070957600080fd5b50610712611857565b6040516103339190612786565b34801561072b57600080fd5b5061038161073a366004612369565b61187c565b34801561074b57600080fd5b506103c161075a36600461248b565b611910565b34801561076b57600080fd5b50610381611927565b34801561078057600080fd5b5061035c61078f3660046127ca565b611934565b6103c16107a236600461248b565b611991565b6103c16107b536600461248b565b6119ce565b3480156107c657600080fd5b506103c16107d53660046127f4565b6119f5565b3480156107e657600080fd5b506103ed6107f536600461248b565b63389a75e1600c908152600091909152602090205490565b600061081882611b73565b92915050565b60606002805461082d90612848565b80601f016020809104026020016040519081016040528092919081815260200182805461085990612848565b80156108a65780601f1061087b576101008083540402835291602001916108a6565b820191906000526020600020905b81548152906001019060200180831161088957829003601f168201915b5050505050905090565b60006108bb82611bc9565b6108f1576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061091882611143565b9050336001600160a01b0382161461096a576109348133611934565b61096a576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600854630100000090046001600160a01b031680610a175760085460ff16610a17575073721c00182a990771244d7a71b9fa2ea789a3b4335b90565b600080610a256109de565b90506001600160a01b03811615610ac9576040517f285fb8c80000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152848116604483015282169063285fb8c89060640160006040518083038186803b158015610aa057600080fd5b505afa925050508015610ab1575060015b610abf576000915050610acf565b6001915050610acf565b60019150505b9392505050565b6000610ae182611c09565b9050836001600160a01b0316816001600160a01b031614610b2e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b03881690911417610b9457610b5e8633611934565b610b94576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610bd4576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610be18686866001611cc0565b8015610bec57600082555b6001600160a01b0386811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c020000000000000000000000000000000000000000000000000000000084169003610cce57600184016000818152600460205260408120549003610ccc576000548114610ccc5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610d1c8686866001611cee565b505050505050565b60006202a30067ffffffffffffffff164201905063389a75e1600c5233600052806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b6000610d7e611d15565b919050565b610d8b611d47565b6000610d956109de565b90506001600160a01b038116610dd7576040517f39ffc7ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063da0194c090610e1e903090879060040161289b565b600060405180830381600087803b158015610e3857600080fd5b505af1158015610e4c573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0384169250632304aa0291506044015b600060405180830381600087803b158015610ec257600080fd5b505af1158015610ed6573d6000803e3d6000fd5b50505050505050565b610efa838383604051806020016040528060008152506117fa565b505050565b6060610a17611d15565b63389a75e1600c523360005260006020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b610f4d611d4b565b600a610f5982826128fe565b5050565b610f65611d47565b6000610f6f6109de565b90506001600160a01b038116610fb1576040517f39ffc7ba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0382169063da0194c090610ff8903090889060040161289b565b600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff861660248201526001600160a01b0384169250632304aa029150604401600060405180830381600087803b15801561109b57600080fd5b505af11580156110af573d6000803e3d6000fd5b50506040517f8d7443140000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0384169250638d74431491506044015b600060405180830381600087803b15801561112557600080fd5b505af1158015611139573d6000803e3d6000fd5b5050505050505050565b600061081882611c09565b600a805461115b90612848565b80601f016020809104026020016040519081016040528092919081815260200182805461118790612848565b80156111d45780601f106111a9576101008083540402835291602001916111d4565b820191906000526020600020905b8154815290600101906020018083116111b757829003601f168201915b505050505081565b6111e4611d47565b61120173721c00182a990771244d7a71b9fa2ea789a3b4336115a4565b6040517fda0194c000000000000000000000000000000000000000000000000000000000815273721c00182a990771244d7a71b9fa2ea789a3b4339063da0194c09061125490309060009060040161289b565b600060405180830381600087803b15801561126e57600080fd5b505af1158015611282573d6000803e3d6000fd5b50506040517fbf7bfd7e0000000000000000000000000000000000000000000000000000000081523060048201526000602482015273721c00182a990771244d7a71b9fa2ea789a3b433925063bf7bfd7e9150604401600060405180830381600087803b1580156112f257600080fd5b505af1158015611306573d6000803e3d6000fd5b50505050565b60006001600160a01b03821661134e576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b61137c611d4b565b6113866000611d81565b565b611390611d47565b611399836115a4565b6001600160a01b03831615610efa576040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063da0194c0906113ef903090869060040161289b565b600060405180830381600087803b15801561140957600080fd5b505af115801561141d573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff841660248201526001600160a01b0386169250632304aa029150604401610ea8565b611485611d4b565b600b610f5982826128fe565b60606003805461082d90612848565b6114a8611d47565b600980547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc9060200160405180910390a150565b3360008181526007602090815260408083206001600160a01b038716808552925290912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055906001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611598911515815260200190565b60405180910390a35050565b6115ac611d47565b6000806001600160a01b0383163b156116d0576040517f01ffc9a7000000000000000000000000000000000000000000000000000000008152600060048201526001600160a01b038416906301ffc9a790602401602060405180830381865afa925050508015611639575060408051601f3d908101601f19168201909252611636918101906129fa565b60015b15611645579150600290505b816116d0576040517f01ffc9a7000000000000000000000000000000000000000000000000000000008152600060048201526001600160a01b038416906301ffc9a790602401602060405180830381865afa9250505080156116c4575060408051601f3d908101601f191682019092526116c1918101906129fa565b60015b156116d0579150600190505b6001600160a01b038316158015906116e6575081155b1561171d576040517f32483afb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6117466109de565b604080516001600160a01b03928316815291861660208301520160405180910390a160408051606081018252600180825261ffff93909316602082018190526001600160a01b03959095169101819052600880547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000016610100909502949094179091177fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000009091021790915550565b611805848484610ad6565b6001600160a01b0383163b156113065761182184848484611dda565b611306576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160608101825260008082526020820181905291810191909152610a17611d15565b6060600a805461188b90612848565b80601f01602080910402602001604051908101604052809291908181526020018280546118b790612848565b80156119045780601f106118d957610100808354040283529160200191611904565b820191906000526020600020905b8154815290600101906020018083116118e757829003601f168201915b50505050509050919050565b611918611d4b565b611924816103e8611f29565b50565b600b805461115b90612848565b6001600160a01b0382811660009081526007602090815260408083209385168352929052205460ff16806108185760095460ff1615610818576119756109de565b6001600160a01b0316826001600160a01b031614905092915050565b611999611d4b565b63389a75e1600c52806000526020600c2080544211156119c157636f5e88186000526004601cfd5b6000905561192481611d81565b6119d6611d4b565b8060601b6119ec57637448fbae6000526004601cfd5b61192481611d81565b6119fd611d47565b611a06846115a4565b6001600160a01b03841615611306576040517fda0194c00000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063da0194c090611a5c903090879060040161289b565b600060405180830381600087803b158015611a7657600080fd5b505af1158015611a8a573d6000803e3d6000fd5b50506040517f2304aa020000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff851660248201526001600160a01b0387169250632304aa029150604401600060405180830381600087803b158015611aff57600080fd5b505af1158015611b13573d6000803e3d6000fd5b50506040517f8d7443140000000000000000000000000000000000000000000000000000000081523060048201526effffffffffffffffffffffffffffff841660248201526001600160a01b0387169250638d744314915060440161110b565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f86455d28000000000000000000000000000000000000000000000000000000001480610818575061081882612070565b60008054821080156108185750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000161590565b600081600054811015611c8e57600081815260046020526040812054907c010000000000000000000000000000000000000000000000000000000082169003611c8c575b80600003610acf57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020526040902054611c4d565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81811015611ce757611cdf8585611cda8487612a17565b612151565b600101611cc3565b5050505050565b60005b81811015611ce757611d0d8585611d088487612a17565b6121c0565b600101611cf1565b6040517f1454a55900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113865b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff74873927543314611386576382b429006000526004601cfd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff7487392780546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a355565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a0290611e28903390899088908890600401612a51565b6020604051808303816000875af1925050508015611e63575060408051601f3d908101601f19168201909252611e6091810190612a8d565b60015b611eda573d808015611e91576040519150601f19603f3d011682016040523d82523d6000602084013e611e96565b606091505b508051600003611ed2576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b6000805490829003611f67576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f746000848385611cc0565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461202357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101611feb565b508160000361205e576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000908155610efa9150848385611cee565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061210357507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806108185750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b6001600160a01b03838116159083161581801561216b5750805b156121a2576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156121ae575b611ce7565b806121a957611ce73386868634612220565b6001600160a01b0383811615908316158180156121da5750805b15612211576040517f5cbd944100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816121a957806121a957611ce7565b600061222a6109de565b90506001600160a01b03811615610d1c576040517f285fb8c80000000000000000000000000000000000000000000000000000000081526001600160a01b0387811660048301528681166024830152858116604483015282169063285fb8c89060640160006040518083038186803b1580156122a557600080fd5b505afa1580156122b9573d6000803e3d6000fd5b50505050505050505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461192457600080fd5b60006020828403121561230557600080fd5b8135610acf816122c5565b6000815180845260005b818110156123365760208185018101518683018201520161231a565b506000602082860101526020601f19601f83011685010191505092915050565b602081526000610acf6020830184612310565b60006020828403121561237b57600080fd5b5035919050565b80356001600160a01b0381168114610d7e57600080fd5b600080604083850312156123ac57600080fd5b6123b583612382565b946020939093013593505050565b6000806000606084860312156123d857600080fd5b6123e184612382565b92506123ef60208501612382565b91506123fd60408501612382565b90509250925092565b6009811061243d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b602081016108188284612406565b60008060006060848603121561246457600080fd5b61246d84612382565b925061247b60208501612382565b9150604084013590509250925092565b60006020828403121561249d57600080fd5b610acf82612382565b803560098110610d7e57600080fd5b80356effffffffffffffffffffffffffffff81168114610d7e57600080fd5b600080604083850312156124e757600080fd5b6124f0836124a6565b91506124fe602084016124b5565b90509250929050565b6020808252825182820181905260009190848201906040850190845b818110156125485783516001600160a01b031683529284019291840191600101612523565b50909695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561259e5761259e612554565b604051601f8501601f19908116603f011681019082821181831017156125c6576125c6612554565b816040528093508581528686860111156125df57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561260b57600080fd5b813567ffffffffffffffff81111561262257600080fd5b8201601f8101841361263357600080fd5b611f2184823560208401612583565b60008060006060848603121561265757600080fd5b612660846124a6565b925061266e602085016124b5565b91506123fd604085016124b5565b60008060006060848603121561269157600080fd5b61269a84612382565b925061266e602085016124a6565b801515811461192457600080fd5b6000602082840312156126c857600080fd5b8135610acf816126a8565b600080604083850312156126e657600080fd5b6126ef83612382565b915060208301356126ff816126a8565b809150509250929050565b6000806000806080858703121561272057600080fd5b61272985612382565b935061273760208601612382565b925060408501359150606085013567ffffffffffffffff81111561275a57600080fd5b8501601f8101871361276b57600080fd5b61277a87823560208401612583565b91505092959194509250565b6000606082019050612799828451612406565b60208301516effffffffffffffffffffffffffffff8082166020850152806040860151166040850152505092915050565b600080604083850312156127dd57600080fd5b6127e683612382565b91506124fe60208401612382565b6000806000806080858703121561280a57600080fd5b61281385612382565b9350612821602086016124a6565b925061282f604086016124b5565b915061283d606086016124b5565b905092959194509250565b600181811c9082168061285c57607f821691505b602082108103612895577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6001600160a01b038316815260408101610acf6020830184612406565b601f821115610efa57600081815260208120601f850160051c810160208610156128df5750805b601f850160051c820191505b81811015610d1c578281556001016128eb565b815167ffffffffffffffff81111561291857612918612554565b61292c816129268454612848565b846128b8565b602080601f83116001811461297f57600084156129495750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555610d1c565b600085815260208120601f198616915b828110156129ae5788860151825594840194600190910190840161298f565b50858210156129ea57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b600060208284031215612a0c57600080fd5b8151610acf816126a8565b80820180821115610818577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152612a836080830184612310565b9695505050505050565b600060208284031215612a9f57600080fd5b8151610acf816122c556fea2646970667358221220f7c08958c483e78ca1eea8c8a3523fba76fd97725a7bfe9d122d3e5f3b65516064736f6c63430008140033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000114275696c64696e6720546f676574686572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d5776544831435341636a674e7a4179464e5958336773704b48505077414e317675485a6737386b7033374a6200000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d505846715668466351696a42474e384567665a57485052315944756e45516e6a6a38323868654e76504a57660000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Building Together
Arg [1] : symbol_ (string): BT
Arg [2] : baseURI_ (string): ipfs://QmWvTH1CSAcjgNzAyFNYX3gspKHPPwAN1vuHZg78kp37Jb
Arg [3] : contractURI_ (string): ipfs://QmPXFqVhFcQijBGN8EgfZWHPR1YDunEQnjj828heNvPJWf

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [5] : 4275696c64696e6720546f676574686572000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 4254000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [9] : 697066733a2f2f516d5776544831435341636a674e7a4179464e595833677370
Arg [10] : 4b48505077414e317675485a6737386b7033374a620000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [12] : 697066733a2f2f516d505846715668466351696a42474e384567665a57485052
Arg [13] : 315944756e45516e6a6a38323868654e76504a57660000000000000000000000


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.