APE Price: $0.19 (-0.51%)

Contract

0x55DfE03618b6f83301C6cD85B9f9Abd3bF382B79

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

More Info

Private Name Tags

TokenTracker

Multichain Info

N/A
Transaction Hash
Block
From
To
Set Approval For...324219532026-01-15 19:07:058 days ago1768504025IN
0x55DfE036...3bF382B79
0 APE0.00247821101.68276
Set Approval For...322710082026-01-11 17:14:2412 days ago1768151664IN
0x55DfE036...3bF382B79
0 APE0.00470628101.68276
Set Approval For...322677642026-01-11 15:00:3912 days ago1768143639IN
0x55DfE036...3bF382B79
0 APE0.00470628101.68276
Safe Transfer Fr...322100412026-01-10 2:56:4414 days ago1768013804IN
0x55DfE036...3bF382B79
0 APE0.00455945101.68276
Set Approval For...319420822026-01-03 6:01:2421 days ago1767420084IN
0x55DfE036...3bF382B79
0 APE0.00470628101.68276
Set Approval For...318295032025-12-31 13:52:3623 days ago1767189156IN
0x55DfE036...3bF382B79
0 APE0.00470628101.68276
Set Approval For...317942302025-12-30 21:42:4324 days ago1767130963IN
0x55DfE036...3bF382B79
0 APE0.00247821101.68276
Safe Transfer Fr...317534632025-12-30 1:37:0625 days ago1767058626IN
0x55DfE036...3bF382B79
0 APE0.00629823101.68276
Safe Transfer Fr...315882252025-12-26 4:05:5829 days ago1766721958IN
0x55DfE036...3bF382B79
0 APE0.00455945101.68276
Safe Transfer Fr...315881542025-12-26 4:03:1229 days ago1766721792IN
0x55DfE036...3bF382B79
0 APE0.00504753101.68276
Set Approval For...312248112025-12-19 21:46:1835 days ago1766180778IN
0x55DfE036...3bF382B79
0 APE0.00471482101.68276
Set Approval For...310192402025-12-15 23:36:2839 days ago1765841788IN
0x55DfE036...3bF382B79
0 APE0.00471482101.68276
Set Approval For...308395292025-12-12 17:15:2142 days ago1765559721IN
0x55DfE036...3bF382B79
0 APE0.00247821101.68276
Safe Transfer Fr...307778252025-12-11 15:50:0243 days ago1765468202IN
0x55DfE036...3bF382B79
0 APE0.00629823101.68276
Set Approval For...306461992025-12-09 13:15:0745 days ago1765286107IN
0x55DfE036...3bF382B79
0 APE0.00247821101.68276
Safe Transfer Fr...295831942025-12-02 3:58:2953 days ago1764647909IN
0x55DfE036...3bF382B79
0 APE0.0015751425.42069
Set Approval For...292430692025-11-28 3:10:4157 days ago1764299441IN
0x55DfE036...3bF382B79
0 APE0.0011769525.42069
Set Approval For...289135142025-11-23 16:56:3561 days ago1763916995IN
0x55DfE036...3bF382B79
0 APE0.0011790825.42069
Set Approval For...285991262025-11-20 22:14:5464 days ago1763676894IN
0x55DfE036...3bF382B79
0 APE0.0011791125.42069
Set Approval For...285627732025-11-20 17:20:4564 days ago1763659245IN
0x55DfE036...3bF382B79
0 APE0.0006729125.42069
Set Approval For...285627662025-11-20 17:20:3764 days ago1763659237IN
0x55DfE036...3bF382B79
0 APE0.0006220625.42069
Set Approval For...285287712025-11-20 8:35:0565 days ago1763627705IN
0x55DfE036...3bF382B79
0 APE0.0006199325.42069
Set Approval For...284562602025-11-19 18:08:3665 days ago1763575716IN
0x55DfE036...3bF382B79
0 APE0.0006707725.42069
Set Approval For...284562522025-11-19 18:08:3065 days ago1763575710IN
0x55DfE036...3bF382B79
0 APE0.0006199325.42069
Set Approval For...282855682025-11-18 6:05:5867 days ago1763445958IN
0x55DfE036...3bF382B79
0 APE0.0006220625.42069
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OtherShards

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 50 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@limitbreak/creator-token-standards/src/erc1155c/ERC1155C.sol";
import "@limitbreak/creator-token-standards/src/programmable-royalties/BasicRoyalties.sol";
import "@limitbreak/creator-token-standards/src/access/OwnableBasic.sol";

/**
 * @title OtherShards
 * @author OtherEggs
 */
contract OtherShards is ERC1155C, BasicRoyalties, OwnableBasic {
    mapping(address => bool) public minters;

    event MinterAdded(address minter);
    event MinterRemoved(address minter);

    constructor(
        string memory uri_,
        address royaltyReceiver_,
        uint96 royaltyFeeNumerator_
    )
        ERC1155OpenZeppelin(uri_)
        BasicRoyalties(royaltyReceiver_, royaltyFeeNumerator_)
    {
        //Initial Mints
        _mint(msg.sender, 1, 1, "");
        _mint(msg.sender, 2, 1, "");
        _mint(msg.sender, 3, 1, "");
        _mint(msg.sender, 4, 1, "");
    }

    modifier onlyMinter() {
        require(minters[msg.sender], "OtherShards: caller is not a minter");
        _;
    }

    /**
     * @dev Add a minter
     * @param minter Address to add as minter
     */
    function addMinter(address minter) external onlyOwner {
        require(minter != address(0), "OtherShards: minter is zero address");
        minters[minter] = true;
        emit MinterAdded(minter);
    }

    /**
     * @dev Remove a minter
     * @param minter Address to remove as minter
     */
    function removeMinter(address minter) external onlyOwner {
        minters[minter] = false;
        emit MinterRemoved(minter);
    }

    /**
     * @dev Mint tokens to a specified address
     * @param to Address to receive the tokens
     * @param id ID of the token to mint
     * @param amount Amount of tokens to mint
     */
    function mint(uint256 id, address to, uint256 amount) external onlyMinter {
        _mint(to, id, amount, "");
    }

    /**
     * @dev Mint tokens with data to a specified address
     * @param to Address to receive the tokens
     * @param id ID of the token to mint
     * @param amount Amount of tokens to mint
     * @param data Additional data to pass with the transfer
     */
    function mintWithData(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) external onlyMinter {
        _mint(to, id, amount, data);
    }

    /**
     * @dev Mint batch of tokens to a specified address
     * @param to Address to receive the tokens
     * @param ids Array of token IDs to mint
     * @param amounts Array of token amounts to mint
     */
    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external onlyMinter {
        _mintBatch(to, ids, amounts, "");
    }

    /**
     * @dev Burn tokens from a specified address
     * @param from Address to burn tokens from
     * @param id ID of the token to burn
     * @param amount Amount of tokens to burn
     */
    function burn(address from, uint256 id, uint256 amount) external {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _burn(from, id, amount);
    }

    /**
     * @dev Burn batch of tokens from a specified address
     * @param from Address to burn tokens from
     * @param ids Array of token IDs to burn
     * @param amounts Array of token amounts to burn
     */
    function burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _burnBatch(from, ids, amounts);
    }

    /**
     * @notice Set the default royalty for all tokens
     * @param receiver The address to receive royalties
     * @param feeNumerator The royalty fee numerator (basis points)
     */
    function setDefaultRoyalty(
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setDefaultRoyalty(receiver, feeNumerator);
    }

    /**
     * @notice Set royalty for a specific token
     * @param tokenId The token ID to set royalty for
     * @param receiver The address to receive royalties
     * @param feeNumerator The royalty fee numerator (basis points)
     */
    function setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) external onlyOwner {
        _setTokenRoyalty(tokenId, receiver, feeNumerator);
    }

    /**
     * @notice Check if contract supports an interface
     * @param interfaceId The interface ID to check
     * @return True if supported
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view virtual override(ERC1155C, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @notice Set the URI for all tokens
     * @param newURI The new base URI for token metadata
     */
    function setURI(string memory newURI) external onlyOwner {
        _setURI(newURI);
    }

}

File 2 of 25 : OwnableBasic.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

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

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

File 3 of 25 : 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;
}

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

import "../utils/AutomaticValidatorTransferApproval.sol";
import "../utils/CreatorTokenBase.sol";
import "../token/erc1155/ERC1155OpenZeppelin.sol";
import {TOKEN_TYPE_ERC1155} from "@limitbreak/permit-c/src/Constants.sol";

/**
 * @title ERC1155C
 * @author Limit Break, Inc.
 * @notice Extends OpenZeppelin's ERC1155 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 ERC1155C is ERC1155OpenZeppelin, CreatorTokenBase, AutomaticValidatorTransferApproval {
    
    /**
     * @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());
            }
        }
    }

    /**
     * @notice Indicates whether the contract implements the specified interface.
     * @dev Overrides supportsInterface in ERC165.
     * @param interfaceId The interface id
     * @return true if the contract implements the specified interface, false otherwise
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return 
        interfaceId == type(ICreatorToken).interfaceId || 
        interfaceId == type(ICreatorTokenLegacy).interfaceId || 
        super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the function selector for the transfer validator's validation function to be called 
     * @notice for transaction simulation. 
     */
    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
        functionSignature = bytes4(keccak256("validateTransfer(address,address,address,uint256,uint256)"));
        isViewFunction = false;
    }

    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic
    function _beforeTokenTransfer(
        address /*operator*/,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory /*data*/
    ) internal virtual override {
        uint256 idsArrayLength = ids.length;
        for (uint256 i = 0; i < idsArrayLength;) {
            _validateBeforeTransfer(from, to, ids[i], amounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic
    function _afterTokenTransfer(
        address /*operator*/,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory /*data*/
    ) internal virtual override {
        uint256 idsArrayLength = ids.length;
        for (uint256 i = 0; i < idsArrayLength;) {
            _validateAfterTransfer(from, to, ids[i], amounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    function _tokenType() internal pure override returns(uint16) {
        return uint16(TOKEN_TYPE_ERC1155);
    }
}

/**
 * @title ERC1155CInitializable
 * @author Limit Break, Inc.
 * @notice Initializable implementation of ERC1155C to allow for EIP-1167 proxy clones.
 */
abstract contract ERC1155CInitializable is ERC1155OpenZeppelinInitializable, CreatorTokenBase, AutomaticValidatorTransferApproval {

    function initializeERC1155(string memory uri_) public override {
        super.initializeERC1155(uri_);

        _emitDefaultTransferValidator();
        _registerTokenType(getTransferValidator());
    }

    /**
     * @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());
            }
        }
    }

    /**
     * @notice Indicates whether the contract implements the specified interface.
     * @dev Overrides supportsInterface in ERC165.
     * @param interfaceId The interface id
     * @return true if the contract implements the specified interface, false otherwise
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return 
        interfaceId == type(ICreatorToken).interfaceId || 
        interfaceId == type(ICreatorTokenLegacy).interfaceId || 
        super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the function selector for the transfer validator's validation function to be called 
     * @notice for transaction simulation. 
     */
    function getTransferValidationFunction() external pure returns (bytes4 functionSignature, bool isViewFunction) {
        functionSignature = bytes4(keccak256("validateTransfer(address,address,address,uint256,uint256)"));
        isViewFunction = false;
    }

    /// @dev Ties the open-zeppelin _beforeTokenTransfer hook to more granular transfer validation logic
    function _beforeTokenTransfer(
        address /*operator*/,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory /*data*/
    ) internal virtual override {
        uint256 idsArrayLength = ids.length;
        for (uint256 i = 0; i < idsArrayLength;) {
            _validateBeforeTransfer(from, to, ids[i], amounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    /// @dev Ties the open-zeppelin _afterTokenTransfer hook to more granular transfer validation logic
    function _afterTokenTransfer(
        address /*operator*/,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory /*data*/
    ) internal virtual override {
        uint256 idsArrayLength = ids.length;
        for (uint256 i = 0; i < idsArrayLength;) {
            _validateAfterTransfer(from, to, ids[i], amounts[i]);

            unchecked {
                ++i;
            }
        }
    }

    function _tokenType() internal pure override returns(uint16) {
        return uint16(TOKEN_TYPE_ERC1155);
    }
}

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

interface ICreatorToken {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
    function getTransferValidationFunction() external view returns (bytes4 functionSignature, bool isViewFunction);
}

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

interface ICreatorTokenLegacy {
    event TransferValidatorUpdated(address oldValidator, address newValidator);
    function getTransferValidator() external view returns (address validator);
    function setTransferValidator(address validator) external;
}

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

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

    function beforeAuthorizedTransfer(address operator, address token, uint256 tokenId) external;
    function afterAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransfer(address operator, address token) external;
    function afterAuthorizedTransfer(address token) external;
    function beforeAuthorizedTransfer(address token, uint256 tokenId) external;
    function beforeAuthorizedTransferWithAmount(address token, uint256 tokenId, uint256 amount) external;
    function afterAuthorizedTransferWithAmount(address token, uint256 tokenId) external;
}

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

interface ITransferValidatorSetTokenType {
    function setTokenTypeOfCollection(address collection, uint16 tokenType) external;
}

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

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

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

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

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

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

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

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

File 10 of 25 : ERC1155OpenZeppelin.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "../../access/OwnablePermissions.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";

abstract contract ERC1155OpenZeppelinBase is ERC1155 {

}

abstract contract ERC1155OpenZeppelin is ERC1155OpenZeppelinBase {
    constructor(string memory uri_) ERC1155(uri_) {}
}

abstract contract ERC1155OpenZeppelinInitializable is OwnablePermissions, ERC1155OpenZeppelinBase {

    error ERC1155OpenZeppelinInitializable__AlreadyInitializedERC1155();

    bool private _erc1155Initialized;

    function initializeERC1155(string memory uri_) public virtual {
        _requireCallerIsContractOwner();

        if(_erc1155Initialized) {
            revert ERC1155OpenZeppelinInitializable__AlreadyInitializedERC1155();
        }

        _erc1155Initialized = true;

        _setURI(uri_);
    }
}

File 11 of 25 : 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);
    }
}

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

import "../access/OwnablePermissions.sol";
import "../interfaces/ICreatorToken.sol";
import "../interfaces/ICreatorTokenLegacy.sol";
import "../interfaces/ITransferValidator.sol";
import "./TransferValidation.sol";
import "../interfaces/ITransferValidatorSetTokenType.sol";

/**
 * @title CreatorTokenBase
 * @author Limit Break, Inc.
 * @notice CreatorTokenBaseV3 is an abstract contract that provides basic functionality for managing token 
 * transfer policies through an implementation of ICreatorTokenTransferValidator/ICreatorTokenTransferValidatorV2/ICreatorTokenTransferValidatorV3. 
 * 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>
 *
 * <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, whitelists, and graylists.</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/V3 Creator Token Base will work with V1/V2/V3 Transfer Validators.</ul>
 */
abstract contract CreatorTokenBase is OwnablePermissions, TransferValidation, ICreatorToken {

    /// @dev Thrown when setting a transfer validator address that has no deployed code.
    error CreatorTokenBase__InvalidTransferValidatorContract();

    /// @dev The default transfer validator that will be used if no transfer validator has been set by the creator.
    address public constant DEFAULT_TRANSFER_VALIDATOR = address(0x721C002B0059009a671D00aD1700c9748146cd1B);

    /// @dev Used to determine if the default transfer validator is applied.
    /// @dev Set to true when the creator sets a transfer validator address.
    bool private isValidatorInitialized;
    /// @dev Address of the transfer validator to apply to transactions.
    address private transferValidator;

    constructor() {
        _emitDefaultTransferValidator();
        _registerTokenType(DEFAULT_TRANSFER_VALIDATOR);
    }

    /**
     * @notice Sets the transfer validator for the token contract.
     *
     * @dev    Throws when provided validator contract is not the zero address and does not have code.
     * @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 = transferValidator_.code.length > 0;

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

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

        isValidatorInitialized = true;
        transferValidator = transferValidator_;

        _registerTokenType(transferValidator_);
    }

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

        if (validator == address(0)) {
            if (!isValidatorInitialized) {
                validator = DEFAULT_TRANSFER_VALIDATOR;
            }
        }
    }

    /**
     * @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 Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     *
     * @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.
     * @param tokenId The token id being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId);
        }
    }

    /**
     * @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 Be aware that if the msg.sender is the transfer validator, the transfer is automatically permitted, as the
     *      transfer validator is expected to pre-validate the transfer.
     * 
     * @dev Used for ERC20 and ERC1155 token transfers which have an amount value to validate in the transfer validator.
     * @dev The `tokenId` for ERC20 tokens should be set to `0`.
     *
     * @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.
     * @param tokenId The token id being transferred.
     * @param amount  The amount of token being transferred.
     */
    function _preValidateTransfer(
        address caller, 
        address from, 
        address to, 
        uint256 tokenId, 
        uint256 amount,
        uint256 /*value*/) internal virtual override {
        address validator = getTransferValidator();

        if (validator != address(0)) {
            if (msg.sender == validator) {
                return;
            }

            ITransferValidator(validator).validateTransfer(caller, from, to, tokenId, amount);
        }
    }

    function _tokenType() internal virtual pure returns(uint16);

    function _registerTokenType(address validator) internal {
        if (validator != address(0)) {
            uint256 validatorCodeSize;
            assembly {
                validatorCodeSize := extcodesize(validator)
            }
            if(validatorCodeSize > 0) {
                try ITransferValidatorSetTokenType(validator).setTokenTypeOfCollection(address(this), _tokenType()) {
                } catch { }
            }
        }
    }

    /**
     * @dev  Used during contract deployment for constructable and cloneable creator tokens
     * @dev  to emit the `TransferValidatorUpdated` event signaling the validator for the contract
     * @dev  is the default transfer validator.
     */
    function _emitDefaultTransferValidator() internal {
        emit TransferValidatorUpdated(address(0), DEFAULT_TRANSFER_VALIDATOR);
    }
}

// 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();

    /*************************************************************************/
    /*                      Transfers Without Amounts                        */
    /*************************************************************************/

    /// @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 {}

    /*************************************************************************/
    /*                         Transfers With Amounts                        */
    /*************************************************************************/

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

        if(fromZeroAddress && toZeroAddress) {
            revert ShouldNotMintToBurnAddress();
        } else if(fromZeroAddress) {
            _preValidateMint(_msgSender(), to, tokenId, amount, msg.value);
        } else if(toZeroAddress) {
            _preValidateBurn(_msgSender(), from, tokenId, amount, msg.value);
        } else {
            _preValidateTransfer(_msgSender(), from, to, tokenId, amount, 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, uint256 amount) internal virtual {
        bool fromZeroAddress = from == address(0);
        bool toZeroAddress = to == address(0);

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

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

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

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

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

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

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

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

/// @dev Constant bytes32 value of 0x000...000
bytes32 constant ZERO_BYTES32 = bytes32(0);

/// @dev Constant value of 0
uint256 constant ZERO = 0;
/// @dev Constant value of 1
uint256 constant ONE = 1;

/// @dev Constant value representing an open order in storage
uint8 constant ORDER_STATE_OPEN = 0;
/// @dev Constant value representing a filled order in storage
uint8 constant ORDER_STATE_FILLED = 1;
/// @dev Constant value representing a cancelled order in storage
uint8 constant ORDER_STATE_CANCELLED = 2;

/// @dev Constant value representing the ERC721 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC721 = 721;
/// @dev Constant value representing the ERC1155 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC1155 = 1155;
/// @dev Constant value representing the ERC20 token type for signatures and transfer hooks
uint256 constant TOKEN_TYPE_ERC20 = 20;

/// @dev Constant value to mask the upper bits of a signature that uses a packed `vs` value to extract `s`
bytes32 constant UPPER_BIT_MASK = 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

/// @dev EIP-712 typehash used for validating signature based stored approvals
bytes32 constant UPDATE_APPROVAL_TYPEHASH =
    keccak256("UpdateApprovalBySignature(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 approvalExpiration,uint256 sigDeadline,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit without additional data
bytes32 constant SINGLE_USE_PERMIT_TYPEHASH =
    keccak256("PermitTransferFrom(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce)");

/// @dev EIP-712 typehash used for validating a single use permit with additional data
string constant SINGLE_USE_PERMIT_TRANSFER_ADVANCED_TYPEHASH_STUB =
    "PermitTransferFromWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 nonce,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev EIP-712 typehash used for validating an order permit that updates storage as it fills
string constant PERMIT_ORDER_ADVANCED_TYPEHASH_STUB =
    "PermitOrderWithAdditionalData(uint256 tokenType,address token,uint256 id,uint256 amount,uint256 salt,address operator,uint256 expiration,uint256 masterNonce,";

/// @dev Pausable flag for stored approval transfers of ERC721 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC721 = 1 << 0;
/// @dev Pausable flag for stored approval transfers of ERC1155 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC1155 = 1 << 1;
/// @dev Pausable flag for stored approval transfers of ERC20 assets
uint256 constant PAUSABLE_APPROVAL_TRANSFER_FROM_ERC20 = 1 << 2;

/// @dev Pausable flag for single use permit transfers of ERC721 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC721 = 1 << 3;
/// @dev Pausable flag for single use permit transfers of ERC1155 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC1155 = 1 << 4;
/// @dev Pausable flag for single use permit transfers of ERC20 assets
uint256 constant PAUSABLE_PERMITTED_TRANSFER_FROM_ERC20 = 1 << 5;

/// @dev Pausable flag for order fill transfers of ERC1155 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC1155 = 1 << 6;
/// @dev Pausable flag for order fill transfers of ERC20 assets
uint256 constant PAUSABLE_ORDER_TRANSFER_FROM_ERC20 = 1 << 7;

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

        return (royalty.receiver, royaltyAmount);
    }

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

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

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: address zero is not a valid owner");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC1155-isApprovedForAll}.
     */
    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[account][operator];
    }

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not token owner or approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `ids` and `amounts` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non-ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

// 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;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

// 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);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"uri_","type":"string"},{"internalType":"address","name":"royaltyReceiver_","type":"address"},{"internalType":"uint96","name":"royaltyFeeNumerator_","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CreatorTokenBase__InvalidTransferValidatorContract","type":"error"},{"inputs":[],"name":"ShouldNotMintToBurnAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"TokenRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_TRANSFER_VALIDATOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"autoApproveTransfersFromValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTransferValidationFunction","outputs":[{"internalType":"bytes4","name":"functionSignature","type":"bytes4"},{"internalType":"bool","name":"isViewFunction","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getTransferValidator","outputs":[{"internalType":"address","name":"validator","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isApproved","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintWithData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"removeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"autoApprove","type":"bool"}],"name":"setAutomaticApprovalOfTransfersFromValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"transferValidator_","type":"address"}],"name":"setTransferValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60808060405234610e085760009061382c803803809161001f8285610e0d565b8339810160608282031261064b5781516001600160401b03811161087a57820181601f8201121561087a5780516001600160401b038111610df45760405192610072601f8301601f191660200185610e0d565b81845260208284010111610df0576100909160208085019101610e46565b60208201516001600160a01b038116929083900361087a57604001516001600160601b03811691828203610df0578051906001600160401b038211610bd157600254600181811c91168015610de6575b6020821014610dd2579081601f849311610d64575b50602090601f8311600114610cff578792610cf4575b50508160011b916000199060031b1c1916176002555b7fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6040805186815273721c002b0059009a671d00ad1700c9748146cd1b6020820152a173721c002b0059009a671d00ad1700c9748146cd1b3b610c82575b6127108211610c2a578215610be557604080519081016001600160401b03811182821017610bd157604090815284825260209182018490526001600160a01b03851660a09390931b6001600160a01b0319169290921760045590519182527f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef91a260068054336001600160a01b0319821681179092556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a36020906040516102528382610e0d565b818152331590816106d0576102676001610e93565b6102716001610e93565b8151855b818110610b9e5750506001855284865260408520338652865260408520805490600182018092116106895755604051600181526001878201528533916000805160206137ac83398151915260403392a4815191855b838110610b6b575050505083333b610a5e575b50506040516102ec8482610e0d565b818382526106d0576102fe6002610e93565b6103086001610e93565b8151855b818110610a2b5750506002855284865260408520338652865260408520805490600182018092116106895755604051600281526001878201528533916000805160206137ac83398151915260403392a4815191855b8381106109f8575050505083333b6108eb575b50506040516103838482610e0d565b818382526106d0576103956003610e93565b61039f6001610e93565b8151855b8181106108b85750506003855284865260408520338652865260408520805490600182018092116106895755604051600381526001878201528533916000805160206137ac83398151915260403392a4815191855b838110610885575050505083333b61071f575b50506040519061041b8483610e0d565b808383526106d05761042d6004610e93565b906104386001610e93565b8251855b81811061069d5750506004855284865260408520338652865260408520805490600182018092116106895755604051600481526001878201528533916000805160206137ac83398151915260403392a4825192855b84811061065657878787333b6104b1575b6040516128509081610f5c8239f35b826104f2916040518093819263f23a6e6160e01b8352336004840152866024840152600460448401526001606484015260a0608484015260a4830190610ebe565b038185335af1829181610612575b506105ad57508060033d1161059c575b506308c379a014610562575b6084906040519062461bcd60e51b82526004820152603460248201526000805160206137cc83398151915260448201526000805160206137ec8339815191526064820152fd5b61056a610ee3565b908161057757905061051c565b61059860405192839262461bcd60e51b845260048401526024830190610ebe565b0390fd5b9050600481803e5160e01c82610510565b6001600160e01b031916630dc5919f60e01b0190506105cf57508080806104a2565b6084906040519062461bcd60e51b825260048201526028602482015260008051602061380c8339815191526044820152676420746f6b656e7360c01b6064820152fd5b9091508381813d831161064f575b61062a8183610e0d565b8101031261064b57516001600160e01b03198116810361064b579084610500565b8280fd5b503d610620565b6106608183610e69565b5061066b8184610e69565b50831561068157635cbd944160e01b8752600487fd5b600101610491565b634e487b7160e01b87526011600452602487fd5b6106a78186610e69565b506106b28184610e69565b5083156106c857635cbd944160e01b8752600487fd5b60010161043c565b60405162461bcd60e51b815260048101859052602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b61075f916040518093819263f23a6e6160e01b8352336004840152876024840152600360448401526001606484015260a0608484015260a4830190610ebe565b038186335af1839181610841575b506107df5750508060033d116107ce57506308c379a014610562576084906040519062461bcd60e51b82526004820152603460248201526000805160206137cc83398151915260448201526000805160206137ec8339815191526064820152fd5b9050600481803e5160e01c38610510565b6001600160e01b031916630dc5919f60e01b016107fd57388361040b565b60405162461bcd60e51b8152600481018490526028602482015260008051602061380c8339815191526044820152676420746f6b656e7360c01b6064820152608490fd5b9091508481813d831161087e575b6108598183610e0d565b8101031261087a57516001600160e01b03198116810361087a57903861076d565b8380fd5b503d61084f565b61088f8183610e69565b5061089a8184610e69565b5085156108b057635cbd944160e01b8752600487fd5b6001016103f8565b6108c28185610e69565b506108cd8184610e69565b5085156108e357635cbd944160e01b8752600487fd5b6001016103a3565b61092b916040518093819263f23a6e6160e01b8352336004840152876024840152600260448401526001606484015260a0608484015260a4830190610ebe565b038186335af18391816109b8575b5061099a5750508060033d116107ce57506308c379a014610562576084906040519062461bcd60e51b82526004820152603460248201526000805160206137cc83398151915260448201526000805160206137ec8339815191526064820152fd5b6001600160e01b031916630dc5919f60e01b016107fd573883610374565b9091508481813d83116109f1575b6109d08183610e0d565b8101031261087a57516001600160e01b03198116810361087a579038610939565b503d6109c6565b610a028183610e69565b50610a0d8184610e69565b508515610a2357635cbd944160e01b8752600487fd5b600101610361565b610a358185610e69565b50610a408184610e69565b508515610a5657635cbd944160e01b8752600487fd5b60010161030c565b610a9e916040518093819263f23a6e6160e01b8352336004840152876024840152600160448401526001606484015260a0608484015260a4830190610ebe565b038186335af1839181610b2b575b50610b0d5750508060033d116107ce57506308c379a014610562576084906040519062461bcd60e51b82526004820152603460248201526000805160206137cc83398151915260448201526000805160206137ec8339815191526064820152fd5b6001600160e01b031916630dc5919f60e01b016107fd5738836102dd565b9091508481813d8311610b64575b610b438183610e0d565b8101031261087a57516001600160e01b03198116810361087a579038610aac565b503d610b39565b610b758183610e69565b50610b808184610e69565b508515610b9657635cbd944160e01b8752600487fd5b6001016102ca565b610ba88185610e69565b50610bb38184610e69565b508515610bc957635cbd944160e01b8752600487fd5b600101610275565b634e487b7160e01b86526041600452602486fd5b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b73721c002b0059009a671d00ad1700c9748146cd1b3b1561087a5760405163fb2de5d760e01b8152306004820152610483602482015284816044818373721c002b0059009a671d00ad1700c9748146cd1b5af1610ce0575b5061017f565b84610ced91959295610e0d565b9238610cda565b01519050388061010b565b600288528188209250601f198416885b818110610d4c5750908460019594939210610d33575b505050811b01600255610121565b015160001960f88460031b161c19169055388080610d25565b92936020600181928786015181550195019301610d0f565b600288529091507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c81019160208510610dc8575b90601f859493920160051c01905b818110610dba57506100f5565b888155849350600101610dad565b9091508190610d9f565b634e487b7160e01b87526022600452602487fd5b90607f16906100e0565b8480fd5b634e487b7160e01b85526041600452602485fd5b600080fd5b601f909101601f19168101906001600160401b03821190821017610e3057604052565b634e487b7160e01b600052604160045260246000fd5b60005b838110610e595750506000910152565b8181015183820152602001610e49565b8051821015610e7d5760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b604090815191610ea38184610e0d565b600183526020830190601f1901368237825115610e7d575290565b90602091610ed781518092818552858086019101610e46565b601f01601f1916010190565b600060443d10610f4a576040513d600319016004823e8051916001600160401b0383113d602485011117610f55578183018051909390916001600160401b038311610f4d573d84016003190185840160200111610f4d5750610f4a92910160200190610e0d565b90565b949350505050565b9291505056fe6080604052600436101561001257600080fd5b6000803560e01c8062fdd58e14611c1f5780630146354614611bf057806301ffc9a714611b3557806302fe5305146119b257806304634d8d146118bb578063098144d41461188e5780630d705df6146118665780630e89341c14611782578063249b0ac81461171f5780632a55205a1461164e5780632eb2c2d6146113425780633092afd5146112d85780634e1273f4146111345780635944c753146110225780636221d13c14610ffc5780636b20c45414610e65578063715018a614610e08578063836a104014610db45780638da5cb5b14610d8b578063983b2d5614610cc55780639e05d24014610c53578063a22cb46514610b6d578063a9fc664e14610a5b578063d81d0a15146107d7578063e985e9c5146107a0578063f242432a14610406578063f2fde38b1461033d578063f46eccc4146102fe5763f5298aca1461015b57600080fd5b346102fb5760603660031901126102fb57610174611c4f565b6001600160a01b03811690604435906024359061019c903385149081156102e9575b50612067565b838315926101aa84156124e6565b6101b3836125f5565b946101bd826125f5565b93602092846040516101cf8682611cb1565b528751855b81811061029a57505090849291818452838552604084208360005285526040600020546102038282101561253e565b8285528486526040852084600052865281604060002091039055604051918252848201526000805160206127fb83398151915260403392a46102486040519182611cb1565b52825192845b848110610259578580f35b610263818361203d565b5061026e818461203d565b508380610292575b1561028a57635cbd944160e01b8652600486fd5b60010161024e565b506001610276565b909192939495506102ab818a61203d565b506102b6818861203d565b5087806102e1575b156102d257635cbd944160e01b8a5260048afd5b9060018a9695949392016101d4565b5060016102be565b6102f5915033906120c5565b38610196565b80fd5b50346102fb5760203660031901126102fb5760209060ff906040906001600160a01b03610329611c4f565b168152600784522054166040519015158152f35b50346102fb5760203660031901126102fb57610357611c4f565b61035f61212d565b6001600160a01b031680156103b257600680546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b50346102fb5760a03660031901126102fb57610420611c4f565b610428611c6a565b60443591606435906084356001600160401b03811161079c5761044f903690600401611d59565b936001600160a01b0382169386903386148015610787575b61047991939250979695949397611fda565b6001600160a01b0382168015979092906104938915612408565b61049c836125f5565b906104a6866125f5565b9982519a8a9b8c93818b15955b1061070f575050908a9493929186865285602052604086208a6000526020526040600020546104e48a821015612462565b87875286602052604087208b6000526020528960406000209103905586865285602052604086208860005260205260406000206105228a82546121db565b9055878a6040518981528b60208201526000805160206127fb83398151915260403392a4835193865b8581106106bf575050505050503b6105605780f35b6020946105a06040519788968795869463f23a6e6160e01b865233600487015260248601526044850152606484015260a0608484015260a4830190611d18565b03925af182918161068e575b50610618576105b9612640565b6308c379a0146105e1575b60405162461bcd60e51b8152806105dd600482016126d1565b0390fd5b6105e961265e565b806105f457506105c4565b60405162461bcd60e51b8152602060048201529081906105dd906024830190611d18565b6001600160e01b031916630dc5919f60e01b016106385781808080808580f35b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b6106b191925060203d6020116106b8575b6106a98183611cb1565b810190612620565b90836105ac565b503d61069f565b90919293949596506106d1818361203d565b506106dc818461203d565b508480610708575b156106f857635cbd944160e01b8d5260048dfd5b9060018d9796959493920161054b565b50836106e4565b6107198e8761203d565b519d610725818561203d565b518680610780575b1561074157635cbd944160e01b8f5260048ffd5b908e9f9d9e999a9b9c9d6001928815610768575b5050019d50969b9a99989796818e6104b3565b8761075557610779918b8633612726565b3880610755565b508561072d565b5061047961079533866120c5565b9050610467565b8580fd5b50346102fb5760403660031901126102fb5760206107cd6107bf611c4f565b6107c7611c6a565b906120c5565b6040519015158152f35b50346102fb576107e636611e1f565b33845260076020526107fe60ff604086205416611f82565b6020936040519161080f8684611cb1565b8183526001600160a01b03851680159590939061082c8715612185565b61083986518451146123ab565b8551845b818110610a1e575050835b8651811015610890578061085e6001928661203d565b51610869828a61203d565b518752868b5261088860408c818a206000918c835252209182546121db565b905501610848565b50909194929584876040516000805160206127db8339815191523391806108b88c8b836124c1565b0390a4835190875b8281106109eb575050503b6108d3578480f35b9161091385610925959361093789966040519889978896879563bc197c8160e01b875233600488015287602488015260a0604488015260a4870190611deb565b85810360031901606487015290611deb565b83810360031901608485015290611d18565b03925af18291816109cc575b506109a95782610951612640565b6308c379a0146109745760405162461bcd60e51b8152806105dd600482016126d1565b61097c61265e565b908161098857506105c4565b6105dd60405192839262461bcd60e51b845260048401526024830190611d18565b9091506001600160e01b0319166343e6837f60e01b016106385780388080808480f35b6109e4919250843d86116106b8576106a98183611cb1565b9038610943565b6109f5818761203d565b50610a00818961203d565b508115610a1657635cbd944160e01b8952600489fd5b6001016108c0565b610a2c818998979a9961203d565b50610a37818661203d565b508715610a4d57635cbd944160e01b8952600489fd5b60019098959697980161083d565b50346102fb5760203660031901126102fb57610a75611c4f565b90610a7e61212d565b6001600160a01b0382168015159283813b1581610b65575b50610b565782937fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6040610ac8611f09565b81516001600160a01b03909116815260208101869052a1600380546001600160a81b031916600884901b610100600160a81b0316176001179055610b0a575050f35b3b610b125750f35b803b15610b535781809160446040518095819363fb2de5d760e01b835230600484015261048360248401525af1610b47579050f35b610b5091611cb1565b80f35b50fd5b6332483afb60e01b8352600483fd5b905038610a96565b50346102fb5760403660031901126102fb57610b87611c4f565b60243590811515809203610c4f576001600160a01b031690338214610bf8573383526001602052604083208284526020526040832060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608490fd5b8280fd5b50346102fb5760203660031901126102fb57600435801515809103610cc15760207f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc91610c9e61212d565b6003805460ff60a81b191660a883901b60ff60a81b16179055604051908152a180f35b5080fd5b50346102fb5760203660031901126102fb57610cdf611c4f565b610ce761212d565b6001600160a01b03168015610d3a576020817f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69284526007825260408420600160ff19825416179055604051908152a180f35b60405162461bcd60e51b815260206004820152602360248201527f4f746865725368617264733a206d696e746572206973207a65726f206164647260448201526265737360e81b6064820152608490fd5b50346102fb57806003193601126102fb576006546040516001600160a01b039091168152602090f35b50346102fb5760603660031901126102fb57610b50610dd1611c6a565b3383526007602052610de960ff604085205416611f82565b60405190610df8602083611cb1565b83825260443590600435906121fe565b50346102fb57806003193601126102fb57610e2161212d565b600680546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102fb57610e7436611e1f565b6001600160a01b03831692909190610e96903385149081156102e95750612067565b821592610ea384156124e6565b610eb082518451146123ab565b60209185604051610ec18582611cb1565b528051865b818110610fbb575050855b868251821015610f32575080610ee96001928461203d565b51610ef4828861203d565b51818a5289875260408a20868b52875260408a205491610f168284101561253e565b8a5289875260408a20868b52875260408a209103905501610ed1565b828787838881896040516000805160206127db833981519152339180610f59898c836124c1565b0390a4610f696040519182611cb1565b52825192845b848110610f7a578580f35b610f84818361203d565b50610f8f818461203d565b508380610fb3575b15610fab57635cbd944160e01b8652600486fd5b600101610f6f565b506001610f97565b610fc5818461203d565b50610fd0818761203d565b508680610ff4575b15610fec57635cbd944160e01b8852600488fd5b600101610ec6565b506001610fd8565b50346102fb57806003193601126102fb57602060ff60035460a81c166040519015158152f35b50346102fb5760603660031901126102fb5760043561103f611c6a565b6044356001600160601b0381169291908390036111305761105e61212d565b61106c612710841115612596565b6001600160a01b03169182156110ed5760207f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c916040516110ac81611c80565b8581528281018281528588526005845260408089209251915160a01b6001600160a01b0319166001600160a01b03929092169190911790915551908152a380f35b60405162461bcd60e51b815260206004820152601b60248201527a455243323938313a20496e76616c696420706172616d657465727360281b6044820152606490fd5b8380fd5b50346102fb5760403660031901126102fb576004356001600160401b038111610cc15736602382011215610cc157806004013561117081611d77565b9161117e6040519384611cb1565b8183526024602084019260051b820101903682116112d457602401915b8183106112b4575050506024356001600160401b038111610c4f576111c4903690600401611d8e565b815181510361125d578151926111d984611d77565b936111e76040519586611cb1565b8085526111f6601f1991611d77565b013660208601375b8251811015611243576001906112326001600160a01b0361121f838761203d565b511661122b838661203d565b5190611e7c565b61123c828761203d565b52016111fe565b6040516020808252819061125990820187611deb565b0390f35b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608490fd5b82356001600160a01b038116810361079c5781526020928301920161119b565b8480fd5b50346102fb5760203660031901126102fb577fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666926020611315611c4f565b61131d61212d565b6001600160a01b0316808452600782526040808520805460ff1916905551908152a180f35b50346102fb5760a03660031901126102fb5761135c611c4f565b611364611c6a565b6044356001600160401b03811161113057611383903690600401611d8e565b906064356001600160401b0381116112d4576113a3903690600401611d8e565b6084356001600160401b03811161079c576113c2903690600401611d59565b6001600160a01b03851693903385148015611639575b6113e190611fda565b6113ee82518451146123ab565b6001600160a01b038416801580159791959161140989612408565b8451908a9989159a5b8381106115cd5750505050885b8985518210156114a757508060406114396001938861203d565b518a8d611446858c61203d565b5193818486935280602052818120848252602052818120549361146b84861015612462565b8582528160205282822090825260205220910390558c528b60205260408c20898d5260205261149f60408d209182546121db565b90550161141f565b93969598905085888a6000805160206127db833981519152604051806114cf33948c836124c1565b0390a4845191845b83811061158157505050503b6114ea5780f35b60209461152761091395610925604051998a988997889663bc197c8160e01b8852336004890152602488015260a0604488015260a4870190611deb565b03925af1829181611560575b50611540576105b9612640565b6001600160e01b0319166343e6837f60e01b016106385738808080808580f35b61157a91925060203d6020116106b8576106a98183611cb1565b9038611533565b909192939450611591818761203d565b5061159c818b61203d565b5082806115c6575b156115b857635cbd944160e01b8b5260048bfd5b9060018b95949392016114d7565b50816115a4565b6115d7818961203d565b516115e2828b61203d565b518d80611632575b156115fe57635cbd944160e01b8f5260048ffd5b9060019291848f15611614575b50505001611412565b61161f575b8461160b565b61162b91898733612726565b3880611619565b50866115ea565b506113e161164733886120c5565b90506113d8565b50346102fb5760403660031901126102fb576024356004358252600560205260408220916040519261167f84611c80565b546001600160a01b03811680855260a09190911c6020850152156116f3575b60208301516001600160601b031682810292801590840490911417156116df57509051604080516001600160a01b0390921682526127109092046020820152f35b634e487b7160e01b81526011600452602490fd5b60405190925061170281611c80565b6004546001600160a01b038116825260a01c60208201529161169e565b50346102fb5760803660031901126102fb57611739611c4f565b606435906001600160401b038211610c4f5761175c610b50923690600401611d59565b90338452600760205261177560ff604086205416611f82565b60443590602435906121fe565b50346102fb5760203660031901126102fb576040519080600254906117a682611f48565b808552916001811690811561183f57506001146117e2575b611259846117ce81860382611cb1565b604051918291602083526020830190611d18565b600281527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace939250905b808210611825575090915081016020016117ce826117be565b91926001816020925483858801015201910190929161180c565b60ff191660208087019190915292151560051b850190920192506117ce91508390506117be565b50346102fb57806003193601126102fb57604090815190631854b24160e01b82526020820152f35b50346102fb57806003193601126102fb5760206118a9611f09565b6040516001600160a01b039091168152f35b50346102fb5760403660031901126102fb576118d5611c4f565b602435906001600160601b03821690818303611130576118f361212d565b611901612710831115612596565b6001600160a01b031691821561197157816020917f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef938360405161194481611c80565b87815201526001600160a01b03851660a09190911b6001600160a01b03191617600455604051908152a280f35b60405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606490fd5b50346102fb5760203660031901126102fb576004356001600160401b038111610cc15736602382011215610cc1576119f4903690602481600401359101611cd2565b906119fd61212d565b81516001600160401b038111611b2157611a18600254611f48565b601f8111611abe575b50602092601f8211600114611a5e57928293829392611a53575b50508160011b916000199060031b1c19161760025580f35b015190503880611a3b565b601f198216936002845280842091845b868110611aa65750836001959610611a8d575b505050811b0160025580f35b015160001960f88460031b161c19169055388080611a81565b91926020600181928685015181550194019201611a6e565b600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c81019160208410611b17575b601f0160051c01905b818110611b0c5750611a21565b838155600101611aff565b9091508190611af6565b634e487b7160e01b82526041600452602482fd5b50346102fb5760203660031901126102fb5760043563ffffffff60e01b8116809103610cc15760209063152a902d60e11b8114908115611b7b575b506040519015158152f35b632b435fdb60e21b811491508115611bdf575b8115611b9c575b5082611b70565b636cdb3d1360e11b811491508115611bce575b8115611bbd575b5082611b95565b6301ffc9a760e01b14905082611bb6565b6303a24d0760e21b81149150611baf565b63503e914d60e11b81149150611b8e565b50346102fb57806003193601126102fb57602060405173721c002b0059009a671d00ad1700c9748146cd1b8152f35b50346102fb5760403660031901126102fb576020611c47611c3e611c4f565b60243590611e7c565b604051908152f35b600435906001600160a01b0382168203611c6557565b600080fd5b602435906001600160a01b0382168203611c6557565b604081019081106001600160401b03821117611c9b57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b03821117611c9b57604052565b9291926001600160401b038211611c9b5760405191611cfb601f8201601f191660200184611cb1565b829481845281830111611c65578281602093846000960137010152565b919082519283825260005b848110611d44575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201611d23565b9080601f83011215611c6557816020611d7493359101611cd2565b90565b6001600160401b038111611c9b5760051b60200190565b9080601f83011215611c65578135611da581611d77565b92611db36040519485611cb1565b81845260208085019260051b820101928311611c6557602001905b828210611ddb5750505090565b8135815260209182019101611dce565b906020808351928381520192019060005b818110611e095750505090565b8251845260209384019390920191600101611dfc565b6060600319820112611c65576004356001600160a01b0381168103611c6557916024356001600160401b038111611c655782611e5d91600401611d8e565b91604435906001600160401b038211611c6557611d7491600401611d8e565b906001600160a01b03821615611eb157600052600060205260406000209060018060a01b031660005260205260406000205490565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608490fd5b600354600881901c6001600160a01b031691908215611f255750565b60ff1615611f2f57565b73721c002b0059009a671d00ad1700c9748146cd1b9150565b90600182811c92168015611f78575b6020831014611f6257565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f57565b15611f8957565b60405162461bcd60e51b815260206004820152602360248201527f4f746865725368617264733a2063616c6c6572206973206e6f742061206d696e6044820152623a32b960e91b6064820152608490fd5b15611fe157565b60405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608490fd5b80518210156120515760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b1561206e57565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608490fd5b6001600160a01b0390811660009081526001602090815260408083209385168352929052205460ff16919082156120f95750565b60ff60035460a81c166121095750565b9091506001600160a01b0361211c611f09565b6001600160a01b0390921691161490565b6006546001600160a01b0316330361214157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b1561218c57565b60405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b919082018092116121e857565b634e487b7160e01b600052601160045260246000fd5b919290916001600160a01b0381169081156122198115612185565b612222856125f5565b9061222c876125f5565b825160005b818110612376575050866000526000602052604060002085600052602052604060002061225f8982546121db565b90558460006040518981528a60208201526000805160206127fb83398151915260403392a482519260005b8481106123415750505050503b6122a2575b50505050565b6122e69360006020946040519687958694859363f23a6e6160e01b85523360048601528560248601526044850152606484015260a0608484015260a4830190611d18565b03925af160009181612320575b50612300576105b9612640565b6001600160e01b031916630dc5919f60e01b01610638573880808061229c565b61233a91925060203d6020116106b8576106a98183611cb1565b90386122f3565b61234b818361203d565b50612356818461203d565b50831561236e57635cbd944160e01b60005260046000fd5b60010161228a565b612380818661203d565b5061238b818461203d565b5083156123a357635cbd944160e01b60005260046000fd5b600101612231565b156123b257565b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b1561240f57565b60405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b1561246957565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608490fd5b90916124d8611d7493604084526040840190611deb565b916020818403910152611deb565b156124ed57565b60405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b1561254557565b60405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608490fd5b1561259d57565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b6040908151916126058184611cb1565b600183526020830190601f1901368237825115612051575290565b90816020910312611c6557516001600160e01b031981168103611c655790565b60009060033d1161264d57565b905060046000803e60005160e01c90565b600060443d10611d74576040513d600319016004823e8051913d60248401116001600160401b038411176126cb57828201928351916001600160401b0383116126c3573d840160031901858401602001116126c35750611d7492910160200190611cb1565b949350505050565b92915050565b60809060208152603460208201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60608201520190565b909192612731611f09565b6000956001600160a01b03909116918261274f575b50505050505050565b82331461274657823b156127d657604051631854b24160e01b81526001600160a01b039485166004820152948416602486015294909216604484015260648301939093526084820152908290829060a490829084905af180156127cb576127bb575b8080808080612746565b816127c591611cb1565b386127b1565b6040513d84823e3d90fd5b8680fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a2646970667358221220c2a75325b9f145a1ee0f13f2ec7b4432c5a693d9f11f4ce2e424193034272ec764736f6c634300081c0033c3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62455243313135353a207472616e7366657220746f206e6f6e2d45524331313535526563656976657220696d706c656d656e746572000000000000000000000000455243313135353a204552433131353552656365697665722072656a656374650000000000000000000000000000000000000000000000000000000000000060000000000000000000000000daf93e02c8d01c3c005cd1ec04a2e773412b8bf200000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000004c697066733a2f2f626166796265696334706b36686265723563346f72356b37336b6b78636a7674776761643234336a7273367a37683537683570346c35736b696a612f7b69647d2e6a736f6e0000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436101561001257600080fd5b6000803560e01c8062fdd58e14611c1f5780630146354614611bf057806301ffc9a714611b3557806302fe5305146119b257806304634d8d146118bb578063098144d41461188e5780630d705df6146118665780630e89341c14611782578063249b0ac81461171f5780632a55205a1461164e5780632eb2c2d6146113425780633092afd5146112d85780634e1273f4146111345780635944c753146110225780636221d13c14610ffc5780636b20c45414610e65578063715018a614610e08578063836a104014610db45780638da5cb5b14610d8b578063983b2d5614610cc55780639e05d24014610c53578063a22cb46514610b6d578063a9fc664e14610a5b578063d81d0a15146107d7578063e985e9c5146107a0578063f242432a14610406578063f2fde38b1461033d578063f46eccc4146102fe5763f5298aca1461015b57600080fd5b346102fb5760603660031901126102fb57610174611c4f565b6001600160a01b03811690604435906024359061019c903385149081156102e9575b50612067565b838315926101aa84156124e6565b6101b3836125f5565b946101bd826125f5565b93602092846040516101cf8682611cb1565b528751855b81811061029a57505090849291818452838552604084208360005285526040600020546102038282101561253e565b8285528486526040852084600052865281604060002091039055604051918252848201526000805160206127fb83398151915260403392a46102486040519182611cb1565b52825192845b848110610259578580f35b610263818361203d565b5061026e818461203d565b508380610292575b1561028a57635cbd944160e01b8652600486fd5b60010161024e565b506001610276565b909192939495506102ab818a61203d565b506102b6818861203d565b5087806102e1575b156102d257635cbd944160e01b8a5260048afd5b9060018a9695949392016101d4565b5060016102be565b6102f5915033906120c5565b38610196565b80fd5b50346102fb5760203660031901126102fb5760209060ff906040906001600160a01b03610329611c4f565b168152600784522054166040519015158152f35b50346102fb5760203660031901126102fb57610357611c4f565b61035f61212d565b6001600160a01b031680156103b257600680546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b50346102fb5760a03660031901126102fb57610420611c4f565b610428611c6a565b60443591606435906084356001600160401b03811161079c5761044f903690600401611d59565b936001600160a01b0382169386903386148015610787575b61047991939250979695949397611fda565b6001600160a01b0382168015979092906104938915612408565b61049c836125f5565b906104a6866125f5565b9982519a8a9b8c93818b15955b1061070f575050908a9493929186865285602052604086208a6000526020526040600020546104e48a821015612462565b87875286602052604087208b6000526020528960406000209103905586865285602052604086208860005260205260406000206105228a82546121db565b9055878a6040518981528b60208201526000805160206127fb83398151915260403392a4835193865b8581106106bf575050505050503b6105605780f35b6020946105a06040519788968795869463f23a6e6160e01b865233600487015260248601526044850152606484015260a0608484015260a4830190611d18565b03925af182918161068e575b50610618576105b9612640565b6308c379a0146105e1575b60405162461bcd60e51b8152806105dd600482016126d1565b0390fd5b6105e961265e565b806105f457506105c4565b60405162461bcd60e51b8152602060048201529081906105dd906024830190611d18565b6001600160e01b031916630dc5919f60e01b016106385781808080808580f35b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b6106b191925060203d6020116106b8575b6106a98183611cb1565b810190612620565b90836105ac565b503d61069f565b90919293949596506106d1818361203d565b506106dc818461203d565b508480610708575b156106f857635cbd944160e01b8d5260048dfd5b9060018d9796959493920161054b565b50836106e4565b6107198e8761203d565b519d610725818561203d565b518680610780575b1561074157635cbd944160e01b8f5260048ffd5b908e9f9d9e999a9b9c9d6001928815610768575b5050019d50969b9a99989796818e6104b3565b8761075557610779918b8633612726565b3880610755565b508561072d565b5061047961079533866120c5565b9050610467565b8580fd5b50346102fb5760403660031901126102fb5760206107cd6107bf611c4f565b6107c7611c6a565b906120c5565b6040519015158152f35b50346102fb576107e636611e1f565b33845260076020526107fe60ff604086205416611f82565b6020936040519161080f8684611cb1565b8183526001600160a01b03851680159590939061082c8715612185565b61083986518451146123ab565b8551845b818110610a1e575050835b8651811015610890578061085e6001928661203d565b51610869828a61203d565b518752868b5261088860408c818a206000918c835252209182546121db565b905501610848565b50909194929584876040516000805160206127db8339815191523391806108b88c8b836124c1565b0390a4835190875b8281106109eb575050503b6108d3578480f35b9161091385610925959361093789966040519889978896879563bc197c8160e01b875233600488015287602488015260a0604488015260a4870190611deb565b85810360031901606487015290611deb565b83810360031901608485015290611d18565b03925af18291816109cc575b506109a95782610951612640565b6308c379a0146109745760405162461bcd60e51b8152806105dd600482016126d1565b61097c61265e565b908161098857506105c4565b6105dd60405192839262461bcd60e51b845260048401526024830190611d18565b9091506001600160e01b0319166343e6837f60e01b016106385780388080808480f35b6109e4919250843d86116106b8576106a98183611cb1565b9038610943565b6109f5818761203d565b50610a00818961203d565b508115610a1657635cbd944160e01b8952600489fd5b6001016108c0565b610a2c818998979a9961203d565b50610a37818661203d565b508715610a4d57635cbd944160e01b8952600489fd5b60019098959697980161083d565b50346102fb5760203660031901126102fb57610a75611c4f565b90610a7e61212d565b6001600160a01b0382168015159283813b1581610b65575b50610b565782937fcc5dc080ff977b3c3a211fa63ab74f90f658f5ba9d3236e92c8f59570f442aac6040610ac8611f09565b81516001600160a01b03909116815260208101869052a1600380546001600160a81b031916600884901b610100600160a81b0316176001179055610b0a575050f35b3b610b125750f35b803b15610b535781809160446040518095819363fb2de5d760e01b835230600484015261048360248401525af1610b47579050f35b610b5091611cb1565b80f35b50fd5b6332483afb60e01b8352600483fd5b905038610a96565b50346102fb5760403660031901126102fb57610b87611c4f565b60243590811515809203610c4f576001600160a01b031690338214610bf8573383526001602052604083208284526020526040832060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608490fd5b8280fd5b50346102fb5760203660031901126102fb57600435801515809103610cc15760207f6787c7f9a80aa0f5ceddab2c54f1f5169c0b88e75dd5e19d5e858a64144c7dbc91610c9e61212d565b6003805460ff60a81b191660a883901b60ff60a81b16179055604051908152a180f35b5080fd5b50346102fb5760203660031901126102fb57610cdf611c4f565b610ce761212d565b6001600160a01b03168015610d3a576020817f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69284526007825260408420600160ff19825416179055604051908152a180f35b60405162461bcd60e51b815260206004820152602360248201527f4f746865725368617264733a206d696e746572206973207a65726f206164647260448201526265737360e81b6064820152608490fd5b50346102fb57806003193601126102fb576006546040516001600160a01b039091168152602090f35b50346102fb5760603660031901126102fb57610b50610dd1611c6a565b3383526007602052610de960ff604085205416611f82565b60405190610df8602083611cb1565b83825260443590600435906121fe565b50346102fb57806003193601126102fb57610e2161212d565b600680546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102fb57610e7436611e1f565b6001600160a01b03831692909190610e96903385149081156102e95750612067565b821592610ea384156124e6565b610eb082518451146123ab565b60209185604051610ec18582611cb1565b528051865b818110610fbb575050855b868251821015610f32575080610ee96001928461203d565b51610ef4828861203d565b51818a5289875260408a20868b52875260408a205491610f168284101561253e565b8a5289875260408a20868b52875260408a209103905501610ed1565b828787838881896040516000805160206127db833981519152339180610f59898c836124c1565b0390a4610f696040519182611cb1565b52825192845b848110610f7a578580f35b610f84818361203d565b50610f8f818461203d565b508380610fb3575b15610fab57635cbd944160e01b8652600486fd5b600101610f6f565b506001610f97565b610fc5818461203d565b50610fd0818761203d565b508680610ff4575b15610fec57635cbd944160e01b8852600488fd5b600101610ec6565b506001610fd8565b50346102fb57806003193601126102fb57602060ff60035460a81c166040519015158152f35b50346102fb5760603660031901126102fb5760043561103f611c6a565b6044356001600160601b0381169291908390036111305761105e61212d565b61106c612710841115612596565b6001600160a01b03169182156110ed5760207f7f5b076c952c0ec86e5425963c1326dd0f03a3595c19f81d765e8ff559a6e33c916040516110ac81611c80565b8581528281018281528588526005845260408089209251915160a01b6001600160a01b0319166001600160a01b03929092169190911790915551908152a380f35b60405162461bcd60e51b815260206004820152601b60248201527a455243323938313a20496e76616c696420706172616d657465727360281b6044820152606490fd5b8380fd5b50346102fb5760403660031901126102fb576004356001600160401b038111610cc15736602382011215610cc157806004013561117081611d77565b9161117e6040519384611cb1565b8183526024602084019260051b820101903682116112d457602401915b8183106112b4575050506024356001600160401b038111610c4f576111c4903690600401611d8e565b815181510361125d578151926111d984611d77565b936111e76040519586611cb1565b8085526111f6601f1991611d77565b013660208601375b8251811015611243576001906112326001600160a01b0361121f838761203d565b511661122b838661203d565b5190611e7c565b61123c828761203d565b52016111fe565b6040516020808252819061125990820187611deb565b0390f35b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608490fd5b82356001600160a01b038116810361079c5781526020928301920161119b565b8480fd5b50346102fb5760203660031901126102fb577fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb666926020611315611c4f565b61131d61212d565b6001600160a01b0316808452600782526040808520805460ff1916905551908152a180f35b50346102fb5760a03660031901126102fb5761135c611c4f565b611364611c6a565b6044356001600160401b03811161113057611383903690600401611d8e565b906064356001600160401b0381116112d4576113a3903690600401611d8e565b6084356001600160401b03811161079c576113c2903690600401611d59565b6001600160a01b03851693903385148015611639575b6113e190611fda565b6113ee82518451146123ab565b6001600160a01b038416801580159791959161140989612408565b8451908a9989159a5b8381106115cd5750505050885b8985518210156114a757508060406114396001938861203d565b518a8d611446858c61203d565b5193818486935280602052818120848252602052818120549361146b84861015612462565b8582528160205282822090825260205220910390558c528b60205260408c20898d5260205261149f60408d209182546121db565b90550161141f565b93969598905085888a6000805160206127db833981519152604051806114cf33948c836124c1565b0390a4845191845b83811061158157505050503b6114ea5780f35b60209461152761091395610925604051998a988997889663bc197c8160e01b8852336004890152602488015260a0604488015260a4870190611deb565b03925af1829181611560575b50611540576105b9612640565b6001600160e01b0319166343e6837f60e01b016106385738808080808580f35b61157a91925060203d6020116106b8576106a98183611cb1565b9038611533565b909192939450611591818761203d565b5061159c818b61203d565b5082806115c6575b156115b857635cbd944160e01b8b5260048bfd5b9060018b95949392016114d7565b50816115a4565b6115d7818961203d565b516115e2828b61203d565b518d80611632575b156115fe57635cbd944160e01b8f5260048ffd5b9060019291848f15611614575b50505001611412565b61161f575b8461160b565b61162b91898733612726565b3880611619565b50866115ea565b506113e161164733886120c5565b90506113d8565b50346102fb5760403660031901126102fb576024356004358252600560205260408220916040519261167f84611c80565b546001600160a01b03811680855260a09190911c6020850152156116f3575b60208301516001600160601b031682810292801590840490911417156116df57509051604080516001600160a01b0390921682526127109092046020820152f35b634e487b7160e01b81526011600452602490fd5b60405190925061170281611c80565b6004546001600160a01b038116825260a01c60208201529161169e565b50346102fb5760803660031901126102fb57611739611c4f565b606435906001600160401b038211610c4f5761175c610b50923690600401611d59565b90338452600760205261177560ff604086205416611f82565b60443590602435906121fe565b50346102fb5760203660031901126102fb576040519080600254906117a682611f48565b808552916001811690811561183f57506001146117e2575b611259846117ce81860382611cb1565b604051918291602083526020830190611d18565b600281527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace939250905b808210611825575090915081016020016117ce826117be565b91926001816020925483858801015201910190929161180c565b60ff191660208087019190915292151560051b850190920192506117ce91508390506117be565b50346102fb57806003193601126102fb57604090815190631854b24160e01b82526020820152f35b50346102fb57806003193601126102fb5760206118a9611f09565b6040516001600160a01b039091168152f35b50346102fb5760403660031901126102fb576118d5611c4f565b602435906001600160601b03821690818303611130576118f361212d565b611901612710831115612596565b6001600160a01b031691821561197157816020917f8a8bae378cb731c5c40b632330c6836c2f916f48edb967699c86736f9a6a76ef938360405161194481611c80565b87815201526001600160a01b03851660a09190911b6001600160a01b03191617600455604051908152a280f35b60405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606490fd5b50346102fb5760203660031901126102fb576004356001600160401b038111610cc15736602382011215610cc1576119f4903690602481600401359101611cd2565b906119fd61212d565b81516001600160401b038111611b2157611a18600254611f48565b601f8111611abe575b50602092601f8211600114611a5e57928293829392611a53575b50508160011b916000199060031b1c19161760025580f35b015190503880611a3b565b601f198216936002845280842091845b868110611aa65750836001959610611a8d575b505050811b0160025580f35b015160001960f88460031b161c19169055388080611a81565b91926020600181928685015181550194019201611a6e565b600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c81019160208410611b17575b601f0160051c01905b818110611b0c5750611a21565b838155600101611aff565b9091508190611af6565b634e487b7160e01b82526041600452602482fd5b50346102fb5760203660031901126102fb5760043563ffffffff60e01b8116809103610cc15760209063152a902d60e11b8114908115611b7b575b506040519015158152f35b632b435fdb60e21b811491508115611bdf575b8115611b9c575b5082611b70565b636cdb3d1360e11b811491508115611bce575b8115611bbd575b5082611b95565b6301ffc9a760e01b14905082611bb6565b6303a24d0760e21b81149150611baf565b63503e914d60e11b81149150611b8e565b50346102fb57806003193601126102fb57602060405173721c002b0059009a671d00ad1700c9748146cd1b8152f35b50346102fb5760403660031901126102fb576020611c47611c3e611c4f565b60243590611e7c565b604051908152f35b600435906001600160a01b0382168203611c6557565b600080fd5b602435906001600160a01b0382168203611c6557565b604081019081106001600160401b03821117611c9b57604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b03821117611c9b57604052565b9291926001600160401b038211611c9b5760405191611cfb601f8201601f191660200184611cb1565b829481845281830111611c65578281602093846000960137010152565b919082519283825260005b848110611d44575050826000602080949584010152601f8019910116010190565b80602080928401015182828601015201611d23565b9080601f83011215611c6557816020611d7493359101611cd2565b90565b6001600160401b038111611c9b5760051b60200190565b9080601f83011215611c65578135611da581611d77565b92611db36040519485611cb1565b81845260208085019260051b820101928311611c6557602001905b828210611ddb5750505090565b8135815260209182019101611dce565b906020808351928381520192019060005b818110611e095750505090565b8251845260209384019390920191600101611dfc565b6060600319820112611c65576004356001600160a01b0381168103611c6557916024356001600160401b038111611c655782611e5d91600401611d8e565b91604435906001600160401b038211611c6557611d7491600401611d8e565b906001600160a01b03821615611eb157600052600060205260406000209060018060a01b031660005260205260406000205490565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b6064820152608490fd5b600354600881901c6001600160a01b031691908215611f255750565b60ff1615611f2f57565b73721c002b0059009a671d00ad1700c9748146cd1b9150565b90600182811c92168015611f78575b6020831014611f6257565b634e487b7160e01b600052602260045260246000fd5b91607f1691611f57565b15611f8957565b60405162461bcd60e51b815260206004820152602360248201527f4f746865725368617264733a2063616c6c6572206973206e6f742061206d696e6044820152623a32b960e91b6064820152608490fd5b15611fe157565b60405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201526d195c881bdc88185c1c1c9bdd995960921b6064820152608490fd5b80518210156120515760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b1561206e57565b60405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608490fd5b6001600160a01b0390811660009081526001602090815260408083209385168352929052205460ff16919082156120f95750565b60ff60035460a81c166121095750565b9091506001600160a01b0361211c611f09565b6001600160a01b0390921691161490565b6006546001600160a01b0316330361214157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b1561218c57565b60405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b919082018092116121e857565b634e487b7160e01b600052601160045260246000fd5b919290916001600160a01b0381169081156122198115612185565b612222856125f5565b9061222c876125f5565b825160005b818110612376575050866000526000602052604060002085600052602052604060002061225f8982546121db565b90558460006040518981528a60208201526000805160206127fb83398151915260403392a482519260005b8481106123415750505050503b6122a2575b50505050565b6122e69360006020946040519687958694859363f23a6e6160e01b85523360048601528560248601526044850152606484015260a0608484015260a4830190611d18565b03925af160009181612320575b50612300576105b9612640565b6001600160e01b031916630dc5919f60e01b01610638573880808061229c565b61233a91925060203d6020116106b8576106a98183611cb1565b90386122f3565b61234b818361203d565b50612356818461203d565b50831561236e57635cbd944160e01b60005260046000fd5b60010161228a565b612380818661203d565b5061238b818461203d565b5083156123a357635cbd944160e01b60005260046000fd5b600101612231565b156123b257565b60405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608490fd5b1561240f57565b60405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b1561246957565b60405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608490fd5b90916124d8611d7493604084526040840190611deb565b916020818403910152611deb565b156124ed57565b60405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b1561254557565b60405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608490fd5b1561259d57565b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b6040908151916126058184611cb1565b600183526020830190601f1901368237825115612051575290565b90816020910312611c6557516001600160e01b031981168103611c655790565b60009060033d1161264d57565b905060046000803e60005160e01c90565b600060443d10611d74576040513d600319016004823e8051913d60248401116001600160401b038411176126cb57828201928351916001600160401b0383116126c3573d840160031901858401602001116126c35750611d7492910160200190611cb1565b949350505050565b92915050565b60809060208152603460208201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60608201520190565b909192612731611f09565b6000956001600160a01b03909116918261274f575b50505050505050565b82331461274657823b156127d657604051631854b24160e01b81526001600160a01b039485166004820152948416602486015294909216604484015260648301939093526084820152908290829060a490829084905af180156127cb576127bb575b8080808080612746565b816127c591611cb1565b386127b1565b6040513d84823e3d90fd5b8680fdfe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62a2646970667358221220c2a75325b9f145a1ee0f13f2ec7b4432c5a693d9f11f4ce2e424193034272ec764736f6c634300081c0033

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

0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000daf93e02c8d01c3c005cd1ec04a2e773412b8bf200000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000004c697066733a2f2f626166796265696334706b36686265723563346f72356b37336b6b78636a7674776761643234336a7273367a37683537683570346c35736b696a612f7b69647d2e6a736f6e0000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : uri_ (string): ipfs://bafybeic4pk6hber5c4or5k73kkxcjvtwgad243jrs6z7h57h5p4l5skija/{id}.json
Arg [1] : royaltyReceiver_ (address): 0xdAF93E02C8d01C3c005Cd1eC04A2e773412B8BF2
Arg [2] : royaltyFeeNumerator_ (uint96): 1000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 000000000000000000000000daf93e02c8d01c3c005cd1ec04a2e773412b8bf2
Arg [2] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [3] : 000000000000000000000000000000000000000000000000000000000000004c
Arg [4] : 697066733a2f2f626166796265696334706b36686265723563346f72356b3733
Arg [5] : 6b6b78636a7674776761643234336a7273367a37683537683570346c35736b69
Arg [6] : 6a612f7b69647d2e6a736f6e0000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
0x55DfE03618b6f83301C6cD85B9f9Abd3bF382B79
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

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